Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_MESH_H
17 #define SURGSIM_GRAPHICS_MESH_H
51 return !((*this) == rhs);
55 SURGSIM_STATIC_REGISTRATION(Mesh);
58 SurgSim::DataStructures::EmptyData>
64 typedef TriangleMesh<VertexData, DataStructures::EmptyData, DataStructures::EmptyData>
BaseType;
72 template <
class V,
class E,
class T>
73 explicit Mesh(
const TriangleMesh<V, E, T>& other);
99 void initialize(
const std::vector<SurgSim::Math::Vector3d>& vertices,
100 const std::vector<SurgSim::Math::Vector4d>& colors,
101 const std::vector<SurgSim::Math::Vector2d>& textures,
102 const std::vector<size_t>& triangles);
113 bool doLoad(
const std::string& fileName)
override;
125 #endif // SURGSIM_GRAPHICS_MESH_H
Basic class for storing Triangle Meshes, handling basic vertex, edge, and triangle functionality.
Definition: TriangleMesh.h:62
SurgSim::DataStructures::OptionalValue< SurgSim::Math::Vector4d > color
Definition: Mesh.h:35
bool operator==(const SurgSim::Graphics::VertexData &rhs) const
Equality operator.
Definition: Mesh.h:40
size_t m_updateCount
For checking whether the mesh has changed.
Definition: Mesh.h:116
Definition: CompoundShapeToGraphics.cpp:29
bool operator!=(const SurgSim::Graphics::VertexData &rhs) const
Inequality operator.
Definition: Mesh.h:49
TriangleMesh< VertexData, DataStructures::EmptyData, DataStructures::EmptyData > BaseType
Definition: Mesh.h:64
size_t getUpdateCount() const
Return the update count, please note that it will silently roll over when the range of size_t has bee...
Definition: Mesh.cpp:134
void initialize(const std::vector< SurgSim::Math::Vector3d > &vertices, const std::vector< SurgSim::Math::Vector4d > &colors, const std::vector< SurgSim::Math::Vector2d > &textures, const std::vector< size_t > &triangles)
Utility function to initialize a mesh with plain data,.
Definition: Mesh.cpp:51
SurgSim::DataStructures::OptionalValue< SurgSim::Math::Vector2d > texture
Definition: Mesh.h:34
bool doLoad(const std::string &fileName) override
Derived classes will overwrite this method to do actual loading.
Definition: Mesh.cpp:108
void dirty()
Increase the update count, this indicates that the mesh has been changed, if used in a mesh represent...
Definition: Mesh.cpp:129
Mesh()
Default constructor.
Definition: Mesh.cpp:36
Mesh & operator=(const Mesh &other)
Copy Assignment.
Definition: Mesh.cpp:139