opensurgsim
|
Mesh for testing using MockVertexData. More...
#include <MockObjects.h>
Public Types | |
typedef Vertices< MockVertexData >::VertexType | VertexType |
Vertex type for convenience. | |
![]() | |
typedef Vertex< MockVertexData > | VertexType |
Vertex type for convenience. | |
Public Member Functions | |
MockMesh () | |
Constructor. Start out with no vertices and 0 updates. | |
virtual | ~MockMesh () |
Destructor. | |
size_t | createVertex (const SurgSim::Math::Vector3d &position, const SurgSim::Math::Vector3d &normal) |
Create a new vertex in the mesh. More... | |
const SurgSim::Math::Vector3d & | getVertexNormal (size_t id) const |
Returns the normal of a vertex. | |
int | getNumUpdates () const |
Returns the number of updates performed on the mesh. | |
![]() | |
Vertices () | |
Constructor. | |
Vertices (const Vertices< V > &other) | |
Copy constructor when the template data is a different type In this case, no data will be copied. More... | |
Vertices< MockVertexData > & | operator= (const Vertices< V > &other) |
Assignment when the template data is a different type In this case, no data will be copied. More... | |
virtual | ~Vertices () |
Destructor. | |
void | clear () |
Clear mesh to return to an empty state (no vertices). | |
bool | update () |
Performs any updates that are required when the vertices are modified. More... | |
size_t | addVertex (const VertexType &vertex) |
Adds a vertex to the mesh. More... | |
size_t | getNumVertices () const |
Returns the number of vertices in this mesh. | |
const VertexType & | getVertex (size_t id) const |
Returns the specified vertex. | |
VertexType & | getVertex (size_t id) |
Returns the specified vertex (non const version). | |
const std::vector< VertexType > & | getVertices () const |
Returns a vector containing the position of each vertex. | |
std::vector< VertexType > & | getVertices () |
Returns a vector containing the position of each vertex (non const version). | |
void | setVertexPosition (size_t id, const SurgSim::Math::Vector3d &position) |
Sets the position of a vertex. More... | |
const SurgSim::Math::Vector3d & | getVertexPosition (size_t id) const |
Returns the position of a vertex. More... | |
void | setVertexPositions (const std::vector< SurgSim::Math::Vector3d > &positions, bool doUpdate=true) |
Sets the position of each vertex. More... | |
void | transform (const Math::RigidTransform3d &pose) |
Apply a rigid transform to each vertex. More... | |
bool | operator== (const Vertices &mesh) const |
Compares the mesh with another one (equality) More... | |
bool | operator!= (const Vertices &mesh) const |
Compares the mesh with another one (inequality) More... | |
Additional Inherited Members | |
![]() | |
virtual void | doClearVertices () |
Remove all vertices from the mesh. | |
virtual bool | isEqual (const Vertices &mesh) const |
Internal comparison of meshes of the same type: returns true if equal, false if not equal. More... | |
Mesh for testing using MockVertexData.
|
inline |
Create a new vertex in the mesh.
position | Position of the vertex |
normal | Normal of the vertex |