Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials |
Template plane class with some intersection testing methods. More...
#include <plane3d.h>
Public Member Functions | |
EIntersectionRelation3D | classifyPointRelation (const vector3d< T > &point) const |
Classifies the relation of a point to this plane. | |
bool | existsIntersection (const plane3d< T > &other) const |
Tests if there is an intersection with the other plane. | |
T | getDistanceTo (const vector3d< T > &point) const |
Get the distance to a point. | |
bool | getIntersectionWithLimitedLine (const vector3d< T > &linePoint1, const vector3d< T > &linePoint2, vector3d< T > &outIntersection) const |
Get an intersection with a 3d line, limited between two 3d points. | |
bool | getIntersectionWithLine (const vector3d< T > &linePoint, const vector3d< T > &lineVect, vector3d< T > &outIntersection) const |
Get an intersection with a 3d line. | |
bool | getIntersectionWithPlane (const plane3d< T > &other, vector3d< T > &outLinePoint, vector3d< T > &outLineVect) const |
Intersects this plane with another. | |
bool | getIntersectionWithPlanes (const plane3d< T > &o1, const plane3d< T > &o2, vector3d< T > &outPoint) const |
Get the intersection point with two other planes if there is one. | |
f32 | getKnownIntersectionWithLine (const vector3d< T > &linePoint1, const vector3d< T > &linePoint2) const |
Get percentage of line between two points where an intersection with this plane happens. | |
vector3d< T > | getMemberPoint () const |
Gets a member point of the plane. | |
bool | isFrontFacing (const vector3d< T > &lookDirection) const |
Test if the triangle would be front or backfacing from any point. | |
bool | operator!= (const plane3d< T > &other) const |
bool | operator== (const plane3d< T > &other) const |
plane3d (const vector3d< T > &normal, const T d) | |
plane3d (const vector3d< T > &point1, const vector3d< T > &point2, const vector3d< T > &point3) | |
plane3d (T px, T py, T pz, T nx, T ny, T nz) | |
plane3d (const vector3d< T > &MPoint, const vector3d< T > &Normal) | |
plane3d () | |
void | recalculateD (const vector3d< T > &MPoint) |
Recalculates the distance from origin by applying a new member point to the plane. | |
void | setPlane (const vector3d< T > &point1, const vector3d< T > &point2, const vector3d< T > &point3) |
void | setPlane (const vector3d< T > &nvect, T d) |
void | setPlane (const vector3d< T > &point, const vector3d< T > &nvector) |
Public Attributes | |
T | D |
Distance from origin. | |
vector3d< T > | Normal |
Normal vector of the plane. |
Template plane class with some intersection testing methods.
Definition at line 28 of file plane3d.h.
irr::core::plane3d< T >::plane3d | ( | ) | [inline] |
irr::core::plane3d< T >::plane3d | ( | const vector3d< T > & | MPoint, | |
const vector3d< T > & | Normal | |||
) | [inline] |
irr::core::plane3d< T >::plane3d | ( | T | px, | |
T | py, | |||
T | pz, | |||
T | nx, | |||
T | ny, | |||
T | nz | |||
) | [inline] |
irr::core::plane3d< T >::plane3d | ( | const vector3d< T > & | point1, | |
const vector3d< T > & | point2, | |||
const vector3d< T > & | point3 | |||
) | [inline] |
irr::core::plane3d< T >::plane3d | ( | const vector3d< T > & | normal, | |
const T | d | |||
) | [inline] |
EIntersectionRelation3D irr::core::plane3d< T >::classifyPointRelation | ( | const vector3d< T > & | point | ) | const [inline] |
Classifies the relation of a point to this plane.
point | Point to classify its relation. |
bool irr::core::plane3d< T >::existsIntersection | ( | const plane3d< T > & | other | ) | const [inline] |
T irr::core::plane3d< T >::getDistanceTo | ( | const vector3d< T > & | point | ) | const [inline] |
bool irr::core::plane3d< T >::getIntersectionWithLimitedLine | ( | const vector3d< T > & | linePoint1, | |
const vector3d< T > & | linePoint2, | |||
vector3d< T > & | outIntersection | |||
) | const [inline] |
Get an intersection with a 3d line, limited between two 3d points.
linePoint1 | Point 1 of the line. | |
linePoint2 | Point 2 of the line. | |
outIntersection | Place to store the intersection point, if there is one. |
bool irr::core::plane3d< T >::getIntersectionWithLine | ( | const vector3d< T > & | linePoint, | |
const vector3d< T > & | lineVect, | |||
vector3d< T > & | outIntersection | |||
) | const [inline] |
Get 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. |
Definition at line 81 of file plane3d.h.
Referenced by irr::core::plane3d< f32 >::getIntersectionWithLimitedLine(), and irr::core::plane3d< f32 >::getIntersectionWithPlanes().
bool irr::core::plane3d< T >::getIntersectionWithPlane | ( | const plane3d< T > & | other, | |
vector3d< T > & | outLinePoint, | |||
vector3d< T > & | outLineVect | |||
) | const [inline] |
Intersects this plane with another.
other | Other plane to intersect with. | |
outLinePoint | Base point of intersection line. | |
outLineVect | Vector of intersection. |
Definition at line 168 of file plane3d.h.
Referenced by irr::core::plane3d< f32 >::getIntersectionWithPlanes().
bool irr::core::plane3d< T >::getIntersectionWithPlanes | ( | const plane3d< T > & | o1, | |
const plane3d< T > & | o2, | |||
vector3d< T > & | outPoint | |||
) | const [inline] |
Get the intersection point with two other planes if there is one.
Definition at line 190 of file plane3d.h.
Referenced by irr::scene::SViewFrustum::getFarLeftDown(), irr::scene::SViewFrustum::getFarLeftUp(), irr::scene::SViewFrustum::getFarRightDown(), and irr::scene::SViewFrustum::getFarRightUp().
f32 irr::core::plane3d< T >::getKnownIntersectionWithLine | ( | const vector3d< T > & | linePoint1, | |
const vector3d< T > & | linePoint2 | |||
) | const [inline] |
Get percentage of line between two points where an intersection with this plane happens.
Only useful if known that there is an intersection.
linePoint1 | Point1 of the line to intersect with. | |
linePoint2 | Point2 of the line to intersect with. |
Definition at line 102 of file plane3d.h.
Referenced by irr::scene::SViewFrustum::clipLine().
vector3d<T> irr::core::plane3d< T >::getMemberPoint | ( | ) | const [inline] |
Gets a member point of the plane.
Definition at line 150 of file plane3d.h.
Referenced by irr::core::CMatrix4< T >::transformPlane().
bool irr::core::plane3d< T >::isFrontFacing | ( | const vector3d< T > & | lookDirection | ) | const [inline] |
Test if the triangle would be front or backfacing from any point.
Thus, this method assumes a camera position from which the triangle is definitely visible when looking into the given direction. Note that this only works if the normal is Normalized. Do not use this method with points as it will give wrong results!
lookDirection,: | Look direction. |
bool irr::core::plane3d< T >::operator!= | ( | const plane3d< T > & | other | ) | const [inline] |
bool irr::core::plane3d< T >::operator== | ( | const plane3d< T > & | other | ) | const [inline] |
void irr::core::plane3d< T >::recalculateD | ( | const vector3d< T > & | MPoint | ) | [inline] |
Recalculates the distance from origin by applying a new member point to the plane.
Definition at line 144 of file plane3d.h.
Referenced by irr::core::plane3d< f32 >::plane3d(), and irr::core::plane3d< f32 >::setPlane().
void irr::core::plane3d< T >::setPlane | ( | const vector3d< T > & | point1, | |
const vector3d< T > & | point2, | |||
const vector3d< T > & | point3 | |||
) | [inline] |
void irr::core::plane3d< T >::setPlane | ( | const vector3d< T > & | nvect, | |
T | d | |||
) | [inline] |
void irr::core::plane3d< T >::setPlane | ( | const vector3d< T > & | point, | |
const vector3d< T > & | nvector | |||
) | [inline] |
Definition at line 53 of file plane3d.h.
Referenced by irr::core::plane3d< f32 >::plane3d(), and irr::core::CMatrix4< T >::transformPlane().
T irr::core::plane3d< T >::D |
Distance from origin.
Definition at line 226 of file plane3d.h.
Referenced by irr::core::CMatrix4< T >::buildShadowMatrix(), irr::core::plane3d< f32 >::classifyPointRelation(), irr::core::plane3d< f32 >::getDistanceTo(), irr::core::plane3d< f32 >::getIntersectionWithLine(), irr::core::plane3d< f32 >::getIntersectionWithPlane(), irr::core::plane3d< f32 >::getKnownIntersectionWithLine(), irr::core::plane3d< f32 >::getMemberPoint(), irr::core::plane3d< f32 >::operator==(), irr::core::plane3d< f32 >::recalculateD(), irr::scene::SViewFrustum::setFrom(), and irr::core::plane3d< f32 >::setPlane().
vector3d<T> irr::core::plane3d< T >::Normal |
Normal vector of the plane.
Definition at line 223 of file plane3d.h.
Referenced by irr::core::CMatrix4< T >::buildShadowMatrix(), irr::core::plane3d< f32 >::classifyPointRelation(), irr::core::plane3d< f32 >::existsIntersection(), irr::core::plane3d< f32 >::getDistanceTo(), irr::core::plane3d< f32 >::getIntersectionWithLine(), irr::core::plane3d< f32 >::getIntersectionWithPlane(), irr::core::plane3d< f32 >::getKnownIntersectionWithLine(), irr::core::plane3d< f32 >::getMemberPoint(), irr::core::plane3d< f32 >::isFrontFacing(), irr::core::plane3d< f32 >::operator==(), irr::core::plane3d< f32 >::recalculateD(), irr::scene::SViewFrustum::setFrom(), irr::core::plane3d< f32 >::setPlane(), and irr::core::CMatrix4< T >::transformPlane().
The Irrlicht
Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated
on Sun Oct 24 12:42:03 2010 by Doxygen
(1.6.2) |