29#include <osg/observer_ptr>
118 osg::observer_ptr<osg::Group> m_parent;
121 bool m_renderAccumulatedInsteadOfCurrent;
#define AGX_DECLARE_POINTER_TYPES(type)
The CableDamage class is used to estimate damage caused to a cable during a simulation.
Class that creates OSG rendering nodes for each segment of a cable and colors them with a color gradi...
void setColorRangeMax(agx::Real colorRangeMax)
Set the damage at which the color gradient should reach its maxmimu.
bool isRenderingAccumulated() const
CableDamageRenderer(agxCable::CableDamage *damage, agx::Real colorRangeMax, osg::Group *root)
Create a damage renderer for the given CableDamage instance.
virtual ~CableDamageRenderer()
agx::Real getColorRangeMax() const
virtual void last(const agx::Real &timeStamp) override
Update the rendering colors based on the current segment damages.
bool isRenderingCurrent() const
void setEnableRendering(bool enable)
Enable or disable rendering by adding or removing the created OSG nodes from the node that was passed...
bool getEnableRendering() const
agxOSG::GeometryNode * getOsgNode(size_t index)
Gives access to the OSG nodes created for the cable segments.
A node that can be associated with a collision geometry so that the transformation of this node is up...
Derive from this class to implement a listener for simulation step events.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.