Go to the documentation of this file.
16 #ifndef SURGSIM_DATASTRUCTURES_SEGMENTMESH_H
17 #define SURGSIM_DATASTRUCTURES_SEGMENTMESH_H
24 namespace DataStructures
32 template <
class VertexData,
class EdgeData>
55 template <
class V,
class E>
89 bool asPhysics =
true,
90 double radius = 0.0001,
91 double massDensity = 900,
92 double poissonRatio = 0.45,
93 double youngsModulus = 1.75e9);
127 #endif // SURGSIM_DATASTRUCTURES_SEGMENTMESH_H
size_t getNumTriangles() const
Definition: SegmentMesh-inl.h:79
Basic class for storing Triangle Meshes, handling basic vertex, edge, and triangle functionality.
Definition: TriangleMesh.h:64
void createDefaultEdges()
Creates edges for all vertices in the mesh connecting all the points consecutively.
Definition: SegmentMesh-inl.h:154
TriangleMesh< VertexData, EdgeData, SegmentEmptyData > TriangleMeshType
TriangleMesh type for convenience.
Definition: SegmentMesh.h:37
TriangleMeshType::TriangleType TriangleType
Triangle type for convenience (Ids of the 3 vertices)
Definition: SegmentMesh.h:41
SegmentMesh< EmptyData, EmptyData > SegmentMeshPlain
Definition: SegmentMesh.h:120
const TriangleType & getTriangle(size_t id) const
Definition: SegmentMesh-inl.h:103
Element structure for meshes.
Definition: MeshElement.h:45
Definition: CompoundShapeToGraphics.cpp:30
MeshElement< 3, SegmentEmptyData > TriangleType
Triangle type for convenience (Ids of the 3 vertices)
Definition: TriangleMesh.h:69
size_t addTriangle(const TriangleType &triangle)
Definition: SegmentMesh-inl.h:72
SegmentMesh< VertexData, EdgeData > & operator=(const SegmentMesh< VertexData, EdgeData > &other)
Copy Assignment.
Definition: SegmentMesh-inl.h:58
SegmentMesh()
Constructor. The mesh is initially empty (no vertices, no edges).
Definition: SegmentMesh-inl.h:28
bool save(const std::string &fileName, bool asPhysics=true, double radius=0.0001, double massDensity=900, double poissonRatio=0.45, double youngsModulus=1.75e9)
Save the current structure to a ply file.
Definition: SegmentMesh-inl.h:167
virtual ~SegmentMesh()
Destructor.
Definition: SegmentMesh-inl.h:47
void removeTriangle(size_t id)
Definition: SegmentMesh-inl.h:118
const std::vector< TriangleType > & getTriangles() const
Definition: SegmentMesh-inl.h:87
TriangleMeshType::EdgeType EdgeType
Edge type for convenience (Ids of the 2 vertices)
Definition: SegmentMesh.h:39
Class to hold the type of a SegmentMesh.
Definition: SegmentMesh.h:34
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
void doClearTriangles() override
Definition: SegmentMesh-inl.h:141
std::array< SurgSim::Math::Vector3d, 3 > getTrianglePositions(size_t id) const
Definition: SegmentMesh-inl.h:125
void doClear() override
Clear mesh to return to an empty state (no vertices, no edges).
Definition: SegmentMesh-inl.h:147