Regina Calculation Engine
|
Identifies a single normal or almost normal disc type within a triangulation. More...
#include <surfaces/ndisctype.h>
Public Member Functions | |
NDiscType () | |
Creates a new disc type initialised to NONE. More... | |
NDiscType (unsigned long newTetIndex, int newType) | |
Creates a new disc type initialised with the given values. More... | |
NDiscType (const NDiscType &cloneMe) | |
Creates a copy of the given disc type. More... | |
NDiscType & | operator= (const NDiscType &cloneMe) |
Sets this to a copy of the given disc type. More... | |
bool | operator== (const NDiscType &compare) const |
Determines if this and the given disc type are identical. More... | |
bool | operator!= (const NDiscType &compare) const |
Determines if this and the given disc type are different. More... | |
bool | operator< (const NDiscType &compare) const |
Provides an ordering of disc types. More... | |
Public Attributes | |
unsigned long | tetIndex |
The index within the triangulation of the tetrahedron containing this disc type. More... | |
int | type |
Identifies the disc type within the specified tetrahedron. More... | |
Static Public Attributes | |
static const NDiscType | NONE |
Represents a "null" disc type. More... | |
Identifies a single normal or almost normal disc type within a triangulation.
A disc type is identified by a tetrahedron index (the data member tetIndex), and a disc type within that tetrahedron (the data member type). The latter could mean any number of things according to the application at hand. For instance, if we are tracking quad types then type might be an integer between 0 and 2 inclusive, or if we are tracking all normal discs in standard coordinates then type might be an integer between 0 and 6 inclusive. Ultimately, the specific meaning of type is left to the user.
It is however assumed that type will always be non-negative for "meaningful" disc types; this is to ensure that the constant NONE does not clash with any meaningful values.
Note that this class tracks disc types, not discs themselves. To track individual normal discs, see the NDiscSpec class instead.
|
inline |
Creates a new disc type initialised to NONE.
|
inline |
Creates a new disc type initialised with the given values.
newTetIndex | the index within the triangulation of the tetrahedron containing this disc type. |
newType | the specific disc type within the given tetrahedron; see the class notes for the meaning of this field. |
|
inline |
Creates a copy of the given disc type.
cloneMe | the disc type to clone. |
|
inline |
Determines if this and the given disc type are different.
This is the negation of the equality test; see operator == for further details.
true
if this and the given disc type are different, or false
if they are identical.
|
inline |
Provides an ordering of disc types.
Types are ordered first by tetrahedron and then by type. NONE is considered less than all "meaningful" disc types.
true
if this disc type appears before the given disc type in the ordering, or false
if not. Sets this to a copy of the given disc type.
cloneMe | the disc type to clone. |
|
inline |
Determines if this and the given disc type are identical.
Note that NONE is considered identical to NONE, and that NONE will not be equal to any "meaningful" disc type (specifically, a disc type for which type is non-negative).
true
if this and the given disc type are identical, or false
if they are different.
|
static |
Represents a "null" disc type.
Here the type member is negative, to distinguish it from "meaningful" disc types in which type is always zero or positive.
unsigned long regina::NDiscType::tetIndex |
The index within the triangulation of the tetrahedron containing this disc type.
This must be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive.
int regina::NDiscType::type |
Identifies the disc type within the specified tetrahedron.
The precise meaning of this member is left up to the user, though it must be non-negative for "meaningful" disc types. See the NDiscType class notes for details.