16 #ifndef SURGSIM_GRAPHICS_OSGVECTORFIELDREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGVECTORFIELDREPRESENTATION_H 25 #include <osg/Geometry> 26 #include <osg/LineWidth> 34 SURGSIM_STATIC_REGISTRATION(OsgVectorFieldRepresentation);
38 #pragma warning(disable:4250) 58 void setScale(
double scale)
override;
107 #if defined(_MSC_VER) 114 #endif // SURGSIM_GRAPHICS_OSGVECTORFIELDREPRESENTATION_H void privateUpdate(const std::vector< DataStructures::Vertex< VectorFieldData >> &vertices)
Definition: OsgVectorFieldRepresentation.cpp:96
double getScale() const override
Gets the scale applied to all vectors.
Definition: OsgVectorFieldRepresentation.cpp:184
osg::ref_ptr< osg::Point > m_point
OSG::Point for representing vector starting point.
Definition: OsgVectorFieldRepresentation.h:98
Definition: CompoundShapeToGraphics.cpp:29
OSG vector field representation, implements a VectorFieldRepresenation using OSG. ...
Definition: OsgVectorFieldRepresentation.h:42
virtual double getPointSize() const
Gets the size of starting point of a vector.
Definition: OsgVectorFieldRepresentation.cpp:194
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgVectorFieldRepresentation)
Graphic representation of a vector field Each point/location, i.e.
Definition: VectorFieldRepresentation.h:30
osg::ref_ptr< osg::Vec4Array > m_colors
OSG::Vec4Array to hold color for each vector.
Definition: OsgVectorFieldRepresentation.h:101
void setLineWidth(double width) override
Sets vector line width.
Definition: OsgVectorFieldRepresentation.cpp:169
osg::ref_ptr< osg::Vec3Array > m_vertexData
OSG vertex data structure.
Definition: OsgVectorFieldRepresentation.h:83
std::shared_ptr< VectorField > getVectorField() const override
Gets the vector field.
Definition: OsgVectorFieldRepresentation.cpp:164
osg::ref_ptr< osg::LineWidth > m_line
OSG::LineWidth for representing vector.
Definition: OsgVectorFieldRepresentation.h:96
Vertex structure for meshes.
Definition: Vertex.h:44
void setScale(double scale) override
Sets the scale to be applied to all vectors.
Definition: OsgVectorFieldRepresentation.cpp:179
void doUpdate(double dt) override
Definition: OsgVectorFieldRepresentation.cpp:82
osg::ref_ptr< osg::DrawElementsUInt > m_drawPoints
An OSG::DrawElementUInt object specifying how vector starting points will be drawn.
Definition: OsgVectorFieldRepresentation.h:93
virtual void setPointSize(double size)
Sets the size of point indicating the starting of vector.
Definition: OsgVectorFieldRepresentation.cpp:189
osg::ref_ptr< osg::Geometry > m_pointGeometry
OSG::Geometry node holding OSG representation of vector starting points.
Definition: OsgVectorFieldRepresentation.h:88
void updateVectorField(const VectorField &vectorfield) override
Updates the vector field in a threadsafe manner.
Definition: OsgVectorFieldRepresentation.cpp:159
double m_scale
A scale to scale the length of vector.
Definition: OsgVectorFieldRepresentation.h:104
A simple thread-safe data container that can support multiple writers and readers.
Definition: LockedContainer.h:54
std::shared_ptr< SurgSim::Graphics::VectorField > m_vectorField
Vector Field holds a list of vertices/points (X,Y,Z) in 3D space Each point is associated with a vect...
Definition: OsgVectorFieldRepresentation.h:78
OsgVectorFieldRepresentation(const std::string &name)
Constructor.
Definition: OsgVectorFieldRepresentation.cpp:36
~OsgVectorFieldRepresentation()
Destructor.
Definition: OsgVectorFieldRepresentation.cpp:78
double getLineWidth() const override
Gets line width.
Definition: OsgVectorFieldRepresentation.cpp:174
osg::ref_ptr< osg::DrawArrays > m_drawArrays
An OSG::DrawArrays object specifying how vectors will be drawn.
Definition: OsgVectorFieldRepresentation.h:91
osg::ref_ptr< osg::Geometry > m_lineGeometry
OSG::Geometry node holding OSG representation of vectors.
Definition: OsgVectorFieldRepresentation.h:86
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55
Base class for mesh structures, handling basic vertex functionality.
Definition: Vertices.h:51
SurgSim::Framework::LockedContainer< VectorField > m_writeBuffer
Definition: OsgVectorFieldRepresentation.h:80