|
G3D::Plane Class ReferenceAn infinite 2D plane in 3D space.
More...
#include <Plane.h>
List of all members.
|
Public Member Functions |
| Vector3 | center () const |
| Vector3 | closestPoint (const Vector3 &x) const |
| void | deserialize (class BinaryInput &b) |
| float | distance (const Vector3 &x) const |
| void | flip () |
| bool | fuzzyContains (const Vector3 &point) const |
| void | getEquation (float &a, float &b, float &c, float &d) const |
| void | getEquation (double &a, double &b, double &c, double &d) const |
| void | getEquation (Vector3 &normal, float &d) const |
| void | getEquation (Vector3 &normal, double &d) const |
| bool | halfSpaceContains (const Vector4 &point) const |
| bool | halfSpaceContains (Vector3 point) const |
| bool | halfSpaceContainsFinite (const Vector3 &point) const |
| const Vector3 & | normal () const |
| | Plane (class BinaryInput &b) |
| | Plane (const Vector3 &__normal, const Vector3 &point) |
| | Plane (Vector4 point0, Vector4 point1, Vector4 point2) |
| | Plane (const Vector3 &point0, const Vector3 &point1, const Vector3 &point2) |
| | Plane () |
| void | serialize (class BinaryOutput &b) const |
| std::string | toString () const |
| virtual | ~Plane () |
Static Public Member Functions |
| static Plane | fromEquation (float a, float b, float c, float d) |
Detailed Description
An infinite 2D plane in 3D space.
Constructor & Destructor Documentation
| G3D::Plane::Plane |
( |
|
) |
[inline] |
Constructs a plane from three points.
Constructs a plane from three points, where at most two are at infinity (w = 0, not xyz = inf).
The normal will be unitized.
| virtual G3D::Plane::~Plane |
( |
|
) |
[inline, virtual] |
Member Function Documentation
| Vector3 G3D::Plane::center |
( |
|
) |
const [inline] |
Returns normal * distance from origin.
| float G3D::Plane::distance |
( |
const Vector3 & |
x |
) |
const [inline] |
Returns distance from point to plane.
Distance is negative if point is behind (not in plane in direction opposite normal) the plane.
| void G3D::Plane::flip |
( |
|
) |
|
Inverts the facing direction of the plane so the new normal is the inverse of the old normal.
| static Plane G3D::Plane::fromEquation |
( |
float |
a, |
|
|
float |
b, |
|
|
float |
c, |
|
|
float |
d | |
|
) |
| | [static] |
| bool G3D::Plane::fuzzyContains |
( |
const Vector3 & |
point |
) |
const [inline] |
Returns true if the point is nearly in the plane.
| void G3D::Plane::getEquation |
( |
float & |
a, |
|
|
float & |
b, |
|
|
float & |
c, |
|
|
float & |
d | |
|
) |
| | const |
| void G3D::Plane::getEquation |
( |
double & |
a, |
|
|
double & |
b, |
|
|
double & |
c, |
|
|
double & |
d | |
|
) |
| | const |
| void G3D::Plane::getEquation |
( |
Vector3 & |
normal, |
|
|
float & |
d | |
|
) |
| | const |
| void G3D::Plane::getEquation |
( |
Vector3 & |
normal, |
|
|
double & |
d | |
|
) |
| | const |
Returns the equation in the form:.
normal.Dot(Vector3(x, y, z)) + d = 0
| bool G3D::Plane::halfSpaceContains |
( |
const Vector4 & |
point |
) |
const [inline] |
Returns true if point is on the side the normal points to or is in the plane.
| bool G3D::Plane::halfSpaceContains |
( |
Vector3 |
point |
) |
const [inline] |
Returns true if point is on the side the normal points to or is in the plane.
| bool G3D::Plane::halfSpaceContainsFinite |
( |
const Vector3 & |
point |
) |
const [inline] |
Returns true if point is on the side the normal points to or is in the plane.
Only call on finite points. Faster than halfSpaceContains.
| const Vector3& G3D::Plane::normal |
( |
|
) |
const [inline] |
| std::string G3D::Plane::toString |
( |
|
) |
const |
The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:47 2007 for G3D by
1.5.2
Hosted by
| |