SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
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
Definition at line 16 of file SLPlane.cpp.
void SLPlane::print | ( | const char * | name | ) |
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
Definition at line 50 of file SLPlane.cpp.
SLPlane::setByNormalAndPoint defines the plane by a normal N and a point P
Definition at line 40 of file SLPlane.cpp.