All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | Friends | List of all members
gazebo::math::Box Class Reference

Mathematical representation of a box and related functions. More...

#include <math/gzmath.hh>

Collaboration diagram for gazebo::math::Box:
Collaboration graph
[legend]

Public Member Functions

 Box ()
 Default constructor. More...
 
 Box (const Vector3 &_min, const Vector3 &_max)
 Constructor. More...
 
 Box (const Box &_b)
 Copy Constructor. More...
 
virtual ~Box ()
 Destructor. More...
 
math::Vector3 GetCenter () const
 Get the box center. More...
 
math::Vector3 GetSize () const
 Get the size of the box. More...
 
double GetXLength () const
 Get the length along the x dimension. More...
 
double GetYLength () const
 Get the length along the y dimension. More...
 
double GetZLength () const
 Get the length along the z dimension. More...
 
void Merge (const Box &_box)
 Merge a box with this box. More...
 
Box operator+ (const Box &_b) const
 Addition operator. More...
 
const Boxoperator+= (const Box &_b)
 Addition set operator. More...
 
Box operator- (const Vector3 &_v)
 Subtract a vector from the min and max values. More...
 
Boxoperator= (const Box &_b)
 Assignment operator. More...
 
bool operator== (const Box &_b) const
 Equality test operatoer. More...
 

Public Attributes

Vector3 max
 Maximum corner of the box. More...
 
Vector3 min
 Minimum corner of the box. More...
 

Friends

std::ostream & operator<< (std::ostream &_out, const gazebo::math::Box &_b)
 Output operator. More...
 

Detailed Description

Mathematical representation of a box and related functions.

Constructor & Destructor Documentation

gazebo::math::Box::Box ( )

Default constructor.

gazebo::math::Box::Box ( const Vector3 _min,
const Vector3 _max 
)

Constructor.

Parameters
[in]_minMinimum corner of the box
[in]_maxMaximum corner of the box
gazebo::math::Box::Box ( const Box _b)

Copy Constructor.

Parameters
[in]_bBox to copy
virtual gazebo::math::Box::~Box ( )
virtual

Destructor.

Member Function Documentation

math::Vector3 gazebo::math::Box::GetCenter ( ) const

Get the box center.

Returns
The center position of the box
math::Vector3 gazebo::math::Box::GetSize ( ) const

Get the size of the box.

Returns
Size of the box
double gazebo::math::Box::GetXLength ( ) const

Get the length along the x dimension.

Returns
Double value of the length in the x dimension
double gazebo::math::Box::GetYLength ( ) const

Get the length along the y dimension.

Returns
Double value of the length in the y dimension
double gazebo::math::Box::GetZLength ( ) const

Get the length along the z dimension.

Returns
Double value of the length in the z dimension
void gazebo::math::Box::Merge ( const Box _box)

Merge a box with this box.

Parameters
[in]_boxBox to add to this box
Box gazebo::math::Box::operator+ ( const Box _b) const

Addition operator.

result = this + _b

Parameters
[in]_bBox to add
Returns
The new box
const Box& gazebo::math::Box::operator+= ( const Box _b)

Addition set operator.

this = this + _b

Parameters
[in]_bBox to add
Returns
This new box
Box gazebo::math::Box::operator- ( const Vector3 _v)

Subtract a vector from the min and max values.

Parameters
_vThe vector to use during subtraction
Returns
The new box
Box& gazebo::math::Box::operator= ( const Box _b)

Assignment operator.

Set this box to the parameter

Parameters
[in]_bBox to copy
Returns
The new box.
bool gazebo::math::Box::operator== ( const Box _b) const

Equality test operatoer.

Parameters
[in]_bBox to test
Returns
True if equal

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  _out,
const gazebo::math::Box _b 
)
friend

Output operator.

Parameters
[in]_outOutput stream
[in]_bBox to output to the stream
Returns
The stream

Member Data Documentation

Vector3 gazebo::math::Box::max

Maximum corner of the box.

Vector3 gazebo::math::Box::min

Minimum corner of the box.


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