Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
Template plane class with some intersection testing methods. More...
#include <Plane3d.h>
Public Member Functions | |
f32 | getDistanceTo (const vector3d &point) const |
bool | getIntersectionWithLine (const vector3d &linePoint, const vector3d &lineVect, vector3d &outIntersection) const |
bool | getIntersectionWithPlane (const plane3d &other, vector3d &outLinePoint, vector3d &outLineVect) const |
bool | getIntersectionWithPlanes (const plane3d &o1, const plane3d &o2, vector3d &outPoint) const |
Returns the intersection point with two other planes if there is one. | |
vector3d | getMemberPoint () const |
Returns a member point of the plane. | |
bool | isFrontFacing (const vector3d &lookDirection) const |
bool | operator!= (const plane3d &other) const |
bool | operator== (const plane3d &other) const |
plane3d (const vector3d &MPoint, const vector3d &Normal) | |
plane3d (f32 px, f32 py, f32 pz, f32 nx, f32 ny, f32 nz) | |
plane3d (const plane3d &other) | |
plane3d () | |
plane3d (const vector3d &point1, const vector3d &point2, const vector3d &point3) | |
void | recalculateD (const vector3d &MPoint) |
void | setPlane (const vector3d &point1, const vector3d &point2, const vector3d &point3) |
void | setPlane (const vector3d &nvect, f32 d) |
void | setPlane (const vector3d &point, const vector3d &nvector) |
Public Attributes | |
f32 | D |
vector3d | Normal |
Template plane class with some intersection testing methods.
core::plane3d::plane3d | ( | ) |
References recalculateD().
References recalculateD().
core::plane3d::plane3d | ( | const vector3d & | point1, |
const vector3d & | point2, | ||
const vector3d & | point3 | ||
) |
References setPlane().
References recalculateD().
core::plane3d::plane3d | ( | const plane3d & | other | ) |
Returns the distance to a point. Note that this only works if the normal is Normalized.
References D, core::vector3d::dotProduct(), and Normal.
bool core::plane3d::getIntersectionWithLine | ( | const vector3d & | linePoint, |
const vector3d & | lineVect, | ||
vector3d & | outIntersection | ||
) | const |
Returns an intersection with a 3d line.
lineVect,: | Vector of the line to intersect with. |
linePoint,: | Point of the line to intersect with. |
outIntersection,: | Place to store the intersection point, if there is one. |
References D, core::vector3d::dotProduct(), and Normal.
Referenced by getIntersectionWithPlanes().
bool core::plane3d::getIntersectionWithPlane | ( | const plane3d & | other, |
vector3d & | outLinePoint, | ||
vector3d & | outLineVect | ||
) | const |
Intersects this plane with another.
other,: | Other plane to intersect with. |
outLinePoint,: | Base point of intersection line. |
outLineVect,: | Vector of intersection. |
References core::abs(), core::vector3d::crossProduct(), D, core::vector3d::dotProduct(), core::EPSILON64, core::vector3d::getLength(), and Normal.
Referenced by getIntersectionWithPlanes().
bool core::plane3d::getIntersectionWithPlanes | ( | const plane3d & | o1, |
const plane3d & | o2, | ||
vector3d & | outPoint | ||
) | const |
Returns the intersection point with two other planes if there is one.
References getIntersectionWithLine(), and getIntersectionWithPlane().
Referenced by render::Frustum::buildViewFrustum().
vector3d core::plane3d::getMemberPoint | ( | ) | const |
Returns a member point of the plane.
Referenced by core::matrix4::transformPlane().
bool core::plane3d::isFrontFacing | ( | const vector3d & | lookDirection | ) | const |
Returns if the plane is front of backfacing. Note that this only works if the normal is Normalized.
lookDirection,: | Look direction. |
References core::vector3d::dotProduct(), and Normal.
bool core::plane3d::operator!= | ( | const plane3d & | other | ) | const [inline] |
References D, core::EPSILON, and Normal.
bool core::plane3d::operator== | ( | const plane3d & | other | ) | const [inline] |
References D, core::EPSILON, and Normal.
void core::plane3d::recalculateD | ( | const vector3d & | MPoint | ) |
Recalculates the distance from origin by applying a new member point to the plane.
References D, core::vector3d::dotProduct(), and Normal.
Referenced by plane3d(), and setPlane().
References Normal, core::vector3d::normalize(), and recalculateD().
Referenced by plane3d().
void core::plane3d::setPlane | ( | const vector3d & | point1, |
const vector3d & | point2, | ||
const vector3d & | point3 | ||
) |
References Normal, core::vector3d::normalize(), and recalculateD().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by
Doxygen
(1.7.4)
|