#include <Plane.h>
Collaboration diagram for Plane:

Public Types | |
| enum | PointClassification { PLANE_FRONT, PLANE_COINCIDE, PLANE_BACK } |
Public Member Functions | |
| Plane (const Vector<> &aPoint, const Vector<> &aV1, const Vector<> &aV2) | |
| Construct a plane from two direction vectors and a point. | |
| Plane (const Vector<> &aPoint, const Vector<> &aNormal) | |
| Construct a plane from a point and a normal vector. | |
| bool | contains (const Vector<> &aPoint) const |
| Checks whether the plane contains a given point. | |
| Vector | normal () const |
| Returns the normal vector of this plane. | |
| PointClassification | classify (const Vector<> &aPoint) const |
| Determines the position of the point relative to the plane. | |
| std::auto_ptr< Vector<> > | intersect (const Vector<> &point, const Vector<> &dir) const |
| Checks whether the plane intersects the straight line defined by point and dir. | |
| Plane & | operator+= (const Vector<> &v) |
Private Member Functions | |
| void | calcNP () |
Private Attributes | |
| Vector | mPoint |
| Vector | mNormal |
| float | mNTimesP |
| Stores N*P for faster access. | |
Corresponds to the equation:
, for 
Or, alternatively: 
Or:
for all
.
|
|
|
|
||||||||||||||||
|
Construct a plane from two direction vectors and a point.
|
|
||||||||||||
|
Construct a plane from a point and a normal vector.
|
|
|
|
|
|
Determines the position of the point relative to the plane.
|
|
|
Checks whether the plane contains a given point.
|
|
||||||||||||
|
Checks whether the plane intersects the straight line defined by point and dir.
|
|
|
Returns the normal vector of this plane.
|
|
|
|
|
|
|
|
|
Stores N*P for faster access.
|
|
|
|
1.4.5