|
AGX Dynamics
2.37.2.0
|
Class representing the mathematical concept of a plane, also called a half- space. More...
#include <Plane.h>
Public Member Functions | |
| PlaneT () | |
| Create a plane with it surface on the X and Y axes. More... | |
| PlaneT (const agx::Vec4T< T > &plane) | |
| Create a plane from a Vec4T. More... | |
| PlaneT (const T a, const T b, const T c, const T d) | |
| a, b, and c forms the normal of the plane and d is the distance from the origin. More... | |
| PlaneT (const agx::Vec3T< T > &normal, const T d) | |
| Constructor. More... | |
| PlaneT (const agx::Vec3T< T > &normal, const agx::Vec3T< T > &point) | |
| Constructor. More... | |
| PlaneT (const agx::Vec3T< T > &p1, const agx::Vec3T< T > &p2, const agx::Vec3T< T > &p3) | |
| Constructor. More... | |
| PlaneT | calculatePlane (const agx::AffineMatrix4x4 &transform) const |
| Create a new plane that is equal to the current plane transformed by the given transform. More... | |
| PlaneT | calculateTransformedPlane (const agx::AffineMatrix4x4 &transform) const |
| Create a new plane that is equal to the current plane transformed by the given transform. More... | |
| T | getDistance () const |
| agx::Vec3T< T > | getNormal () const |
| /return The normal of the plane. More... | |
| operator agx::Vec4T< T > () const | |
| Cast to Vec4. More... | |
| agx::Vec3T< T > | project (const agx::Vec3T< T > &point) const |
Projects the point point onto this plane. More... | |
| void | set (const agx::Vec4T< T > &plane) |
| Reconfigure this plane according the given specification. More... | |
| void | set (const agx::PlaneT< T > &plane) |
| Make this plane a copy of the given plane. More... | |
| void | setDistance (const T distance) |
| Translate the plane parallel to the normal so that the given distance becomes the new distance from the origin. More... | |
| void | setNormal (const agx::Vec3T< T > &normal) |
| Change the orientation of the plane so that the given normal becomes the new normal of the plane. More... | |
| T | signedDistanceToPoint (const agx::Vec3T< T > &point) const |
| Calculates the distance from the plane to a point. More... | |
Class representing the mathematical concept of a plane, also called a half- space.
Not to be confused with the geometrical shape Plane defined in agxCollide.
| agx::PlaneT< T >::PlaneT | ( | ) |
| agx::PlaneT< T >::PlaneT | ( | const agx::Vec4T< T > & | plane | ) |
| agx::PlaneT< T >::PlaneT | ( | const T | a, |
| const T | b, | ||
| const T | c, | ||
| const T | d | ||
| ) |
| agx::PlaneT< T >::PlaneT | ( | const agx::Vec3T< T > & | normal, |
| const T | d | ||
| ) |
| agx::PlaneT< T >::PlaneT | ( | const agx::Vec3T< T > & | normal, |
| const agx::Vec3T< T > & | point | ||
| ) |
| agx::PlaneT< T >::PlaneT | ( | const agx::Vec3T< T > & | p1, |
| const agx::Vec3T< T > & | p2, | ||
| const agx::Vec3T< T > & | p3 | ||
| ) |
Constructor.
Plane defined by three points in space.
Definition at line 168 of file Plane.h.
References AGX_FORCE_INLINE, and agx::Vec3T< T >::normalize().
| PlaneT< T > agx::PlaneT< T >::calculatePlane | ( | const agx::AffineMatrix4x4 & | transform | ) | const |
Create a new plane that is equal to the current plane transformed by the given transform.
Definition at line 221 of file Plane.h.
References agx::PlaneT< T >::getDistance(), agx::PlaneT< T >::getNormal(), and agxData::transform().
| PlaneT< T > agx::PlaneT< T >::calculateTransformedPlane | ( | const agx::AffineMatrix4x4 & | transform | ) | const |
Create a new plane that is equal to the current plane transformed by the given transform.
Definition at line 239 of file Plane.h.
References AGX_TYPE_BINDING, agx::PlaneT< T >::getDistance(), agx::PlaneT< T >::getNormal(), and agxData::transform().
| T agx::PlaneT< T >::getDistance | ( | ) | const |
Definition at line 194 of file Plane.h.
Referenced by agx::PlaneT< T >::calculatePlane(), agx::PlaneT< T >::calculateTransformedPlane(), agx::PlaneT< T >::set(), and agx::PlaneT< T >::signedDistanceToPoint().
| Vec3T< T > agx::PlaneT< T >::getNormal | ( | ) | const |
/return The normal of the plane.
Definition at line 191 of file Plane.h.
Referenced by agx::PlaneT< T >::calculatePlane(), agx::PlaneT< T >::calculateTransformedPlane(), agx::PlaneT< T >::project(), agx::PlaneT< T >::set(), and agx::PlaneT< T >::signedDistanceToPoint().
| agx::PlaneT< T >::operator agx::Vec4T< T > | ( | ) | const |
Cast to Vec4.
The first three elements of the returned Vec4T hold the normal and the last element holds the distance.
| Vec3T< T > agx::PlaneT< T >::project | ( | const agx::Vec3T< T > & | point | ) | const |
Projects the point point onto this plane.
| point | - point to project onto this plane |
Definition at line 215 of file Plane.h.
References agx::PlaneT< T >::getNormal(), and agx::PlaneT< T >::signedDistanceToPoint().
| void agx::PlaneT< T >::set | ( | const agx::Vec4T< T > & | plane | ) |
| void agx::PlaneT< T >::set | ( | const agx::PlaneT< T > & | plane | ) |
Make this plane a copy of the given plane.
Definition at line 206 of file Plane.h.
References agx::PlaneT< T >::getDistance(), and agx::PlaneT< T >::getNormal().
| void agx::PlaneT< T >::setDistance | ( | const T | distance | ) |
| void agx::PlaneT< T >::setNormal | ( | const agx::Vec3T< T > & | normal | ) |
| T agx::PlaneT< T >::signedDistanceToPoint | ( | const agx::Vec3T< T > & | point | ) | const |
Calculates the distance from the plane to a point.
Negative value if the point is behind the plane, otherwise positive.
Definition at line 209 of file Plane.h.
References agx::PlaneT< T >::getDistance(), and agx::PlaneT< T >::getNormal().
Referenced by agx::PlaneT< T >::project().