AGX Dynamics  2.37.2.0
agxModel::ConvexSoil Class Reference

#include <TerrainParticles.h>

+ Inheritance diagram for agxModel::ConvexSoil:

Public Member Functions

 ConvexSoil (const agx::Vec3Vector *vertices, const agx::UInt32Vector *indices)
 Create a convex body representing digged up soil. More...
 
const char * getClassName () const override
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual agx::Real getVolume () const override
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agxModel::SoilParticle
 SoilParticle (agx::Real radius, ParticleAttributes::SoilType type)
 Specifies the type of the SoilParticle. More...
 
SoilParticle * getParent () const
 
agx::Real getRadius () const
 
bool getSeedContact () const
 
ParticleAttributes::SoilType getType () const
 
bool hasParent () const
 
bool isParent () const
 
void setParent (SoilParticle *parent)
 Set a parent to the particle in a soil particle contact graph. More...
 
void setSeedContact ()
 Set that this particle is a seed. More...
 
- Public Member Functions inherited from agx::RigidBody
 RigidBody (const agx::Name &name="")
 Construct given name. More...
 
 RigidBody (agxCollide::Geometry *geometry)
 Construct given geometry. More...
 
bool add (agxCollide::Geometry *geometry, const agx::AffineMatrix4x4 &localTransform, bool incrementalMassCalculation=false)
 Connect a geometry to this rigid body. More...
 
bool add (agxCollide::Geometry *geometry, bool incrementalMassCalculation=false)
 Add a geometry to this rigid body. More...
 
bool addAttachment (agx::Frame *frame, const agx::String &name)
 Add a named attachment frame to this rigid body. More...
 
void addForce (const agx::Vec3 &force)
 Add the specified force, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
void addForce (agx::Real fx, agx::Real fy, agx::Real fz)
 Add the specified force, fx fy fz, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
void addForceAtLocalCmPosition (const agx::Vec3 &force, const agx::Vec3 &position)
 Add a force given in world coordinate frame, applied at a point specified in the local Center of Mass coordinate frame. More...
 
void addForceAtLocalCmPosition (agx::Real fx, agx::Real fy, agx::Real fz, agx::Real px, agx::Real py, agx::Real pz)
 Add a force given in world coordinate frame, applied at a point specified in the local Center of Mass coordinate frame. More...
 
void addForceAtLocalPosition (const agx::Vec3 &force, const agx::Vec3 &position)
 Add a force, given in the world coordinate frame, applied at a point specified in the local Model coordinate frame. More...
 
void addForceAtLocalPosition (agx::Real fx, agx::Real fy, agx::Real fz, agx::Real px, agx::Real py, agx::Real pz)
 Add a force given in world coordinate frame, applied at a point specified in local coordinate model frame. More...
 
void addForceAtPosition (const agx::Vec3 &force, const agx::Vec3 &position)
 Add a force, given in the World coordinate frame, applied at a point specified in world coordinate frame. More...
 
void addForceAtPosition (agx::Real fx, agx::Real fy, agx::Real fz, agx::Real px, agx::Real py, agx::Real pz)
 Add a force, given in the world coordinate frame, applied at a point specified in the world coordinate frame. More...
 
void addLocalTorque (agx::Real tx, agx::Real ty, agx::Real tz)
 Adds the specified torque, given in Center of Mass coordinate frame that will be affecting this body in the next solve. More...
 
void addLocalTorque (const agx::Vec3 &torque)
 Adds the specified torque, given in Center of Mass coordinate frame that will be affecting this body in the next solve. More...
 
void addTorque (const agx::Vec3 &torque)
 Adds the specified torque, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
void addTorque (agx::Real tx, agx::Real ty, agx::Real tz)
 Adds the specified torque, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
agx::Vec3 calculateCenterOfMassOffset (agx::Real mass=agx::Real()) const
 Calculate the center of mass offset of this rigid body using the volume and density of the added geometries. More...
 
agx::Real calculateMass () const
 Calculate the mass of this rigid body using the volume and density of added geometries. More...
 
RigidBody * clone (bool shallowCopyRenderData=false) const
 Create a clone of the rigid body. More...
 
agx::Vec3 getAcceleration () const
 Will always be 0 for KINEMATIC and STATIC bodies. More...
 
agx::Vec3 getAngularAcceleration () const
 Will always be 0 for KINEMATIC and STATIC bodies. More...
 
agx::Vec3 getAngularMomentum () const
 
agx::Vec3 getAngularVelocity () const
 Angular velocity in world coordinate frame. More...
 
agx::Vec3f getAngularVelocityDamping () const
 
agx::Vec3f getAngularVelocityZeroDamping () const
 
Frame * getAttachment (const agx::String &name)
 Access a named attachment frame. More...
 
agx::RigidBody::AutoSleepProperties & getAutoSleepProperties ()
 
const agx::RigidBody::AutoSleepProperties & getAutoSleepProperties () const
 
agx::AutoSleepThreshold * getAutoSleepThreshold ()
 Returns custom auto-sleep parameters for this rigid body. More...
 
const agx::AutoSleepThreshold * getAutoSleepThreshold () const
 Returns custom auto-sleep parameters for this rigid body. More...
 
agx::MergeSplitBodyStorage * getBodyStorage ()
 Internal method. More...
 
const agx::MergeSplitBodyStorage * getBodyStorage () const
 Internal method. More...
 
agx::Frame * getCmFrame ()
 Return the center of mass (CM) frame of this rigid body. More...
 
const agx::Frame * getCmFrame () const
 Return the center of mass (CM) frame of this rigid body. More...
 
agx::Vec3 getCmLocalTranslate () const
 
agx::Vec3 getCmPosition () const
 
agx::Quat getCmRotation () const
 
const agx::AffineMatrix4x4 & getCmTransform () const
 Convenience methods for center of mass frame. More...
 
agx::Referenced * getCustomData () const
 
bool getEnable () const
 Access the state enable flag. More...
 
agx::Physics::RigidBodyPtr getEntity () const
 Internal method. More...
 
agx::Vec3 getForce () const
 
agx::Frame * getFrame ()
 Returns the model frame containing model the transformation and utilities to manipulate position, rotation etc. More...
 
const agx::Frame * getFrame () const
 Returns the model frame containing model the transformation and utilities to manipulate position, rotation etc. More...
 
const agxCollide::GeometryRefVector & getGeometries () const
 
const agxCollide::Geometry * getGeometry (const agx::Name &name) const
 Find (linear search) the first Geometry in the RigidBody with a matching name. More...
 
agxCollide::Geometry * getGeometry (const agx::Name &name)
 Find (linear search) the first Geometry in the RigidBody with a matching name. More...
 
bool getHandleAsParticle () const
 
agx::UInt32 getId () const
 Internal method. More...
 
agx::Vec3 getLastForce () const
 Access the summed force applied to this rigid body last time the system was integrated. More...
 
agx::Vec3 getLastTorque () const
 Access the summed torque applied to this rigid body last time the system was integrated. More...
 
agx::Vec3 getLinearMomentum () const
 
agx::Vec3f getLinearVelocityDamping () const
 
agx::Vec3f getLinearVelocityZeroDamping () const
 
agx::Vec3 getLocalPosition () const
 
agx::Quat getLocalRotation () const
 
const agx::AffineMatrix4x4 & getLocalTransform () const
 
const agx::MassProperties * getMassProperties () const
 
agx::MassProperties * getMassProperties ()
 
agx::AffineMatrix4x4 getMergedWorldTransform () const
 If a body (child) is merged into a (parent) body the child will not get its transform (getTransform, getPosition, getRotation) updated by the ordinary integration method (as it is disabled). More...
 
agx::RigidBody::MergeSplitProperties & getMergeSplitProperties ()
 
const agx::RigidBody::MergeSplitProperties & getMergeSplitProperties () const
 
agx::MergeSplitThreshold * getMergeSplitThreshold ()
 Returns custom merge-split parameters for this rigid body. More...
 
const agx::MergeSplitThreshold * getMergeSplitThreshold () const
 Returns custom merge-split parameters for this rigid body. More...
 
agx::Vec3 getModelAcceleration (const agx::Vec3 &relPos=agx::Vec3()) const
 Calculates the linear acceleration at the given point relPos. More...
 
agx::Vec3 getModelVelocity (const agx::Vec3 &relPos=agx::Vec3()) const
 Calculates the linear velocity at the given point relPos. More...
 
agx::RigidBody::MotionControl getMotionControl () const
 
const agx::Name & getName () const
 
agx::UInt16 getNumConstraints () const
 
const agxCollide::GeometryRefVector & getOriginalGeometries () const
 Merge-split related. More...
 
agx::Frame * getParentFrame ()
 
const agx::Frame * getParentFrame () const
 
agx::Vec3 getPosition () const
 Current model frame position, given in world coordinate frame. More...
 
agx::PropertyContainer * getPropertyContainer () const
 Access property container of this rigid body. More...
 
agx::Quat getRotation () const
 Current model frame rotation, given in world coordinate frame. More...
 
agx::DynamicsSystem * getSystem ()
 
const agx::DynamicsSystem * getSystem () const
 
agx::Vec3 getTorque () const
 
const agx::AffineMatrix4x4 & getTransform () const
 Current model frame transform, given in world coordinate frame. More...
 
agx::Vec3 getVelocity () const
 Velocity of center of mass frame origin, in world coordinate frame. More...
 
bool hasBodyStorage () const
 
bool hasConstraints () const
 
bool hasPropertyContainer () const
 
bool hasValidEntityIndex () const
 
bool isEnabled () const
 Access the state enable flag. More...
 
bool isMerged () const
 
bool isPowerlineBody () const
 
void moveTo (const agx::AffineMatrix4x4 &target, agx::Real t)
 Utility method to calculate and assign linear- and angular velocity given a target transform and the time it should take to get there. More...
 
void moveTo (const agx::Vec3 &targetPosition, const agx::Quat &targetRotation, agx::Real t)
 Utility method to calculate and assign linear- and angular velocity given a target transform and the time it should take to get there. More...
 
bool remove (agxCollide::Geometry *geometry, bool incrementalMassCalculation=false)
 Remove geometry if geometry is part of this rigid body. More...
 
bool removeAttachment (const agx::String &name)
 Remove an attachment from the rigid body. More...
 
void setAngularVelocity (const agx::Vec3 &angularVelocity)
 Set the angular velocity of the center of mass of this rigid body. More...
 
void setAngularVelocity (agx::Real vx, agx::Real vy, agx::Real vz)
 Set the angular velocity of the center of mass of this rigid body. More...
 
void setAngularVelocityDamping (float damping)
 Set angular velocity damping for the body in all directions x, y and z. More...
 
void setAngularVelocityDamping (const agx::Vec3f &damping)
 Give angular velocity damping in each direction, given in local body coordinate frame. More...
 
void setAngularVelocityZeroDamping (const agx::Vec3f &dir)
 Specify a vector (in body coordinates) along which no angular velocity damping should occur. More...
 
void setAutoSleepThreshold (agx::AutoSleepThreshold *threshold)
 Assign custom auto-sleep parameters to this rigid body. More...
 
void setCmLocalTranslate (const agx::Vec3 &translate)
 Sets the local offset of the center of mass position to the model origin (in model frame coordinates). More...
 
void setCmPosition (const agx::Vec3 &p, bool synchronizeModel=true)
 Assign new center of mass position, given in world coordinate frame. More...
 
void setCmRotation (const agx::Quat &q)
 Assign new center of mass rotation, given in world coordinate frame. More...
 
void setCmRotation (const agx::EulerAngles &e)
 Assign new center of mass rotation, given in world coordinate frame. More...
 
void setCmRotation (const agx::OrthoMatrix3x3 &m)
 Assign new center of mass rotation, given in world coordinate frame. More...
 
void setCmTransform (const agx::AffineMatrix4x4 &matrix, bool synchronizeModel=true)
 Assign new center of mass transform, given in world coordinate frame. More...
 
void setCustomData (agx::Referenced *data)
 It's possible to derive from agx::Referenced and implement a reference counted object and associate it to this rigid body via this method. More...
 
void setEnable (bool enable)
 Change state enable of this rigid body. More...
 
void setEntity (agx::Physics::RigidBodyPtr entity)
 Internal method. More...
 
void setForce (const agx::Vec3 &force)
 Explicitly set the force, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
void setForce (agx::Real fx, agx::Real fy, agx::Real fz)
 Explicitly set the force, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
void setHandleAsParticle (bool handleAsParticle)
 Set this, six degrees of freedom, rigid body to be handled as a three degrees of freedom particle (rotational degrees of freedom ignored). More...
 
void setInertiaTensor (const agx::SPDMatrix3x3 &inertiaTensor, const agx::AffineMatrix4x4 &cmLocalTransform=agx::AffineMatrix4x4(), bool autogenerateCmOffset=false, bool autogenerateInertia=false)
 Convenience method for setting the inertia tensor from extern calculations given in local center of mass coordinate frame. More...
 
void setInertiaTensor (const agx::Vec3 &inertiaDiagonal, const agx::AffineMatrix4x4 &cmLocalTransform=agx::AffineMatrix4x4(), bool autogenerateCmOffset=false, bool autogenerateInertia=false)
 Convenience method for setting the inertia tensor from extern calculations, in diagonal form, given in local center of mass coordinate frame. More...
 
void setIsPowerlineBody (bool isHydraulicBody)
 Internal method. More...
 
void setLinearVelocityDamping (float damping)
 Set linear velocity damping for the body in all directions x, y and z. More...
 
void setLinearVelocityDamping (const agx::Vec3f &damping)
 Give linear velocity damping in each direction, given in local body coordinate frame. More...
 
void setLinearVelocityZeroDamping (const agx::Vec3f &dir)
 Specify a vector (in body coordinates) along which no linear velocity damping should occur. More...
 
void setLocalPosition (const agx::Vec3 &p)
 Set the position of the body relative to its model frame's parent frame. More...
 
void setLocalPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the body relative to its model frame's parent frame. More...
 
void setLocalRotation (const agx::Quat &q)
 Set the rotation of the body relative to its model frame's parent frame. More...
 
void setLocalRotation (const agx::EulerAngles &e)
 Set the rotation of the body relative to its model frame's parent frame. More...
 
void setLocalTransform (const agx::AffineMatrix4x4 &matrix)
 Assign the local transformation matrix for this body, ignoring any eventual parent transformation. More...
 
void setMergeSplitThreshold (agx::MergeSplitThreshold *threshold)
 Assign custom merge-split parameters to this rigid body. More...
 
void setMotionControl (agx::RigidBody::MotionControl control)
 Assign new motion control state to this rigid body. More...
 
void setName (const agx::Name &name)
 Assign new name to this rigid body. More...
 
bool setParentFrame (agx::Frame *frame)
 Set the parent frame of this body's model frame. More...
 
void setPosition (const agx::Vec3 &p)
 Set the position of the model frame in world coordinates. More...
 
void setPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the model frame in world coordinates. More...
 
void setPropertyContainer (agx::PropertyContainer *container)
 Assign new property container. More...
 
void setRotation (const agx::Quat &q)
 Set the rotation of the body relative to world frame. More...
 
void setRotation (const agx::EulerAngles &e)
 Set the rotation of the body relative to world frame. More...
 
void setRotation (const agx::OrthoMatrix3x3 &m)
 Set the rotation of the body relative to world frame. More...
 
void setTorque (const agx::Vec3 &torque)
 Explicitly set the torque, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
void setTorque (agx::Real tx, agx::Real ty, agx::Real tz)
 Explicitly set the torque, given in world coordinate frame, that will be affecting this body in the next solve. More...
 
void setTransform (const agx::AffineMatrix4x4 &matrix)
 Set the transform of the body. More...
 
void setVelocity (const agx::Vec3 &velocity)
 Set the linear velocity of the center of mass of this rigid body. More...
 
void setVelocity (agx::Real vx, agx::Real vy, agx::Real vz)
 Set the linear velocity of the center of mass of this rigid body. More...
 
void setVelocityDamping (float damping)
 Set both linear- and angular velocity damping in all directions. More...
 
void transfer (agxData::EntityStorage *storage)
 Internal method. More...
 
void updateMassProperties ()
 Method to explicitly update mass properties. More...
 
void updateMassProperties (agx::UInt32 mask)
 Method to explicitly update mass properties. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxModel::SoilParticle
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::RigidBody
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
static bool shouldIgnoreGravity (agx::RigidBodyState state)
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

 ConvexSoil ()
 
- Protected Member Functions inherited from agxModel::SoilParticle
 SoilParticle ()
 
- Protected Member Functions inherited from agx::RigidBody
 RigidBody (const agx::RigidBody &)
 
 RigidBody (const agx::Name &name, agx::Physics::RigidBodyPtr entity)
 
virtual ~RigidBody ()
 
void clearBodyStorage ()
 Clear the BodyStorage for this RigidBody. More...
 
void incrementalMassPropertyUpdate (agx::UInt32 mask, int sign, const agxCollide::Geometry *geometry)
 Will calculate new mass properties for this rigid body as the previously calculated one +/- the specified geometry. More...
 
RigidBody & operator= (const agx::RigidBody &)
 
void setBodyStorage (agx::MergeSplitBodyStorage *bodyStorage)
 Give this body a storage for merge-split. More...
 
void setId (agx::UInt32 id)
 Assign dynamics system unique id to this rigid body. More...
 
void setSystem (agx::DynamicsSystem *system)
 Assign dynamics system where this body belongs to. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Additional Inherited Members

- Public Types inherited from agx::RigidBody
enum  MotionControl { STATIC = 1, KINEMATICS = 2, DYNAMICS = 3 }
 The MotionControl enumeration indicates what makes a RigidBody move. More...
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 
- Protected Attributes inherited from agxModel::SoilParticle
ParticleAttributes::SoilType m_type
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Definition at line 242 of file TerrainParticles.h.

Constructor & Destructor Documentation

◆ ConvexSoil() [1/2]

agxModel::ConvexSoil::ConvexSoil ( const agx::Vec3Vector *  vertices,
const agx::UInt32Vector *  indices 
)

Create a convex body representing digged up soil.

◆ ConvexSoil() [2/2]

agxModel::ConvexSoil::ConvexSoil ( )
inlineprotected

Definition at line 257 of file TerrainParticles.h.

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agxModel::ConvexSoil::create ( )
inlinestatic

Definition at line 255 of file TerrainParticles.h.

◆ create() [2/2]

static agxStream::Serializable* agxModel::ConvexSoil::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 255 of file TerrainParticles.h.

◆ getClassName()

const char* agxModel::ConvexSoil::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxModel::SoilParticle.

Definition at line 255 of file TerrainParticles.h.

◆ getConstructClassId()

static const char* agxModel::ConvexSoil::getConstructClassId ( )
inlinestatic

Definition at line 255 of file TerrainParticles.h.

◆ getStorageAgent()

agxStream::StorageAgent* agxModel::ConvexSoil::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Reimplemented from agxModel::SoilParticle.

Definition at line 255 of file TerrainParticles.h.

◆ getVolume()

virtual agx::Real agxModel::ConvexSoil::getVolume ( ) const
overridevirtual
Returns
the volume of the convex soil.

Reimplemented from agxModel::SoilParticle.

◆ restore()

virtual void agxModel::ConvexSoil::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agxModel::SoilParticle.

◆ store()

virtual void agxModel::ConvexSoil::store ( agxStream::OutputArchive &  out) const
overridevirtual

Reimplemented from agxModel::SoilParticle.


The documentation for this class was generated from the following file: