Torque2D Reference
|
#include <mBox.h>
Public Member Functions | |
Box3F () | |
Box3F (const Point3F &in_rMin, const Point3F &in_rMax, const bool in_overrideCheck=false) | |
Box3F (F32 xmin, F32 ymin, F32 zmin, F32 max, F32 ymax, F32 zmax) | |
bool | isContained (const Point3F &in_rContained) const |
Check to see if a point is contained in this box. More... | |
bool | isOverlapped (const Box3F &in_rOverlap) const |
Check to see if another box overlaps this box. More... | |
bool | isContained (const Box3F &in_rContained) const |
Check to see if another box is contained in this box. More... | |
F32 | len_x () const |
F32 | len_y () const |
F32 | len_z () const |
void | intersect (const Box3F &in_rIntersect) |
void | intersect (const Point3F &in_rIntersect) |
void | getCenter (Point3F *center) const |
bool | collideLine (const Point3F &start, const Point3F &end, F32 *t, Point3F *n) const |
bool | collideLine (const Point3F &start, const Point3F &end) const |
bool | collideOrientedBox (const Point3F &radii, const MatrixF &toUs) const |
bool | isValidBox () const |
Point3F | getClosestPoint (const Point3F &refPt) const |
Return the closest point of the box, relative to the passed point. More... | |
Public Attributes | |
Point3F | mMin |
Minimum extents of box. More... | |
Point3F | mMax |
Maximum extents of box. More... | |
|
inline |
|
inline |
Create a box from two points.
Normally, this function will compensate for mismatched min/max values. If you know your values are valid, you can set in_overrideCheck to true and skip this.
in_rMin | Minimum extents of box. |
in_rMax | Maximum extents of box. |
in_overrideCheck | Pass true to skip check of extents. |
|
inline |
Create a box from six extent values.
No checking is performed as to the validity of these extents, unlike the other constructor.
Collide a line against the box.
start | Start of line. |
end | End of line. |
t | Value from 0.0-1.0, indicating position along line of collision. |
n | Normal of collision. |
Collide a line against the box.
Returns true on collision.
Collide an oriented box against the box.
Returns true if "oriented" box collides with us. Assumes incoming box is centered at origin of source space.
radii | The dimension of incoming box (half x,y,z length). |
toUs | A transform that takes incoming box into our space. |
|
inline |
Get the center of this box.
This is the average of min and mMax.
Return the closest point of the box, relative to the passed point.
|
inline |
Perform an intersection operation with another box and store the results in this box.
|
inline |
|
inline |
Check to see if a point is contained in this box.
|
inline |
Check to see if another box is contained in this box.
|
inline |
Check to see if another box overlaps this box.
|
inline |
Check that the box is valid.
Currently, this just means that min < mMax.
|
inline |
|
inline |
|
inline |
Point3F mMax |
Maximum extents of box.
Point3F mMin |
Minimum extents of box.