Mathematical representation of a box and related functions.
More...
#include <ignition/math/Box.hh>
Mathematical representation of a box and related functions.
ignition::math::Box::Box |
( |
| ) |
|
Constructor.
This constructor will compute the box's minimum and maximum corners based on the two arguments.
- Parameters
-
[in] | _vec1 | One corner of the box |
[in] | _vec2 | Another corner of the box |
ignition::math::Box::Box |
( |
double |
_vec1X, |
|
|
double |
_vec1Y, |
|
|
double |
_vec1Z, |
|
|
double |
_vec2X, |
|
|
double |
_vec2Y, |
|
|
double |
_vec2Z |
|
) |
| |
Constructor.
This constructor will compute the box's minimum and maximum corners based on the arguments.
- Parameters
-
[in] | _vec1X | One corner's X position |
[in] | _vec1Y | One corner's Y position |
[in] | _vec1Z | One corner's Z position |
[in] | _vec2X | Other corner's X position |
[in] | _vec2Y | Other corner's Y position |
[in] | _vec2Z | Other corner's Z position |
ignition::math::Box::Box |
( |
const Box & |
_b | ) |
|
Copy Constructor.
- Parameters
-
virtual ignition::math::Box::~Box |
( |
| ) |
|
|
virtual |
Get the box center.
- Returns
- The center position of the box
bool ignition::math::Box::Intersects |
( |
const Box & |
_box | ) |
const |
Test box intersection.
This test will only work if both box's minimum corner is less than or equal to their maximum corner.
- Parameters
-
[in] | _box | Box to check for intersection with this box. |
- Returns
- True if this box intersects _box.
const Vector3d& ignition::math::Box::Max |
( |
| ) |
const |
|
inline |
Get the maximum corner.
- Returns
- The Vector3d that is the maximum corner of the box.
References ignition::math::max().
Get a mutable version of the maximum corner.
- Returns
- The Vector3d that is the maximum corner of the box.
References ignition::math::max().
void ignition::math::Box::Merge |
( |
const Box & |
_box | ) |
|
Merge a box with this box.
- Parameters
-
[in] | _box | Box to add to this box |
const Vector3d& ignition::math::Box::Min |
( |
| ) |
const |
|
inline |
Get the minimum corner.
- Returns
- The Vector3d that is the minimum corner of the box.
References ignition::math::min().
Get a mutable version of the minimum corner.
- Returns
- The Vector3d that is the minimum corner of the box.
References ignition::math::min().
bool ignition::math::Box::operator!= |
( |
const Box & |
_b | ) |
const |
Inequality test operatoer.
- Parameters
-
- Returns
- True if not equal
Box ignition::math::Box::operator+ |
( |
const Box & |
_b | ) |
const |
Addition operator.
result = this + _b
- Parameters
-
- Returns
- The new box
const Box& ignition::math::Box::operator+= |
( |
const Box & |
_b | ) |
|
Addition set operator.
this = this + _b
- Parameters
-
- Returns
- This new box
Box ignition::math::Box::operator- |
( |
const Vector3d & |
_v | ) |
|
Subtract a vector from the min and max values.
- Parameters
-
_v | The vector to use during subtraction |
- Returns
- The new box
Box& ignition::math::Box::operator= |
( |
const Box & |
_b | ) |
|
Assignment operator.
Set this box to the parameter
- Parameters
-
- Returns
- The new box.
bool ignition::math::Box::operator== |
( |
const Box & |
_b | ) |
const |
Equality test operatoer.
- Parameters
-
- Returns
- True if equal
Get the size of the box.
- Returns
- Size of the box
double ignition::math::Box::XLength |
( |
| ) |
const |
Get the length along the x dimension.
- Returns
- Double value of the length in the x dimension
double ignition::math::Box::YLength |
( |
| ) |
const |
Get the length along the y dimension.
- Returns
- Double value of the length in the y dimension
double ignition::math::Box::ZLength |
( |
| ) |
const |
Get the length along the z dimension.
- Returns
- Double value of the length in the z dimension
Output operator.
- Parameters
-
[in] | _out | Output stream |
[in] | _b | Box to output to the stream |
- Returns
- The stream
The documentation for this class was generated from the following file: