Regina Calculation Engine
Public Member Functions | Static Public Member Functions | List of all members
regina::SnappedTwoSphere Class Reference

Represents a 2-sphere made from two snapped 3-balls in a triangulation. More...

#include <subcomplex/snappedtwosphere.h>

Inheritance diagram for regina::SnappedTwoSphere:
regina::ShortOutput< SnappedTwoSphere > regina::Output< SnappedTwoSphere, false >

Public Member Functions

 ~SnappedTwoSphere ()
 Destroys this snapped 2-sphere; note that the corresponding snapped 3-balls will also be destroyed. More...
 
SnappedTwoSphereclone () const
 Returns a newly created clone of this structure. More...
 
const SnappedBallsnappedBall (int index) const
 Returns one of the two snapped 3-balls whose equators are joined. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 A default implementation for detailed output. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Static Public Member Functions

static SnappedTwoSphereformsSnappedTwoSphere (Tetrahedron< 3 > *tet1, Tetrahedron< 3 > *tet2)
 Determines if the two given tetrahedra together form a snapped 2-sphere. More...
 
static SnappedTwoSphereformsSnappedTwoSphere (SnappedBall *ball1, SnappedBall *ball2)
 Determines if the two given snapped 3-balls together form a snapped 2-sphere. More...
 

Detailed Description

Represents a 2-sphere made from two snapped 3-balls in a triangulation.

This occurs when two snapped 3-balls are glued together at their equators (note that this gluing does not have to extend to triangular faces). Each 3-ball has a central disc (bounded by the 3-ball's equator and bisecting its internal edge), and these two discs together form an embedded 2-sphere in the triangulation.

This 2-sphere can be cut along and the two resulting 2-sphere boundaries filled in with 3-balls, and the resulting triangulation has the same number of tetrahedra as the original. If the snapped 2-sphere was separating, the resulting triangulation will contain the two terms of the corresponding connected sum.

Constructor & Destructor Documentation

§ ~SnappedTwoSphere()

regina::SnappedTwoSphere::~SnappedTwoSphere ( )
inline

Destroys this snapped 2-sphere; note that the corresponding snapped 3-balls will also be destroyed.

Member Function Documentation

§ clone()

SnappedTwoSphere* regina::SnappedTwoSphere::clone ( ) const

Returns a newly created clone of this structure.

Returns
a newly created clone.

§ detail()

std::string regina::Output< SnappedTwoSphere , supportsUtf8 >::detail ( ) const
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

§ formsSnappedTwoSphere() [1/2]

static SnappedTwoSphere* regina::SnappedTwoSphere::formsSnappedTwoSphere ( Tetrahedron< 3 > *  tet1,
Tetrahedron< 3 > *  tet2 
)
static

Determines if the two given tetrahedra together form a snapped 2-sphere.

Precondition
The two given tetrahedra are distinct.
Parameters
tet1the first tetrahedron to examine.
tet2the second tetrahedron to examine.
Returns
a newly created structure containing details of the snapped 2-sphere, or null if the given tetrahedra do not form a snapped 2-sphere.

§ formsSnappedTwoSphere() [2/2]

static SnappedTwoSphere* regina::SnappedTwoSphere::formsSnappedTwoSphere ( SnappedBall ball1,
SnappedBall ball2 
)
static

Determines if the two given snapped 3-balls together form a snapped 2-sphere.

If this is the case, the snapped 3-balls stored in the structure returned will be clones of the original 3-balls, not the original 3-balls themselves.

Precondition
The two given snapped 3-balls use distinct tetrahedra.
Parameters
ball1the first snapped 3-ball to examine.
ball2the second snapped 3-ball to examine.
Returns
a newly created structure containing details of the snapped 2-sphere, or null if the given snapped 3-balls do not form a snapped 2-sphere.

§ snappedBall()

const SnappedBall * regina::SnappedTwoSphere::snappedBall ( int  index) const
inline

Returns one of the two snapped 3-balls whose equators are joined.

Parameters
indexspecifies which of the two 3-balls to return; this must be either 0 or 1.
Returns
the corresponding snapped 3-ball.

§ str()

std::string regina::Output< SnappedTwoSphere , supportsUtf8 >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.

Python:
In addition to str(), this is also used as the Python "stringification" function __str__().
Returns
a short text representation of this object.

§ utf8()

std::string regina::Output< SnappedTwoSphere , supportsUtf8 >::utf8 ( ) const
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.

Returns
a short text representation of this object.

§ writeTextLong()

void regina::ShortOutput< SnappedTwoSphere , false >::writeTextLong ( std::ostream &  out) const
inlineinherited

A default implementation for detailed output.

This routine simply calls T::writeTextShort() and appends a final newline.

Python:
Not present.
Parameters
outthe output stream to which to write.

§ writeTextShort()

void regina::SnappedTwoSphere::writeTextShort ( std::ostream &  out) const
inline

Writes a short text representation of this object to the given output stream.

Python:
Not present.
Parameters
outthe output stream to which to write.

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

Copyright © 1999-2016, 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@maths.uq.edu.au).