KrisLibrary
1.0.0
|
Uses a propagation method to calculate an approximate penetration distance of mesh m1 inside m2. More...
#include <PenetrationDepth.h>
Public Types | |
enum | VertexClass { Unvisited =0, Fringe =1, Computed =2, Outside =3 } |
typedef Meshing::TriMeshWithTopology | TriMeshWithTopology |
typedef Meshing::TriMesh | TriMesh |
Public Member Functions | |
ApproximatePenetrationDepth (const TriMeshWithTopology &m1, const TriMesh &m2) | |
void | Reset () |
void | ComputeInitial (const RigidTransform &f1, const RigidTransform &f2, const int tc1[], const int tc2[], int n) |
void | ComputeDepth () |
Public Attributes | |
const TriMeshWithTopology & | m1 |
const TriMesh & | m2 |
std::vector< VertexClass > | vertexClass |
std::vector< Real > | depth |
std::vector< Vector3 > | normal |
std::vector< int > | fringe |
Real | maxDepth |
Vector3 | deepestPoint |
Vector3 | deepestNormal |
Uses a propagation method to calculate an approximate penetration distance of mesh m1 inside m2.
The method is similar to Heidelberger 2002. The propagation is initialized using ComputeInitial() with the world-space rigid-body transforms of the two meshes, and lists of overlapping triangles.
Then, the approximate penetration depth is calculated using ComputeDepth(). To re-initialize the computation use Reset().