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 Box & | operator+= (const Box &_b) |
Addition set operator. | |
Box | operator- (const Vector3 &_v) |
Subtract a vector from the min and max values. | |
Box & | operator= (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. | |
Mathematical representation of a box and related functions.
gazebo::math::Box::Box | ( | ) |
Default constructor.
Constructor.
[in] | _min | Minimum corner of the box |
[in] | _max | Maximum corner of the box |
|
virtual |
Destructor.
math::Vector3 gazebo::math::Box::GetCenter | ( | ) | const |
Get the box center.
math::Vector3 gazebo::math::Box::GetSize | ( | ) | const |
Get the size of the box.
double gazebo::math::Box::GetXLength | ( | ) | const |
Get the length along the x dimension.
double gazebo::math::Box::GetYLength | ( | ) | const |
Get the length along the y dimension.
double gazebo::math::Box::GetZLength | ( | ) | const |
Get the length along the z dimension.
void gazebo::math::Box::Merge | ( | const Box & | _box | ) |
Merge a box with this box.
[in] | _box | Box to add to this box |
Subtract a vector from the min and max values.
_v | The vector to use during subtraction |
bool gazebo::math::Box::operator== | ( | const Box & | _b | ) |
|
friend |
Output operator.
[in] | _out | Output stream |
[in] | _b | Box to output to the stream |
Vector3 gazebo::math::Box::max |
Maximum corner of the box.
Vector3 gazebo::math::Box::min |
Minimum corner of the box.