AGX Dynamics  2.35.0.1
agxOSG::ParticleTrajectoriesDrawable Class Reference

#include <ParticleTrajectoriesDrawable.h>

+ Inheritance diagram for agxOSG::ParticleTrajectoriesDrawable:

Public Member Functions

 ParticleTrajectoriesDrawable (agx::ParticleSystem *particleSystem)
 
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...
 
void createParticleTrajectoryFromId (agx::Index particleId)
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 The actual draw method for the particle system. More...
 
bool getEnable () const
 
agx::UInt getNumTrajectoryPositions () const
 Get the number of positions used in the trajectories. More...
 
agx::ParticleSystem * getParticleSystem ()
 
agx::Real getSampling () const
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const char * libraryName () const
 
bool particleIsRendered (agx::Physics::ParticlePtr &ptr)
 
void popLatestPositions ()
 Pops latest positions in all trajectories. Useful when stepping backwards in a journal. More...
 
void removeParticleTrajectoryFromId (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 setEnable (bool enable)
 
void setNumTrajectoryPositions (agx::UInt num)
 Set the number of positions used in the trajectories. More...
 
void setSampling (agx::Real sampling, bool doResample=true)
 
void updateParticleTrajectories ()
 Update the trajectory structures. More...
 

Protected Member Functions

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

Protected Attributes

TrajectoryTable m_activeParticleTrajectories
 
agxData::BufferRef m_colorBuffer
 
agxData::BufferRef m_countBuffer
 
agx::Vector< ParticleTrajectoryData > m_destroyedParticlesTrajectories
 
bool m_enable
 
agxData::BufferRef m_firstsBuffer
 
agx::UInt m_maxPosCounts
 
ParticleStorageListener m_particleStorageListener
 
agx::ParticleSystemObserver m_particleSystem
 
agx::TaskGroupRef m_renderTask
 
agx::Real m_sampling
 
agxData::BufferRef m_verticesBuffer
 

Detailed Description

Definition at line 34 of file ParticleTrajectoriesDrawable.h.

Constructor & Destructor Documentation

◆ ParticleTrajectoriesDrawable()

agxOSG::ParticleTrajectoriesDrawable::ParticleTrajectoriesDrawable ( agx::ParticleSystem *  particleSystem)

◆ ~ParticleTrajectoriesDrawable()

virtual agxOSG::ParticleTrajectoriesDrawable::~ParticleTrajectoriesDrawable ( )
protectedvirtual

Member Function Documentation

◆ className()

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

Definition at line 74 of file ParticleTrajectoriesDrawable.h.

◆ clone()

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

Definition at line 71 of file ParticleTrajectoriesDrawable.h.

◆ cloneType()

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

Definition at line 70 of file ParticleTrajectoriesDrawable.h.

◆ computeBound()

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

Compute the bounding box around Drawables's geometry.

◆ createParticleTrajectoryFromId()

void agxOSG::ParticleTrajectoriesDrawable::createParticleTrajectoryFromId ( agx::Index  particleId)

◆ drawImplementation()

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

The actual draw method for the particle system.

◆ getEnable()

bool agxOSG::ParticleTrajectoriesDrawable::getEnable ( ) const

Definition at line 159 of file ParticleTrajectoriesDrawable.h.

References m_enable.

◆ getNumTrajectoryPositions()

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

Get the number of positions used in the trajectories.

Definition at line 163 of file ParticleTrajectoriesDrawable.h.

References m_maxPosCounts.

◆ getParticleSystem()

agx::ParticleSystem * agxOSG::ParticleTrajectoriesDrawable::getParticleSystem ( )

Definition at line 157 of file ParticleTrajectoriesDrawable.h.

References m_particleSystem.

◆ getSampling()

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

Definition at line 161 of file ParticleTrajectoriesDrawable.h.

References m_sampling.

◆ handleCreationEvent()

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

◆ handleDestructionEvent()

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

◆ isSameKindAs()

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

Definition at line 72 of file ParticleTrajectoriesDrawable.h.

◆ libraryName()

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

Definition at line 73 of file ParticleTrajectoriesDrawable.h.

◆ particleIsRendered()

bool agxOSG::ParticleTrajectoriesDrawable::particleIsRendered ( agx::Physics::ParticlePtr &  ptr)

◆ popLatestPositions()

void agxOSG::ParticleTrajectoriesDrawable::popLatestPositions ( )

Pops latest positions in all trajectories. Useful when stepping backwards in a journal.

◆ popOldPositionsInDeadTrajectories()

void agxOSG::ParticleTrajectoriesDrawable::popOldPositionsInDeadTrajectories ( )
protected

◆ removeParticleTrajectoryFromId()

void agxOSG::ParticleTrajectoriesDrawable::removeParticleTrajectoryFromId ( agx::Index  particleId)

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

◆ resample()

void agxOSG::ParticleTrajectoriesDrawable::resample ( )

◆ resetTrajectories()

void agxOSG::ParticleTrajectoriesDrawable::resetTrajectories ( )

Reset trajectories.

◆ sample()

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

◆ setEnable()

void agxOSG::ParticleTrajectoriesDrawable::setEnable ( bool  enable)

◆ setNumTrajectoryPositions()

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

Set the number of positions used in the trajectories.

◆ setSampling()

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

◆ updateKernelBuffers()

void agxOSG::ParticleTrajectoriesDrawable::updateKernelBuffers ( )
protected

◆ updateParticleTrajectories()

void agxOSG::ParticleTrajectoriesDrawable::updateParticleTrajectories ( )

Update the trajectory structures.

Member Data Documentation

◆ m_activeParticleTrajectories

TrajectoryTable agxOSG::ParticleTrajectoriesDrawable::m_activeParticleTrajectories
protected

Definition at line 144 of file ParticleTrajectoriesDrawable.h.

◆ m_colorBuffer

agxData::BufferRef agxOSG::ParticleTrajectoriesDrawable::m_colorBuffer
protected

Definition at line 147 of file ParticleTrajectoriesDrawable.h.

◆ m_countBuffer

agxData::BufferRef agxOSG::ParticleTrajectoriesDrawable::m_countBuffer
protected

Definition at line 148 of file ParticleTrajectoriesDrawable.h.

◆ m_destroyedParticlesTrajectories

agx::Vector<ParticleTrajectoryData> agxOSG::ParticleTrajectoriesDrawable::m_destroyedParticlesTrajectories
protected

Definition at line 143 of file ParticleTrajectoriesDrawable.h.

◆ m_enable

bool agxOSG::ParticleTrajectoriesDrawable::m_enable
protected

Definition at line 151 of file ParticleTrajectoriesDrawable.h.

Referenced by getEnable().

◆ m_firstsBuffer

agxData::BufferRef agxOSG::ParticleTrajectoriesDrawable::m_firstsBuffer
protected

Definition at line 149 of file ParticleTrajectoriesDrawable.h.

◆ m_maxPosCounts

agx::UInt agxOSG::ParticleTrajectoriesDrawable::m_maxPosCounts
protected

Definition at line 150 of file ParticleTrajectoriesDrawable.h.

Referenced by getNumTrajectoryPositions().

◆ m_particleStorageListener

ParticleStorageListener agxOSG::ParticleTrajectoriesDrawable::m_particleStorageListener
protected

Definition at line 154 of file ParticleTrajectoriesDrawable.h.

◆ m_particleSystem

agx::ParticleSystemObserver agxOSG::ParticleTrajectoriesDrawable::m_particleSystem
mutableprotected

Definition at line 140 of file ParticleTrajectoriesDrawable.h.

Referenced by getParticleSystem().

◆ m_renderTask

agx::TaskGroupRef agxOSG::ParticleTrajectoriesDrawable::m_renderTask
protected

Definition at line 141 of file ParticleTrajectoriesDrawable.h.

◆ m_sampling

agx::Real agxOSG::ParticleTrajectoriesDrawable::m_sampling
protected

Definition at line 152 of file ParticleTrajectoriesDrawable.h.

Referenced by getSampling().

◆ m_verticesBuffer

agxData::BufferRef agxOSG::ParticleTrajectoriesDrawable::m_verticesBuffer
protected

Definition at line 146 of file ParticleTrajectoriesDrawable.h.


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