Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

regina::NTetrahedron Class Reference
[Triangulations]

Represents a tetrahedron in a triangulation. More...

#include <ntetrahedron.h>

Inheritance diagram for regina::NTetrahedron:

regina::ShareableObject regina::boost::noncopyable List of all members.

Public Member Functions

 NTetrahedron ()
 Creates a new tetrahedron with empty description and no faces joined to anything.
 NTetrahedron (const std::string &desc)
 Creates a new tetrahedron with the given description and no faces joined to anything.
virtual ~NTetrahedron ()
 Destroys this tetrahedron.
const std::string & getDescription () const
 Returns the text description associated with this tetrahedron.
void setDescription (const std::string &desc)
 Sets the text description associated with this tetrahedron.
NTetrahedrongetAdjacentTetrahedron (int face) const
 Returns the tetrahedron glued to the given face of this tetrahedron, or 0 if the given face is on the triangulation boundary.
NPerm getAdjacentTetrahedronGluing (int face) const
 Returns a permutation representing the correspondence between vertices of this tetrahedron and vertices of the tetrahedron glued to the given face of this tetrahedron.
int getAdjacentFace (int face) const
 Examines the tetrahedron glued to the given face of this tetrahedron and returns the corresponding face of that tetrahedron.
bool hasBoundary () const
 Determines if this tetrahedron has any faces that are boundary faces.
void joinTo (int myFace, NTetrahedron *you, NPerm gluing)
 Joins the given face of this tetrahedron to another tetrahedron.
NTetrahedronunjoin (int myFace)
 Unglues the given face of this tetrahedron from whatever is joined to it.
void isolate ()
 Undoes any face gluings involving this tetrahedron.
NComponentgetComponent () const
 Returns the triangulation component to which this tetrahedron belongs.
NVertexgetVertex (int vertex) const
 Returns the vertex in the triangulation skeleton corresponding to the given vertex of this tetrahedron.
NEdgegetEdge (int edge) const
 Returns the edge in the triangulation skeleton corresponding to the given edge of this tetrahedron.
NFacegetFace (int face) const
 Returns the face in the triangulation skeleton corresponding to the given face of this tetrahedron.
NPerm getEdgeMapping (int edge) const
 The edge in the skeleton corresponding to the requested edge of this tetrahedron is examined, and a permutation mapping vertices (0,1) of the skeleton edge to the corresponding vertices of this tetrahedron is returned.
NPerm getFaceMapping (int face) const
 The face in the skeleton corresponding to the requested face of this tetrahedron is examined, and a permutation mapping vertices (0,1,2) of the skeleton face to the corresponding vertices of this tetrahedron is returned.
void writeTextShort (std::ostream &out) const
 Writes this object in short text format to the given output stream.

Friends

class NTriangulation
 Allow access to private members.

Detailed Description

Represents a tetrahedron in a triangulation.

With each tetrahedron is stored various pieces of information regarding the overall skeletal structure and component structure of the triangulation. This information will be allocated, calculated and deallocated by the NTriangulation object containing the corresponding tetrahedra.

Whenever the gluings of tetrahedra are altered, the external routine responsible for changing the gluings (the routine that calls joinTo() and unjoin()) must call NTriangulation::gluingsHaveChanged() for the triangulation containing the tetrahedra concerned; this will ensure that skeletal information and other properties of the triangulation are recalculated when necessary.


Constructor & Destructor Documentation

regina::NTetrahedron::NTetrahedron  ) 
 

Creates a new tetrahedron with empty description and no faces joined to anything.

regina::NTetrahedron::NTetrahedron const std::string &  desc  ) 
 

Creates a new tetrahedron with the given description and no faces joined to anything.

Parameters:
desc the description to give the new tetrahedron.

regina::NTetrahedron::~NTetrahedron  )  [inline, virtual]
 

Destroys this tetrahedron.


Member Function Documentation

int regina::NTetrahedron::getAdjacentFace int  face  )  const [inline]
 

Examines the tetrahedron glued to the given face of this tetrahedron and returns the corresponding face of that tetrahedron.

That is, the returned face of the adjacent tetrahedron is glued to the given face of this tetrahedron.

Precondition:
The given face of this tetrahedron has a tetrahedron (possibly this one) glued to it.
Parameters:
face the face of this tetrahedron whose gluing we will examine. This should be between 0 and 3 inclusive, where face i is opposite vertex i of the tetrahedron.
Returns:
the face of the tetrahedron adjacent along the given face that is in fact glued to the given face of this tetrahedron.

NTetrahedron * regina::NTetrahedron::getAdjacentTetrahedron int  face  )  const [inline]
 

Returns the tetrahedron glued to the given face of this tetrahedron, or 0 if the given face is on the triangulation boundary.

Parameters:
face the face of this tetrahedron to examine. This should be between 0 and 3 inclusive, where face i is opposite vertex i of the tetrahedron.
Returns:
the tetrahedron glued to the given face, or 0 if the given face lies on the boundary.

NPerm regina::NTetrahedron::getAdjacentTetrahedronGluing int  face  )  const [inline]
 

Returns a permutation representing the correspondence between vertices of this tetrahedron and vertices of the tetrahedron glued to the given face of this tetrahedron.

If we call the returned permutation p, then for each vertex v of this tetrahedron, p[v] will be the vertex of the adjacent tetrahedron that is identified with v according to the gluing along the given face of this tetrahedron.

Precondition:
The given face of this tetrahedron has a tetrahedron (possibly this one) glued to it.
Parameters:
face the face of this tetrahedron whose gluing we will examine. This should be between 0 and 3 inclusive, where face i is opposite vertex i of the tetrahedron.
Returns:
a permutation mapping the vertices of this tetrahedron to the vertices of the tetrahedron adjacent along the given face.

NComponent * regina::NTetrahedron::getComponent  )  const [inline]
 

Returns the triangulation component to which this tetrahedron belongs.

Precondition:
This tetrahedron belongs to a triangulation whose skeletal information has been calculated.
Returns:
the component containing this tetrahedron.

const std::string & regina::NTetrahedron::getDescription  )  const [inline]
 

Returns the text description associated with this tetrahedron.

Returns:
the description of this tetrahedron.

NEdge * regina::NTetrahedron::getEdge int  edge  )  const [inline]
 

Returns the edge in the triangulation skeleton corresponding to the given edge of this tetrahedron.

Precondition:
This tetrahedron belongs to a triangulation whose skeletal information has been calculated.
Parameters:
edge the edge of this tetrahedron to examine. This should be between 0 and 5 inclusive.
Returns:
the edge of the skeleton corresponding to the requested tetrahedron edge.

NPerm regina::NTetrahedron::getEdgeMapping int  edge  )  const [inline]
 

The edge in the skeleton corresponding to the requested edge of this tetrahedron is examined, and a permutation mapping vertices (0,1) of the skeleton edge to the corresponding vertices of this tetrahedron is returned.

Thus, for each i=0,1 and each tetrahedron containing this skeleton edge, getEdgeMapping(...)[i] will refer to vertices that are all identified to each other along the skeleton edge concerned.

Furthermore, following the ordered edges defined by the images of (2,3) under the returned permutations will produce an ordered chain circling the skeleton edge. That is, if tetrahedra A and B are adjacent along the edge concerned and also at vertex V, then if A.getEdgeMapping(...)[3] refers to V, we will have B.getEdgeMapping(...)[2] referring to V also, and B will appear immediately after A in the list of embeddings stored in the corresponding NEdge object. See NEdge::getEmbeddings() for further details.

Parameters:
edge the edge of this tetrahedron to examine. This should be between 0 and 5 inclusive.
Returns:
a mapping from vertices (0,1) of the requested edge to the vertices of this tetrahedron.

NFace * regina::NTetrahedron::getFace int  face  )  const [inline]
 

Returns the face in the triangulation skeleton corresponding to the given face of this tetrahedron.

Precondition:
This tetrahedron belongs to a triangulation whose skeletal information has been calculated.
Parameters:
face the face of this tetrahedron to examine. This should be between 0 and 3 inclusive, where face i lies opposite vertex i.
Returns:
the face of the skeleton corresponding to the requested tetrahedron face.

NPerm regina::NTetrahedron::getFaceMapping int  face  )  const [inline]
 

The face in the skeleton corresponding to the requested face of this tetrahedron is examined, and a permutation mapping vertices (0,1,2) of the skeleton face to the corresponding vertices of this tetrahedron is returned.

Thus, for each i=0,1,2 and all tetrahedra containing this skeleton face, getFaceMapping(...)[i] will refer to vertices that are all identified to each other along the skeleton face concerned.

Parameters:
face the face of this tetrahedron to examine. This should be between 0 and 3 inclusive.
Returns:
a mapping from vertices (0,1,2) of the requested face to the vertices of this tetrahedron.

NVertex * regina::NTetrahedron::getVertex int  vertex  )  const [inline]
 

Returns the vertex in the triangulation skeleton corresponding to the given vertex of this tetrahedron.

Precondition:
This tetrahedron belongs to a triangulation whose skeletal information has been calculated.
Parameters:
vertex the vertex of this tetrahedron to examine. This should be between 0 and 3 inclusive.
Returns:
the vertex of the skeleton corresponding to the requested tetrahedron vertex.

bool regina::NTetrahedron::hasBoundary  )  const
 

Determines if this tetrahedron has any faces that are boundary faces.

Returns:
true if and only if this tetrahedron has any boundary faces.

void regina::NTetrahedron::isolate  ) 
 

Undoes any face gluings involving this tetrahedron.

Any other tetrahedra involved will be automatically updated.

void regina::NTetrahedron::joinTo int  myFace,
NTetrahedron you,
NPerm  gluing
 

Joins the given face of this tetrahedron to another tetrahedron.

The other tetrahedron involved will be automatically updated.

Warning:
Note that NTriangulation::gluingsHaveChanged() will have to be called after all joins and unjoins have been performed.
Precondition:
The given face of this tetrahedron is not currently glued to anything.

The face of the other tetrahedron that will be glued to the given face of this tetrahedron is not currently glued to anything.

If the other tetrahedron involved is this tetrahedron, we are not attempting to glue a face to itself.

Parameters:
myFace the face of this tetrahedron that will be glued to the given other tetrahedron. This should be between 0 and 3 inclusive, where face i is opposite vertex i of the tetrahedron.
you the tetrahedron (possibly this one) that will be glued to the given face of this tetrahedron.
gluing a permutation describing the mapping of vertices by which the two tetrahedra will be joined. Each vertex v of this tetrahedron that lies on the given face will be identified with vertex gluing[v] of tetrahedron you. In addition, the face of you that will be glued to the given face of this tetrahedron will be face number gluing[myFace].

void regina::NTetrahedron::setDescription const std::string &  desc  )  [inline]
 

Sets the text description associated with this tetrahedron.

Note that descriptions need not be unique, and may be empty.

Parameters:
desc the new description to assign to this tetrahedron.

NTetrahedron* regina::NTetrahedron::unjoin int  myFace  ) 
 

Unglues the given face of this tetrahedron from whatever is joined to it.

The other tetrahedron involved (possibly this one) will be automatically updated.

Warning:
Note that NTriangulation::gluingsHaveChanged() will have to be called after all joins and unjoins have been performed.
Precondition:
The given face of this tetrahedron has a tetrahedron (possibly this one) glued to it.
Parameters:
myFace the face of this tetrahedron whose gluing we will undo. This should be between 0 and 3 inclusive, where face i is opposite vertex i of the tetrahedron.
Returns:
the tetrahedron that was originally glued to the given face of this tetrahedron.

void regina::NTetrahedron::writeTextShort std::ostream &  out  )  const [inline, virtual]
 

Writes this object in short text format to the given output stream.

The output should fit on a single line and no newline should be written.

Python:
The parameter out does not exist; standard output will be used.
Parameters:
out the output stream to which to write.

Implements regina::ShareableObject.


Friends And Related Function Documentation

friend class NTriangulation [friend]
 

Allow access to private members.


The documentation for this class was generated from the following file:
Copyright © 1999-2004, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).