A plane and related functions. More...
#include <ignition/math/Plane.hh>
Public Types | |
| enum | PlaneSide { NEGATIVE_SIDE = 0 , POSITIVE_SIDE = 1 , NO_SIDE = 2 , BOTH_SIDE = 3 } |
| Enum used to indicate a side of the plane, no side, or both sides for entities on the plane. More... | |
Public Member Functions | |
| Plane () | |
| Constructor. | |
| Plane (const Vector3< T > &_normal, const Vector2< T > &_size, T _offset) | |
| Constructor. | |
| Plane (const Vector3< T > &_normal, T _offset=0.0) | |
| Constructor from a normal and a distance. | |
| virtual | ~Plane () |
| Destructor. | |
| T | Distance (const Vector3< T > &_origin, const Vector3< T > &_dir) const |
| Get distance to the plane give an origin and direction. | |
| T | Distance (const Vector3< T > &_point) const |
| The distance to the plane from the given point. | |
| Vector3< T > & | Normal () |
| Get the plane offset. | |
| const Vector3< T > & | Normal () const |
| Get the plane offset. | |
| T | Offset () const |
| Get the plane offset. | |
| Plane< T > & | operator= (const Plane< T > &_p) |
| Equal operator. | |
| void | Set (const Vector3< T > &_normal, const Vector2< T > &_size, T _offset) |
| Set the plane. | |
| void | Set (const Vector3< T > &_normal, T _offset) |
| Set the plane. | |
| PlaneSide | Side (const math::Box &_box) const |
| The side of the plane a box is on. | |
| PlaneSide | Side (const Vector3< T > &_point) const |
| The side of the plane a point is on. | |
| Vector2< T > & | Size () |
| Get the plane size. | |
| const Vector2< T > & | Size () const |
| Get the plane size. | |
A plane and related functions.
| enum ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Plane::PlaneSide |
Enum used to indicate a side of the plane, no side, or both sides for entities on the plane.
|
inline |
Constructor.
|
inline |
Constructor from a normal and a distance.
| [in] | _normal | The plane normal |
| [in] | _offset | Offset along the normal |
|
inline |
Constructor.
| [in] | _normal | The plane normal |
| [in] | _size | Size of the plane |
| [in] | _offset | Offset along the normal |
|
inlinevirtual |
Destructor.
|
inline |
Get distance to the plane give an origin and direction.
| [in] | _origin | the origin |
| [in] | _dir | a direction |
|
inline |
The distance to the plane from the given point.
The distance can be negative, which indicates the point is on the negative side of the plane.
| [in] | _point | 3D point to calculate distance from. |
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Plane< int >::Side(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Plane< int >::Side().
|
inline |
Get the plane offset.
|
inline |
Get the plane offset.
|
inline |
Get the plane offset.
|
inline |
Equal operator.
| _p | another plane |
|
inline |
Set the plane.
| [in] | _normal | The plane normal |
| [in] | _size | Size of the plane |
| [in] | _offset | Offset along the normal |
|
inline |
Set the plane.
| [in] | _normal | The plane normal |
| [in] | _offset | Offset along the normal |
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Plane< int >::Plane().
|
inline |
The side of the plane a box is on.
| [in] | _box | The 3D box to check. |
|
inline |
The side of the plane a point is on.
| [in] | _point | The 3D point to check. |
|
inline |
Get the plane size.
|
inline |
Get the plane size.