|
opensurgsim
|
Vertex structure for meshes. More...
#include <Vertex.h>
Public Member Functions | |
| Vertex () | |
| Constructor. | |
| Vertex (const SurgSim::Math::Vector3d &position, const Data &data=Data()) | |
| Constructor. More... | |
| template<class T > | |
| Vertex (const Vertex< T > &other) | |
| Copy constructor when the template data is a different type In this case, no data will be copied. More... | |
| template<class T > | |
| Vertex< Data > & | operator= (const Vertex< T > &other) |
| Assignment when the template data is a different type In this case, no data will be copied. More... | |
| bool | operator== (const Vertex< Data > &vertex) const |
| Compare the vertex to another one (equality) More... | |
| bool | operator!= (const Vertex< Data > &vertex) const |
| Compare the vertex to another one (inequality) More... | |
Public Attributes | |
| SurgSim::Math::Vector3d | position |
| Position of the vertex. | |
| Data | data |
| Extra vertex data. | |
Vertex structure for meshes.
Vertices are the lowest level of structure in a Mesh, providing a position and can store extra per-vertex data. MeshElements combine MeshVertices to form the structure of the mesh.
Vertex is to be used purely as a data structure and not provide implementation of algorithms. For example, a physics FEM's nodes are not subclasses of Vertex if they provide code that is part of the FEM algorithm, but they may used with a Mesh to store the structure of the FEM.
The extra Data is left up to the particular use of Mesh to specify. For example, for use collision detection, a vertex may need a normal and adjacent triangle information, which could be stored in a struct.
If no extra Data is needed, a specialization exists for void, in which case the constructor takes no data.
| Data | Type of extra data stored in the vertex (void for no data) |
|
inlineexplicit |
Constructor.
| position | Position of the vertex |
| data | Extra data to be stored in the vertex |
|
inlineexplicit |
|
inline |
Compare the vertex to another one (inequality)
| vertex | The Vertex to compare it to |
|
inline |
|
inline |
Compare the vertex to another one (equality)
| vertex | The Vertex to compare it to |
1.8.12