|
AGXDynamics
2.31.1.0
|
Interface class for accessing data and functions for the internal soil particle simulation used in agxTerrain. More...
#include <SoilSimulationInterface.h>
Inheritance diagram for agxTerrain::SoilSimulationInterface:Public Member Functions | |
| SoilSimulationInterface (Terrain *terrain) | |
| Construct given terrain instance. More... | |
| SoilSimulationInterface () | |
| void | addCollisionGroup (agx::UInt32 id) |
Add the specified id to a vector of group id, this will make the created soil particles part of the group id. More... | |
| void | addCollisionGroup (const agx::Name &name) |
| 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 |
| agx::Real | calculateSoilParticleBulkVolume () const |
| agx::Real | calculateSoilParticleSpecificVolume () const |
| agx::Physics::GranularBodyPtr | createSoilParticle (const agx::Vec3 &position=agx::Vec3(), const agx::Vec3 &velocity=agx::Vec3()) |
| Create a soil particle with nominal radius and material in the internal soil simulation. More... | |
| agx::Physics::GranularBodyPtr | createSoilParticle (agx::Real radius, const agx::Vec3 &position=agx::Vec3(), const agx::Vec3 &velocity=agx::Vec3()) |
| Create a soil particle with specified radius and material in the internal soil simulation. More... | |
| agx::Physics::GranularBodySystem * | getGranularBodySystem () const |
| Returns the internal GranularBodySystem used to simulate the soil particles. More... | |
| size_t | getNumSoilParticles () const |
| Get the number of soil particles active in the soil simulation. More... | |
| const agxCollide::ParticleGeometryContactVector & | getParticleGeometryContacts () const |
| Returns the particle-geometry contacts in the internal soil simulation. More... | |
| const agxCollide::ParticlePairContactVector & | getParticleParticleContacts () const |
| Returns the particle-particle contacts in the internal soil simulation. More... | |
| int | getReferenceCount () const |
| agx::Bound3 | getSoilParticleBound () const |
| Get the complete bound of the soil particle system active in the simulation. More... | |
| SoilParticleArray | getSoilParticles () const |
| Get the soil particles active in the simulation. More... | |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isGeometryPtrValid (agx::Physics::GeometryPtr geometry) const |
| bool | isParticleGeometryContactValid (agx::Physics::ParticleGeometryContactPtr contact) |
| bool | isParticlePairContactValid (agx::Physics::ParticlePairContactPtr contact) |
| bool | isValid (agx::Physics::GranularBodyPtr ptr) const |
| 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 | removeCollisionGroup (agx::UInt32 id) |
| Remove a group id from the vector of group ids. More... | |
| void | removeCollisionGroup (const agx::Name &name) |
| void | removeSoilParticle (agx::Physics::GranularBodyPtr ptr) |
| Tag a soil particle for removal at the last stages of the current time step. 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... | |
Static Public Member Functions | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| ~SoilSimulationInterface () | |
| agx::Physics::GranularBodyPtr | _createSoilParticle (agx::Real radius, const agx::Vec3 &position, const agx::Vec3 &velocity, agx::Material *material) |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | initGranularBodySystem () |
| bool | isLastTerrain () |
| bool | isTerrainPagerActive () |
Static Protected Member Functions | |
| 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 | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Interface class for accessing data and functions for the internal soil particle simulation used in agxTerrain.
Definition at line 36 of file SoilSimulationInterface.h.
| agxTerrain::SoilSimulationInterface::SoilSimulationInterface | ( | Terrain * | terrain | ) |
Construct given terrain instance.
| terrain | - terrain instance |
| agxTerrain::SoilSimulationInterface::SoilSimulationInterface | ( | ) |
|
protected |
|
protected |
| void agxTerrain::SoilSimulationInterface::addCollisionGroup | ( | agx::UInt32 | id | ) |
Add the specified id to a vector of group id, this will make the created soil particles part of the group id.
By default, the created soil particles are not part of any group.
This can be used to partition the simulation where some groups cannot collide with other groups. Which groups that can collide or not is determined by Space and can be set using the method agxCollide::Space::setEnablePair(id1,id2);
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| agx::Real agxTerrain::SoilSimulationInterface::calculateSoilParticleBulkVolume | ( | ) | const |
| agx::Real agxTerrain::SoilSimulationInterface::calculateSoilParticleSpecificVolume | ( | ) | const |
| agx::Physics::GranularBodyPtr agxTerrain::SoilSimulationInterface::createSoilParticle | ( | const agx::Vec3 & | position = agx::Vec3(), |
| const agx::Vec3 & | velocity = agx::Vec3() |
||
| ) |
Create a soil particle with nominal radius and material in the internal soil simulation.
| position | - initial position of the created soil particle in world space. |
| velocity | - initial velocity of the created soil particle in world space. |
| agx::Physics::GranularBodyPtr agxTerrain::SoilSimulationInterface::createSoilParticle | ( | agx::Real | radius, |
| const agx::Vec3 & | position = agx::Vec3(), |
||
| const agx::Vec3 & | velocity = agx::Vec3() |
||
| ) |
Create a soil particle with specified radius and material in the internal soil simulation.
| radius | - radius of the created soil particle. If negative, no particle will be created. |
| position | - initial position of the created soil particle in world space. |
| velocity | - initial velocity of the created soil particle in world space. |
|
protectedinherited |
|
staticprotectedinherited |
| agx::Physics::GranularBodySystem* agxTerrain::SoilSimulationInterface::getGranularBodySystem | ( | ) | const |
Returns the internal GranularBodySystem used to simulate the soil particles.
| size_t agxTerrain::SoilSimulationInterface::getNumSoilParticles | ( | ) | const |
Get the number of soil particles active in the soil simulation.
| const agxCollide::ParticleGeometryContactVector& agxTerrain::SoilSimulationInterface::getParticleGeometryContacts | ( | ) | const |
Returns the particle-geometry contacts in the internal soil simulation.
| const agxCollide::ParticlePairContactVector& agxTerrain::SoilSimulationInterface::getParticleParticleContacts | ( | ) | const |
Returns the particle-particle contacts in the internal soil simulation.
|
inherited |
| agx::Bound3 agxTerrain::SoilSimulationInterface::getSoilParticleBound | ( | ) | const |
Get the complete bound of the soil particle system active in the simulation.
| SoilParticleArray agxTerrain::SoilSimulationInterface::getSoilParticles | ( | ) | const |
Get the soil particles active in the simulation.
|
protected |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
| bool agxTerrain::SoilSimulationInterface::isGeometryPtrValid | ( | agx::Physics::GeometryPtr | geometry | ) | const |
|
protected |
| bool agxTerrain::SoilSimulationInterface::isParticleGeometryContactValid | ( | agx::Physics::ParticleGeometryContactPtr | contact | ) |
| bool agxTerrain::SoilSimulationInterface::isParticlePairContactValid | ( | agx::Physics::ParticlePairContactPtr | contact | ) |
|
protected |
| bool agxTerrain::SoilSimulationInterface::isValid | ( | agx::Physics::GranularBodyPtr | ptr | ) | const |
Definition at line 179 of file SoilSimulationInterface.h.
References agx::ref_ptr< T >::isValid().
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
| void agxTerrain::SoilSimulationInterface::removeCollisionGroup | ( | agx::UInt32 | id | ) |
Remove a group id from the vector of group ids.
| id | - The group id to be removed |
| void agxTerrain::SoilSimulationInterface::removeSoilParticle | ( | agx::Physics::GranularBodyPtr | ptr | ) |
Tag a soil particle for removal at the last stages of the current time step.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.