SimpleFastOpenAtomicVisualiser
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
meshes.h File Reference
#include <triangle.h>
Include dependency graph for meshes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
void centreMesh (std::vector< Trixel< T > > &mesh)
 Centre a triangulation at (0,0,0).
 

Variables

template<class T >
const T phi = (1.0+2.23606797749979)*0.5
 Golden ratio.
 
template<class T >
const std::vector< vec3< T > > DODECAHEDRON_VERTICES
 A centred Dodecahedron's vertices.
 
template<class T >
const std::vector< Trixel< T > > DODECAHEDRON
 A centred Dodecahedron's triangulation.
 
template<class T >
const T ICOSAHEDRON_X = 0.525731112119133606
 Golden ratio scaled for a unit icosahedron.
 
template<class T >
const T ICOSAHEDRON_Z = 0.850650808352039932
 1 scaled for a unit icosahedron.
 
template<class T >
const std::vector< vec3< T > > ICOSAHEDRON_VERTICES
 A centred Icosahedron's vertices.
 
template<class T >
const std::vector< Trixel< T > > ICOSAHEDRON
 A centred Icosahedrons's triangulation.
 
template<class T >
const std::vector< vec3< T > > OCTAHEDRON_VERTICES
 A centred Octahedron's vertices.
 
template<class T >
const std::vector< Trixel< T > > OCTAHEDRON
 A centred Octahedron's triangulation.
 
template<class T >
const T INV_SQRT3 = 1.0/1.7320508075688772
 
template<class T >
const std::vector< vec3< T > > TETRAHEDRON_VERTICES
 A centred Tetrahedron's vertices.
 
template<class T >
const std::vector< Trixel< T > > TETRAHEDRON
 A centred Tetrahedron's triangulation.
 
template<class T >
const T INV_SQRT2 = 1.0/1.4142135623730951
 
template<class T >
const std::vector< vec3< T > > CUBE_VERTICES
 A centred Cube's vertices.
 
template<class T >
const std::vector< Trixel< T > > CUBE
 A centred Cube's triangulation.
 
template<class T >
const T SQRT3 = 1.7320508075688772
 
template<class T >
const T SQRT6 = 2.449489742783178
 
template<class T >
const T C = 0.5021179759100816
 
template<class T >
const std::vector< vec3< T > > TRIAUGMENTED_TRIANGULAR_PRISM_VERTICES
 A centred Triagmented triangular prism's vertices.
 
template<class T >
const std::vector< Trixel< T > > TRIAUGMENTED_TRIANGULAR_PRISM
 A centred Triagmented triangular prism's triangulation.
 

Function Documentation

◆ centreMesh()

template<class T >
void centreMesh ( std::vector< Trixel< T > > &  mesh)

Centre a triangulation at (0,0,0).

Template Parameters
Tnumeric type.
Parameters
meshthe triangulation to centre.

Variable Documentation

◆ C

template<class T >
const T C = 0.5021179759100816

◆ CUBE

template<class T >
const std::vector<Trixel<T> > CUBE
Initial value:

A centred Cube's triangulation.

Template Parameters
Tnumeric type.

◆ CUBE_VERTICES

template<class T >
const std::vector<vec3<T> > CUBE_VERTICES
Initial value:
=
{
INV_SQRT2<T>*vec3<T>(-1.0, -1.0, 1.0),
INV_SQRT2<T>*vec3<T>(1.0, -1.0, 1.0),
INV_SQRT2<T>*vec3<T>(1.0, 1.0, 1.0),
INV_SQRT2<T>*vec3<T>(-1.0, 1.0, 1.0),
INV_SQRT2<T>*vec3<T>(-1.0, -1.0, -1.0),
INV_SQRT2<T>*vec3<T>(1.0, -1.0, -1.0),
INV_SQRT2<T>*vec3<T>(1.0, 1.0, -1.0),
INV_SQRT2<T>*vec3<T>(-1.0, 1.0, -1.0)
}

A centred Cube's vertices.

Template Parameters
Tnumeric type.

◆ DODECAHEDRON

template<class T >
const std::vector<Trixel<T> > DODECAHEDRON

A centred Dodecahedron's triangulation.

Template Parameters
Tnumeric type.

◆ DODECAHEDRON_VERTICES

template<class T >
const std::vector<vec3<T> > DODECAHEDRON_VERTICES
Initial value:
=
{
vec3<T>(1.0, 1.0, 1.0)/phi<T>,
vec3<T>(1.0, 1.0, -1.0)/phi<T>,
vec3<T>(1.0, -1.0, 1.0)/phi<T>,
vec3<T>(-1.0, 1.0, 1.0)/phi<T>,
vec3<T>(-1.0, -1.0, -1.0)/phi<T>,
vec3<T>(-1.0, -1.0, 1.0)/phi<T>,
vec3<T>(-1.0, 1.0, -1.0)/phi<T>,
vec3<T>(1.0, -1.0, -1.0)/phi<T>,
vec3<T>(0.0, phi<T>, -1.0/phi<T>)/phi<T>,
vec3<T>(0.0, -phi<T>, 1.0/phi<T>)/phi<T>,
vec3<T>(0.0, -phi<T>, -1.0/phi<T>)/phi<T>,
vec3<T>(1.0/phi<T>, 0.0, -phi<T>)/phi<T>,
vec3<T>(-1.0/phi<T>, 0.0, phi<T>)/phi<T>,
vec3<T>(-1.0/phi<T>, 0.0, -phi<T>)/phi<T>,
vec3<T>(phi<T>, -1.0/phi<T>, 0.0)/phi<T>,
vec3<T>(-phi<T>, 1.0/phi<T>, 0.0)/phi<T>,
vec3<T>(-phi<T>, -1.0/phi<T>, 0.0)/phi<T>
}

A centred Dodecahedron's vertices.

Template Parameters
Tnumeric type.

◆ ICOSAHEDRON

template<class T >
const std::vector<Trixel<T> > ICOSAHEDRON
Initial value:
=
{
}

A centred Icosahedrons's triangulation.

Template Parameters
Tnumeric type.

◆ ICOSAHEDRON_VERTICES

template<class T >
const std::vector<vec3<T> > ICOSAHEDRON_VERTICES

◆ ICOSAHEDRON_X

template<class T >
const T ICOSAHEDRON_X = 0.525731112119133606

Golden ratio scaled for a unit icosahedron.

Template Parameters
Tnumeric type.

◆ ICOSAHEDRON_Z

template<class T >
const T ICOSAHEDRON_Z = 0.850650808352039932

1 scaled for a unit icosahedron.

Template Parameters
Tnumeric type.

◆ INV_SQRT2

template<class T >
const T INV_SQRT2 = 1.0/1.4142135623730951

◆ INV_SQRT3

template<class T >
const T INV_SQRT3 = 1.0/1.7320508075688772

◆ OCTAHEDRON

template<class T >
const std::vector<Trixel<T> > OCTAHEDRON

◆ OCTAHEDRON_VERTICES

template<class T >
const std::vector<vec3<T> > OCTAHEDRON_VERTICES
Initial value:
=
{
{0.0,0.0,1.0},
{1.0,0.0,0.0},
{0.0,1.0,0.0},
{-1.0,0.0,0.0},
{0.0,-1.0,0.0},
{0.0,0.0,-1.0}
}

A centred Octahedron's vertices.

Template Parameters
Tnumeric type.

◆ phi

template<class T >
const T phi = (1.0+2.23606797749979)*0.5

Golden ratio.

Template Parameters
Tnumeric type.

◆ SQRT3

template<class T >
const T SQRT3 = 1.7320508075688772

◆ SQRT6

template<class T >
const T SQRT6 = 2.449489742783178

◆ TETRAHEDRON

template<class T >
const std::vector<Trixel<T> > TETRAHEDRON

◆ TETRAHEDRON_VERTICES

template<class T >
const std::vector<vec3<T> > TETRAHEDRON_VERTICES
Initial value:
=
{
vec3<T>(1.0, 1.0, 1.0)*INV_SQRT3<T>,
vec3<T>(-1.0,1.0, -1.0)*INV_SQRT3<T>,
vec3<T>(1.0, -1.0, -1.0)*INV_SQRT3<T>,
vec3<T>(-1.0, -1.0, 1.0)*INV_SQRT3<T>
}

A centred Tetrahedron's vertices.

Template Parameters
Tnumeric type.

◆ TRIAUGMENTED_TRIANGULAR_PRISM

template<class T >
const std::vector<Trixel<T> > TRIAUGMENTED_TRIANGULAR_PRISM
Initial value:
=
{
}

A centred Triagmented triangular prism's triangulation.

Template Parameters
Tnumeric type.

◆ TRIAUGMENTED_TRIANGULAR_PRISM_VERTICES

template<class T >
const std::vector<vec3<T> > TRIAUGMENTED_TRIANGULAR_PRISM_VERTICES
Initial value:
=
{
C<T>*vec3<T>(0.0, -2.0/SQRT3<T>, 1.0),
C<T>*vec3<T>(0.0, -2.0/SQRT3<T>, -1.0),
C<T>*vec3<T>(1.0, 1.0/SQRT3<T>, 1.0),
C<T>*vec3<T>(-1.0, 1.0/SQRT3<T>, 1.0),
C<T>*vec3<T>(1.0, 1.0/SQRT3<T>, -1.0),
C<T>*vec3<T>(-1.0, 1.0/SQRT3<T>, -1.0),
C<T>*vec3<T>(0.0, (1.0+SQRT6<T>)/SQRT3<T>, 0.0),
C<T>*vec3<T>((1.0+SQRT6<T>)/2.0, -(1.0+SQRT6<T>)/(2.0*SQRT3<T>), 0.0),
C<T>*vec3<T>(-(1.0+SQRT6<T>)/2.0, -(1.0+SQRT6<T>)/(2.0*SQRT3<T>), 0.0)
}

A centred Triagmented triangular prism's vertices.

Template Parameters
Tnumeric type.