Kaim::Box3f Class Reference
#include <box3f.h>
This class represents a three-dimensional axis-aligned bounding box whose dimensions are stored using floating-point numbers.
This class is typically used to identify regions of three-dimensional space. For example, this class is used to store the bounding box taken up by some objects such as NavMeshes, NavFloors and NavCells
Creates a new Box3f with invalid extents: you must call Set() before using it.
Kaim::Box3f::Box3f |
( |
const Vec3f & |
min_, |
|
|
const Vec3f & |
max_ |
|
) |
| |
|
inline |
Creates a new Box3f with the provided extents.
- Parameters
-
min_ | The minima of the bounding box. |
max_ | The maxima of the bounding box. |
Vec3f Kaim::Box3f::Center |
( |
| ) |
const |
|
inline |
Retrieves the coordinates of the exact center of the box.
void Kaim::Box3f::Clear |
( |
| ) |
|
|
inline |
Clears all information maintained by this object.
This method sets the extents of the box to invalid values; you must follow this method with a call to Set() before you can use the box.
void Kaim::Box3f::Enlarge |
( |
KyFloat32 |
enlargement | ) |
|
|
inline |
Enlarges the extents of the bounding box by the specified amount in all directions.
void Kaim::Box3f::ExpandByBox3 |
( |
const Box3f & |
box | ) |
|
|
inline |
Enlarges the extents of the bounding box to include the area covered by the specified bounding box.
If the bounding box already encompasses the area of box, the bounding box is not modified.
void Kaim::Box3f::ExpandByVec3 |
( |
const Vec3f & |
pos | ) |
|
|
inline |
Enlarges the extents of the bounding box to include the specified three-dimensional point.
If the point is already contained within the bounding box, the box is not modified.
bool Kaim::Box3f::IsPoint2DInside |
( |
const Vec2f & |
p | ) |
const |
|
inline |
Returns true if the (X,Y) coordinates of the specified position are contained within the (X,Y) extents extents of the bounding box.
bool Kaim::Box3f::IsPoint3DInside |
( |
const Vec3f & |
p | ) |
const |
|
inline |
Returns true if the specified position is contained within the extents of the bounding box.
Retrieves the distance between the diagonally opposite corners of the box.
void Kaim::Box3f::Set |
( |
const Vec3f & |
min_, |
|
|
const Vec3f & |
max_ |
|
) |
| |
|
inline |
Sets the extents of the bounding box to the specified values.
- Parameters
-
min_ | The minima of the bounding box. |
max_ | The maxima of the bounding box. |
Retrieves the extents of the box along the X axis.
Retrieves the extents of the box along the Y axis.
Retrieves the extents of the box along the Z axis.
void Kaim::Box3f::Translate |
( |
const Vec3f & |
v | ) |
|
|
inline |
Moves the bounding box by the specified vector.
The maxima of the bounding box.
The minima of the bounding box.
The documentation for this class was generated from the following file: