ImFusion SDK 4.3
ImFusion::MeshProcessing Namespace Reference

Collection of algorithms for post-processing meshes. More...

Detailed Description

Collection of algorithms for post-processing meshes.

Namespaces

namespace  Cleaning
 Mesh processing algorithms related to cleaning of the mesh.
 
namespace  ColorsTexturing
 Mesh processing algorithms related to mesh colors and texture processing.
 
namespace  ConnectedComponents
 Mesh processing algorithms based on connected component analysis.
 
namespace  Geometry
 Mesh processing algorithms related to geometrical operations.
 
namespace  Misc
 Miscellaneous mesh processing functions.
 
namespace  Remeshing
 Mesh processing algorithms related to mesh remeshing (smoothing, decimation, subdivision)
 
namespace  Statistics
 Methods for computing statistics on Meshes.
 

Classes

struct  ConnectedComponentData
 

Functions

void reduceToNumberOfComponents (Mesh *mesh, int numComponents, bool leaveOnlyLargestComponentsWithComparibleSizes=false)
 
MeshcleanMesh (const Mesh *mesh, const std::vector< int > &ComponentsToKeep, const std::vector< int > &labels)
 
MeshcleanMesh (const Mesh *mesh, float minConnectedArea, float maxConnectedArea, ConnectedComponentData *components=nullptr)
 
void splitConnectedComponents (const Mesh &mesh, std::vector< std::unique_ptr< Mesh > > &connectedComponents, double keepComponentsWithRatioToMaxArea=0.)
 
void labelConnectedComponents (Mesh *mesh, std::vector< int > &labels, std::vector< int > &labelsSize, std::vector< float > &labelsArea, std::vector< ImFusion::Geometry::AlignedBox > *labelsBoundingBox)
 Determines connected components and assigns an id of connected component to each face using an integer "labelProperty" accessible through an underlying TriMesh.
 

Function Documentation

◆ reduceToNumberOfComponents()

void reduceToNumberOfComponents ( Mesh * mesh,
int numComponents,
bool leaveOnlyLargestComponentsWithComparibleSizes = false )
Deprecated
"MeshProcessing::reduceToNumberOfComponents is deprecated, consider using MeshProcessing::ConnectedComponents::reduceToNumberOfLargestComponents API instead"

◆ cleanMesh() [1/2]

Mesh * cleanMesh ( const Mesh * mesh,
const std::vector< int > & ComponentsToKeep,
const std::vector< int > & labels )
Deprecated
"MeshProcessing::cleanMesh is deprecated, consider using MeshProcessing::ConnectedComponents::reduceToComponentsByLabel API instead"

◆ cleanMesh() [2/2]

Mesh * cleanMesh ( const Mesh * mesh,
float minConnectedArea,
float maxConnectedArea,
ConnectedComponentData * components = nullptr )
Deprecated
"MeshProcessing::cleanMesh is deprecated, consider using MeshProcessing::ConnectedComponents::reduceToComponentsByArea API instead"

◆ splitConnectedComponents()

void splitConnectedComponents ( const Mesh & mesh,
std::vector< std::unique_ptr< Mesh > > & connectedComponents,
double keepComponentsWithRatioToMaxArea = 0. )
Deprecated
"MeshProcessing::splitConnectedComponents is deprecated, consider using MeshProcessing::ConnectedComponents::splitConnectedComponents API instead"

◆ labelConnectedComponents()

void labelConnectedComponents ( Mesh * mesh,
std::vector< int > & labels,
std::vector< int > & labelsSize,
std::vector< float > & labelsArea,
std::vector< ImFusion::Geometry::AlignedBox > * labelsBoundingBox )

Determines connected components and assigns an id of connected component to each face using an integer "labelProperty" accessible through an underlying TriMesh.

Deprecated
"MeshProcessing::labelConnectedComponents is deprecated, consider using MeshProcessing::ConnectedComponents::labelConnectedComponents API instead"
Parameters
[in,out]meshMesh
[out]labelsmapping from the "labelProperty" to an array index (for the next 3 outputs)
[out]labelsSizelist of triangle count per connected component, ordered according to area from smallest to largest
[out]labelsArealist of area of triangles per connected component, ordered from smallest to largest
[out]labelsBoundingBoxlist of bounding boxes of connected components, ordered according to area from smallest to largest
Search Tab / S to search, Esc to close