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