16 #ifndef SURGSIM_GRAPHICS_OSGCURVEREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGCURVEREPRESENTATION_H 23 #include <osg/ref_ptr> 27 #pragma warning(disable:4250) 42 SURGSIM_STATIC_REGISTRATION(OsgCurveRepresentation)
44 class OsgCurveRepresentation :
public OsgRepresentation,
public CurveRepresentation
52 explicit OsgCurveRepresentation(
const std::string& name);
54 ~OsgCurveRepresentation();
58 bool doInitialize()
override;
60 bool doWakeUp()
override;
62 void doUpdate(
double dt)
override;
64 void setSubdivisions(
size_t num)
override;
66 size_t getSubdivisions()
const override;
68 void setTension(
double tension)
override;
70 double getTension()
const override;
76 void setWidth(
double width)
override;
78 double getWidth()
const override;
80 void setAntiAliasing(
bool val)
override;
82 bool isAntiAliasing()
const override;
114 #if defined(_MSC_VER) Definition: CompoundShapeToGraphics.cpp:29
size_t m_subdivision
Definition: OsgCurveRepresentation.h:101
Vertices< EmptyData > VerticesPlain
Definition: Vertices.h:161
osg::ref_ptr< osg::Geometry > m_geometry
Definition: OsgCurveRepresentation.h:92
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
std::vector< Math::Vector3d > m_controlPoints
Definition: OsgCurveRepresentation.h:108
std::vector< Math::Vector3d > m_vertices
Definition: OsgCurveRepresentation.h:109
osg::ref_ptr< osg::Vec3Array > m_vertexData
Definition: OsgCurveRepresentation.h:93
double m_width
Definition: OsgCurveRepresentation.h:103
Definition: OculusView.h:25
osg::ref_ptr< osg::DrawArrays > m_drawArrays
Definition: OsgCurveRepresentation.h:95
Math::Vector4d m_color
Definition: OsgCurveRepresentation.h:100
double m_tension
Definition: OsgCurveRepresentation.h:102
Eigen::Matrix< double, 4, 1 > Vector4d
A 4D vector of doubles.
Definition: Vector.h:61
Implements the CurveRepresentation for OpenSceneGraph, it uses Catmull Rom interpolation, to draw the line as a GL_LINESTRIP.
Definition: OsgCurveRepresentation.h:47
osg::ref_ptr< osg::Vec3Array > m_normalData
Definition: OsgCurveRepresentation.h:94