SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Public Member Functions | List of all members
HierarchicalTriangularMesh< T > Class Template Reference

A refineable mesh of triangles. More...

#include <hierarchicalTriangularMesh.h>

Public Member Functions

 HierarchicalTriangularMesh (BASE_MESH mesh)
 Construct a new Hierarchical Triangular Mesh from a library base.
 
 HierarchicalTriangularMesh (const std::vector< Trixel< T > > &baseMesh)
 Construct a new Hierarchical Triangular Mesh from a user base mesh.
 
uint32_t size () const
 Get the number of refinements.
 
uint32_t triangles () const
 Get the number of triangles at the largest refinement.
 
void build (uint32_t depth=0)
 Refine the mesh to a give depth.
 
std::vector< Trixel< T > > leaves () const
 The triangulation at the current refinement.
 
std::vector< Tvertices () const
 Get the vertices of the mesh.
 
std::vector< TvertexNormals () const
 Get the normal vectors for each triangle.
 

Detailed Description

template<class T>
class HierarchicalTriangularMesh< T >

A refineable mesh of triangles.

Template Parameters
Tnumeric type.

Constructor & Destructor Documentation

◆ HierarchicalTriangularMesh() [1/2]

Construct a new Hierarchical Triangular Mesh from a library base.

Parameters
mesheither a specific base or any.
See also
meshes.h.

◆ HierarchicalTriangularMesh() [2/2]

template<class T >
HierarchicalTriangularMesh< T >::HierarchicalTriangularMesh ( const std::vector< Trixel< T > > &  baseMesh)
inline

Construct a new Hierarchical Triangular Mesh from a user base mesh.

Parameters
baseMesha user supplied triangulation.

Member Function Documentation

◆ build()

template<class T >
void HierarchicalTriangularMesh< T >::build ( uint32_t  depth = 0)
inline

Refine the mesh to a give depth.

Parameters
depthdepth of refinement.

◆ leaves()

template<class T >
std::vector< Trixel< T > > HierarchicalTriangularMesh< T >::leaves ( ) const
inline

The triangulation at the current refinement.

Returns
std::vector<Trixel<T>> the triangulation.

◆ size()

template<class T >
uint32_t HierarchicalTriangularMesh< T >::size ( ) const
inline

Get the number of refinements.

Returns
uint32_t refinements calculated.

◆ triangles()

template<class T >
uint32_t HierarchicalTriangularMesh< T >::triangles ( ) const
inline

Get the number of triangles at the largest refinement.

Returns
uint32_t the number of triangles.

◆ vertexNormals()

template<class T >
std::vector< T > HierarchicalTriangularMesh< T >::vertexNormals ( ) const
inline

Get the normal vectors for each triangle.

Returns
std::vector<T> the normal vectors, flattened.

◆ vertices()

template<class T >
std::vector< T > HierarchicalTriangularMesh< T >::vertices ( ) const
inline

Get the vertices of the mesh.

Returns
std::vector<T> vertices flattened for each triangle.

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