16 #ifndef SURGSIM_DATASTRUCTURES_TETRAHEDRONMESH_H 17 #define SURGSIM_DATASTRUCTURES_TETRAHEDRONMESH_H 21 #include "SurgSim/DataStructures/MeshElement.h" 22 #include "SurgSim/DataStructures/Vertices.h" 27 namespace DataStructures
59 template <
class VertexData,
class EdgeData,
class TriangleData,
class TetrahedronData>
83 size_t addEdge(
const EdgeType& edge);
115 const std::vector<EdgeType>&
getEdges()
const;
138 const EdgeType&
getEdge(
size_t id)
const;
189 virtual void doClear();
192 std::vector<EdgeType> m_edges;
195 std::vector<TriangleType> m_triangles;
198 std::vector<TetrahedronType> m_tetrahedrons;
205 #include "SurgSim/DataStructures/TetrahedronMesh-inl.h" 207 #endif // SURGSIM_DATASTRUCTURES_TETRAHEDRONMESH_H const std::vector< EdgeType > & getEdges() const
Returns a vector containing the position of each edge.
Definition: TetrahedronMesh-inl.h:91
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
MeshElement< 4, TetrahedronData > TetrahedronType
Tetrahedron type for convenience (Ids of the 4 vertices)
Definition: TetrahedronMesh.h:68
Basic class for storing Tetrahedron Meshes, handling basic vertex, edge, triangle and tetrahedron fun...
Definition: TetrahedronMesh.h:60
bool isValid() const
Test if the TetrahedronMesh is valid (valid vertex Ids used in all MeshElements)
Definition: TetrahedronMesh-inl.h:187
virtual void doClearEdges()
Remove all edges from the mesh.
Definition: TetrahedronMesh-inl.h:246
size_t getNumEdges() const
Returns the number of edges in this mesh.
Definition: TetrahedronMesh-inl.h:67
size_t addTriangle(const TriangleType &triangle)
Adds a triangle to the mesh.
Definition: TetrahedronMesh-inl.h:49
virtual void doClearTriangles()
Remove all triangles from the mesh.
Definition: TetrahedronMesh-inl.h:254
size_t getNumTetrahedrons() const
Returns the number of tetrahedrons in this mesh.
Definition: TetrahedronMesh-inl.h:83
const std::vector< TetrahedronType > & getTetrahedrons() const
Returns a vector containing the position of each tetrahedron.
Definition: TetrahedronMesh-inl.h:123
virtual bool isEqual(const Vertices< VertexData > &mesh) const
Internal comparison of meshes of the same type: returns true if equal, false if not equal...
Definition: TetrahedronMesh-inl.h:270
size_t addEdge(const EdgeType &edge)
Adds an edge to the mesh.
Definition: TetrahedronMesh-inl.h:40
virtual void doClearTetrahedrons()
Remove all tetrahedrons from the mesh.
Definition: TetrahedronMesh-inl.h:262
MeshElement< 2, EdgeData > EdgeType
Edge type for convenience (Ids of the 2 vertices)
Definition: TetrahedronMesh.h:64
size_t addTetrahedron(const TetrahedronType &tetrahedron)
Adds a tetrahedron to the mesh.
Definition: TetrahedronMesh-inl.h:58
virtual ~TetrahedronMesh()
Destructor.
Definition: TetrahedronMesh-inl.h:33
TetrahedronMesh()
Constructor. The mesh is initially empty (no vertices, no edges, no triangles, no tetrahedrons)...
Definition: TetrahedronMesh-inl.h:27
Element structure for meshes.
Definition: MeshElement.h:44
MeshElement< 3, TriangleData > TriangleType
Triangle type for convenience (Ids of the 3 vertices)
Definition: TetrahedronMesh.h:66
const TetrahedronType & getTetrahedron(size_t id) const
Returns the specified tetrahedron.
Definition: TetrahedronMesh-inl.h:171
const TriangleType & getTriangle(size_t id) const
Returns the specified triangle.
Definition: TetrahedronMesh-inl.h:155
const std::vector< TriangleType > & getTriangles() const
Returns a vector containing the position of each triangle.
Definition: TetrahedronMesh-inl.h:107
const EdgeType & getEdge(size_t id) const
Returns the specified edge.
Definition: TetrahedronMesh-inl.h:139
Base class for mesh structures, handling basic vertex functionality.
Definition: Vertices.h:51
size_t getNumTriangles() const
Returns the number of triangles in this mesh.
Definition: TetrahedronMesh-inl.h:75