|
AGX Dynamics 2.42.3.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. | |
| PlaneT (const agx::Vec3T< T > &normal, const agx::Vec3T< T > &point) | |
| Constructor. | |
| PlaneT (const agx::Vec3T< T > &normal, const T d) | |
| Constructor. | |
| PlaneT (const agx::Vec3T< T > &p1, const agx::Vec3T< T > &p2, const agx::Vec3T< T > &p3) | |
| Constructor. | |
| PlaneT (const agx::Vec4T< T > &plane) | |
| Create a plane from a Vec4T. | |
| 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. | |
| PlaneT | calculatePlane (const agx::AffineMatrix4x4 &transform) const |
| Create a new plane that is equal to the current plane transformed by the given transform. | |
| PlaneT | calculateTransformedPlane (const agx::AffineMatrix4x4 &transform) const |
| Create a new plane that is equal to the current plane transformed by the given transform. | |
| T | getDistance () const |
| agx::Vec3T< T > | getNormal () const |
| operator agx::Vec4T< T > () const | |
| Cast to Vec4. | |
| agx::Vec3T< T > | project (const agx::Vec3T< T > &point) const |
Projects the point point onto this plane. | |
| void | set (const agx::PlaneT< T > &plane) |
| Make this plane a copy of the given plane. | |
| void | set (const agx::Vec4T< T > &plane) |
| Reconfigure this plane according the given specification. | |
| void | setDistance (const T distance) |
| Translate the plane parallel to the normal so that the given distance becomes the new distance from the origin. | |
| 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. | |
| T | signedDistanceToPoint (const agx::Vec3T< T > &point) const |
| Calculates the distance from the plane to a point. | |
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.
Definition at line 31 of file agx/Plane.h.
| agx::PlaneT< T >::PlaneT |
Create a plane with it surface on the X and Y axes.
Definition at line 139 of file agx/Plane.h.
References agx::init().
| agx::PlaneT< T >::PlaneT | ( | const agx::Vec4T< T > & | plane | ) |
Create a plane from a Vec4T.
The first three elements become the normal and the last element is the distance from the origin to the newly created plane.
Definition at line 145 of file agx/Plane.h.
| agx::PlaneT< T >::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.
ax+by+cz+d=0
Definition at line 149 of file agx/Plane.h.
References agx::init().
| agx::PlaneT< T >::PlaneT | ( | const agx::Vec3T< T > & | normal, |
| const T | d | ||
| ) |
Constructor.
| normal | Plane normal (a,b,c) in plane equation. |
| d | Distance from origin. |
Definition at line 155 of file agx/Plane.h.
References agx::init().
| agx::PlaneT< T >::PlaneT | ( | const agx::Vec3T< T > & | normal, |
| const agx::Vec3T< T > & | point | ||
| ) |
Constructor.
| normal | - Normal (a,b,c) in the plane equation |
| point | - A point on the plane |
Definition at line 161 of file agx/Plane.h.
References agx::init().
| 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 agx/Plane.h.
References agx::init(), 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 agx/Plane.h.
| 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 agx/Plane.h.
| T agx::PlaneT< T >::getDistance |
Definition at line 194 of file agx/Plane.h.
Referenced by agxCollide::Plane::getDistance(), agx::operator<<(), and agx::PlaneT< T >::set().
| Vec3T< T > agx::PlaneT< T >::getNormal |
Definition at line 191 of file agx/Plane.h.
Referenced by agxCollide::Plane::getNormal(), agx::operator<<(), and agx::PlaneT< T >::set().
| 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 agx/Plane.h.
| 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 agx/Plane.h.
References agx::PlaneT< T >::getDistance(), agx::PlaneT< T >::getNormal(), and agx::init().
| void agx::PlaneT< T >::set | ( | const agx::Vec4T< T > & | plane | ) |
Reconfigure this plane according the given specification.
The first three elements of the Vec4 are taken to be the normal and the last element becomes the distance from the origin.
Definition at line 203 of file agx/Plane.h.
References agx::init().
| void agx::PlaneT< T >::setDistance | ( | const T | distance | ) |
Translate the plane parallel to the normal so that the given distance becomes the new distance from the origin.
Definition at line 200 of file agx/Plane.h.
| void agx::PlaneT< T >::setNormal | ( | const agx::Vec3T< T > & | normal | ) |
Change the orientation of the plane so that the given normal becomes the new normal of the plane.
Definition at line 197 of file agx/Plane.h.
| 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 agx/Plane.h.