114 m_contactMaterials.resize( 4,
nullptr );
125 if ( materialIndex < m_contactMaterials.size() )
127 m_contactMaterials[ materialIndex ] = contactMaterial;
139 if ( materialIndex < m_contactMaterials.size() )
141 return m_contactMaterials[
static_cast< agx::UInt32 >( excavationMode ) ];
168 size_t numContacts );
agx::Vec3 AGXTERRAIN_EXPORT calculateGravityVector(agxSDK::Simulation *simulation, const agx::Vec3 &position)
Utility method for calculating the gravity vector given a point.
AGXTERRAIN_EXPORT void setShovelExplicitShovelContactMaterial(agx::ContactMaterial *shovelAggregateCM, agx::Real contactArea, const agx::ContactMaterial *sourceMaterial, const agx::RealVector &weights, TerrainToolCollection *collection)
Set the shovel-aggregate contact material properties from a source contact material that should be a ...
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes...
agx::Real AGXTERRAIN_EXPORT estimateContactDepth(agx::ContactMaterial *contactMaterial, TerrainToolCollection *collection, agx::Real contactVelocity, agx::Real contactGravity, agx::Real contactArea, agx::Real elasticRestLength, size_t numContacts)
Utility method for estimating the contact depth of a shovel <-> aggregate contact from contact veloci...
AGXTERRAIN_EXPORT void setShovelAggregateContactMaterialProperties(agx::ContactMaterial *shovelAggregateCM, agx::Real contactArea, const agx::RealVector &weights, TerrainToolCollection *collection)
Set the shovel-aggregate contact material properties from a source contact material that should eithe...
#define AGX_DECLARE_POINTER_TYPES(type)
ExcavationMode
Enum for describing the different excavation modes of a shovel: PRIMARY - The primary mode of excavat...
Base class providing referencing counted objects.
The geometry representation used by the collision detection engine.
AGXTERRAIN_EXPORT bool setupShovelAggregateContactMaterial(agx::ContactMaterial *shovelAggregateCM, agx::Real contactArea, Shovel::ExcavationMode mode, TerrainToolCollection *collection, const agx::RealVector &weights)
Configure the contact material that is to be used in shovel-aggregate contacts.
agx::Real AGXTERRAIN_EXPORT calculateGv(agx::Vec3 normal, agx::Vec3 point, const agx::RigidBody *rb1, const agx::RigidBody *rb2)
Utility method for calculating the relative velocity of two bodies in a contact normal direction...
#define AGXTERRAIN_EXPORT
The rigid body class, combining a geometric model and a frame of reference.
Main material class which acts as a holder of a Surface Material and a Bulk material.
AGXTERRAIN_EXPORT agx::Material * findShovelMaterial(agxTerrain::Shovel *shovel)
Find the agx::Material on the first contact valid contact geometry in the specified shovel...
AGXTERRAIN_EXPORT agxCollide::Geometry * getFirstContactValidGeometry(const agx::RigidBody *shovelBody)
Get first contact valid geometry in the shovel rigid body for contact.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
#define AGX_DECLARE_VECTOR_TYPES(type)
AGXTERRAIN_EXPORT bool isValidContactGeometry(agxCollide::Geometry *geometry)
Checks if the specified geometry is valid for creating aggregate contacts against.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()