Regina 7.3 Calculation Engine
Public Member Functions | Public Attributes | Friends | List of all members
regina::PrismSpec Struct Reference

Specifies a single triangular prism in a tetrahedron. More...

#include <surface/prism.h>

Public Member Functions

 PrismSpec ()=default
 Creates a new uninitialised prism specifier. More...
 
 PrismSpec (size_t newTetIndex, int newEdge)
 Creates a new prism specifier containing the given values. More...
 
 PrismSpec (const PrismSpec &cloneMe)=default
 Creates a new prism specifier that is a clone of the given specifier. More...
 
PrismSpecoperator= (const PrismSpec &cloneMe)=default
 Copies the values from the given prism specifier into this specifier. More...
 
bool operator== (const PrismSpec &other) const
 Determines if this and the given prism specifier contain identical information. More...
 
bool operator!= (const PrismSpec &other) const
 Determines if this and the given prism specifier contain different information. More...
 

Public Attributes

size_t tetIndex
 The index in the triangulation of the tetrahedron containing the prism. More...
 
int edge
 The edge of the tetrahedron that is contained in this prism. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const PrismSpec &spec)
 Writes the given prism specifier to the given output stream. More...
 

Detailed Description

Specifies a single triangular prism in a tetrahedron.

If a tetrahedron contains normal quads, slicing along these quads splits the tetrahedron into two triangular prisms (and possibly some additional product regions). Each triangular prism contains two of the vertices and one of the edges of the original tetrahedron.

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.

Precondition
This class should only be used with embedded normal surfaces.

Constructor & Destructor Documentation

◆ PrismSpec() [1/3]

regina::PrismSpec::PrismSpec ( )
default

Creates a new uninitialised prism specifier.

◆ PrismSpec() [2/3]

regina::PrismSpec::PrismSpec ( size_t  newTetIndex,
int  newEdge 
)
inline

Creates a new prism specifier containing the given values.

Parameters
newTetIndexthe index in the triangulation of the tetrahedron containing the prism.
newEdgethe edge of the tetrahedron that is contained in this prism; this must be between 0 and 5 inclusive.

◆ PrismSpec() [3/3]

regina::PrismSpec::PrismSpec ( const PrismSpec cloneMe)
default

Creates a new prism specifier that is a clone of the given specifier.

Parameters
cloneMethe prism specifier to clone.

Member Function Documentation

◆ operator!=()

bool regina::PrismSpec::operator!= ( const PrismSpec other) const
inline

Determines if this and the given prism specifier contain different information.

Parameters
otherthe prism specifier to compare with this.
Returns
true if and only if this and the given prism specifier contain different information.

◆ operator=()

PrismSpec & regina::PrismSpec::operator= ( const PrismSpec cloneMe)
default

Copies the values from the given prism specifier into this specifier.

Parameters
cloneMethe prism specifier whose values should be copied.
Returns
a reference to this prism specifier.

◆ operator==()

bool regina::PrismSpec::operator== ( const PrismSpec other) const
inline

Determines if this and the given prism specifier contain identical information.

Parameters
otherthe prism specifier to compare with this.
Returns
true if and only if this and the given prism specifier contain identical information.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const PrismSpec spec 
)
friend

Writes the given prism specifier to the given output stream.

The prism specifier will be written as a pair (tetIndex, edge).

Parameters
outthe output stream to which to write.
specthe prism specifier to write.
Returns
a reference to out.

Member Data Documentation

◆ edge

int regina::PrismSpec::edge

The edge of the tetrahedron that is contained in this prism.

◆ tetIndex

size_t regina::PrismSpec::tetIndex

The index in the triangulation of the tetrahedron containing the prism.


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

Copyright © 1999-2023, 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).