Description

Functions

   
   
Mesh * createTetrahedron(const VertexDescription & vd)
   
Mesh * createTetrahedron()
   
void addTetrahedron( MeshBuilder & mb)
   
Mesh * createCube(const VertexDescription & vd)
   
Mesh * createCube()
   
void addCube( MeshBuilder & mb)
   
Mesh * createOctahedron(const VertexDescription & vd)
   
Mesh * createOctahedron()
   
void addOctahedron( MeshBuilder & mb)
   
Mesh * createDodecahedron(const VertexDescription & vd)
   
Mesh * createDodecahedron()
   
void addDodecahedron( MeshBuilder & mb)
   
Mesh * createIcosahedron(const VertexDescription & vd)
   
Mesh * createIcosahedron()
   
void addIcosahedron( MeshBuilder & mb)
   
Mesh * createEdgeSubdivisionSphere( Mesh * platonicSolid, uint8_t subdivisions)

Documentation

function
Rendering::MeshUtils::PlatonicSolids::createTetrahedron

public
     
     
Mesh * createTetrahedron( const VertexDescription & vd )

Return a mesh containing a tetrahedron (4 vertices, 4 triangles). The tetrahedron is centered at the origin and the vertices are lying on the unit sphere. Positions and normals for the vertices are generated.

Returns

Tetrahedron Mesh

Defined in Rendering/MeshUtils/PlatonicSolids.h:35


function
Rendering::MeshUtils::PlatonicSolids::createTetrahedron

public inline
   
   
Mesh * createTetrahedron( )

Defined in Rendering/MeshUtils/PlatonicSolids.h:36


function
Rendering::MeshUtils::PlatonicSolids::addTetrahedron

public
     
     
void addTetrahedron( MeshBuilder & mb )

Defined in Rendering/MeshUtils/PlatonicSolids.h:43


function
Rendering::MeshUtils::PlatonicSolids::createCube

public
     
     
Mesh * createCube( const VertexDescription & vd )

Return a mesh containing a cube (8 vertices, 6 squares). The cube is centered at the origin and the vertices are lying on the unit sphere. Positions and normals for the vertices are generated.

Returns

Cube Mesh

Defined in Rendering/MeshUtils/PlatonicSolids.h:52


function
Rendering::MeshUtils::PlatonicSolids::createCube

public inline
   
   
Mesh * createCube( )

Defined in Rendering/MeshUtils/PlatonicSolids.h:53


function
Rendering::MeshUtils::PlatonicSolids::addCube

public
     
     
void addCube( MeshBuilder & mb )

Defined in Rendering/MeshUtils/PlatonicSolids.h:60


function
Rendering::MeshUtils::PlatonicSolids::createOctahedron

public
     
     
Mesh * createOctahedron( const VertexDescription & vd )

Return a mesh containing an octahedron (6 vertices, 8 triangles). The octahedron is centered at the origin and the vertices are lying on the unit sphere. Positions and normals for the vertices are generated.

Returns

Octahedron Mesh

Defined in Rendering/MeshUtils/PlatonicSolids.h:69


function
Rendering::MeshUtils::PlatonicSolids::createOctahedron

public inline
   
   
Mesh * createOctahedron( )

Defined in Rendering/MeshUtils/PlatonicSolids.h:70


function
Rendering::MeshUtils::PlatonicSolids::addOctahedron

public
     
     
void addOctahedron( MeshBuilder & mb )

Defined in Rendering/MeshUtils/PlatonicSolids.h:77


function
Rendering::MeshUtils::PlatonicSolids::createDodecahedron

public
     
     
Mesh * createDodecahedron( const VertexDescription & vd )

Return a mesh containing a dodecahedron (20 vertices, 12 pentagons). Each face is split into three triangles (36 triangles overall). The dodecahedron is centered at the origin and the vertices are lying on the unit sphere. Positions and normals for the vertices are generated.

Returns

Dodecahedron Mesh

Defined in Rendering/MeshUtils/PlatonicSolids.h:87


function
Rendering::MeshUtils::PlatonicSolids::createDodecahedron

public inline
   
   
Mesh * createDodecahedron( )

Defined in Rendering/MeshUtils/PlatonicSolids.h:88


function
Rendering::MeshUtils::PlatonicSolids::addDodecahedron

public
     
     
void addDodecahedron( MeshBuilder & mb )

Defined in Rendering/MeshUtils/PlatonicSolids.h:95


function
Rendering::MeshUtils::PlatonicSolids::createIcosahedron

public
     
     
Mesh * createIcosahedron( const VertexDescription & vd )

Return a mesh containing an icosahedron (12 vertices, 20 triangles). The icosahredron is centered at the origin and the vertices are lying on the unit sphere. Positions and normals for the vertices are generated.

Returns

Icosahedron Mesh

Defined in Rendering/MeshUtils/PlatonicSolids.h:104


function
Rendering::MeshUtils::PlatonicSolids::createIcosahedron

public inline
   
   
Mesh * createIcosahedron( )

Defined in Rendering/MeshUtils/PlatonicSolids.h:105


function
Rendering::MeshUtils::PlatonicSolids::addIcosahedron

public
     
     
void addIcosahedron( MeshBuilder & mb )

Defined in Rendering/MeshUtils/PlatonicSolids.h:112


function
Rendering::MeshUtils::PlatonicSolids::createEdgeSubdivisionSphere

public
     
     
Mesh * createEdgeSubdivisionSphere( Mesh * platonicSolid,
  uint8_t subdivisions
)    

Return a sphere which is generated by subdividing the edges of a platonic solid. A platonic solid with triangular faces is needed in this implementation. For each subdivision the number of triangles is quadrupled. The sphere is centered at the origin and the vertices are lying on the unit sphere. Positions and normals for the vertices are generated.

Parameters

platonicSolid
A tetrahedron, an octahedron, or an icosahedron.
subdivisions
Number of subdivision steps.

Returns

Subdivision Sphere Mesh , ornullptrif the given platonic solid could not be used.

See also: createTetrahedron()

See also: createOctahedron()

See also: createIcosahedron()

Defined in Rendering/MeshUtils/PlatonicSolids.h:128