CVB++ 15.0

3D mesh object consisting of polygons. More...

#include <cvb/mesh.hpp>

Public Member Functions

std::size_t NumPolygons () const noexcept
 Get the number of polygons in this mesh.
 
Polygon3D< T > PolygonAt (std::size_t index) const
 Gets polygons for this mesh.
 
std::vector< std::uint32_tPolygonIndicesAt (std::size_t index) const
 Gets point indices for a polygon.
 
std::size_t NumPoints () const noexcept
 Get the number of points in the mesh.
 
PointAt (std::size_t index) const noexcept
 Gets the point at the specified index.
 
Cuboid CalculateBoundingBox () const
 Calculates the minimum and maximum extent of the mesh.
 
void RasterDensePointCloudToDst (const Matrix3D &cameraRotation, Vector3D< double > cameraTranslation, DensePointCloud &denseCloud)
 Rasters this mesh into a dense point cloud and stores the result.
 
DensePointCloudPtr RasterDensePointCloud (const Matrix3D &cameraRotation, Vector3D< double > cameraTranslation, double xResIncrement, double yResIncrement)
 Rasters this mesh into a dense point cloud and stores the result.
 

Static Public Member Functions

static MeshPtr< T > FromFile (const String &fileName)
 Loads a mesh from file.
 
static MeshPtr< T > FromPointCloud (const SparsePointCloudPtr &pointCloud)
 Creates a mesh from a point cloud containing mesh information.
 

Detailed Description

template<class T>
class Cvb::Mesh< T >

3D mesh object consisting of polygons.

Member Function Documentation

◆ CalculateBoundingBox()

template<class T>
Cuboid CalculateBoundingBox ( ) const
inline

Calculates the minimum and maximum extent of the mesh.

Returns
The variable to receive the extent.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FromFile()

template<class T>
static MeshPtr< T > FromFile ( const String & fileName)
inlinestatic

Loads a mesh from file.

Use a 3D point as type.

Parameters
[in]fileNameFile to load.
Returns
The typed mesh.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FromPointCloud()

template<class T>
static MeshPtr< T > FromPointCloud ( const SparsePointCloudPtr & pointCloud)
inlinestatic

Creates a mesh from a point cloud containing mesh information.

Use a 3D point as type.

Attention
Note, that pointCloud is shared with the mesh. Do not forget to release pointCloud, as soon as the mesh is not used anymore and destroyed.
Parameters
[in]pointCloudShared pointer to point cloud with mesh information.
Returns
Shared pointer to the mesh
Exceptions
Anyexception derived from std::exception including CvbException and if mesh could not be created.

◆ NumPoints()

template<class T>
std::size_t NumPoints ( ) const
inlinenoexcept

Get the number of points in the mesh.

Returns
Number of points.
Exceptions
Doesnot throw any exception.

◆ NumPolygons()

template<class T>
std::size_t NumPolygons ( ) const
inlinenoexcept

Get the number of polygons in this mesh.

Returns
Number polygons.
Exceptions
Doesnot throw any exception.

◆ PointAt()

template<class T>
T PointAt ( std::size_t index) const
inlinenoexcept

Gets the point at the specified index.

Parameters
[in]indexThe index.
Returns
A 3D point.
Exceptions
Doesnot throw any exception.

◆ PolygonAt()

template<class T>
Polygon3D< T > PolygonAt ( std::size_t index) const
inline

Gets polygons for this mesh.

Parameters
[in]indexThe index.
Returns
The polygon at the given index.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ PolygonIndicesAt()

template<class T>
std::vector< std::uint32_t > PolygonIndicesAt ( std::size_t index) const
inline

Gets point indices for a polygon.

Parameters
[in]indexThe index.
Returns
A vector with the indices.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ RasterDensePointCloud()

template<class T>
DensePointCloudPtr RasterDensePointCloud ( const Matrix3D & cameraRotation,
Vector3D< double > cameraTranslation,
double xResIncrement,
double yResIncrement )
inline

Rasters this mesh into a dense point cloud and stores the result.

Parameters
[in]cameraRotationRotation matrix for the camera.
[in]cameraTranslationTranslation vector for the camera.
[in]xResIncrementThe pixel size in x-direction.
[in]yResIncrementThe pixel size in y-direction.
Returns
A dense point cloud with the rastered mesh.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ RasterDensePointCloudToDst()

template<class T>
void RasterDensePointCloudToDst ( const Matrix3D & cameraRotation,
Vector3D< double > cameraTranslation,
DensePointCloud & denseCloud )
inline

Rasters this mesh into a dense point cloud and stores the result.

Parameters
[in]cameraRotationRotation matrix for the camera.
[in]cameraTranslationTranslation vector for the camera.
[in]denseCloudDense point cloud to store the rastered mesh in.
Exceptions
Anyexception derived from std::exception including CvbException.