|
AGX Dynamics 2.42.3.1
|
Class that can be used to extract data from elements in a simulation within a specified bound. More...
#include <AnalysisBox.h>
Inheritance diagram for agx::AnalysisBox:Public Types | |
| typedef HashSet< agx::Index > | ParticleIdSet |
Public Member Functions | |
| AnalysisBox (agxSDK::Simulation *simulation, const agx::Vec3 &halfVec, const agx::AffineMatrix4x4 &transform=agx::AffineMatrix4x4()) | |
| Constructor for the AnalysisBox. | |
| Real | calculateBodyMassInside (bool onlyIncludeEmittedBodies=false) |
| Return the body mass in the particles inside the Analysis Box. | |
| Real | calculateBoxVolume () const |
| Return the volume of the Analysis Box. | |
| Real | calculateBulkDensity () const |
| Return the estimated bulk density inside the Analysis Box based on the current contents. | |
| Real | calculateParticleMassInside () |
| Return the particle mass in the particles inside the Analysis Box. | |
| void | clearContentData () |
| Clears all content data inside the box. | |
| bool | containsParticle (agx::Index particleId) const |
| Returns true/false if the particle given the specified particle id is inside the box. | |
| bool | containsPoint (const agx::Vec3 &point) const |
| Returns true/false if the point is contained inside the Analysis Box bound. | |
| Real | estimateMassFlowInside (bool includeParticles=true, bool includeBodies=true) |
| Estimate the particle mass flow inside the Analysis Box. | |
| RigidBodyPtrVector | getBodiesInside () const |
| Returns the rigid bodies inside the Analysis Box. | |
| agx::Real | getBodyMassInside () const |
| Get rigid body mass inside bound from last content update. | |
| agx::Vec3 | getBoxCenter () const |
| Get the center point of the Analysis Box bound. | |
| agx::Vec3 | getBoxHalfVec () const |
| Get the half vector of the Analysis Box bound. | |
| agx::Quat | getBoxRotation () const |
| Get the rotation of the Analysis Box bound. | |
| bool | getEnable () const |
| Return true/false if the box is enabled. | |
| bool | getEnableRendering () const |
| Return true/false if the box rendering is enabled. | |
| agx::Vec3 | getLocalPositionInBox (const agx::Vec3 &worldPosition) const |
| Get the local position of the specified world position. | |
| size_t | getNumBodiesInside () |
| Get number of rigid bodies in bound from last content update. | |
| size_t | getNumParticlesInside () |
| Get number of particles in bound from last content update. | |
| agx::Real | getParticleMassInside () const |
| Get particle mass inside bound from last content update. | |
| ParticleIdSet | getParticlesInside () const |
| Returns the particles ids inside the Analysis Box. | |
| agx::Real | getTotalMassInside () const |
| Get total mass inside bound from last content update. | |
| agx::AffineMatrix4x4 | getTransform () const |
| Get the transform of the Analysis box. | |
| void | setBoxCenter (const agx::Vec3 ¢er) |
| Set the center of the Analysis Box bound. | |
| void | setBoxHalfVec (const agx::Vec3 &halfVec) |
| Set the half vector of the Analysis Box bound. | |
| void | setBoxRotation (const agx::Quat &rotation) |
| Set the rotation of the Analysis Box bound. | |
| void | setEnable (bool enable) |
| Set true/false to enable/enable the Analysis Box. | |
| void | setEnableRendering (bool enable) |
| Set true/false to enable/enable rendering of the Analysis Box. | |
| void | updateContents (bool includeRigidBodies=false, bool onlyIncludeEmittedBodies=false) |
| Update the analysis box contents. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Protected Member Functions | |
| virtual | ~AnalysisBox () |
| Virtual Destructor. | |
| agx::AffineMatrix4x4 | getInvTransform () const |
| agx::ParticleSystem * | getParticleSystem () |
| void | updateInvTransform () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Attributes | |
| agx::Real | m_bodyMassInside |
| agx::Bound3 | m_bound |
| bool | m_enabled |
| bool | m_enableDebugRenderContents |
| bool | m_enableRendering |
| agx::AffineMatrix4x4 | m_invBoxTransform |
| ParticleIdSet | m_particleIdsInside |
| agx::Real | m_particleMassInside |
| RigidBodyPtrVector | m_rigidBodiesInside |
| agxSDK::Simulation * | m_simulation |
| agx::AffineMatrix4x4 | m_transform |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
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. | |
Class that can be used to extract data from elements in a simulation within a specified bound.
Definition at line 30 of file AnalysisBox.h.
Definition at line 33 of file AnalysisBox.h.
| agx::AnalysisBox::AnalysisBox | ( | agxSDK::Simulation * | simulation, |
| const agx::Vec3 & | halfVec, | ||
| const agx::AffineMatrix4x4 & | transform = agx::AffineMatrix4x4() |
||
| ) |
Constructor for the AnalysisBox.
| simulation | The simulation to couple the analysis box too. |
| halfVec | Half vector that spans the box. |
| transform | The transformation of the analysis box, translation and rotation. |
|
protectedvirtual |
Virtual Destructor.
| Real agx::AnalysisBox::calculateBodyMassInside | ( | bool | onlyIncludeEmittedBodies = false | ) |
Return the body mass in the particles inside the Analysis Box.
| Real agx::AnalysisBox::calculateBoxVolume | ( | ) | const |
Return the volume of the Analysis Box.
| Real agx::AnalysisBox::calculateBulkDensity | ( | ) | const |
Return the estimated bulk density inside the Analysis Box based on the current contents.
| Real agx::AnalysisBox::calculateParticleMassInside | ( | ) |
Return the particle mass in the particles inside the Analysis Box.
| void agx::AnalysisBox::clearContentData | ( | ) |
Clears all content data inside the box.
| bool agx::AnalysisBox::containsParticle | ( | agx::Index | particleId | ) | const |
Returns true/false if the particle given the specified particle id is inside the box.
| bool agx::AnalysisBox::containsPoint | ( | const agx::Vec3 & | point | ) | const |
Returns true/false if the point is contained inside the Analysis Box bound.
| Real agx::AnalysisBox::estimateMassFlowInside | ( | bool | includeParticles = true, |
| bool | includeBodies = true |
||
| ) |
Estimate the particle mass flow inside the Analysis Box.
| agx::RigidBodyPtrVector agx::AnalysisBox::getBodiesInside | ( | ) | const |
Returns the rigid bodies inside the Analysis Box.
Definition at line 173 of file AnalysisBox.h.
| agx::Real agx::AnalysisBox::getBodyMassInside | ( | ) | const |
Get rigid body mass inside bound from last content update.
| agx::Vec3 agx::AnalysisBox::getBoxCenter | ( | ) | const |
Get the center point of the Analysis Box bound.
| agx::Vec3 agx::AnalysisBox::getBoxHalfVec | ( | ) | const |
Get the half vector of the Analysis Box bound.
| agx::Quat agx::AnalysisBox::getBoxRotation | ( | ) | const |
Get the rotation of the Analysis Box bound.
| bool agx::AnalysisBox::getEnable | ( | ) | const |
Return true/false if the box is enabled.
Definition at line 175 of file AnalysisBox.h.
| bool agx::AnalysisBox::getEnableRendering | ( | ) | const |
Return true/false if the box rendering is enabled.
|
protected |
Definition at line 185 of file AnalysisBox.h.
Get the local position of the specified world position.
| size_t agx::AnalysisBox::getNumBodiesInside | ( | ) |
Get number of rigid bodies in bound from last content update.
| size_t agx::AnalysisBox::getNumParticlesInside | ( | ) |
Get number of particles in bound from last content update.
| agx::Real agx::AnalysisBox::getParticleMassInside | ( | ) | const |
Get particle mass inside bound from last content update.
| agx::AnalysisBox::ParticleIdSet agx::AnalysisBox::getParticlesInside | ( | ) | const |
Returns the particles ids inside the Analysis Box.
Definition at line 171 of file AnalysisBox.h.
|
protected |
| agx::Real agx::AnalysisBox::getTotalMassInside | ( | ) | const |
Get total mass inside bound from last content update.
| agx::AffineMatrix4x4 agx::AnalysisBox::getTransform | ( | ) | const |
Get the transform of the Analysis box.
Definition at line 183 of file AnalysisBox.h.
| void agx::AnalysisBox::setBoxCenter | ( | const agx::Vec3 & | center | ) |
Set the center of the Analysis Box bound.
| void agx::AnalysisBox::setBoxHalfVec | ( | const agx::Vec3 & | halfVec | ) |
Set the half vector of the Analysis Box bound.
| void agx::AnalysisBox::setBoxRotation | ( | const agx::Quat & | rotation | ) |
Set the rotation of the Analysis Box bound.
| void agx::AnalysisBox::setEnable | ( | bool | enable | ) |
Set true/false to enable/enable the Analysis Box.
Definition at line 177 of file AnalysisBox.h.
| void agx::AnalysisBox::setEnableRendering | ( | bool | enable | ) |
Set true/false to enable/enable rendering of the Analysis Box.
| void agx::AnalysisBox::updateContents | ( | bool | includeRigidBodies = false, |
| bool | onlyIncludeEmittedBodies = false |
||
| ) |
Update the analysis box contents.
|
protected |
|
protected |
Definition at line 165 of file AnalysisBox.h.
|
protected |
Definition at line 159 of file AnalysisBox.h.
|
protected |
Definition at line 166 of file AnalysisBox.h.
|
protected |
Definition at line 168 of file AnalysisBox.h.
|
protected |
Definition at line 167 of file AnalysisBox.h.
|
protected |
Definition at line 161 of file AnalysisBox.h.
|
protected |
Definition at line 163 of file AnalysisBox.h.
|
protected |
Definition at line 164 of file AnalysisBox.h.
|
protected |
Definition at line 162 of file AnalysisBox.h.
|
protected |
Definition at line 158 of file AnalysisBox.h.
|
protected |
Definition at line 160 of file AnalysisBox.h.