Regina Calculation Engine
Public Member Functions | Protected Attributes | List of all members
regina::NDiscSetTet Class Reference

Represents a set of normal discs inside a single tetrahedron. More...

#include <surfaces/ndisc.h>

Inheritance diagram for regina::NDiscSetTet:
regina::NDiscSetTetData< T >

Public Member Functions

 NDiscSetTet (const NNormalSurface &surface, unsigned long tetIndex)
 Creates a new set of normal discs corresponding to the discs of the given normal surface that lie within the given tetrahedron. More...
 
 NDiscSetTet (unsigned long tri0, unsigned long tri1, unsigned long tri2, unsigned long tri3, unsigned long quad0, unsigned long quad1, unsigned long quad2, unsigned long oct0=0, unsigned long oct1=0, unsigned long oct2=0)
 Creates a new set of normal discs where the number of discs of each type is explicitly given. More...
 
virtual ~NDiscSetTet ()
 Destroys this disc set. More...
 
unsigned long nDiscs (int type) const
 Determines the number of discs of the given type inside this tetrahedron. More...
 
unsigned long arcFromDisc (int arcFace, int arcVertex, int discType, unsigned long discNumber) const
 Determines which normal arc of a given type on a given face of this tetrahedron corresponds to the given normal disc. More...
 
void discFromArc (int arcFace, int arcVertex, unsigned long arcNumber, int &discType, unsigned long &discNumber) const
 Determines which normal disc in this tetrahedron meets the given normal arc on the given face. More...
 

Protected Attributes

unsigned long internalNDiscs [10]
 The number of discs of each type. More...
 

Detailed Description

Represents a set of normal discs inside a single tetrahedron.

The numbers of discs of each type are stored in this structure, so querying them is fast regardless of the underlying normal surface coordinate system used.

Warning
This class converts the number of normal discs of a given type from NLargeInteger to unsigned long. See the precondition below.
Precondition
The number of normal discs of a particular type in a particular tetrahedron can be represented by a long integer.
This class should only be used with embedded normal surfaces.
Todo:
Bug (long-term): Have some error flag so we can barf politely if the number of normal discs of a given type does not fit into an unsigned long. See how this affects NDiscSetTetData also.

Constructor & Destructor Documentation

regina::NDiscSetTet::NDiscSetTet ( const NNormalSurface surface,
unsigned long  tetIndex 
)

Creates a new set of normal discs corresponding to the discs of the given normal surface that lie within the given tetrahedron.

Parameters
surfacethe normal surface whose discs we shall use.
tetIndexthe index in the triangulation of the tetrahedron that our discs must lie in; this must be between 0 and tri.getNumberOfTetrahedra()-1 inclusive, where tri is the triangulation containing the given normal surface.
regina::NDiscSetTet::NDiscSetTet ( unsigned long  tri0,
unsigned long  tri1,
unsigned long  tri2,
unsigned long  tri3,
unsigned long  quad0,
unsigned long  quad1,
unsigned long  quad2,
unsigned long  oct0 = 0,
unsigned long  oct1 = 0,
unsigned long  oct2 = 0 
)

Creates a new set of normal discs where the number of discs of each type is explicitly given.

Parameters
tri0the number of triangular discs surrounding vertex 0.
tri1the number of triangular discs surrounding vertex 1.
tri2the number of triangular discs surrounding vertex 2.
tri3the number of triangular discs surrounding vertex 3.
quad0the number of quadrilateral discs of type 0.
quad1the number of quadrilateral discs of type 1.
quad2the number of quadrilateral discs of type 2.
oct0the number of octahedral discs of type 0.
oct1the number of octahedral discs of type 1.
oct2the number of octahedral discs of type 2.
regina::NDiscSetTet::~NDiscSetTet ( )
inlinevirtual

Destroys this disc set.

Member Function Documentation

unsigned long regina::NDiscSetTet::arcFromDisc ( int  arcFace,
int  arcVertex,
int  discType,
unsigned long  discNumber 
) const

Determines which normal arc of a given type on a given face of this tetrahedron corresponds to the given normal disc.

Precondition
The given normal disc actually meets a normal arc of the given type on the given face.
Parameters
arcFacethe face of this tetrahedron containing the normal arc (between 0 and 3 inclusive).
arcVertexthe vertex of this tetrahedron about which the normal arc runs (between 0 and 3 inclusive); arcFace and arcVertex should not be the same.
discTypethe disc type of the given normal disc; this should be between 0 and 9 inclusive, as described in the NDiscSpec class notes.
discNumberindicates which normal disc of the given disc type is referred to (between 0 and nDiscs(discType)-1 inclusive).
Returns
the number of the normal arc of the given type that belongs to the given normal disc. Arcs of a given type (where arcFace and arcVertex together define the arc type) are numbered starting at 0 from the tetrahedron vertex outwards.
void regina::NDiscSetTet::discFromArc ( int  arcFace,
int  arcVertex,
unsigned long  arcNumber,
int &  discType,
unsigned long &  discNumber 
) const

Determines which normal disc in this tetrahedron meets the given normal arc on the given face.

Precondition
The given normal arc actually exists in the normal surface with which this NDiscSetTet object was created.
Parameters
arcFacethe face of this tetrahedron containing the normal arc (between 0 and 3 inclusive).
arcVertexthe vertex of this tetrahedron about which the normal arc runs (between 0 and 3 inclusive); arcFace and arcVertex should not be the same.
arcNumberindicates which normal arc of the given type is referred to. Arcs of a given type (where arcFace and arcVertex together define the arc type) are numbered starting at 0 from the tetrahedron vertex outwards.
discTypereturns the disc type of the normal disc that meets the given normal arc; this will be between 0 and 9 inclusive, as described in the NDiscSpec class notes. Any value may be initially passed.
discNumberreturns a number that indicates which normal disc of the returned disc type (discType) meets the given normal arc; this will be between 0 and nDiscs(discType)-1 inclusive. Any value may be initially passed.
unsigned long regina::NDiscSetTet::nDiscs ( int  type) const
inline

Determines the number of discs of the given type inside this tetrahedron.

Parameters
typethe disc type to examine; this should be between 0 and 9 inclusive. Disc types are outlined in the NDiscSpec class notes.
Returns
the number of discs of the given type inside this tetrahedron.

Member Data Documentation

unsigned long regina::NDiscSetTet::internalNDiscs[10]
protected

The number of discs of each type.


The documentation for this class was generated from the following file:

Copyright © 1999-2013, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).