Distance functions
[Standard functions]

Functions for calculating distances. More...

Functions

GLfloat cluVertexDistance (const CLvertex *v0, const CLvertex *v1)
GLfloat cluPlaneDistance (const CLUplane *plane, const CLvertex *v)
GLfloat cluSphereDistance (const CLUsphere *sphere, const CLvertex *v)
GLfloat cluSphereDistanceSphere (const CLUsphere *sphere0, const CLUsphere *sphere1)

Detailed Description

Distances are "signed distances".

The implicit argument to all these functions is a vertex. For example, cluPlaneDistance() does not explicitly state an input argument so it implies distance to a vertex.


Function Documentation

GLfloat cluVertexDistance const CLvertex *  v0,
const CLvertex *  v1
 

Todo:
Eliminate divide by zero possibility?

make this return the *signed* distance!

Definition at line 435 of file clumaths.c.

References cluNormalDifference(), and cluNormalMagnitude().

Referenced by cluSetConeSphereVertex(), cluSetSphereMesh(), cluSetSphereModel(), and cluSphereDistance().


Generated on Thu Dec 27 13:53:42 2007 for CLU by  doxygen 1.4.6