ImFusion SDK 4.3
ImFusion::MeshProcessing::Statistics Namespace Reference

Methods for computing statistics on Meshes. More...

Detailed Description

Methods for computing statistics on Meshes.

Functions

double computeVolume (const Mesh &mesh)
 Compute the volume of a watertight mesh.
 
double computeDiceCoefficient (const Mesh &mesh1, const Mesh &mesh2)
 Compute the dice coefficient for two watertight mesh volumes.
 

Function Documentation

◆ computeVolume()

double computeVolume ( const Mesh & mesh)

Compute the volume of a watertight mesh.

Parameters
[in]meshMesh
Returns
Volume of the mesh, -1 if calculation could not be performed, i.e. mesh is not manifold and/or not closed
Warning
Mesh must not self-intersect, otherwise the result will be incorrect. If in doubt, use Mesh::isSelfIntersecting

◆ computeDiceCoefficient()

double computeDiceCoefficient ( const Mesh & mesh1,
const Mesh & mesh2 )

Compute the dice coefficient for two watertight mesh volumes.

Parameters
[in]mesh1First mesh
[in]mesh2Second mesh
Returns
-1 if calculation could not be performed (i.e. at least one of the meshes is not manifold or/and not closed), otherwise dice = 2 * volume(intersection(mesh1, mesh2))/(volume(mesh1) + volume(mesh2))
Warning
Meshes must not self-intersect, otherwise the result will be incorrect. If in doubt, use Mesh::isSelfIntersecting
Search Tab / S to search, Esc to close