BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
Read-only class representing a triangle mesh based on markers's IDs and links between them. More...
#include <btkTriangleMesh.h>
Classes | |
class | Edge |
Read-only class used to represent an edge as a set of two vertices. More... | |
class | Face |
Read-only class used to represent a face as a set of three vertices. More... | |
class | Vertex |
Read-only class used to bridge the content of a Point into a vertex. More... | |
class | VertexFace |
Store three marker's IDs to create a face. More... | |
class | VertexLink |
Store two marker's IDs to create a link between them (Only to create mesh's edge). More... | |
Public Types | |
typedef btkSharedPtr< const TriangleMesh > | ConstPointer |
typedef std::vector< Edge > ::const_iterator | EdgeConstIterator |
typedef std::vector< Edge > ::iterator | EdgeIterator |
typedef std::vector< Face > ::const_iterator | FaceConstIterator |
typedef std::vector< Face > ::iterator | FaceIterator |
typedef btkNullPtr< TriangleMesh > | NullPointer |
typedef btkSharedPtr < TriangleMesh > | Pointer |
typedef std::vector< Vertex > ::const_iterator | VertexConstIterator |
typedef std::vector< Vertex > ::iterator | VertexIterator |
Public Types inherited from btk::DataObject | |
typedef btkSharedPtr< const DataObject > | ConstPointer |
typedef btkNullPtr< DataObject > | NullPointer |
typedef btkSharedPtr< DataObject > | Pointer |
Public Types inherited from btk::Object | |
typedef btkSharedPtr< const Object > | ConstPointer |
typedef btkSharedPtr< Object > | Pointer |
Static Public Member Functions | |
static Pointer | New (const std::vector< int > &m, const std::vector< VertexLink > &l) |
static Pointer | New (const std::vector< int > &m, const std::vector< VertexLink > &l, const std::vector< VertexFace > &f) |
static NullPointer | Null () |
Static Public Member Functions inherited from btk::DataObject | |
static NullPointer | Null () |
Protected Member Functions | |
TriangleMesh (const std::vector< int > &m, const std::vector< VertexLink > &l) | |
TriangleMesh (const std::vector< int > &m, const std::vector< VertexLink > &l, const std::vector< VertexFace > &f) | |
Protected Member Functions inherited from btk::DataObject | |
DataObject () | |
DataObject (const DataObject &toCopy) | |
virtual | ~DataObject () |
Protected Member Functions inherited from btk::Object | |
Object () | |
Object (const Object &toCopy) | |
virtual | ~Object () |
Additional Inherited Members | |
Protected Attributes inherited from btk::Object | |
unsigned long int | m_Timestamp |
Read-only class representing a triangle mesh based on markers's IDs and links between them.
Smart pointer associated with a const TriangleMesh object.
Const Iterator related to the list of edges stored in the mesh.
Iterator related to the list of edges stored in the mesh.
Const Iterator related to the list of faces stored in the mesh.
Iterator related to the list of faces stored in the mesh.
Special null pointer associated with a TriangleMesh object. This type should be used only internally to test the nullity of a smart pointer. See the static method Null() instead.
Smart pointer associated with a TriangleMesh object.
Const Iterator related to the list of vertices stored in the mesh.
Iterator related to the list of vertices stored in the mesh.
|
protected |
Constructor. Build the vertices, edges and faces, from the set of IDs m and the set of links l. If one of the given link contains a wrong ID (out of range), then, it is not added to the list of edges.
|
protected |
Constructor. Build the vertices, edges and faces, from the set of IDs m, the set of links l and the set of faces f. If one of the given link or face contains a wrong ID (out of range), then, it is not added.
|
inline |
Returns an iterator to the beginning of the list of edges.
|
inline |
Returns a const iterator to the beginning of the list of edges.
|
inline |
Returns an iterator to the beginning of the list of faces.
|
inline |
Returns a const iterator to the beginning of the list of faces.
|
inline |
Returns an iterator to the beginning of the list of vertices.
|
inline |
Returns a const iterator to the beginning of the list of vertices.
bool btk::TriangleMesh::ConnectPoints | ( | PointCollection::Pointer | points | ) |
Connect the given points to the mesh by finding the corresponding IDs. Returns true if all the vertices are connected. If one of the point are not found (vertex ID not recognised), then the connections are reseted and the method return false.
|
inline |
Returns an iterator just past the last edge.
|
inline |
Returns a const iterator just past the last edge.
|
inline |
Returns an iterator just past the last face.
|
inline |
Returns a const iterator just past the last face.
|
inline |
Returns an iterator just past the last vertex.
|
inline |
Returns a const iterator just past the last vertex.
|
inline |
Returns the index of the current frame used by the vertices to get their coordinates. The index starts from 0.
|
inline |
Returns the number of edges.
|
inline |
Returns the number of faces.
int btk::TriangleMesh::GetMaxVertexId | ( | ) | const |
Return the greatest ID for the vertices stored in the mesh.
|
inline |
Returns the number of vertives.
|
inlinestatic |
Creates a smart pointer to a TriangleMesh object.
|
inlinestatic |
Creates a smart pointer to a TriangleMesh object.
|
inlinestatic |
Static function to return a null pointer.
|
inline |
Sets the index of the current frame used by the vertices to get their coordinates. The index for the first frame is 0.
void btk::TriangleMesh::SetDefinition | ( | const std::vector< int > & | m, |
const std::vector< VertexLink > & | l | ||
) |
Set the mesh based only on the given marker's id m and the links between them l. If one of the given link contains a wrong ID (out of range), then, it is not added to the list of edges.
void btk::TriangleMesh::SetDefinition | ( | const std::vector< int > & | m, |
const std::vector< VertexLink > & | l, | ||
const std::vector< VertexFace > & | f | ||
) |
Set the mesh based on the given marker's id m, the links between them (l) and the faces defined as a set of three markers. (f). If one of the given link/face contains a wrong ID (out of range), then, it is not added to the list of edges/faces.