Klamp't  0.8.1
Public Types | Public Member Functions | Public Attributes | List of all members
DistanceQuery Struct Reference

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
 

Detailed Description

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.


The documentation for this struct was generated from the following file: