#include <Plane.h>
Collaboration diagram for gmtl::Plane:
Public Methods | |
Plane () | |
Creates an uninitialized Plane. More... | |
Plane (const Point< DATA_TYPE, 3 > &pt1, const Point< DATA_TYPE, 3 > &pt2, const Point< DATA_TYPE, 3 > &pt3) | |
Creates a plane that the given points lie on. More... | |
Plane (const Vec< DATA_TYPE, 3 > &norm, const Point< DATA_TYPE, 3 > &pt) | |
Creates a plane with the given normal on which pt resides. More... | |
Plane (const Vec< DATA_TYPE, 3 > &norm, const DATA_TYPE &dPlaneConst) | |
Creates a plane with the given normal and offset. More... | |
Plane (const Plane< DATA_TYPE > &plane) | |
Creates an exact duplicate of the given plane. More... | |
const Vec< DATA_TYPE, 3 > & | getNormal () const |
Gets the normal for this plane. More... | |
void | setNormal (const Vec< DATA_TYPE, 3 > &norm) |
Sets the normal for this plane to the given vector. More... | |
const DATA_TYPE & | getOffset () const |
Gets the offset of this plane from the origin such that the offset is the negative distance from the origin. More... | |
void | setOffset (const DATA_TYPE &offset) |
Sets the offset of this plane from the origin. More... | |
Public Attributes | |
Vec< DATA_TYPE, 3 > | mNorm |
The normal for this vector. More... | |
DATA_TYPE | mOffset |
This plane's offset from the origin such that for any point pt, dot( pt, mNorm ) = mOffset. More... |
All points on the plane satify the equation dot(Pt,Normal) = offset normal is assumed to be normalized
NOTE: Some plane implementation store D instead of offset. Thus those implementation have opposite sign from what we have
pg. 309 Computer Graphics 2nd Edition Hearn Baker
N dot P = -D | |-d-| __|___|-->N | | *
Definition at line 65 of file Plane.h.
|
Creates an uninitialized Plane. In other words, the normal is (0,0,0) and the offset is 0. Definition at line 72 of file Plane.h. References mOffset.
00073 : mOffset( 0 ) 00074 {} |
|
Creates a plane that the given points lie on.
Definition at line 83 of file Plane.h. References gmtl::cross, gmtl::dot, mNorm, mOffset, and gmtl::normalize.
|
|
Creates a plane with the given normal on which pt resides.
Definition at line 101 of file Plane.h. References gmtl::dot, mNorm, and mOffset.
|
|
Creates a plane with the given normal and offset.
Definition at line 113 of file Plane.h. References mNorm, and mOffset.
|
|
Creates an exact duplicate of the given plane.
Definition at line 122 of file Plane.h. References mNorm, and mOffset.
|
|
Gets the normal for this plane.
Definition at line 131 of file Plane.h. References mNorm.
00132 { 00133 return mNorm; 00134 } |
|
Gets the offset of this plane from the origin such that the offset is the negative distance from the origin.
Definition at line 154 of file Plane.h. References mOffset.
00155 { 00156 return mOffset; 00157 } |
|
Sets the normal for this plane to the given vector.
Definition at line 143 of file Plane.h. References mNorm.
00144 { 00145 mNorm = norm; 00146 } |
|
Sets the offset of this plane from the origin.
Definition at line 164 of file Plane.h. References mOffset.
00165 { 00166 mOffset = offset; 00167 } |
|
The normal for this vector. For any point on the plane, dot( pt, mNorm) = mOffset. |
|
This plane's offset from the origin such that for any point pt, dot( pt, mNorm ) = mOffset. Note that mOffset = -D (neg dist from the origin). |