AGX Dynamics  2.37.2.0
agx::AnalysisBox Class Reference

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 &center, const agx::Vec3 &halfVec)
 Constructor for the AnalysisBox. More...
 
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...
 
void printContents ()
 
void setAnalysisBound (const agx::Vec3 &center, 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 updateContents ()
 Update the analysis box contents. 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...
 

Protected Member Functions

virtual ~AnalysisBox ()
 Virtual Destructor. More...
 
agx::ParticleSystem * getParticleSystem ()
 
void updateBound (const agx::Vec3 &center, const agx::Vec3 &halfVec)
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

agx::Bound3 m_bound
 
bool m_enabled
 
ParticleIdSet m_particleIdsInside
 
RigidBodyPtrVector m_rigidBodiesInside
 
agxSDK::Simulation * m_simulation
 
- 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. More...
 

Detailed Description

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.

Member Typedef Documentation

◆ ParticleIdSet

Definition at line 34 of file AnalysisBox.h.

Constructor & Destructor Documentation

◆ AnalysisBox()

agx::AnalysisBox::AnalysisBox ( agxSDK::Simulation *  simulation,
const agx::Vec3 &  center,
const agx::Vec3 &  halfVec 
)

Constructor for the AnalysisBox.

Parameters
simulationThe simulation to couple the analysis box too.
centerCenter of the Analysis Box.
halfVecHalf vector that span the bound.

◆ ~AnalysisBox()

virtual agx::AnalysisBox::~AnalysisBox ( )
protectedvirtual

Virtual Destructor.

Member Function Documentation

◆ containsParticle()

bool agx::AnalysisBox::containsParticle ( agx::Index  particleId) const

Returns true/false if the particle given the specified particle id is inside the box.

◆ containsPoint()

bool agx::AnalysisBox::containsPoint ( const agx::Vec3 &  point)

Returns true/false if the point is contained inside the Analysis Box bound.

◆ getAnalysisBound()

agx::Bound3 agx::AnalysisBox::getAnalysisBound ( ) const

Get the bound of the Analysis Box.

Definition at line 99 of file AnalysisBox.h.

◆ getBoundCenter()

agx::Vec3 agx::AnalysisBox::getBoundCenter ( )

Get the center point of the Analysis Box bound.

◆ getBoundHalfVec()

agx::Vec3 agx::AnalysisBox::getBoundHalfVec ( )

Get the half vector of the Analysis Box bound.

◆ getEnable()

bool agx::AnalysisBox::getEnable ( ) const

Return true/false if the box is enabled.

Definition at line 103 of file AnalysisBox.h.

◆ getParticleMassInsideBound()

Real agx::AnalysisBox::getParticleMassInsideBound ( )

Return the particle mass in the particles inside the Analysis Box.

◆ getParticlesInside()

agx::AnalysisBox::ParticleIdSet agx::AnalysisBox::getParticlesInside ( ) const

Returns the particles ids inside the Analysis Box.

Definition at line 101 of file AnalysisBox.h.

◆ getParticleSystem()

agx::ParticleSystem* agx::AnalysisBox::getParticleSystem ( )
protected

◆ printContents()

void agx::AnalysisBox::printContents ( )

◆ setAnalysisBound()

void agx::AnalysisBox::setAnalysisBound ( const agx::Vec3 &  center,
const agx::Vec3 &  halfVec 
)

Update the bounds of the Analysis Box.

◆ setEnable()

void agx::AnalysisBox::setEnable ( bool  enable)

Set true/false to enable/enable the Analysis Box.

Definition at line 105 of file AnalysisBox.h.

◆ updateBound()

void agx::AnalysisBox::updateBound ( const agx::Vec3 &  center,
const agx::Vec3 &  halfVec 
)
protected

◆ updateContents()

void agx::AnalysisBox::updateContents ( )

Update the analysis box contents.

Member Data Documentation

◆ m_bound

agx::Bound3 agx::AnalysisBox::m_bound
protected

Definition at line 93 of file AnalysisBox.h.

◆ m_enabled

bool agx::AnalysisBox::m_enabled
protected

Definition at line 96 of file AnalysisBox.h.

◆ m_particleIdsInside

ParticleIdSet agx::AnalysisBox::m_particleIdsInside
protected

Definition at line 95 of file AnalysisBox.h.

◆ m_rigidBodiesInside

RigidBodyPtrVector agx::AnalysisBox::m_rigidBodiesInside
protected

Definition at line 94 of file AnalysisBox.h.

◆ m_simulation

agxSDK::Simulation* agx::AnalysisBox::m_simulation
protected

Definition at line 92 of file AnalysisBox.h.


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