MoCSI API Reference
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ShapeBase< T > Class Template Reference

Managing class for all types of meshes. Provides the interface to all the needed data when working with a mesh in a pseudo 3D case. More...

#include <ShapeBase.h>

Collaboration diagram for ShapeBase< T >:
Collaboration graph

Public Member Functions

const std::vector< std::vector< T > > & getVertices () const
 
const std::vector< std::vector< int > > & getFaces () const
 
const std::vector< std::vector< T > > & getNormals () const
 
const std::vector< T > & getAreas () const
 
int getNumberOfFacets () const
 
void setVertices (const std::vector< std::vector< T > > vertex_list)
 
void setFaces (const std::vector< std::vector< int > > &face_list)
 
void setNormals (const std::vector< std::vector< T > > face_normals)
 
void setAreas (const std::vector< T > face_areas)
 
void validityCheck ()
 Checks whether the mesh has at least one valid facet and whether all vectors of expected equal length are actually equal or not.
 
 ShapeBase ()
 Constructor for an empty ShapeBase object.
 
 ShapeBase (std::vector< std::vector< T > > vertex_list, std::vector< std::vector< int > > face_list, std::vector< std::vector< T > > face_normals, std::vector< T > face_areas)
 Constructor for a filled ShapeBase object.
 
 ~ShapeBase ()=default
 

Protected Attributes

std::vector< std::vector< T > > m_vertex_list {}
 
std::vector< std::vector< int > > m_face_list
 
std::vector< std::vector< T > > m_face_normals {}
 
std::vector< Tm_face_areas {}
 

Detailed Description

template<typename T>
class ShapeBase< T >

Managing class for all types of meshes. Provides the interface to all the needed data when working with a mesh in a pseudo 3D case.

Constructor & Destructor Documentation

◆ ShapeBase() [1/2]

template<typename T >
ShapeBase< T >::ShapeBase ( )

Constructor for an empty ShapeBase object.

◆ ShapeBase() [2/2]

template<typename T >
ShapeBase< T >::ShapeBase ( std::vector< std::vector< T > >  vertex_list,
std::vector< std::vector< int > >  face_list,
std::vector< std::vector< T > >  face_normals,
std::vector< T face_areas 
)

Constructor for a filled ShapeBase object.

Parameters
vertex_listList of the 3D coordinates of all vertices within a mesh.
face_listList of the vertices belonging to all faces within a mesh.
face_normalsList of the 3D coordinates of all normal vectors of the faces within a mesh.
face_areasList of the areas of all faces within a mesh.

◆ ~ShapeBase()

template<typename T >
ShapeBase< T >::~ShapeBase ( )
default

Member Function Documentation

◆ getAreas()

template<typename T >
const std::vector< T > & ShapeBase< T >::getAreas ( ) const
inline

◆ getFaces()

template<typename T >
const std::vector< std::vector< int > > & ShapeBase< T >::getFaces ( ) const
inline

◆ getNormals()

template<typename T >
const std::vector< std::vector< T > > & ShapeBase< T >::getNormals ( ) const
inline

◆ getNumberOfFacets()

template<typename T >
int ShapeBase< T >::getNumberOfFacets ( ) const
inline

◆ getVertices()

template<typename T >
const std::vector< std::vector< T > > & ShapeBase< T >::getVertices ( ) const
inline

◆ setAreas()

template<typename T >
void ShapeBase< T >::setAreas ( const std::vector< T face_areas)
inline

◆ setFaces()

template<typename T >
void ShapeBase< T >::setFaces ( const std::vector< std::vector< int > > &  face_list)
inline

◆ setNormals()

template<typename T >
void ShapeBase< T >::setNormals ( const std::vector< std::vector< T > >  face_normals)
inline

◆ setVertices()

template<typename T >
void ShapeBase< T >::setVertices ( const std::vector< std::vector< T > >  vertex_list)
inline

◆ validityCheck()

template<typename T >
void ShapeBase< T >::validityCheck ( )

Checks whether the mesh has at least one valid facet and whether all vectors of expected equal length are actually equal or not.

Member Data Documentation

◆ m_face_areas

template<typename T >
std::vector<T> ShapeBase< T >::m_face_areas {}
protected

◆ m_face_list

template<typename T >
std::vector<std::vector<int> > ShapeBase< T >::m_face_list
protected

◆ m_face_normals

template<typename T >
std::vector<std::vector<T> > ShapeBase< T >::m_face_normals {}
protected

◆ m_vertex_list

template<typename T >
std::vector<std::vector<T> > ShapeBase< T >::m_vertex_list {}
protected

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