|
AGXDynamics
2.31.1.0
|
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 ¢er, const agx::Vec3 &halfVec) | |
| Constructor for the AnalysisBox. More... | |
| 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 |
| bool | containsParticle (agx::Index particleId) const |
| Returns true/false if the particle given the specified particle id is inside the box. More... | |
| bool | containsPoint (const agx::Vec3 &point) |
| Returns true/false if the point is contained inside the Analysis Box bound. More... | |
| agx::Bound3 | getAnalysisBound () const |
| Get the bound of the Analysis Box. More... | |
| agx::Vec3 | getBoundCenter () |
| Get the center point of the Analysis Box bound. More... | |
| agx::Vec3 | getBoundHalfVec () |
| Get the half vector of the Analysis Box bound. More... | |
| bool | getEnable () const |
| Return true/false if the box is enabled. More... | |
| Real | getParticleMassInsideBound () |
| Return the particle mass in the particles inside the Analysis Box. More... | |
| ParticleIdSet | getParticlesInside () const |
| Returns the particles ids inside the Analysis Box. More... | |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| void | printContents () |
| 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 | setAnalysisBound (const agx::Vec3 ¢er, const agx::Vec3 &halfVec) |
| Update the bounds of the Analysis Box. More... | |
| void | setEnable (bool enable) |
| Set true/false to enable/enable the Analysis Box. 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... | |
| void | updateContents () |
| Update the analysis box contents. More... | |
Static Public Member Functions | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~AnalysisBox () |
| Virtual Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| agx::ParticleSystem * | getParticleSystem () |
| void | updateBound (const agx::Vec3 ¢er, const agx::Vec3 &halfVec) |
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 | |
| agx::Bound3 | m_bound |
| bool | m_enabled |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| ParticleIdSet | m_particleIdsInside |
| AtomicValue | m_refCount |
| RigidBodyPtrVector | m_rigidBodiesInside |
| agxSDK::Simulation * | m_simulation |
Class that can be used to extract data from elements in a simulation within a specified bound.
Definition at line 31 of file AnalysisBox.h.
Definition at line 34 of file AnalysisBox.h.
| agx::AnalysisBox::AnalysisBox | ( | agxSDK::Simulation * | simulation, |
| const agx::Vec3 & | center, | ||
| const agx::Vec3 & | halfVec | ||
| ) |
Constructor for the AnalysisBox.
| simulation | The simulation to couple the analysis box too. |
| center | Center of the Analysis Box. |
| halfVec | Half vector that span the bound. |
|
protectedvirtual |
Virtual Destructor.
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| 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 | ) |
Returns true/false if the point is contained inside the Analysis Box bound.
|
protectedinherited |
| agx::Bound3 agx::AnalysisBox::getAnalysisBound | ( | ) | const |
Get the bound of the Analysis Box.
Definition at line 99 of file AnalysisBox.h.
| agx::Vec3 agx::AnalysisBox::getBoundCenter | ( | ) |
Get the center point of the Analysis Box bound.
| agx::Vec3 agx::AnalysisBox::getBoundHalfVec | ( | ) |
Get the half vector of the Analysis Box bound.
|
staticprotectedinherited |
| bool agx::AnalysisBox::getEnable | ( | ) | const |
Return true/false if the box is enabled.
Definition at line 103 of file AnalysisBox.h.
| Real agx::AnalysisBox::getParticleMassInsideBound | ( | ) |
Return the particle mass in the particles inside the Analysis Box.
| agx::AnalysisBox::ParticleIdSet agx::AnalysisBox::getParticlesInside | ( | ) | const |
Returns the particles ids inside the Analysis Box.
Definition at line 101 of file AnalysisBox.h.
|
protected |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
| void agx::AnalysisBox::printContents | ( | ) |
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.
Update the bounds of the Analysis Box.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| void agx::AnalysisBox::setEnable | ( | bool | enable | ) |
Set true/false to enable/enable the Analysis Box.
Definition at line 105 of file AnalysisBox.h.
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.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
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.
|
protected |
| void agx::AnalysisBox::updateContents | ( | ) |
Update the analysis box contents.
|
staticinherited |
|
protected |
Definition at line 93 of file AnalysisBox.h.
|
protected |
Definition at line 96 of file AnalysisBox.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protected |
Definition at line 95 of file AnalysisBox.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protected |
Definition at line 94 of file AnalysisBox.h.
|
protected |
Definition at line 92 of file AnalysisBox.h.