csSquaredDist Class Reference
[Geometry utilities]
Some functions to perform squared distance calculations.
More...
#include <csgeom/math3d.h>
Static Public Member Functions | |
static float | PointLine (const csVector3 &p, const csVector3 &l1, const csVector3 &l2) |
Returns the squared distance between a point and a line. | |
static float | PointPlane (const csVector3 &p, const csPlane3 &plane) |
Returns the squared distance between a point and a normalized plane. | |
static float | PointPoint (const csVector3 &p1, const csVector3 &p2) |
Returns the squared distance between two points. | |
static float | PointPoly (const csVector3 &p, csVector3 *V, int n, const csPlane3 &plane, float sqdist=-1) |
Returns the squared distance between a point and a polygon. |
Detailed Description
Some functions to perform squared distance calculations.This is a static class and contains only static member functions.
Definition at line 228 of file math3d.h.
Member Function Documentation
static float csSquaredDist::PointLine | ( | const csVector3 & | p, | |
const csVector3 & | l1, | |||
const csVector3 & | l2 | |||
) | [static] |
Returns the squared distance between a point and a line.
static float csSquaredDist::PointPlane | ( | const csVector3 & | p, | |
const csPlane3 & | plane | |||
) | [inline, static] |
Returns the squared distance between a point and a normalized plane.
Definition at line 243 of file math3d.h.
References csPlane3::Classify().
static float csSquaredDist::PointPoly | ( | const csVector3 & | p, | |
csVector3 * | V, | |||
int | n, | |||
const csPlane3 & | plane, | |||
float | sqdist = -1 | |||
) | [static] |
Returns the squared distance between a point and a polygon.
If sqdist is >= 0, then it is used as the pre-calculated point to plane distance. V is an array of vertices, n is the number of vertices, and plane is the polygon plane.
The documentation for this class was generated from the following file:
- csgeom/math3d.h
Generated for Crystal Space 1.0.2 by doxygen 1.4.7