#include <Box.h>
Public Member Functions | |
| Box (void) | |
| virtual | ~Box (void) |
| Box (const Box &rhs) | |
| Box & | operator= (const Box &rhs) |
| Box (const ml7::Vector2 ¢er, const ml7::Vector2 &half_width) | |
| Box (const float x1, const float y1, const float x2, const float y2) | |
| Box & | from_points (const ml7::Vector2 &p, const ml7::Vector2 &q) |
| Box & | from_bounds (const float x1, const float y1, const float x2, const float y2) |
| bool | operator== (const Box &rhs) const |
| bool | operator!= (const Box &rhs) const |
Public Attributes | |
| ml7::Vector2 | center |
| ml7::Vector2 | half_width |
Base class for boxes of any type and purpose: collision geometry, bounding volumes, other primitives.
| bl7::geometry2::Box::Box | ( | void | ) | [inline] |
Default constructor.
| virtual bl7::geometry2::Box::~Box | ( | void | ) | [inline, virtual] |
Destructor.
| bl7::geometry2::Box::Box | ( | const Box & | rhs | ) | [inline] |
Copy constructor.
| bl7::geometry2::Box::Box | ( | const ml7::Vector2 & | center, | |
| const ml7::Vector2 & | half_width | |||
| ) | [inline] |
Explicit constructor: box from center point and the half-width vector.
| bl7::geometry2::Box::Box | ( | const float | x1, | |
| const float | y1, | |||
| const float | x2, | |||
| const float | y2 | |||
| ) | [inline] |
Explicit constructor: box from the minimum and the maximum values.
| Box & bl7::geometry2::Box::from_bounds | ( | const float | x1, | |
| const float | y1, | |||
| const float | x2, | |||
| const float | y2 | |||
| ) |
Creates the box from bounds defining the minimum and the maximum values.
Creates a box from bounds defining the minimum and the maximum values.
| Box & bl7::geometry2::Box::from_points | ( | const ml7::Vector2 & | p, | |
| const ml7::Vector2 & | q | |||
| ) |
Creates the box from points with the minimum and the maximum values.
Creates a box from points with the minimum and the maximum values.
| bool bl7::geometry2::Box::operator!= | ( | const Box & | rhs | ) | const [inline] |
Checks whether a given Box and this have not the same center or half-width.
Copy assignment operator.
Reimplemented from bl7::geometry2::Geometry.
Reimplemented in bl7::geometry2::AABB, and bl7::geometry2::CollisionBox.
| bool bl7::geometry2::Box::operator== | ( | const Box & | rhs | ) | const [inline] |
Checks whether a given Box and this have the same center and half-width.
The center point.
The half-width.
1.6.1