#include <plane3.h>
Inheritance diagram for csPlane3:
Public Methods | |
csPlane3 () | |
Initialize to the xy plane. | |
csPlane3 (const csVector3 &plane_norm, float d=0) | |
Initialize the plane. | |
csPlane3 (float a, float b, float c, float d=0) | |
Initialize the plane. | |
csPlane3 (const csVector3 &v1, const csVector3 &v2, const csVector3 &v3) | |
Initialize the plane through the three given points. | |
csPlane3 (const csVector3 &v2, const csVector3 &v3) | |
Initialize the plane through 0 and the two given points. | |
csVector3& | Normal () |
Return the normal vector of this plane. | |
const csVector3& | Normal () const |
Return the normal vector of this plane. | |
float | A () const |
Return the A component of this plane. | |
float | B () const |
Return the B component of this plane. | |
float | C () const |
Return the C component of this plane. | |
float | D () const |
Return the D component of this plane. | |
float& | A () |
Return the A component of this plane. | |
float& | B () |
Return the B component of this plane. | |
float& | C () |
Return the C component of this plane. | |
float& | D () |
Return the D component of this plane. | |
void | Set (float a, float b, float c, float d) |
Set the value of the four plane components. | |
void | Set (const csVector3 &normal, float d) |
Same but takes a vector directly. | |
void | Set (const csVector3 &v1, const csVector3 &v2, const csVector3 &v3) |
Initialize the plane through the three given points. | |
void | Set (const csVector3 &v2, const csVector3 &v3) |
Initialize the plane through the origin and the two given points. | |
float | Classify (const csVector3 &pt) const |
Classify the given vector with regards to this plane. | |
float | Distance (const csVector3 &pt) const |
Compute the distance from the given vector to this plane. More... | |
void | Invert () |
Reverses the direction of the plane while maintianing the plane itself. | |
void | Normalize () |
Normalizes the plane equation so that 'norm' is a unit vector. | |
Public Attributes | |
csVector3 | norm |
The normal vector (or the (A,B,C) components). | |
float | DD |
The D component of the plane. | |
Static Public Methods | |
float | Classify (float A, float B, float C, float D, const csVector3 &pt) |
Classify a vector with regards to four plane components. |
The plane is given by the equation AAx + BBy + CCz + DD = 0, Where (AA,BB,CC) is given by the vector 'norm'.
|
Compute the distance from the given vector to this plane. This function assumes that 'norm' is a unit vector. If not, the function returns distance times the magnitude of 'norm'. |