KrisLibrary
1.0.0
|
A general-purpose distance querying class. More...
#include <CollisionMesh.h>
Public Member Functions | |
CollisionMeshQuery (const CollisionMesh &m1, const CollisionMesh &m2) | |
CollisionMeshQuery (const CollisionMeshQuery &q) | |
const CollisionMeshQuery & | operator= (const CollisionMeshQuery &q) |
bool | Collide () |
bool | CollideAll () |
Real | Distance (Real absErr, Real relErr, Real bound=Inf) |
Real | Distance_Coherent (Real absErr, Real relErr, Real bound=Inf) |
bool | WithinDistance (Real tol) |
bool | WithinDistanceAll (Real tol) |
Real | PenetrationDepth () |
Real | Distance_Cached () const |
Real | PenetrationDepth_Cached () const |
void | ClosestPoints (Vector3 &p1, Vector3 &p2) const |
Returns the closest points between the mesh after a Distance call. Results are in in local coordinates. | |
void | ClosestPair (int &t1, int &t2) const |
Returns the closest triangles. | |
void | TolerancePoints (Vector3 &p1, Vector3 &p2) const |
Returns a pair of points defining a true result of a WithinDistance call. Results are in in local coordinates. | |
void | TolerancePair (int &t1, int &t2) const |
Returns a pair of triangles triangles defining a true result of a WithinDistance call. | |
void | PenetrationPoints (Vector3 &p1, Vector3 &p2, Vector3 &d1) const |
void | CollisionPairs (std::vector< int > &t1, std::vector< int > &t2) const |
void | TolerancePoints (std::vector< Vector3 > &p1, std::vector< Vector3 > &t2) const |
Returns all pairs of points that are within the given tolerance of a WithinDistance call. Results are in in local coordinates. | |
void | TolerancePairs (std::vector< int > &t1, std::vector< int > &t2) const |
Returns all pairs of triangles that are within the given tolerance of a WithinDistance call. | |
Public Attributes | |
const CollisionMesh * | m1 |
const CollisionMesh * | m2 |
A general-purpose distance querying class.
Given two meshes, allows querying collision, tolerance, and distance using PQP, or querying penetration depth using an approximate computation.
All vectors p1, p2 are given in the local frames of m1 and m2 resp.
bool Geometry::CollisionMeshQuery::WithinDistance | ( | Real | tol | ) |
in case CollisionMeshQueryEnhanced is used to query TolerancePoints/TolerancePairs
Referenced by Geometry::FitBox(), and TolerancePair().