Regina Calculation Engine
|
Represents a component of the boundary of a triangulation. More...
#include <triangulation/nboundarycomponent.h>
Public Member Functions | |
virtual | ~NBoundaryComponent () |
Default destructor. More... | |
unsigned long | index () const |
Returns the index of this boundary component in the underlying triangulation. More... | |
unsigned long | getNumberOfTriangles () const |
Returns the number of triangles in this boundary component. More... | |
unsigned long | getNumberOfFaces () const |
A deprecated alias for getNumberOfTriangles(). More... | |
unsigned long | getNumberOfEdges () const |
Returns the number of edges in this boundary component. More... | |
unsigned long | getNumberOfVertices () const |
Returns the number of vertices in this boundary component. More... | |
NTriangle * | getTriangle (unsigned long index) const |
Returns the requested triangle in this boundary component. More... | |
NTriangle * | getFace (unsigned long index) const |
A deprecated alias for getTriangle(). More... | |
NEdge * | getEdge (unsigned long index) const |
Returns the requested edge in this boundary component. More... | |
NVertex * | getVertex (unsigned long index) const |
Returns the requested vertex in this boundary component. More... | |
NComponent * | getComponent () const |
Returns the component of the triangulation to which this boundary component belongs. More... | |
long | getEulerChar () const |
Returns the Euler characteristic of this boundary component. More... | |
long | getEulerCharacteristic () const |
A deprecated alias for getEulerChar(). More... | |
bool | isIdeal () const |
Determines if this boundary component is ideal. More... | |
bool | isOrientable () const |
Determines if this boundary component is orientable. More... | |
void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. More... | |
void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. More... | |
long | markedIndex () const |
Returns the index at which this object is stored in an NMarkedVector. More... | |
Input and Output | |
std::string | str () const |
Returns the output from writeTextShort() as a string. More... | |
std::string | toString () const |
A deprecated alias for str(), which returns the output from writeTextShort() as a string. More... | |
std::string | detail () const |
Returns the output from writeTextLong() as a string. More... | |
std::string | toStringLong () const |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More... | |
Friends | |
class | NTriangulation |
Allow access to private members. More... | |
Represents a component of the boundary of a triangulation.
Note that an ideal vertex constitutes a boundary component of its own.
We can run into some interesting cases with invalid triangulations. Suppose some vertex link is a multiply punctured surface (which makes the vertex and hence the entire triangulation invalid). This means that different parts of the 3-manifold boundary are effectively "pinched" together. If this happens, the different parts of the boundary that are pinched might or might not be listed as part of the same boundary component; if not then the offending vertex will be included in all of these boundary components. Nevertheless, only one of these can be considered the "official" boundary component of the vertex as returned by NVertex::getBoundaryComponent(). This is all a bit of a mess, but then again the entire triangulation is invalid and so you almost certainly have bigger problems to deal with.
Boundary components are highly temporary; once a triangulation changes, all its boundary component objects will be deleted and new ones will be created.
|
inlinevirtual |
Default destructor.
|
inherited |
Returns the output from writeTextLong() as a string.
|
inline |
Returns the component of the triangulation to which this boundary component belongs.
|
inline |
Returns the requested edge in this boundary component.
For an ideal boundary component (which consists of a single vertex), there are no real edges in the boundary component and this routine cannot be used.
index | the index of the requested edge in the boundary component. This should be between 0 and getNumberOfEdges()-1 inclusive. Note that the index of a edge in the boundary component need not be the index of the same edge in the entire triangulation. |
|
inline |
Returns the Euler characteristic of this boundary component.
If this boundary component is ideal, the Euler characteristic of the link of the corresponding ideal vertex is returned.
|
inline |
A deprecated alias for getEulerChar().
Returns the Euler characteristic of this boundary component. If this boundary component is ideal, the Euler characteristic of the link of the corresponding ideal vertex is returned.
|
inline |
A deprecated alias for getTriangle().
This routine returns the requested triangular face in this boundary component. See getTriangle() for further details.
index | the index of the requested triangle in the boundary component. This should be between 0 and getNumberOfTriangles()-1 inclusive. Note that the index of a triangle in the boundary component need not be the index of the same triangle in the entire triangulation. |
|
inline |
Returns the number of edges in this boundary component.
|
inline |
A deprecated alias for getNumberOfTriangles().
This routine returns the number of triangular faces in this boundary component. See getNumberOfTriangles() for further details.
|
inline |
Returns the number of triangles in this boundary component.
|
inline |
Returns the number of vertices in this boundary component.
|
inline |
Returns the requested triangle in this boundary component.
For an ideal boundary component (which consists of a single vertex), there are no real triangles in the boundary component and this routine cannot be used.
index | the index of the requested triangle in the boundary component. This should be between 0 and getNumberOfTriangles()-1 inclusive. Note that the index of a triangle in the boundary component need not be the index of the same triangle in the entire triangulation. |
|
inline |
Returns the requested vertex in this boundary component.
index | the index of the requested vertex in the boundary component. This should be between 0 and getNumberOfVertices()-1 inclusive. Note that the index of a vertex in the boundary component need not be the index of the same vertex in the entire triangulation. |
|
inline |
Returns the index of this boundary component in the underlying triangulation.
This is identical to calling getTriangulation()->boundaryComponentIndex(this)
.
|
inline |
Determines if this boundary component is ideal.
This is the case if and only if it consists of a single (ideal) vertex and no triangles.
true
if and only if this boundary component is ideal.
|
inline |
Determines if this boundary component is orientable.
If the boundary component is ideal, the orientability of the link of the corresponding ideal vertex is returned.
true
if and only if this boundary component is orientable.
|
inlineinherited |
Returns the index at which this object is stored in an NMarkedVector.
If this object does not belong to an NMarkedVector, the return value is undefined.
|
inherited |
Returns the output from writeTextShort() as a string.
__str__()
function.
|
inlineinherited |
A deprecated alias for str(), which returns the output from writeTextShort() as a string.
|
inlineinherited |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string.
|
virtual |
Writes this object in long text format to the given output stream.
The output should provide the user with all the information they could want. The output should be human-readable, should not contain extremely long lines (so users can read the output in a terminal), and should end with a final newline.
The default implementation of this routine merely calls writeTextShort() and adds a newline.
out | the output stream to which to write. |
Reimplemented from regina::ShareableObject.
|
inlinevirtual |
Writes this object in short text format to the given output stream.
The output should be human-readable, should fit on a single line, and should not end with a newline.
out | the output stream to which to write. |
Implements regina::ShareableObject.
|
friend |
Allow access to private members.