KrisLibrary  1.0.0
PenetrationDepth.h
1 #ifndef PENETRATION_DEPTH_H
2 #define PENETRATION_DEPTH_H
3 
4 #include <KrisLibrary/meshing/TriMeshTopology.h>
5 #include <KrisLibrary/errors.h>
6 
7 namespace Geometry {
8 
9  using namespace Math3D;
10 
23 {
24 public:
26  typedef Meshing::TriMesh TriMesh;
27 
28  enum VertexClass { Unvisited=0, Fringe=1, Computed=2, Outside=3 };
29 
30  ApproximatePenetrationDepth(const TriMeshWithTopology &m1, const TriMesh &m2);
31  void Reset();
32  void ComputeInitial(const RigidTransform& f1,const RigidTransform& f2,const int tc1[], const int tc2[],int n);
33  void ComputeDepth();
34 
35  const TriMeshWithTopology &m1;
36  const TriMesh &m2;
37  std::vector<VertexClass> vertexClass;
38  std::vector<Real> depth;
39  std::vector<Vector3> normal;
40  std::vector<int> fringe;
41  Real maxDepth;
42  Vector3 deepestPoint;
43  Vector3 deepestNormal;
44 };
45 
46 } //namespace Math3D
47 
48 #endif
A 3D vector class.
Definition: math3d/primitives.h:136
A triangle mesh that contains connectivity relations between vertices and triangles.
Definition: TriMeshTopology.h:31
A rigid-body transformation.
Definition: math3d/primitives.h:820
Contains all the definitions in the Math3D package.
Definition: AnyGeometry.h:13
Uses a propagation method to calculate an approximate penetration distance of mesh m1 inside m2...
Definition: PenetrationDepth.h:22
A basic triangle mesh.
Definition: TriMesh.h:41
Contains all definitions in the Geometry package.
Definition: AnyGeometry.cpp:26