plane Class Reference
[Math Data Types]
#include <plane.h>
Detailed Description
A plane in 3d space.(C) 2004 RadonLabs GmbH
Definition at line 16 of file plane.h.
Public Member Functions | |
| plane () | |
| default constructor | |
| plane (float A, float B, float C, float D) | |
| constructor 1 | |
| plane (const plane &p) | |
| constructor 2 | |
| plane (const vector3 &v0, const vector3 &v1, const vector3 &v2) | |
| constructor 3 | |
| void | set (float A, float B, float C, float D) |
| set contents | |
| void | set (const vector3 &v0, const vector3 &v1, const vector3 &v2) |
| construct plane from 3 vectors | |
| float | distance (const vector3 &v) const |
| compute distance of point to plane | |
| vector3 | normal () const |
| get plane normal | |
| bool | intersect (const line3 &l, float &t) const |
| get intersecting t of line with one sided plane | |
| bool | intersect (const plane &p, line3 &l) const |
| get plane/plane intersection | |
Public Attributes | |
| float | a |
| float | b |
| float | c |
| float | d |
Constructor & Destructor Documentation
|
|
default constructor
|
|
||||||||||||||||||||
|
constructor 1
|
|
|
constructor 2
|
|
||||||||||||||||
|
constructor 3
|
Member Function Documentation
|
||||||||||||||||||||
|
set contents
|
|
||||||||||||||||
|
construct plane from 3 vectors Constructs a plane from 3 position vectors. |
|
|
compute distance of point to plane Computes the distance of a point to the plane. Return 0.0 if the point is on the plane. |
|
|
get plane normal Returns the plane normal. |
|
||||||||||||
|
get intersecting t of line with one sided plane Get intersecting t of line with one-sided plane. Returns false if the line is parallel to the plane. If the given line intersects with the plane, plugging the value t into the line equation produces the point of intersection. The following code snippet shows the way to get the intersection point between a line and a plane: if (p.intersect(l, t)) { vector3 intersection = l.b + t*l.m; } |
|
||||||||||||
|
get plane/plane intersection Get plane/plane intersection. Return false if planes are parallel. |
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file: