Mathematical representation of a box and related functions. More...
#include <math/gzmath.hh>
Public Member Functions | |
Box () GAZEBO_DEPRECATED(8.0) | |
Default constructor. More... | |
Box (const Vector3 &_vec1, const Vector3 &_vec2) GAZEBO_DEPRECATED(8.0) | |
Constructor. More... | |
Box (const ignition::math::Box &_box) GAZEBO_DEPRECATED(8.0) | |
Ignition math copy constructor. More... | |
Box (const Box &_b) GAZEBO_DEPRECATED(8.0) | |
Copy Constructor. More... | |
virtual | ~Box () |
Destructor. More... | |
bool | Contains (const math::Vector3 &_p) const |
Check if a point lies inside or on the box. 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... | |
ignition::math::Box | Ign () const |
Convert this box to an ignition::math::Box. More... | |
void | Merge (const Box &_box) |
Merge a box with this box. More... | |
Box | operator+ (const Box &_b) const |
Addition operator. More... | |
const Box & | operator+= (const Box &_b) |
Addition set operator. More... | |
Box | operator- (const Vector3 &_v) |
Subtract a vector from the min and max values. More... | |
Box & | operator= (const ignition::math::Box &_b) |
Assignment operator for ignition math. More... | |
Box & | operator= (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... | |
Mathematical representation of a box and related functions.
Box | ( | ) |
Default constructor.
Constructor.
This constructor will compute the box's minumum and maximum corners based on the two arguments.
[in] | _vec1 | One corner of the box |
[in] | _vec2 | Another corner of the box |
Box | ( | const ignition::math::Box & | _box | ) |
Ignition math copy constructor.
[in] | _box | Ignition box to convert |
|
virtual |
Destructor.
bool Contains | ( | const math::Vector3 & | _p | ) | const |
Check if a point lies inside or on the box.
[in] | _p | Point to check. |
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.
ignition::math::Box Ign | ( | ) | const |
Convert this box to an ignition::math::Box.
Subtract a vector from the min and max values.
_v | The vector to use during subtraction |
Box& operator= | ( | const ignition::math::Box & | _b | ) |
Assignment operator for ignition math.
[in] | _b | a new value |
bool operator== | ( | const Box & | _b | ) | const |
|
friend |
Output operator.
[in] | _out | Output stream |
[in] | _b | Box to output to the stream |
Vector3 max |
Maximum corner of the box.
Vector3 min |
Minimum corner of the box.