vtdata library
|
Public Types | |
enum | IntersectionType { COLINEAR, COPLANAR, PARALLEL, FACING_AWAY, INTERSECTING } |
Public Member Functions | |
FPlane (float a, float b, float c, float d) | |
Construct from parametric coefficients. | |
FPlane (const FPoint3 &p, const FPoint3 &q, const FPoint3 &r) | |
Construct from three points. | |
FPlane (const FPoint3 &Point, const FPoint3 &Normal) | |
Construct from point and normal vector. | |
const FPlane & | operator= (const FPlane &rhs) |
void | Set (const FPoint3 &p, const FPoint3 &n) |
void | Set (float a, float b, float c, float d) |
float | Distance (const FPoint3 &v) const |
const IntersectionType | Intersection (const FPlane &Plane, FPoint3 &Origin, FPoint3 &Direction, float fEpsilon=0.0) const |
Intersection of two planes. More... | |
const IntersectionType | RayIntersection (const FPoint3 &Origin, const FPoint3 &Direction, float &fDistance, FPoint3 &Intersection, float fEpsilon=0.0) const |
Intersection of ray with plane. More... | |
const IntersectionType | LineIntersection (const FPoint3 &Origin, const FPoint3 &Direction, FPoint3 &Intersection, float fEpsilon=0.0) const |
Intersection of line with plane. | |
const IntersectionType | ThreePlanesIntersection (const FPlane &Plane1, const FPlane &Plane2, FPoint3 &Intersection, float fEpsilon=0.0) const |
Intersection of three planes. | |
Public Member Functions inherited from FPoint3 | |
FPoint3 (float fx, float fy, float fz) | |
FPoint3 (const DPoint3 &p) | |
float | Length () const |
float | LengthSquared () const |
FPoint3 & | Normalize () |
FPoint3 & | SetLength (float len) |
void | Set (float fx, float fy, float fz) |
float | Dot (const FPoint3 &rhs) const |
float | Dot (const float *fp) const |
FPoint3 | Cross (const FPoint3 &v) const |
void | UnitNormal (const FPoint3 &p0, const FPoint3 &p1, const FPoint3 &p2) |
FPoint3 & | operator= (const FPoint3 &v) |
FPoint3 & | operator= (const DPoint3 &v) |
FPoint3 | operator+ (const FPoint3 &v) const |
FPoint3 | operator- (const FPoint3 &v) const |
FPoint3 | operator* (float s) const |
FPoint3 | operator* (double s) const |
FPoint3 | operator/ (float s) const |
FPoint3 | operator- () const |
bool | operator== (const FPoint3 &v2) const |
bool | operator!= (const FPoint3 &v2) const |
void | operator+= (const FPoint3 &v) |
void | operator-= (const FPoint3 &v) |
void | operator*= (float s) |
void | operator/= (float s) |
float & | operator[] (int nIndex) |
const float & | operator[] (int nIndex) const |
Public Attributes | |
float | w |
Public Attributes inherited from FPoint3 | |
float | x |
float | y |
float | z |
A class representing an infinite plane, interface single-precision (float).
const FPlane::IntersectionType FPlane::Intersection | ( | const FPlane & | Plane, |
FPoint3 & | Origin, | ||
FPoint3 & | Direction, | ||
float | fEpsilon = 0.0 |
||
) | const |
Find the intersection of two planes. which in the general case is a line. The line is provided as a ray (origin and direction).
const FPlane::IntersectionType FPlane::RayIntersection | ( | const FPoint3 & | Origin, |
const FPoint3 & | Direction, | ||
float & | fDistance, | ||
FPoint3 & | Intersection, | ||
float | fEpsilon = 0.0 |
||
) | const |
Compute Ray-Plane intersection.
Origin,Direction | The position and direction that define the ray. |
fDistance | The distance along the ray to the intersection point. |
Intersection | The intersection point. |
fEpsilon | Small value to test for numeric equivalenccy. |