16 #ifndef SURGSIM_GRAPHICS_MESHREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_MESHREPRESENTATION_H 19 #include "SurgSim/Framework/Asset.h" 20 #include "SurgSim/Framework/FrameworkConvert.h" 21 #include "SurgSim/DataStructures/DataStructuresConvert.h" 23 #include "SurgSim/Graphics/Mesh.h" 24 #include "SurgSim/Graphics/Representation.h" 40 UPDATE_OPTION_NONE = 0,
41 UPDATE_OPTION_VERTICES = 0x01,
42 UPDATE_OPTION_COLORS = 0x02,
43 UPDATE_OPTION_TEXTURES = 0x04,
44 UPDATE_OPTION_TRIANGLES = 0x08,
45 UPDATE_OPTION_ALL = UPDATE_OPTION_VERTICES | UPDATE_OPTION_COLORS |
46 UPDATE_OPTION_TEXTURES | UPDATE_OPTION_TRIANGLES
64 virtual std::shared_ptr<Mesh>
getMesh() = 0;
68 virtual void setMesh(std::shared_ptr<SurgSim::Framework::Asset> mesh) = 0;
72 virtual void loadMesh(
const std::string& fileName) = 0;
77 virtual void setShape(std::shared_ptr<SurgSim::Math::Shape> shape) = 0;
89 virtual void updateMesh(
const Mesh& mesh) = 0;
95 #endif // SURGSIM_GRAPHICS_MESHREPRESENTATION_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Graphics representation of a mesh, can be initialized from a Mesh structure.
Definition: MeshRepresentation.h:34
virtual void loadMesh(const std::string &fileName)=0
Convenience function to trigger the load of the mesh with the given filename.
virtual ~MeshRepresentation()
Destructor.
Definition: MeshRepresentation.h:60
This contains a series of functions to encode and decode Eigen data structures to and from YAML nodes...
virtual int getUpdateOptions() const =0
Gets update options for this mesh.
virtual void setUpdateOptions(int val)=0
Sets the structures that are expected to change during the lifetime of the mesh, these will be update...
virtual void setMesh(std::shared_ptr< SurgSim::Framework::Asset > mesh)=0
Sets the mesh.
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:40
virtual std::shared_ptr< Mesh > getMesh()=0
Gets the mesh.
MeshRepresentation(const std::string &name)
Constructor.
Definition: MeshRepresentation.h:51
virtual void setShape(std::shared_ptr< SurgSim::Math::Shape > shape)=0
Sets the shape of the representation param shape the shape of this representation.