Plane Class Reference

A plane and related functions. More...

#include <math/gzmath.hh>

Public Member Functions

 Plane ()
 Constructor. More...
 
 Plane (const Vector3 &_normal, double _offset=0.0)
 Constructor from a normal and a distanec. More...
 
 Plane (const Vector3 &_normal, const Vector2d &_size, double _offset)
 Constructor. More...
 
 Plane (const ignition::math::Planed &_plane)
 Copy constructor for ignition::math::Plane. More...
 
virtual ~Plane ()
 Destructor. More...
 
double Distance (const Vector3 &_origin, const Vector3 &_dir) const
 Get distance to the plane give an origin and direction. More...
 
ignition::math::Planed Ign () const
 Convert this to igntion::math::Planed. More...
 
Planeoperator= (const Plane &_p)
 Equal operator. More...
 
Planeoperator= (const ignition::math::Planed &_p)
 Equal operator for ignition::math::Plane. More...
 
void Set (const Vector3 &_normal, const Vector2d &_size, double offset)
 Set the plane. More...
 

Public Attributes

double d
 Plane offset. More...
 
Vector3 normal
 Plane normal. More...
 
Vector2d size
 Plane size. More...
 

Detailed Description

A plane and related functions.

Constructor & Destructor Documentation

§ Plane() [1/4]

Plane ( )

Constructor.

§ Plane() [2/4]

Plane ( const Vector3 _normal,
double  _offset = 0.0 
)

Constructor from a normal and a distanec.

Parameters
[in]_normalThe plane normal
[in]_offsetOffset along the normal

§ Plane() [3/4]

Plane ( const Vector3 _normal,
const Vector2d _size,
double  _offset 
)

Constructor.

Parameters
[in]_normalThe plane normal
[in]_sizeSize of the plane
[in]_offsetOffset along the normal

§ Plane() [4/4]

Plane ( const ignition::math::Planed &  _plane)

Copy constructor for ignition::math::Plane.

Parameters
[in]_planePlane to copy

§ ~Plane()

virtual ~Plane ( )
virtual

Destructor.

Member Function Documentation

§ Distance()

double Distance ( const Vector3 _origin,
const Vector3 _dir 
) const

Get distance to the plane give an origin and direction.

Parameters
[in]_originthe origin
[in]_dira direction
Returns
the shortest distance

§ Ign()

ignition::math::Planed Ign ( ) const

Convert this to igntion::math::Planed.

Returns
This plane converted to ignition::math::Planed.

§ operator=() [1/2]

Plane& operator= ( const Plane _p)

Equal operator.

Parameters
_panother plane
Returns
itself

§ operator=() [2/2]

Plane& operator= ( const ignition::math::Planed &  _p)

Equal operator for ignition::math::Plane.

Parameters
_pIgnition math plane
Returns
itself

§ Set()

void Set ( const Vector3 _normal,
const Vector2d _size,
double  offset 
)

Set the plane.

Parameters
[in]_normalThe plane normal
[in]_sizeSize of the plane
[in]_offsetOffset along the normal

Member Data Documentation

§ d

double d

Plane offset.

§ normal

Vector3 normal

Plane normal.

§ size

Vector2d size

Plane size.


The documentation for this class was generated from the following file: