A lightweight class used to refer to a particular face of a particular tetrahedron. More...
#include <ntetface.h>
Public Member Functions | |
NTetFace () | |
Creates a new specifier with no initialisation. | |
NTetFace (int newTet, int newFace) | |
Creates a new specifier referring to the given face of the given tetrahedron. | |
NTetFace (const NTetFace &cloneMe) | |
Creates a new specifier referring to the same tetrahedron face as the given specifier. | |
bool | isBoundary (unsigned nTetrahedra) const |
Determines if this specifier represents the overall boundary. | |
bool | isBeforeStart () const |
Determines if this specifier represents a before-the-start value. | |
bool | isPastEnd (unsigned nTetrahedra, bool boundaryAlso) const |
Determines if this specifier represents a past-the-end value. | |
void | setFirst () |
Sets this specifier to the first face of the first tetrahedron. | |
void | setBoundary (unsigned nTetrahedra) |
Sets this specifier to the overall boundary. | |
void | setBeforeStart () |
Sets this specifier to before-the-start. | |
void | setPastEnd (unsigned nTetrahedra) |
Sets this specifier to past-the-end. | |
NTetFace & | operator= (const NTetFace &other) |
Sets this specifier to the value of the given specifier. | |
NTetFace | operator++ () |
Increments this specifier. | |
NTetFace | operator++ (int) |
Increments this specifier. | |
NTetFace | operator-- () |
Decrements this specifier. | |
NTetFace | operator-- (int) |
Decrements this specifier. | |
bool | operator== (const NTetFace &other) const |
Determines if this and the given specifier are identical. | |
bool | operator< (const NTetFace &other) const |
Determines if this is less than the given specifier. | |
bool | operator<= (const NTetFace &other) const |
Determines if this is less than or equal to the given specifier. | |
Public Attributes | |
int | tet |
The tetrahedron referred to. | |
int | face |
The face of the tetrahedron referred to. |
A lightweight class used to refer to a particular face of a particular tetrahedron.
Only the tetrahedron index and face number are stored.
Facilities are provided for iterating through tetrahedron faces. With this in mind, it is also possible to represent the overall boundary, a past-the-end value and a before-the-start value.
When iterating through the tetrahedron faces, the faces will be ordered first by tetrahedron index and then by face number. The overall boundary appears after all other tetrahedron faces.
If there are n tetrahedra, the tetrahedra will be numbered from 0 to n-1 inclusive. The boundary will be represented as tetrahedron n, face 0. The past-the-end value will be represented as tetrahedron n, face 1, and the before-the-start value will be represented as tetrahedron -1, face 3.
regina::NTetFace::NTetFace | ( | ) | [inline] |
Creates a new specifier with no initialisation.
This specifier must be initialised before it is used.
regina::NTetFace::NTetFace | ( | int | newTet, |
int | newFace | ||
) | [inline] |
Creates a new specifier referring to the given face of the given tetrahedron.
newTet | the given tetrahedron; see the class notes for allowable values of this parameter. |
newFace | the given face; this should be between 0 and 3 inclusive. |
regina::NTetFace::NTetFace | ( | const NTetFace & | cloneMe ) | [inline] |
Creates a new specifier referring to the same tetrahedron face as the given specifier.
cloneMe | the specifier to clone. |
bool regina::NTetFace::isBeforeStart | ( | ) | const [inline] |
Determines if this specifier represents a before-the-start value.
true
if and only if this specifier is before-the-start. bool regina::NTetFace::isBoundary | ( | unsigned | nTetrahedra ) | const [inline] |
Determines if this specifier represents the overall boundary.
nTetrahedra | the number of tetrahedra under consideration. Note that the boundary is represented in this specifier as tetrahedron nTetrahedra, face 0. |
true
if and only if this specifier represents the overall boundary. bool regina::NTetFace::isPastEnd | ( | unsigned | nTetrahedra, |
bool | boundaryAlso | ||
) | const [inline] |
Determines if this specifier represents a past-the-end value.
You can optionally declare the overall boundary to be past-the-end as well as the already predefined past-the-end value.
nTetrahedra | the number of tetrahedra under consideration. Note that past-the-end is represented in this specifier as tetrahedron nTetrahedra, face 1. |
boundaryAlso | true if the overall boundary should be considered past-the-end in addition to the predefined past-the-end value. |
true
if and only if this specifier is past-the-end. NTetFace regina::NTetFace::operator++ | ( | ) | [inline] |
Increments this specifier.
It will be changed to point to the next tetrahedron face.
Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.
NTetFace regina::NTetFace::operator++ | ( | int | ) | [inline] |
Increments this specifier.
It will be changed to point to the next tetrahedron face.
Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.
NTetFace regina::NTetFace::operator-- | ( | ) | [inline] |
Decrements this specifier.
It will be changed to point to the previous tetrahedron face.
Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.
NTetFace regina::NTetFace::operator-- | ( | int | ) | [inline] |
Decrements this specifier.
It will be changed to point to the previous tetrahedron face.
Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.
bool regina::NTetFace::operator< | ( | const NTetFace & | other ) | const [inline] |
Determines if this is less than the given specifier.
other | the specifier to compare with this. |
true
if and only if this is less than the given specifier. bool regina::NTetFace::operator<= | ( | const NTetFace & | other ) | const [inline] |
Determines if this is less than or equal to the given specifier.
other | the specifier to compare with this. |
true
if and only if this is less than or equal to the given specifier. Sets this specifier to the value of the given specifier.
other | the given specifier. |
bool regina::NTetFace::operator== | ( | const NTetFace & | other ) | const [inline] |
Determines if this and the given specifier are identical.
other | the specifier to compare with this. |
true
if and only if this and the given specifier are equal. void regina::NTetFace::setBeforeStart | ( | ) | [inline] |
Sets this specifier to before-the-start.
void regina::NTetFace::setBoundary | ( | unsigned | nTetrahedra ) | [inline] |
Sets this specifier to the overall boundary.
nTetrahedra | the number of tetrahedra under consideration. Note that the boundary is represented in this specifier as tetrahedron nTetrahedra, face 0. |
void regina::NTetFace::setFirst | ( | ) | [inline] |
Sets this specifier to the first face of the first tetrahedron.
void regina::NTetFace::setPastEnd | ( | unsigned | nTetrahedra ) | [inline] |
Sets this specifier to past-the-end.
nTetrahedra | the number of tetrahedra under consideration. Note that past-the-end is represented in this specifier as tetrahedron nTetrahedra, face 1. |
The face of the tetrahedron referred to.
The face number is between 0 and 3 inclusive.
The tetrahedron referred to.
Tetrahedron numbering begins at 0.