![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <GenericMesh.h>
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... | |
A generic mesh interface for data communication between library and client applications
| using cloudViewer::GenericMesh::genericTriangleAction = std::function<void(GenericTriangle&)> |
Generic function to apply to a triangle (used by foreach)
|
strong |
Indicates the scope of filter operations.
| All | indicates that all properties (color, normal, vertex position) are filtered. |
| Color | indicates that only the colors are filtered. |
| Normal | indicates that only the normals are filtered. |
| Vertex | indicates that only the vertex positions are filtered. |
| Enumerator | |
|---|---|
| All | |
| Color | |
| Normal | |
| Vertex | |
Indicates the method that is used for mesh simplification if multiple vertices are combined to a single one.
| Average | indicates that the average position is computed as output. |
| Quadric | indicates 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 | |
|
default |
|
virtualdefault |
Default destructor.
|
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.
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().
|
pure virtual |
Fast iteration mechanism.
Virtual method to apply a function to the whole mesh
| action | function to apply (see GenericMesh::genericTriangleAction) |
Implemented in ccMesh, ccMeshGroup, ccSubMesh, cloudViewer::Delaunay2dMesh, cloudViewer::geometry::ecvMeshBase, and cloudViewer::SimpleMesh.
Referenced by define_GenericMesh().
|
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.
| bbMin | lower bounding-box limits (Xmin,Ymin,Zmin) |
| bbMax | higher 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().
|
inlinevirtual |
Reimplemented in cloudViewer::geometry::HalfEdgeTriangleMesh.
References size.
Referenced by ccMesh::getTriangles(), ccMesh::hasTriangleMaterialIds(), ccMesh::hasTriangleUvs(), ccMesh::IsEmpty(), cloudViewer::io::ReadTriangleMesh(), and cloudViewer::io::rpc::SetTriangleMesh().
|
pure virtual |
Places the mesh iterator at the beginning.
Virtual method to handle the mesh global iterator
Implemented in ccMesh, ccMeshGroup, ccSubMesh, cloudViewer::Delaunay2dMesh, cloudViewer::geometry::ecvMeshBase, and cloudViewer::SimpleMesh.
Referenced by cloudViewer::MeshSamplingTools::buildMeshEdgeUsageMap(), ccMesh::ccMesh(), cloudViewer::MeshSamplingTools::computeMeshArea(), cloudViewer::MeshSamplingTools::computeMeshVolume(), ccNormalVectors::ComputeNormalWithTri(), define_GenericMesh(), cloudViewer::DistanceComputationTools::intersectMeshWithOctree(), cloudViewer::Grid3D< unsigned >::intersectWith(), cloudViewer::MeshSamplingTools::samplePointsOnMesh(), STLFilter::saveToASCIIFile(), STLFilter::saveToBINFile(), MAFilter::saveToFile(), ObjFilter::saveToFile(), DxfFilter::saveToFile(), and cloudViewer::ManualSegmentationTools::segmentMesh().
|
pure virtual |
Returns the number of triangles.
Virtual method to request 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().