16 #ifndef SURGSIM_GRAPHICS_OSGMESHREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGMESHREPRESENTATION_H 22 #include <osg/ref_ptr> 31 #pragma warning(disable:4250) 37 class DrawElementsUInt;
61 virtual std::shared_ptr<Mesh> getMesh()
override;
63 virtual void setUpdateOptions(
int val)
override;
64 virtual int getUpdateOptions()
const override;
66 osg::ref_ptr<osg::Geometry> getOsgGeometry();
68 virtual void setFilename(
std::string filename)
override;
72 virtual void doUpdate(
double dt)
override;
75 virtual bool doInitialize()
override;
100 int updateOsgArrays();
105 void updateVertices(
int updateOptions);
108 void updateNormals();
111 void updateTriangles();
116 osg::Object::DataVariance getDataVariance(
int updateOption);
119 #if defined(_MSC_VER) 126 #endif // SURGSIM_GRAPHICS_OSGMESHREPRESENTATION_H Definition: DriveElementFromInputBehavior.cpp:27
Implementation of a MeshRepresentation for rendering under osg.
Definition: OsgMeshRepresentation.h:49
Graphics representation of a mesh, can be initialized from a Mesh structure.
Definition: MeshRepresentation.h:28
int m_updateOptions
Indicates which elements of the mesh should be updated on every frame.
Definition: OsgMeshRepresentation.h:79
SURGSIM_STATIC_REGISTRATION(SerializationMockComponent)
osg::ref_ptr< osg::DrawElementsUInt > m_triangles
Definition: OsgMeshRepresentation.h:94
std::string m_filename
File name of the external file which contains the mesh to be used by this class.
Definition: OsgMeshRepresentation.h:85
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
osg::ref_ptr< osg::Vec2Array > m_textureCoordinates
Definition: OsgMeshRepresentation.h:93
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
osg::ref_ptr< osg::Vec3Array > m_vertices
Definition: OsgMeshRepresentation.h:90
std::shared_ptr< Mesh > m_mesh
The mesh.
Definition: OsgMeshRepresentation.h:82
osg::ref_ptr< osg::Geometry > m_geometry
Definition: OsgMeshRepresentation.h:89
osg::ref_ptr< osg::Vec3Array > m_normals
Definition: OsgMeshRepresentation.h:92
Definition: OsgLight.h:33
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:42
osg::ref_ptr< osg::Vec4Array > m_colors
Definition: OsgMeshRepresentation.h:91