A 2D oriented bounding box.
Public Member Functions | |
Obb2D () | |
Constructor. More... | |
Obb2D (const Obb2D &other) | |
Copy constructor. More... | |
Obb2D (const Vec2F &nCenter, const Vec2F &nHalfExtents, float nRotation) | |
Construct from center, half extents and rotation. More... | |
virtual const Vec2F & | getCenter () const |
Get the center of the bounding box. More... | |
virtual const Vec2F & | getHalfExtents () const |
Get the half width and half height of the bounding box. More... | |
virtual float | getRotation () const |
Get the rotation angle of the box. More... | |
virtual | ~Obb2D () |
Protected Attributes | |
Vec2F | center |
Vec2F | halfExtents |
float | rotation |
Obb2D | ( | ) |
Constructor.
Construct from center, half extents and rotation.
nCenter | The center of the box. |
nHalfExtents | The half width and half height of the (unrotated) box |
nRotation | Counter-clock-wise rotation angle with respect to the X axis, in radians. |
|
virtual |
|
virtual |
Get the center of the bounding box.
|
virtual |
Get the half width and half height of the bounding box.
|
virtual |
Get the rotation angle of the box.
|
protected |
|
protected |
|
protected |