Jolt Physics
A multi core friendly Game Physics Engine
|
Axis aligned box. More...
#include <AABox.h>
Public Member Functions | |
JPH_OVERRIDE_NEW_DELETE | AABox () |
Constructor. More... | |
AABox (Vec3Arg inMin, Vec3Arg inMax) | |
AABox (DVec3Arg inMin, DVec3Arg inMax) | |
AABox (Vec3Arg inCenter, float inRadius) | |
bool | operator== (const AABox &inRHS) const |
Comparison operators. More... | |
bool | operator!= (const AABox &inRHS) const |
void | SetEmpty () |
Reset the bounding box to an empty bounding box. More... | |
bool | IsValid () const |
Check if the bounding box is valid (max >= min) More... | |
void | Encapsulate (Vec3Arg inPos) |
Encapsulate point in bounding box. More... | |
void | Encapsulate (const AABox &inRHS) |
Encapsulate bounding box in bounding box. More... | |
void | Encapsulate (const Triangle &inRHS) |
Encapsulate triangle in bounding box. More... | |
void | Encapsulate (const VertexList &inVertices, const IndexedTriangle &inTriangle) |
Encapsulate triangle in bounding box. More... | |
AABox | Intersect (const AABox &inOther) const |
Intersect this bounding box with inOther, returns the intersection. More... | |
void | EnsureMinimalEdgeLength (float inMinEdgeLength) |
Make sure that each edge of the bounding box has a minimal length. More... | |
void | ExpandBy (Vec3Arg inVector) |
Widen the box on both sides by inVector. More... | |
Vec3 | GetCenter () const |
Get center of bounding box. More... | |
Vec3 | GetExtent () const |
Get extent of bounding box (half of the size) More... | |
Vec3 | GetSize () const |
Get size of bounding box. More... | |
float | GetSurfaceArea () const |
Get surface area of bounding box. More... | |
float | GetVolume () const |
Get volume of bounding box. More... | |
bool | Contains (const AABox &inOther) const |
Check if this box contains another box. More... | |
bool | Contains (Vec3Arg inOther) const |
Check if this box contains a point. More... | |
bool | Contains (DVec3Arg inOther) const |
Check if this box contains a point. More... | |
bool | Overlaps (const AABox &inOther) const |
Check if this box overlaps with another box. More... | |
bool | Overlaps (const Plane &inPlane) const |
Check if this box overlaps with a plane. More... | |
void | Translate (Vec3Arg inTranslation) |
Translate bounding box. More... | |
void | Translate (DVec3Arg inTranslation) |
Translate bounding box. More... | |
AABox | Transformed (Mat44Arg inMatrix) const |
Transform bounding box. More... | |
AABox | Transformed (DMat44Arg inMatrix) const |
Transform bounding box. More... | |
AABox | Scaled (Vec3Arg inScale) const |
Scale this bounding box, can handle non-uniform and negative scaling. More... | |
Vec3 | GetSupport (Vec3Arg inDirection) const |
Calculate the support vector for this convex shape. More... | |
template<class VERTEX_ARRAY > | |
void | GetSupportingFace (Vec3Arg inDirection, VERTEX_ARRAY &outVertices) const |
Get the vertices of the face that faces inDirection the most. More... | |
Vec3 | GetClosestPoint (Vec3Arg inPoint) const |
Get the closest point on or in this box to inPoint. More... | |
float | GetSqDistanceTo (Vec3Arg inPoint) const |
Get the squared distance between inPoint and this box (will be 0 if in Point is inside the box) More... | |
Static Public Member Functions | |
static AABox | sFromTwoPoints (Vec3Arg inP1, Vec3Arg inP2) |
Create box from 2 points. More... | |
static AABox | sBiggest () |
Get bounding box of size 2 * FLT_MAX. More... | |
Public Attributes | |
Vec3 | mMin |
Bounding box min and max. More... | |
Vec3 | mMax |
Axis aligned box.
|
inline |
Constructor.
|
inline |
|
inline |
Check if this box contains another box.
|
inline |
Check if this box contains a point.
|
inline |
Check if this box contains a point.
|
inline |
Encapsulate bounding box in bounding box.
|
inline |
Encapsulate triangle in bounding box.
|
inline |
Encapsulate triangle in bounding box.
|
inline |
Encapsulate point in bounding box.
|
inline |
Make sure that each edge of the bounding box has a minimal length.
|
inline |
Widen the box on both sides by inVector.
|
inline |
Get center of bounding box.
Get the closest point on or in this box to inPoint.
|
inline |
Get extent of bounding box (half of the size)
|
inline |
Get size of bounding box.
|
inline |
Get the squared distance between inPoint and this box (will be 0 if in Point is inside the box)
Calculate the support vector for this convex shape.
|
inline |
Get the vertices of the face that faces inDirection the most.
|
inline |
Get surface area of bounding box.
|
inline |
Get volume of bounding box.
Intersect this bounding box with inOther, returns the intersection.
|
inline |
Check if the bounding box is valid (max >= min)
|
inline |
|
inline |
Comparison operators.
|
inline |
Check if this box overlaps with another box.
|
inline |
Check if this box overlaps with a plane.
|
inlinestatic |
Get bounding box of size 2 * FLT_MAX.
Scale this bounding box, can handle non-uniform and negative scaling.
|
inline |
Reset the bounding box to an empty bounding box.
Create box from 2 points.
|
inline |
Translate bounding box.
|
inline |
Translate bounding box.
Vec3 AABox::mMax |
Vec3 AABox::mMin |
Bounding box min and max.