Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a plane in 3D space. More...
#include <omPlane3D.h>
Public Member Functions | |
Plane3D () | |
Create a plane in 3D space with the normal pointing along the positive Z axis with offset = 0. More... | |
Plane3D (const VectorND< T, 3 > &planeNormal, T planeOffset) | |
Create a plane in 3D space with the specified normal and offset from the origin. More... | |
Plane3D (const VectorND< T, 3 > &planeNormal, const VectorND< T, 3 > &pointOnPlane) | |
Create a plane in 3D space from the specified normal and point on the plane. More... | |
Plane3D (const VectorND< T, 3 > &p1, const VectorND< T, 3 > &p2, const VectorND< T, 3 > &p3) | |
Create a plane in 3D space from three points in that plane. More... | |
T | getDistanceTo (const VectorND< T, 3 > &point) const |
Get the perpendicular distance from the specified point to the plane. More... | |
T | getSignedDistanceTo (const VectorND< T, 3 > &point) const |
Get the perpendicular distance from the specified point to the plane. More... | |
VectorND< T, 3 > | getProjection (const VectorND< T, 3 > &point) const |
Return the projection of the given point onto the plane. More... | |
VectorND< T, 3 > | getProjectionNormalized (const VectorND< T, 3 > &point) const |
Return the projection of the given point onto the plane. More... | |
VectorND< T, 3 > | getVectorProjection (const VectorND< T, 3 > &vector) const |
Return the projection of the given point onto the plane. More... | |
VectorND< T, 3 > | getVectorProjectionNormalized (const VectorND< T, 3 > &vector) const |
Return the projection of the given point onto the plane. More... | |
VectorND< T, 3 > | getReflection (const VectorND< T, 3 > &point) const |
Get the reflection of a point over the plane. More... | |
VectorND< T, 3 > | getReflectionNormalized (const VectorND< T, 3 > &point) const |
Get the reflection of a point over the plane. More... | |
VectorND< T, 3 > | getVectorReflection (const VectorND< T, 3 > &vector) const |
Return the specular reflection of a vector off the plane. More... | |
VectorND< T, 3 > | getVectorReflectionNormalized (const VectorND< T, 3 > &vector) const |
Return the specular reflection of a vector off the plane, if the plane has a unit normal vector. More... | |
Plane3D | normalize () const |
Normalize the plane's normal vector and correct the offset to match. More... | |
Plane3D | operator- () const |
Return the plane with the opposite normal vector and offset. More... | |
Public Attributes | |
VectorND< T, 3 > | normal |
A vector perpendicular to the plane. More... | |
T | offset |
The distance that the plane is offset from the origin. More... | |
A class that represents a plane in 3D space.
It uses the normal and offset plane representation as it is the most universally useful in computational mathematics, especially relating to graphics and geometry.
|
inline |
Create a plane in 3D space with the normal pointing along the positive Z axis with offset = 0.
|
inline |
Create a plane in 3D space with the specified normal and offset from the origin.
|
inline |
Create a plane in 3D space from the specified normal and point on the plane.
|
inline |
Create a plane in 3D space from three points in that plane.
|
inline |
Get the perpendicular distance from the specified point to the plane.
|
inline |
Get the perpendicular distance from the specified point to the plane.
|
inline |
Return the projection of the given point onto the plane.
|
inline |
Return the projection of the given point onto the plane.
The plane is assumed to have a normal vector of unit length. This results in a significantly faster function, however the results are meaningless if the precondition is not met.
|
inline |
Return the projection of the given point onto the plane.
|
inline |
Return the projection of the given point onto the plane.
The plane is assumed to have a normal vector of unit length. This results in a significantly faster function, however the results are meaningless if the precondition is not met.
|
inline |
Get the reflection of a point over the plane.
|
inline |
Get the reflection of a point over the plane.
The plane is assumed to have a normal vector of unit length. This results in a significantly faster function, however the results are meaningless if the precondition is not met.
|
inline |
Return the specular reflection of a vector off the plane.
|
inline |
Return the specular reflection of a vector off the plane, if the plane has a unit normal vector.
The plane is assumed to have a normal vector of unit length. This results in a significantly faster function, however the results are meaningless if the precondition is not met.
|
inline |
Normalize the plane's normal vector and correct the offset to match.
|
inline |
Return the plane with the opposite normal vector and offset.
This plane is mathematically the same as the original plane.
VectorND<T,3> om::math::Plane3D< T >::normal |
A vector perpendicular to the plane.
T om::math::Plane3D< T >::offset |
The distance that the plane is offset from the origin.