Mathematical representation of a box and related functions.
More...
#include <math/gzmath.hh>
Mathematical representation of a box and related functions.
◆ Box() [1/4]
◆ Box() [2/4]
Constructor.
This constructor will compute the box's minumum and maximum corners based on the two arguments.
- Parameters
-
[in] | _vec1 | One corner of the box |
[in] | _vec2 | Another corner of the box |
◆ Box() [3/4]
Box |
( |
const ignition::math::Box & |
_box | ) |
|
Ignition math copy constructor.
- Parameters
-
[in] | _box | Ignition box to convert |
◆ Box() [4/4]
Copy Constructor.
- Parameters
-
◆ ~Box()
◆ Contains()
Check if a point lies inside or on the box.
- Parameters
-
- Returns
- True if the point is inside or on the box.
◆ GetCenter()
Get the box center.
- Returns
- The center position of the box
◆ GetSize()
Get the size of the box.
- Returns
- Size of the box
◆ GetXLength()
double GetXLength |
( |
| ) |
const |
Get the length along the x dimension.
- Returns
- Double value of the length in the x dimension
◆ GetYLength()
double GetYLength |
( |
| ) |
const |
Get the length along the y dimension.
- Returns
- Double value of the length in the y dimension
◆ GetZLength()
double GetZLength |
( |
| ) |
const |
Get the length along the z dimension.
- Returns
- Double value of the length in the z dimension
◆ Ign()
ignition::math::Box Ign |
( |
| ) |
const |
Convert this box to an ignition::math::Box.
- Returns
- This Box as an ignition::math::Box.
◆ Merge()
void Merge |
( |
const Box & |
_box | ) |
|
Merge a box with this box.
- Parameters
-
[in] | _box | Box to add to this box |
◆ operator+()
Box operator+ |
( |
const Box & |
_b | ) |
const |
Addition operator.
result = this + _b
- Parameters
-
- Returns
- The new box
◆ operator+=()
const Box& operator+= |
( |
const Box & |
_b | ) |
|
Addition set operator.
this = this + _b
- Parameters
-
- Returns
- This new box
◆ operator-()
Subtract a vector from the min and max values.
- Parameters
-
_v | The vector to use during subtraction |
- Returns
- The new box
◆ operator=() [1/2]
Box& operator= |
( |
const ignition::math::Box & |
_b | ) |
|
Assignment operator for ignition math.
- Parameters
-
- Returns
- The new box
◆ operator=() [2/2]
Box& operator= |
( |
const Box & |
_b | ) |
|
Assignment operator.
Set this box to the parameter
- Parameters
-
- Returns
- The new box.
◆ operator==()
bool operator== |
( |
const Box & |
_b | ) |
const |
Equality test operatoer.
- Parameters
-
- Returns
- True if equal
◆ operator<<
Output operator.
- Parameters
-
[in] | _out | Output stream |
[in] | _b | Box to output to the stream |
- Returns
- The stream
◆ max
Maximum corner of the box.
◆ min
Minimum corner of the box.
The documentation for this class was generated from the following file: