![]() |
SLProject 4.0.000
|
Defines a plane in 3D space with the equation ax + by + cy + d = 0. More...
#include <SLPlane.h>
Public Member Functions | |
| SLPlane (const SLVec3f &v1, const SLVec3f &v2, const SLVec3f &v3) | |
| SLPlane () | |
| ~SLPlane () | |
| void | setPoints (const SLVec3f &v1, const SLVec3f &v2, const SLVec3f &v3) |
| void | setNormalAndPoint (const SLVec3f &N, const SLVec3f &P) |
| void | setCoefficients (const SLfloat A, const SLfloat B, const SLfloat C, const SLfloat D) |
| SLfloat | distToPoint (const SLVec3f &p) |
| Returns distance between a point P and the plane. More... | |
| void | print (const char *name) |
Public Attributes | |
| SLVec3f | N |
| plane normal More... | |
| SLfloat | d |
| d = -(ax+by+cy) = -normal.dot(point) More... | |
Defines a plane in 3D space with the equation ax + by + cy + d = 0.
SLPlane defines a plane in 3D space with the equation ax + by + cy + d = 0 where [a,b,c] is the plane normal and d is the distance from [0,0,0]. The class is used to define the 6 planes of the view frustum.
SLPlane::SLPlane ctor with 3 points
|
inline |
|
inline |
Returns distance between a point P and the plane.
| void SLPlane::print | ( | const char * | name | ) |
SLPlane::print prints the normal and the coefficent d
| void SLPlane::setCoefficients | ( | const SLfloat | A, |
| const SLfloat | B, | ||
| const SLfloat | C, | ||
| const SLfloat | D | ||
| ) |
SLPlane::setByCoefficients defines the plane by the coefficient A,B,C & D
SLPlane::setByNormalAndPoint defines the plane by a normal N and a point P
SLPlane::setFromPoints set the plane from 3 points
| SLfloat SLPlane::d |
d = -(ax+by+cy) = -normal.dot(point)
| SLVec3f SLPlane::N |
plane normal