Klamp't
0.9.0
|
A method for efficiently caching and updating distance computations using temporal coherence. More...
#include <DistanceQuery.h>
Public Types | |
enum | Status { Far, Close, Contact, WasFar, WasClose, WasContact, Invalid } |
Public Member Functions | |
void | NextCycle () |
Real | UpdateQuery () |
bool | ClosestPoints (Vector3 &cp1, Vector3 &cp2, Vector3 &dir) |
Public Attributes | |
Geometry::AnyCollisionQuery * | query |
Status | s |
Real | distanceTolerance |
Real | distanceAbsErr |
Real | distanceRelErr |
A method for efficiently caching and updating distance computations using temporal coherence.
Suppose the transforms of the collision objects change. Call NextStatus() to cycle the DistanceStatus. UpdateQuery() returns the separation distance, (a negative number signifies penetration distance) QueryClosestPoints() returns the closest points (or furthest penetrating points). It will call UpdateQuery if needed.