All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 <Box.hh>

Public Member Functions

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

Public Attributes

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

Friends

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

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)

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: