78 Tree() : m_renderer( nullptr ), m_graphicsRoot( nullptr ) {}
Tree is a structure of Branch objects in a mathematical Tree structure where a Branch can have severa...
virtual void addNotification(agxSDK::Simulation *simulation) override
Called when this assembly is added to a simulation (given that it not already is in the simulation).
void setColor(const agx::Vec4 &color)
Assign color to this tree.
CylinderGeometryShaderRef m_cylinderGeometry
virtual void addNotification()
Called when this listener is added to the simulation.
virtual void post(const agx::TimeStamp &)
Called after a step is taken in the simulation Implement this method in the derived class to get call...
osg::ref_ptr< osg::Group > m_node
TreeRenderer(agxModel::Tree *tree, osg::Group *root)
agx::Vec4 getColor() const
TreeRendererRef m_renderer
void setColor(const agx::Vec4 &color)
Assign color to this tree.
Tree()
Use agxModel::Tree instead if you intend to use this constructor.
const agx::Vec4 getColor() const
osg::observer_ptr< osg::Group > m_graphicsRoot
virtual Tree * clone()
Clone call when new tree is needed from internal methods.
virtual void addNotification(agxSDK::Simulation *simulation)
Called when this assembly is added to a simulation (given that it not already is in the simulation).
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Derive from this class to implement a listener for simulation step events.
A class holding 4 dimensional vectors and providing basic arithmetic.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
agx::ref_ptr< TreeRenderer > TreeRendererRef
agx::ref_ptr< Tree > TreeRef
osg::ref_ptr< CylinderGeometryShader > CylinderGeometryShaderRef