CCCoreLib 31 May 2022
CloudCompare Core algorithms
Public Types | Public Member Functions | List of all members
CCCoreLib::GenericMesh Class Referenceabstract

A generic mesh interface for data communication between library and client applications. More...

#include <GenericMesh.h>

Inheritance diagram for CCCoreLib::GenericMesh:
Inheritance graph
[legend]

Public Types

using genericTriangleAction = std::function< void(GenericTriangle &)>
 Generic function to apply to a triangle (used by foreach)
 

Public Member Functions

virtual ~GenericMesh ()=default
 Default destructor.
 
virtual unsigned size () const =0
 Returns the number of triangles. More...
 
virtual void forEach (genericTriangleAction action)=0
 Fast iteration mechanism. More...
 
virtual void getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax)=0
 Returns the mesh bounding-box. More...
 
virtual void placeIteratorAtBeginning ()=0
 Places the mesh iterator at the beginning. More...
 
virtual GenericTriangle_getNextTriangle ()=0
 Returns the next triangle (relatively to the global iterator position) More...
 

Detailed Description

A generic mesh interface for data communication between library and client applications.

Member Function Documentation

◆ _getNextTriangle()

virtual GenericTriangle * CCCoreLib::GenericMesh::_getNextTriangle ( )
pure virtual

Returns the next triangle (relatively to the global iterator position)

Virtual method to handle the mesh global iterator. Global iterator position should be increased each time this method is called. The returned object can be temporary.

Returns
a triangle

Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.

◆ forEach()

virtual void CCCoreLib::GenericMesh::forEach ( genericTriangleAction  action)
pure virtual

Fast iteration mechanism.

Virtual method to apply a function to the whole mesh

Parameters
actionfunction to apply (see GenericMesh::genericTriangleAction)

Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.

◆ getBoundingBox()

virtual void CCCoreLib::GenericMesh::getBoundingBox ( CCVector3 bbMin,
CCVector3 bbMax 
)
pure virtual

Returns the mesh bounding-box.

Virtual method to request the mesh bounding-box limits. It is equivalent to the bounding-box of the cloud composed of the mesh vertexes.

Parameters
bbMinlower bounding-box limits (Xmin,Ymin,Zmin)
bbMaxhigher bounding-box limits (Xmax,Ymax,Zmax)

Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.

◆ placeIteratorAtBeginning()

virtual void CCCoreLib::GenericMesh::placeIteratorAtBeginning ( )
pure virtual

Places the mesh iterator at the beginning.

Virtual method to handle the mesh global iterator

Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.

◆ size()

virtual unsigned CCCoreLib::GenericMesh::size ( ) const
pure virtual

Returns the number of triangles.

Virtual method to request the mesh size

Returns
the mesh size

Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.


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