AGX Dynamics  2.37.3.2
agxOSG::FrameTrajectoryDrawable Class Reference

#include <FrameTrajectoryDrawable.h>

+ Inheritance diagram for agxOSG::FrameTrajectoryDrawable:

Public Member Functions

 FrameTrajectoryDrawable (agxSDK::Simulation *simulation)
 
bool addTrajectory (agx::Frame *frame)
 Add a trajectory to be drawn given a frame. More...
 
bool addTrajectory (agx::Frame *frame, agx::Vec4f color)
 Add a trajectory to be drawn given a frame and a color. More...
 
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...
 
bool getEnable () const
 Return true of the drawable is enabled. More...
 
agx::UInt getNumTrajectoryPositions () const
 Get the number of positions used in the trajectories. More...
 
agxSDK::Simulation * getSimulation ()
 Get the simulation related to the drawable. More...
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const char * libraryName () const
 
bool removeTrajectory (agx::Frame *frame)
 Remove the current stored trajectory from the drawable for a particle with given id. More...
 
void resetTrajectories ()
 Reset trajectories. More...
 
void setDefaultTrajectoryColor (const agx::Vec4f &color)
 Set default color of trajectories. More...
 
void setEnable (bool enable)
 Enable the drawable. More...
 
void setNumTrajectoryPositions (agx::UInt num)
 Set the number of positions used in the trajectories. More...
 
void updateTrajectories ()
 Update the trajectory structures. More...
 

Protected Member Functions

virtual ~FrameTrajectoryDrawable ()
 
void popOldPositionsInDeadTrajectories ()
 
void updateKernelBuffers ()
 

Protected Attributes

agx::Vector< std::tuple< agx::FrameRef, agx::Vec4f, TrajectoryData > > m_activeTrajectories
 
agxData::BufferRef m_colorBuffer
 
agxData::BufferRef m_countBuffer
 
agx::Vec4f m_defaultTrajectoryColor
 
agx::Vector< TrajectoryData > m_destroyedTrajectories
 
bool m_enable
 
agxData::BufferRef m_firstsBuffer
 
agx::UInt m_maxPosCounts
 
agx::TaskGroupRef m_renderTask
 
agxSDK::SimulationObserver m_simulation
 
agxData::BufferRef m_verticesBuffer
 

Detailed Description

Definition at line 34 of file FrameTrajectoryDrawable.h.

Constructor & Destructor Documentation

◆ FrameTrajectoryDrawable()

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

◆ ~FrameTrajectoryDrawable()

virtual agxOSG::FrameTrajectoryDrawable::~FrameTrajectoryDrawable ( )
protectedvirtual

Member Function Documentation

◆ addTrajectory() [1/2]

bool agxOSG::FrameTrajectoryDrawable::addTrajectory ( agx::Frame *  frame)

Add a trajectory to be drawn given a frame.

◆ addTrajectory() [2/2]

bool agxOSG::FrameTrajectoryDrawable::addTrajectory ( agx::Frame *  frame,
agx::Vec4f  color 
)

Add a trajectory to be drawn given a frame and a color.

◆ className()

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

Definition at line 49 of file FrameTrajectoryDrawable.h.

◆ clone()

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

Definition at line 46 of file FrameTrajectoryDrawable.h.

◆ cloneType()

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

Definition at line 45 of file FrameTrajectoryDrawable.h.

◆ computeBound()

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

Compute the bounding box around Drawables's geometry.

◆ drawImplementation()

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

The actual draw method for the particle system.

◆ getEnable()

bool agxOSG::FrameTrajectoryDrawable::getEnable ( ) const

Return true of the drawable is enabled.

Definition at line 126 of file FrameTrajectoryDrawable.h.

◆ getNumTrajectoryPositions()

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

Get the number of positions used in the trajectories.

Definition at line 130 of file FrameTrajectoryDrawable.h.

◆ getSimulation()

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

Get the simulation related to the drawable.

Definition at line 124 of file FrameTrajectoryDrawable.h.

◆ isSameKindAs()

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

Definition at line 47 of file FrameTrajectoryDrawable.h.

◆ libraryName()

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

Definition at line 48 of file FrameTrajectoryDrawable.h.

◆ popOldPositionsInDeadTrajectories()

void agxOSG::FrameTrajectoryDrawable::popOldPositionsInDeadTrajectories ( )
protected

◆ removeTrajectory()

bool agxOSG::FrameTrajectoryDrawable::removeTrajectory ( agx::Frame *  frame)

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

◆ resetTrajectories()

void agxOSG::FrameTrajectoryDrawable::resetTrajectories ( )

Reset trajectories.

◆ setDefaultTrajectoryColor()

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

Set default color of trajectories.

Definition at line 132 of file FrameTrajectoryDrawable.h.

◆ setEnable()

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

Enable the drawable.

Definition at line 128 of file FrameTrajectoryDrawable.h.

◆ setNumTrajectoryPositions()

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

Set the number of positions used in the trajectories.

◆ updateKernelBuffers()

void agxOSG::FrameTrajectoryDrawable::updateKernelBuffers ( )
protected

◆ updateTrajectories()

void agxOSG::FrameTrajectoryDrawable::updateTrajectories ( )

Update the trajectory structures.

Member Data Documentation

◆ m_activeTrajectories

agx::Vector<std::tuple<agx::FrameRef, agx::Vec4f, TrajectoryData> > agxOSG::FrameTrajectoryDrawable::m_activeTrajectories
protected

Definition at line 112 of file FrameTrajectoryDrawable.h.

◆ m_colorBuffer

agxData::BufferRef agxOSG::FrameTrajectoryDrawable::m_colorBuffer
protected

Definition at line 116 of file FrameTrajectoryDrawable.h.

◆ m_countBuffer

agxData::BufferRef agxOSG::FrameTrajectoryDrawable::m_countBuffer
protected

Definition at line 117 of file FrameTrajectoryDrawable.h.

◆ m_defaultTrajectoryColor

agx::Vec4f agxOSG::FrameTrajectoryDrawable::m_defaultTrajectoryColor
protected

Definition at line 113 of file FrameTrajectoryDrawable.h.

◆ m_destroyedTrajectories

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

Definition at line 111 of file FrameTrajectoryDrawable.h.

◆ m_enable

bool agxOSG::FrameTrajectoryDrawable::m_enable
protected

Definition at line 120 of file FrameTrajectoryDrawable.h.

◆ m_firstsBuffer

agxData::BufferRef agxOSG::FrameTrajectoryDrawable::m_firstsBuffer
protected

Definition at line 118 of file FrameTrajectoryDrawable.h.

◆ m_maxPosCounts

agx::UInt agxOSG::FrameTrajectoryDrawable::m_maxPosCounts
protected

Definition at line 119 of file FrameTrajectoryDrawable.h.

◆ m_renderTask

agx::TaskGroupRef agxOSG::FrameTrajectoryDrawable::m_renderTask
protected

Definition at line 109 of file FrameTrajectoryDrawable.h.

◆ m_simulation

agxSDK::SimulationObserver agxOSG::FrameTrajectoryDrawable::m_simulation
mutableprotected

Definition at line 108 of file FrameTrajectoryDrawable.h.

◆ m_verticesBuffer

agxData::BufferRef agxOSG::FrameTrajectoryDrawable::m_verticesBuffer
protected

Definition at line 115 of file FrameTrajectoryDrawable.h.


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