cocos2d-x
3.3
|
#include <CCAABB.h>
Public Member Functions | |
AABB () | |
Constructor. More... | |
AABB (const Vec3 &min, const Vec3 &max) | |
Constructor. More... | |
AABB (const AABB &box) | |
Constructor. More... | |
Vec3 | getCenter () |
Gets the center point of the bounding box. More... | |
void | getCorners (Vec3 *dst) const |
bool | intersects (const AABB &aabb) const |
Tests whether this bounding box intersects the specified bounding object. More... | |
bool | containPoint (const Vec3 &point) const |
check whether the point is in. More... | |
void | merge (const AABB &box) |
Sets this bounding box to the smallest bounding box that contains both this bounding object and the specified bounding box. More... | |
void | set (const Vec3 &min, const Vec3 &max) |
Sets this bounding box to the specified values. More... | |
void | reset () |
reset min and max value. More... | |
bool | isEmpty () const |
void | updateMinMax (const Vec3 *point, ssize_t num) |
update the _min and _max from the given point. More... | |
void | transform (const Mat4 &mat) |
Transforms the bounding box by the given transformation matrix. More... | |
Public Attributes | |
Vec3 | _min |
Vec3 | _max |
AABB | ( | ) |
Constructor.
bool containPoint | ( | const Vec3 & | point | ) | const |
check whether the point is in.
Vec3 getCenter | ( | ) |
Gets the center point of the bounding box.
void getCorners | ( | Vec3 * | dst | ) | const |
bool intersects | ( | const AABB & | aabb | ) | const |
Tests whether this bounding box intersects the specified bounding object.
bool isEmpty | ( | ) | const |
void merge | ( | const AABB & | box | ) |
Sets this bounding box to the smallest bounding box that contains both this bounding object and the specified bounding box.
void reset | ( | ) |
reset min and max value.
void transform | ( | const Mat4 & | mat | ) |
Transforms the bounding box by the given transformation matrix.
update the _min and _max from the given point.
Vec3 _max |
Vec3 _min |