|
| MeshPos ()=default |
| Empty constructor that creates a null (invalid) MeshPos.
|
|
| MeshPos (const FaceType *f, short e) |
|
| MeshPos (const FaceType *f, const VertexType *v) |
|
| MeshPos (const FaceType *f, const VertexType *v, short e) |
| Constructor that creates a MeshPos with the given facem vertex and edge. The given triplet must describe a valid MeshPos. The constructor asserts this condition.
|
|
const FaceType * | face () const |
|
const VertexType * | vertex () const |
|
short | edge () const |
|
const FaceType * | adjFace () const |
|
const VertexType * | adjVertex () const |
|
short | adjEdge () const |
|
bool | isValid () const |
| Returns true if this MeshPos is valid.
|
|
bool | isNull () const |
| Returns true if this is null, non initialized, MeshPos. The result of this function is different from calling !isValid().
|
|
bool | isEdgeOnBorder () const |
| Returns true if the current edge of this MeshPos is on a border. To check if is on border, this function checks wheter exists an adjacent face to the current face along the current edge of this MeshPos. It does not use border flags.
|
|
bool | isCCWOriented () const |
| Returns true if the current vertex of the MeshPos corresponts to the first vertex of the current edge. If this member function returns true , the next operations performed on the MeshPos will move in CounderClockWise order.
|
|
bool | flipFace () |
| Moves this MeshPos to the face adjacent to the current face that shares the same vertex and the same edge of this MeshPos. The function returns true if the current face is changed. If the adjacent face does not exist because the edge of the current face is on border, the current face does not change, and the MeshPos remains valid. In this case, the function returns false .
|
|
void | flipVertex () |
| Moves this MeshPos to the vertex adjacent to the current vertex that shares the same face and the same edge of this MeshPos.
|
|
void | flipEdge () |
| Moves this MeshPos to the edge adjacent to the current edge that shares the same face and the same vertex of this MeshPos.
|
|
void | nextEdgeAdjacentToV () |
| Moves this MeshPos to the next edge that is adjacent to the current vertex of the MeshPos. This Move corresponds to make a flipEdge() and then a flipFace() moves. Using this move, it is possible to visit the next face and the next edge adjacent to the current vertex, and can be used to navigate in the star of the current vertex.
|
|
bool | nextEdgeOnBorderAdjacentToV () |
| Moves the MeshPos to the next edge on border that is adjacent to the current vertex of the MeshPos. Basically, cycles on the edges adjacent to the current vertex, and stops when finds a border edge.
|
|
uint | numberOfAdjacentFacesToV () const |
| Returns the number of adjacent faces to the current vertex of this MeshPos. This works also for vertices that are on a border, and the starting edge and face is ininfluent. The only requirement is that this MeshPos is valid.
|
|
bool | operator== (const MeshPos &op) const |
|
bool | operator!= (const MeshPos &op) const |
|
bool | operator< (const MeshPos &op) const |
|
template<face::HasAdjacentFaces FaceType>
class vcl::MeshPos< FaceType >
The MeshPos class describes a "Position in a Mesh" that can be identified with a triplet of Face-Vertex-Edge, where:
- the Vertex is part of the Face;
- the edge is an index less than the number of vertices of the Face
- The Vertex is part of the Edge in the Face.
Its utility is to navigate the topology of the Mesh trough a set of well-defined operations that allow to "move" the MeshPos object.
To be used, the MeshPos requires that the Mesh on which the given Face-Vertex-Edge triplet is defined, has per Face Adjacent Faces topology informtion.
template<face::HasAdjacentFaces FaceType>
Moves this MeshPos to the next edge that is adjacent to the current vertex of the MeshPos. This Move corresponds to make a flipEdge()
and then a flipFace()
moves. Using this move, it is possible to visit the next face and the next edge adjacent to the current vertex, and can be used to navigate in the star of the current vertex.
Note that if a "next face" does not exists because we are on border, the MeshPos flips only the current edge, staying on the same face (see the flipFace()
function for more details).