Template plane class with some intersection testing methods. More...
#include <plane3d.h>
Public Attributes | |
T | D |
Distance from origin. | |
vector3d< T > | Normal |
Normal vector of the plane. | |
Template plane class with some intersection testing methods.
It has to be ensured, that the normal is always normalized. The constructors and setters of this class will not ensure this automatically. So any normal passed in has to be normalized in advance. No change to the normal will be made by any of the class methods.
|
inline |
Definition at line 39 of file plane3d.h.
References irr::core::plane3d< T >::recalculateD().
|
inline |
Definition at line 41 of file plane3d.h.
References irr::core::plane3d< T >::recalculateD().
Definition at line 43 of file plane3d.h.
References irr::core::plane3d< T >::recalculateD().
|
inline |
Definition at line 45 of file plane3d.h.
References irr::core::plane3d< T >::setPlane().
|
inline |
Classifies the relation of a point to this plane.
point | Point to classify its relation. |
Definition at line 135 of file plane3d.h.
References irr::core::plane3d< T >::D, irr::core::ISREL3D_BACK, irr::core::ISREL3D_FRONT, irr::core::ISREL3D_PLANAR, irr::core::plane3d< T >::Normal, and irr::core::ROUNDING_ERROR_f32.
Tests if there is an intersection with the other plane.
Definition at line 162 of file plane3d.h.
References irr::core::plane3d< T >::Normal, and irr::core::ROUNDING_ERROR_f32.
Get the distance to a point.
Note that this only works if the normal is normalized.
Definition at line 222 of file plane3d.h.
References irr::core::plane3d< T >::D, and irr::core::plane3d< T >::Normal.
|
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. |
Definition at line 121 of file plane3d.h.
References irr::core::plane3d< T >::getIntersectionWithLine().
|
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 86 of file plane3d.h.
References irr::core::plane3d< T >::D, and irr::core::plane3d< T >::Normal.
Referenced by irr::core::plane3d< T >::getIntersectionWithLimitedLine().
|
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 173 of file plane3d.h.
References irr::core::plane3d< T >::D, irr::core::plane3d< T >::Normal, and irr::core::ROUNDING_ERROR_f64.
Referenced by irr::core::plane3d< T >::getIntersectionWithPlanes().
|
inline |
Get the intersection point with two other planes if there is one.
Definition at line 195 of file plane3d.h.
References irr::core::plane3d< T >::getIntersectionWithPlane().
Referenced by irr::scene::SViewFrustum::getFarLeftDown(), irr::scene::SViewFrustum::getFarLeftUp(), irr::scene::SViewFrustum::getFarRightDown(), irr::scene::SViewFrustum::getFarRightUp(), irr::scene::SViewFrustum::getNearLeftDown(), irr::scene::SViewFrustum::getNearLeftUp(), irr::scene::SViewFrustum::getNearRightDown(), and irr::scene::SViewFrustum::getNearRightUp().
|
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 107 of file plane3d.h.
References irr::core::plane3d< T >::D, and irr::core::plane3d< T >::Normal.
Referenced by irr::scene::SViewFrustum::clipLine().
Gets a member point of the plane.
Definition at line 155 of file plane3d.h.
References irr::core::plane3d< T >::D, and irr::core::plane3d< T >::Normal.
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. |
Definition at line 214 of file plane3d.h.
References F32_LOWER_EQUAL_0, and irr::core::plane3d< T >::Normal.
Definition at line 52 of file plane3d.h.
References irr::core::plane3d< T >::D, irr::core::equals(), and irr::core::plane3d< T >::Normal.
Recalculates the distance from origin by applying a new member point to the plane.
Definition at line 149 of file plane3d.h.
References irr::core::plane3d< T >::D, and irr::core::plane3d< T >::Normal.
Referenced by irr::core::plane3d< T >::plane3d(), irr::core::plane3d< T >::plane3d(), irr::core::plane3d< T >::plane3d(), irr::core::plane3d< T >::setPlane(), and irr::core::plane3d< T >::setPlane().
Definition at line 64 of file plane3d.h.
References irr::core::plane3d< T >::D, and irr::core::plane3d< T >::Normal.
|
inline |
Definition at line 58 of file plane3d.h.
References irr::core::plane3d< T >::Normal, and irr::core::plane3d< T >::recalculateD().
Referenced by irr::core::plane3d< T >::plane3d().
|
inline |
Definition at line 70 of file plane3d.h.
References irr::core::plane3d< T >::Normal, and irr::core::plane3d< T >::recalculateD().
T irr::core::plane3d< T >::D |
Distance from origin.
Definition at line 231 of file plane3d.h.
Referenced by irr::core::plane3d< T >::classifyPointRelation(), irr::core::plane3d< T >::getDistanceTo(), irr::core::plane3d< T >::getIntersectionWithLine(), irr::core::plane3d< T >::getIntersectionWithPlane(), irr::core::plane3d< T >::getKnownIntersectionWithLine(), irr::core::plane3d< T >::getMemberPoint(), irr::core::plane3d< T >::operator==(), irr::core::plane3d< T >::recalculateD(), irr::scene::SViewFrustum::setFrom(), and irr::core::plane3d< T >::setPlane().
Normal vector of the plane.
Definition at line 228 of file plane3d.h.
Referenced by irr::core::plane3d< T >::classifyPointRelation(), irr::core::plane3d< T >::existsIntersection(), irr::core::plane3d< T >::getDistanceTo(), irr::core::plane3d< T >::getIntersectionWithLine(), irr::core::plane3d< T >::getIntersectionWithPlane(), irr::core::plane3d< T >::getKnownIntersectionWithLine(), irr::core::plane3d< T >::getMemberPoint(), irr::core::plane3d< T >::isFrontFacing(), irr::core::plane3d< T >::operator==(), irr::core::plane3d< T >::recalculateD(), irr::scene::SViewFrustum::setFrom(), irr::core::plane3d< T >::setPlane(), irr::core::plane3d< T >::setPlane(), and irr::core::plane3d< T >::setPlane().