18 #ifndef _IGNITION_PLANE_HH_
19 #define _IGNITION_PLANE_HH_
44 this->normal = _normal;
55 this->
Set(_normal, _size, _offset);
68 this->normal = _normal;
80 T denom = this->normal.Dot(_dir);
82 if (std::abs(denom) < 1e-3)
89 T nom = _origin.
Dot(this->normal) - this->d;
130 this->normal = _p.normal;
131 this->size = _p.size;
Plane(const Vector3< T > &_normal, T _offset=0.0)
Constructor from a normal and a distanec.
Definition: Plane.hh:42
Plane< float > Planef
Definition: Plane.hh:149
Two dimensional (x, y) vector.
Definition: Vector2.hh:29
A plane and related functions.
Definition: Plane.hh:31
Plane< double > Planed
Definition: Plane.hh:148
Plane()
Constructor.
Definition: Plane.hh:34
const Vector2< T > & Size() const
Get the plane size.
Definition: Plane.hh:96
T Distance(const Vector3< T > &_origin, const Vector3< T > &_dir) const
Get distance to the plane give an origin and direction.
Definition: Plane.hh:77
T Dot(const Vector3< T > &_v) const
Return the dot product of this vector and another vector.
Definition: Vector3.hh:191
T Offset() const
Get the plane offset.
Definition: Plane.hh:120
const Vector3< T > & Normal() const
Get the plane offset.
Definition: Plane.hh:108
Vector2< T > & Size()
Get the plane size.
Definition: Plane.hh:102
Plane(const Vector3< T > &_normal, const Vector2< T > &_size, T _offset)
Constructor.
Definition: Plane.hh:52
Vector3< T > & Normal()
Get the plane offset.
Definition: Plane.hh:114
virtual ~Plane()
Destructor.
Definition: Plane.hh:59
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:37
Plane< T > & operator=(const Plane< T > &_p)
Equal operator.
Definition: Plane.hh:128
Plane< int > Planei
Definition: Plane.hh:147
void Set(const Vector3< T > &_normal, const Vector2< T > &_size, T _offset)
Set the plane.
Definition: Plane.hh:65