Go to the documentation of this file.
16 #ifndef SURGSIM_DATASTRUCTURES_VERTICES_H
17 #define SURGSIM_DATASTRUCTURES_VERTICES_H
30 namespace DataStructures
50 template <
class VertexData>
103 const std::vector<VertexType>&
getVertices()
const;
168 #endif // SURGSIM_DATASTRUCTURES_VERTICES_H
Vertices()
Constructor.
Definition: Vertices-inl.h:30
std::vector< VertexType > m_vertices
Vertices.
Definition: Vertices.h:158
bool update()
Performs any updates that are required when the vertices are modified.
Definition: Vertices-inl.h:86
virtual bool doUpdate()
Performs any updates that are required when the vertices are modified.
Definition: Vertices-inl.h:196
virtual ~Vertices()
Destructor.
Definition: Vertices-inl.h:75
void transform(const Math::RigidTransform3d &pose)
Apply a rigid transform to each vertex.
Definition: Vertices-inl.h:157
Base class for mesh structures, handling basic vertex functionality.
Definition: Vertices.h:51
void setVertexPositions(const std::vector< SurgSim::Math::Vector3d > &positions, bool doUpdate=true)
Sets the position of each vertex.
Definition: Vertices-inl.h:141
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
const VertexType & getVertex(size_t id) const
Returns the specified vertex.
Definition: Vertices-inl.h:105
Vertices< EmptyData > VerticesPlain
Definition: Vertices.h:161
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
void clear()
Clear mesh to return to an empty state (no vertices).
Definition: Vertices-inl.h:80
Definition: CompoundShapeToGraphics.cpp:29
Vertex structure for meshes.
Definition: Vertex.h:44
void setVertexPosition(size_t id, const SurgSim::Math::Vector3d &position)
Sets the position of a vertex.
Definition: Vertices-inl.h:129
bool operator!=(const Vertices &mesh) const
Compares the mesh with another one (inequality)
Definition: Vertices-inl.h:172
virtual void doClear()
Clear mesh to return to an empty state (no vertices).
Definition: Vertices-inl.h:190
virtual bool isEqual(const Vertices &mesh) const
Internal comparison of meshes of the same type: returns true if equal, false if not equal.
Definition: Vertices-inl.h:184
const std::vector< VertexType > & getVertices() const
Returns a vector containing the position of each vertex.
Definition: Vertices-inl.h:117
size_t addVertex(const VertexType &vertex)
Adds a vertex to the mesh.
Definition: Vertices-inl.h:92
virtual void doClearVertices()
Remove all vertices from the mesh.
Definition: Vertices-inl.h:178
const SurgSim::Math::Vector3d & getVertexPosition(size_t id) const
Returns the position of a vertex.
Definition: Vertices-inl.h:135
size_t getNumVertices() const
Returns the number of vertices in this mesh.
Definition: Vertices-inl.h:99
Vertex< VertexData > VertexType
Vertex type for convenience.
Definition: Vertices.h:55
Vertices< VertexData > & operator=(const Vertices< V > &other)
Assignment when the template data is a different type In this case, no data will be copied.
Definition: Vertices-inl.h:47
bool operator==(const Vertices &mesh) const
Compares the mesh with another one (equality)
Definition: Vertices-inl.h:166