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. More... | |
| Plane (const Vector3< T > &_normal, T _offset=0.0) | |
| Constructor from a normal and a distance. More... | |
| Plane (const Vector3< T > &_normal, const Vector2< T > &_size, T _offset) | |
| Constructor. More... | |
| virtual | ~Plane () |
| Destructor. More... | |
| T | Distance (const Vector3< T > &_point) const |
| The distance to the plane from the given point. More... | |
| T | Distance (const Vector3< T > &_origin, const Vector3< T > &_dir) const |
| Get distance to the plane give an origin and direction. More... | |
| const Vector3< T > & | Normal () const |
| Get the plane offset. More... | |
| Vector3< T > & | Normal () |
| Get the plane offset. More... | |
| T | Offset () const |
| Get the plane offset. More... | |
| Plane< T > & | operator= (const Plane< T > &_p) |
| Equal operator. More... | |
| void | Set (const Vector3< T > &_normal, T _offset) |
| Set the plane. More... | |
| void | Set (const Vector3< T > &_normal, const Vector2< T > &_size, T _offset) |
| Set the plane. More... | |
| PlaneSide | Side (const Vector3< T > &_point) const |
| The side of the plane a point is on. More... | |
| PlaneSide | Side (const math::Box &_box) const |
| The side of the plane a box is on. More... | |
| const Vector2< T > & | Size () const |
| Get the plane size. More... | |
| Vector2< T > & | Size () |
| Get the plane size. More... | |
A plane and related functions.
| enum ignition::math::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 |
References ignition::math::Plane< T >::Set().
|
inlinevirtual |
Destructor.
|
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::Plane< T >::Side().
|
inline |
Get distance to the plane give an origin and direction.
| [in] | _origin | the origin |
| [in] | _dir | a direction |
References ignition::math::Vector3< T >::Dot().
|
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] | _offset | Offset along the normal |
Referenced by ignition::math::Plane< T >::Plane().
|
inline |
Set the plane.
| [in] | _normal | The plane normal |
| [in] | _size | Size of the plane |
| [in] | _offset | Offset along the normal |
|
inline |
The side of the plane a point is on.
| [in] | _point | The 3D point to check. |
References ignition::math::Plane< T >::Distance(), ignition::math::Plane< T >::NEGATIVE_SIDE, ignition::math::Plane< T >::NO_SIDE, and ignition::math::Plane< T >::POSITIVE_SIDE.
|
inline |
The side of the plane a box is on.
| [in] | _box | The 3D box to check. |
References ignition::math::Plane< T >::BOTH_SIDE, ignition::math::Box::Center(), ignition::math::Plane< T >::Distance(), ignition::math::Plane< T >::NEGATIVE_SIDE, ignition::math::Plane< T >::POSITIVE_SIDE, and ignition::math::Box::Size().
|
inline |
Get the plane size.
|
inline |
Get the plane size.