Regina 7.0 Calculation Engine
|
Identifies a single normal or almost normal disc type within a triangulation. More...
#include <surface/disctype.h>
Public Member Functions | |
constexpr | DiscType () |
Creates a new null disc type, as described in the class notes. More... | |
constexpr | DiscType (size_t newTetIndex, int newType) |
Creates a new disc type initialised with the given values. More... | |
constexpr | DiscType (const DiscType &cloneMe)=default |
Creates a copy of the given disc type. More... | |
constexpr | operator bool () const |
Returns true if this disc type is non-null. More... | |
DiscType & | operator= (const DiscType &cloneMe)=default |
Sets this to a copy of the given disc type. More... | |
constexpr bool | operator== (const DiscType &compare) const |
Determines if this and the given disc type are identical. More... | |
constexpr bool | operator!= (const DiscType &compare) const |
Determines if this and the given disc type are different. More... | |
constexpr bool | operator< (const DiscType &compare) const |
Provides an ordering of disc types. More... | |
Public Attributes | |
size_t | 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 DiscType | NONE |
Represents a null disc type, as described in the class notes. 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 class can also store a null disc type; this is obtained by calling the default constructor, and it will have a type of -1 and a tetrahedron index of 0. You can test for a null disc type by casting to bool
.
Note that this class tracks disc types, not discs themselves. To track individual normal discs, see the DiscSpec class instead.
These objects are small enough to pass by value and swap with std::swap(), with no need for any specialised move operations or swap functions.
|
inlineconstexpr |
Creates a new null disc type, as described in the class notes.
|
inlineconstexpr |
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. |
|
constexprdefault |
Creates a copy of the given disc type.
cloneMe | the disc type to clone. |
|
inlineconstexpr |
Returns true
if this disc type is non-null.
The implementation will assume that a non-null disc type has non-negative type (as explained in the class notes).
true
if and only if this is not a null disc type.
|
inlineconstexpr |
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.
|
inlineconstexpr |
Provides an ordering of disc types.
Types are ordered first by tetrahedron and then by type. The null disc type 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. |
|
inlineconstexpr |
Determines if this and the given disc type are identical.
Regarding null disc types: two null DiscType objects that were both created using the default constructor will be considered equal to each other, and will not be equal to any "meaningful" disc type (where 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, as described in the class notes.
bool
. size_t regina::DiscType::tetIndex |
The index within the triangulation of the tetrahedron containing this disc type.
This must be between 0 and Triangulation<3>::size()-1 inclusive.
int regina::DiscType::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 DiscType class notes for details.