ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::GenericMesh Class Referenceabstract

#include <GenericMesh.h>

Inheritance diagram for cloudViewer::GenericMesh:
[legend]

Public Types

enum  SimplificationContraction { SimplificationContraction::Average, SimplificationContraction::Quadric }
 Indicates the method that is used for mesh simplification if multiple vertices are combined to a single one. More...
 
enum  FilterScope { FilterScope::All, FilterScope::Color, FilterScope::Normal, FilterScope::Vertex }
 Indicates the scope of filter operations. More...
 
enum  DeformAsRigidAsPossibleEnergy { DeformAsRigidAsPossibleEnergy::Spokes, DeformAsRigidAsPossibleEnergy::Smoothed }
 
using genericTriangleAction = std::function< void(GenericTriangle &)>
 Generic function to apply to a triangle (used by foreach) More...
 

Public Member Functions

 GenericMesh ()=default
 
virtual ~GenericMesh ()=default
 Default destructor. More...
 
virtual unsigned size () const =0
 Returns the number of triangles. More...
 
virtual bool hasTriangles () const
 
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 Typedef Documentation

◆ genericTriangleAction

Generic function to apply to a triangle (used by foreach)

Member Enumeration Documentation

◆ DeformAsRigidAsPossibleEnergy

Energy model that is minimized in the DeformAsRigidAsPossible method.

Parameters
Spokesis the original energy as formulated in Sorkine and Alexa, "As-Rigid-As-Possible Surface Modeling", 2007.
Smoothedadds a rotation smoothing term to the rotations.
Enumerator
Spokes 
Smoothed 

◆ FilterScope

Indicates the scope of filter operations.

Parameters
Allindicates that all properties (color, normal, vertex position) are filtered.
Colorindicates that only the colors are filtered.
Normalindicates that only the normals are filtered.
Vertexindicates that only the vertex positions are filtered.
Enumerator
All 
Color 
Normal 
Vertex 

◆ SimplificationContraction

Indicates the method that is used for mesh simplification if multiple vertices are combined to a single one.

Parameters
Averageindicates that the average position is computed as output.
Quadricindicates that the distance to the adjacent triangle planes is minimized. Cf. "Simplifying Surfaces with Color and Texture using Quadric Error Metrics" by Garland and Heckbert.
Enumerator
Average 
Quadric 

Constructor & Destructor Documentation

◆ GenericMesh()

cloudViewer::GenericMesh::GenericMesh ( )
default

◆ ~GenericMesh()

virtual cloudViewer::GenericMesh::~GenericMesh ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ _getNextTriangle()

virtual GenericTriangle* cloudViewer::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 ccMesh, ccMeshGroup, ccSubMesh, cloudViewer::Delaunay2dMesh, cloudViewer::geometry::ecvMeshBase, and cloudViewer::SimpleMesh.

Referenced by cloudViewer::MeshSamplingTools::computeMeshArea(), cloudViewer::MeshSamplingTools::computeMeshVolume(), define_GenericMesh(), cloudViewer::DistanceComputationTools::intersectMeshWithOctree(), cloudViewer::Grid3D< unsigned >::intersectWith(), cloudViewer::MeshSamplingTools::samplePointsOnMesh(), and DxfFilter::saveToFile().

◆ forEach()

virtual void cloudViewer::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 ccMesh, ccMeshGroup, ccSubMesh, cloudViewer::Delaunay2dMesh, cloudViewer::geometry::ecvMeshBase, and cloudViewer::SimpleMesh.

Referenced by define_GenericMesh().

◆ getBoundingBox()

virtual void cloudViewer::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 ccMesh, ccMeshGroup, ccSubMesh, cloudViewer::Delaunay2dMesh, cloudViewer::geometry::ecvMeshBase, and cloudViewer::SimpleMesh.

Referenced by cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), cloudViewer::MeshSamplingTools::computeMeshVolume(), and define_GenericMesh().

◆ hasTriangles()

◆ placeIteratorAtBeginning()

◆ size()

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

Returns the number of triangles.

Virtual method to request the mesh size

Returns
the mesh size

Implemented in ccMesh, ccMeshGroup, ccSubMesh, cloudViewer::Delaunay2dMesh, cloudViewer::geometry::ecvMeshBase, and cloudViewer::SimpleMesh.

Referenced by cc2DLabel::addPickedPoint(), ccGraphicalSegmentationTool::applySegmentation(), cloudViewer::MeshSamplingTools::buildMeshEdgeUsageMap(), ccMesh::ccMesh(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistanceWithOctree(), cloudViewer::MeshSamplingTools::computeMeshArea(), cloudViewer::MeshSamplingTools::computeMeshVolume(), ccNormalVectors::ComputeNormalWithTri(), ccGenericMesh::computePointPosition(), define_GenericMesh(), ccComparisonDlg::determineBestOctreeLevel(), ccGenericMesh::drawMeOnly(), ccPropertiesTreeDelegate::fillWithMesh(), ccSubMesh::getCurrentTriGlobalIndex(), cc2smReader::getPclCloud2(), cc2smReader::getPclMesh(), cc2smReader::getPclTextureMesh(), cc2smReader::getVtkPolyDataFromMeshCloud(), cc2smReader::getVtkPolyDataWithTextures(), ccMesh::hasTriangleMaterialIds(), ccMesh::hasTriangleUvs(), ccCommandLineParser::importFile(), cloudViewer::DistanceComputationTools::intersectMeshWithOctree(), cloudViewer::Grid3D< unsigned >::intersectWith(), cloudViewer::MeshSamplingTools::samplePointsOnMesh(), STLFilter::saveToASCIIFile(), STLFilter::saveToBINFile(), MAFilter::saveToFile(), ObjFilter::saveToFile(), DxfFilter::saveToFile(), OFFFilter::saveToFile(), STLFilter::saveToFile(), cloudViewer::ManualSegmentationTools::segmentMesh(), cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane(), ccMesh::shrinkToFit(), ToFbxMesh(), ccGenericMesh::trianglePicking(), TrianglesToTest::TrianglesToTest(), and VtkUtils::TableModel::updateData().


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