25#include <osg/Geometry>
51 osg::Node *
getNode( ) {
return m_parent; }
#define AGX_DECLARE_POINTER_TYPES(type)
void preDraw()
If the rendering of this graph requires some pre-state to be set (orthographic projection etc) this c...
void postDraw()
If the rendering of this graph requires some cleanup to be done it can be done in this method.
void drawLine(const agx::Vec2 &p1, const agx::Vec2 &p2) const
Draw a line from p1 to p2.
void setRenderManager(agxRender::RenderManager *mgr)
void updateLineGeometry(size_t channelIndex, const agxRender::Graph::DataVector &data)
void drawData(size_t channelIndex, const agxRender::Graph::DataVector &data)
Update the line geometry for a specified channel given the data (points)
agxRender::RenderManager * m_mgr
GraphRenderer(agxRender::RenderManager *renderManager)
size_t getNumChannels() const
void clear()
Destruction of any data for this graph.
void drawText(const agx::Vec2 &pos, const agx::String &str)
void removeChannel()
Tear down data for the last added channel.
virtual void setEnable(bool flag)
Implement functionality for enabling/disabling the rendering of this graph.
agx::Vector< OSGChannel > Channels
void setColor(const agx::Vec4 &color)
void addChannel()
Setup structures/data for another data channel.
osg::ref_ptr< osg::Group > m_parent
Abstract base class that acts as an interface and can render the data from a Graph.
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
A class holding 4 dimensional vectors and providing basic arithmetic.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
osg::DrawArrays * primitiveSet
osg::ref_ptr< osg::Vec4Array > colors
osg::ref_ptr< osg::Vec3Array > vertices
osg::ref_ptr< osg::Geometry > geometry
osg::ref_ptr< osg::Geode > geode