AGX Dynamics  2.37.3.2
agxOSG::RigidBodyTrajectoryDrawable Class Reference

#include <RigidBodyTrajectoryDrawable.h>

+ Inheritance diagram for agxOSG::RigidBodyTrajectoryDrawable:

Public Member Functions

 RigidBodyTrajectoryDrawable (agxSDK::Simulation *simulation)
 
void addRigidBodyCallback (agxSDK::Simulation *, agx::RigidBody *body)
 
virtual const char * className () const
 
virtual osg::Object * clone (const osg::CopyOp &) const
 
virtual osg::Object * cloneType () const
 
virtual osg::BoundingBox computeBound () const
 Compute the bounding box around Drawables's geometry. More...
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 The actual draw method for the particle system. More...
 
ScalarColorMap * getColorMap () const
 
bool getEnable () const
 
agx::UInt getNumTrajectoryPositions () const
 Get the number of positions used in the trajectories. More...
 
bool getOnlyDrawRigidBodyEmitterBodies () const
 
agx::Real getSampling () const
 
agxSDK::Simulation * getSimulation ()
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const char * libraryName () const
 
void removeRigidBodyCallback (agxSDK::Simulation *, agx::RigidBody *body)
 
void removeTrajectoryFromId (agx::Index particleId)
 Remove the current stored trajectory from the drawable for a particle with given id. More...
 
void resample ()
 
void resetTrajectories ()
 Reset trajectories. More...
 
void setColorMap (ScalarColorMap *colorMap)
 Set the scalar color map that will be used color the rigid body trajectories with respect to speed. More...
 
void setDefaultTrajectoryColor (const agx::Vec4f &color)
 Set default color of trajectories. More...
 
void setEnable (bool enable, bool doResample=true)
 
void setNumTrajectoryPositions (agx::UInt num)
 Set the number of positions used in the trajectories. More...
 
void setOnlyDrawRigidBodyEmitterBodies (bool enable)
 
void setSampling (agx::Real sampling, bool doResample=true)
 
void updateTrajectories ()
 Update the trajectory structures. More...
 

Protected Member Functions

virtual ~RigidBodyTrajectoryDrawable ()
 
void handleCreationEvent (agx::Index index)
 
void handleDestructionEvent (agx::Index index)
 
void popOldPositionsInDeadTrajectories ()
 
void sample (agx::Index index)
 
void updateKernelBuffers ()
 

Protected Attributes

TrajectoryTable m_activeTrajectories
 
agxSDK::Simulation::RigidBodyEvent::CallbackType m_addRigidBodyCallback
 
agxData::BufferRef m_colorBuffer
 
ScalarColorMapRef m_colorMap
 
agxData::BufferRef m_countBuffer
 
agx::Vector< TrajectoryData > m_destroyedTrajectories
 
bool m_enable
 
agxData::BufferRef m_firstsBuffer
 
agx::UInt m_maxPosCounts
 
bool m_onlyDrawRigidBodyEmitterBodies
 
agxSDK::Simulation::RigidBodyEvent::CallbackType m_removeRigidBodyCallback
 
agx::TaskGroupRef m_renderTask
 
agx::Real m_sampling
 
agxSDK::SimulationObserver m_simulation
 
agx::Vec4f m_trajectoryColor
 
agxData::BufferRef m_verticesBuffer
 

Detailed Description

Definition at line 35 of file RigidBodyTrajectoryDrawable.h.

Constructor & Destructor Documentation

◆ RigidBodyTrajectoryDrawable()

agxOSG::RigidBodyTrajectoryDrawable::RigidBodyTrajectoryDrawable ( agxSDK::Simulation *  simulation)

◆ ~RigidBodyTrajectoryDrawable()

virtual agxOSG::RigidBodyTrajectoryDrawable::~RigidBodyTrajectoryDrawable ( )
protectedvirtual

Member Function Documentation

◆ addRigidBodyCallback()

void agxOSG::RigidBodyTrajectoryDrawable::addRigidBodyCallback ( agxSDK::Simulation *  ,
agx::RigidBody *  body 
)

◆ className()

virtual const char* agxOSG::RigidBodyTrajectoryDrawable::className ( ) const
inlinevirtual

Definition at line 49 of file RigidBodyTrajectoryDrawable.h.

◆ clone()

virtual osg::Object* agxOSG::RigidBodyTrajectoryDrawable::clone ( const osg::CopyOp &  ) const
inlinevirtual

Definition at line 46 of file RigidBodyTrajectoryDrawable.h.

◆ cloneType()

virtual osg::Object* agxOSG::RigidBodyTrajectoryDrawable::cloneType ( ) const
inlinevirtual

Definition at line 45 of file RigidBodyTrajectoryDrawable.h.

◆ computeBound()

virtual osg::BoundingBox agxOSG::RigidBodyTrajectoryDrawable::computeBound ( ) const
virtual

Compute the bounding box around Drawables's geometry.

◆ drawImplementation()

virtual void agxOSG::RigidBodyTrajectoryDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

The actual draw method for the particle system.

◆ getColorMap()

ScalarColorMap* agxOSG::RigidBodyTrajectoryDrawable::getColorMap ( ) const
Returns
the scalar color map that is used to color the rigid body trajectories with respect to speed.

◆ getEnable()

bool agxOSG::RigidBodyTrajectoryDrawable::getEnable ( ) const

Definition at line 157 of file RigidBodyTrajectoryDrawable.h.

◆ getNumTrajectoryPositions()

agx::UInt agxOSG::RigidBodyTrajectoryDrawable::getNumTrajectoryPositions ( ) const

Get the number of positions used in the trajectories.

Definition at line 161 of file RigidBodyTrajectoryDrawable.h.

◆ getOnlyDrawRigidBodyEmitterBodies()

bool agxOSG::RigidBodyTrajectoryDrawable::getOnlyDrawRigidBodyEmitterBodies ( ) const

◆ getSampling()

agx::Real agxOSG::RigidBodyTrajectoryDrawable::getSampling ( ) const

Definition at line 159 of file RigidBodyTrajectoryDrawable.h.

◆ getSimulation()

agxSDK::Simulation * agxOSG::RigidBodyTrajectoryDrawable::getSimulation ( )

Definition at line 155 of file RigidBodyTrajectoryDrawable.h.

◆ handleCreationEvent()

void agxOSG::RigidBodyTrajectoryDrawable::handleCreationEvent ( agx::Index  index)
protected

◆ handleDestructionEvent()

void agxOSG::RigidBodyTrajectoryDrawable::handleDestructionEvent ( agx::Index  index)
protected

◆ isSameKindAs()

virtual bool agxOSG::RigidBodyTrajectoryDrawable::isSameKindAs ( const osg::Object *  obj) const
inlinevirtual

Definition at line 47 of file RigidBodyTrajectoryDrawable.h.

◆ libraryName()

virtual const char* agxOSG::RigidBodyTrajectoryDrawable::libraryName ( ) const
inlinevirtual

Definition at line 48 of file RigidBodyTrajectoryDrawable.h.

◆ popOldPositionsInDeadTrajectories()

void agxOSG::RigidBodyTrajectoryDrawable::popOldPositionsInDeadTrajectories ( )
protected

◆ removeRigidBodyCallback()

void agxOSG::RigidBodyTrajectoryDrawable::removeRigidBodyCallback ( agxSDK::Simulation *  ,
agx::RigidBody *  body 
)

◆ removeTrajectoryFromId()

void agxOSG::RigidBodyTrajectoryDrawable::removeTrajectoryFromId ( agx::Index  particleId)

Remove the current stored trajectory from the drawable for a particle with given id.

◆ resample()

void agxOSG::RigidBodyTrajectoryDrawable::resample ( )

◆ resetTrajectories()

void agxOSG::RigidBodyTrajectoryDrawable::resetTrajectories ( )

Reset trajectories.

◆ sample()

void agxOSG::RigidBodyTrajectoryDrawable::sample ( agx::Index  index)
protected

◆ setColorMap()

void agxOSG::RigidBodyTrajectoryDrawable::setColorMap ( ScalarColorMap *  colorMap)

Set the scalar color map that will be used color the rigid body trajectories with respect to speed.

Parameters
colorMap- the scalar map that will be used to color the body trajectories
Note
- setting a color map overrides the current set trajectory color via setDefaultTrajectoryColor.

◆ setDefaultTrajectoryColor()

void agxOSG::RigidBodyTrajectoryDrawable::setDefaultTrajectoryColor ( const agx::Vec4f &  color)

Set default color of trajectories.

Definition at line 163 of file RigidBodyTrajectoryDrawable.h.

◆ setEnable()

void agxOSG::RigidBodyTrajectoryDrawable::setEnable ( bool  enable,
bool  doResample = true 
)

◆ setNumTrajectoryPositions()

void agxOSG::RigidBodyTrajectoryDrawable::setNumTrajectoryPositions ( agx::UInt  num)

Set the number of positions used in the trajectories.

◆ setOnlyDrawRigidBodyEmitterBodies()

void agxOSG::RigidBodyTrajectoryDrawable::setOnlyDrawRigidBodyEmitterBodies ( bool  enable)

◆ setSampling()

void agxOSG::RigidBodyTrajectoryDrawable::setSampling ( agx::Real  sampling,
bool  doResample = true 
)

◆ updateKernelBuffers()

void agxOSG::RigidBodyTrajectoryDrawable::updateKernelBuffers ( )
protected

◆ updateTrajectories()

void agxOSG::RigidBodyTrajectoryDrawable::updateTrajectories ( )

Update the trajectory structures.

Member Data Documentation

◆ m_activeTrajectories

TrajectoryTable agxOSG::RigidBodyTrajectoryDrawable::m_activeTrajectories
protected

Definition at line 141 of file RigidBodyTrajectoryDrawable.h.

◆ m_addRigidBodyCallback

agxSDK::Simulation::RigidBodyEvent::CallbackType agxOSG::RigidBodyTrajectoryDrawable::m_addRigidBodyCallback
protected

Definition at line 134 of file RigidBodyTrajectoryDrawable.h.

◆ m_colorBuffer

agxData::BufferRef agxOSG::RigidBodyTrajectoryDrawable::m_colorBuffer
protected

Definition at line 145 of file RigidBodyTrajectoryDrawable.h.

◆ m_colorMap

ScalarColorMapRef agxOSG::RigidBodyTrajectoryDrawable::m_colorMap
protected

Definition at line 152 of file RigidBodyTrajectoryDrawable.h.

◆ m_countBuffer

agxData::BufferRef agxOSG::RigidBodyTrajectoryDrawable::m_countBuffer
protected

Definition at line 146 of file RigidBodyTrajectoryDrawable.h.

◆ m_destroyedTrajectories

agx::Vector<TrajectoryData> agxOSG::RigidBodyTrajectoryDrawable::m_destroyedTrajectories
protected

Definition at line 140 of file RigidBodyTrajectoryDrawable.h.

◆ m_enable

bool agxOSG::RigidBodyTrajectoryDrawable::m_enable
protected

Definition at line 149 of file RigidBodyTrajectoryDrawable.h.

◆ m_firstsBuffer

agxData::BufferRef agxOSG::RigidBodyTrajectoryDrawable::m_firstsBuffer
protected

Definition at line 147 of file RigidBodyTrajectoryDrawable.h.

◆ m_maxPosCounts

agx::UInt agxOSG::RigidBodyTrajectoryDrawable::m_maxPosCounts
protected

Definition at line 148 of file RigidBodyTrajectoryDrawable.h.

◆ m_onlyDrawRigidBodyEmitterBodies

bool agxOSG::RigidBodyTrajectoryDrawable::m_onlyDrawRigidBodyEmitterBodies
protected

Definition at line 150 of file RigidBodyTrajectoryDrawable.h.

◆ m_removeRigidBodyCallback

agxSDK::Simulation::RigidBodyEvent::CallbackType agxOSG::RigidBodyTrajectoryDrawable::m_removeRigidBodyCallback
protected

Definition at line 135 of file RigidBodyTrajectoryDrawable.h.

◆ m_renderTask

agx::TaskGroupRef agxOSG::RigidBodyTrajectoryDrawable::m_renderTask
protected

Definition at line 138 of file RigidBodyTrajectoryDrawable.h.

◆ m_sampling

agx::Real agxOSG::RigidBodyTrajectoryDrawable::m_sampling
protected

Definition at line 151 of file RigidBodyTrajectoryDrawable.h.

◆ m_simulation

agxSDK::SimulationObserver agxOSG::RigidBodyTrajectoryDrawable::m_simulation
mutableprotected

Definition at line 137 of file RigidBodyTrajectoryDrawable.h.

◆ m_trajectoryColor

agx::Vec4f agxOSG::RigidBodyTrajectoryDrawable::m_trajectoryColor
protected

Definition at line 142 of file RigidBodyTrajectoryDrawable.h.

◆ m_verticesBuffer

agxData::BufferRef agxOSG::RigidBodyTrajectoryDrawable::m_verticesBuffer
protected

Definition at line 144 of file RigidBodyTrajectoryDrawable.h.


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