Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
OrientedBox Class Reference

Oriented box. More...

#include <OrientedBox.h>

Public Member Functions

JPH_OVERRIDE_NEW_DELETE OrientedBox ()=default
 Constructor. More...
 
 OrientedBox (Mat44Arg inOrientation, Vec3Arg inHalfExtents)
 
 OrientedBox (Mat44Arg inOrientation, const AABox &inBox)
 Construct from axis aligned box and transform. Only works for rotation/translation matrix (no scaling / shearing). More...
 
bool Overlaps (const AABox &inBox, float inEpsilon=1.0e-6f) const
 Test if oriented box overlaps with axis aligned box each other. More...
 
bool Overlaps (const OrientedBox &inBox, float inEpsilon=1.0e-6f) const
 Test if two oriented boxes overlap each other. More...
 

Public Attributes

Mat44 mOrientation
 Transform that positions and rotates the local space axis aligned box into world space. More...
 
Vec3 mHalfExtents
 Half extents (half the size of the edge) of the local space axis aligned box. More...
 

Detailed Description

Oriented box.

Constructor & Destructor Documentation

◆ OrientedBox() [1/3]

JPH_OVERRIDE_NEW_DELETE OrientedBox::OrientedBox ( )
default

Constructor.

◆ OrientedBox() [2/3]

OrientedBox::OrientedBox ( Mat44Arg  inOrientation,
Vec3Arg  inHalfExtents 
)
inline

◆ OrientedBox() [3/3]

OrientedBox::OrientedBox ( Mat44Arg  inOrientation,
const AABox inBox 
)
inline

Construct from axis aligned box and transform. Only works for rotation/translation matrix (no scaling / shearing).

Member Function Documentation

◆ Overlaps() [1/2]

JPH_NAMESPACE_BEGIN bool OrientedBox::Overlaps ( const AABox inBox,
float  inEpsilon = 1.0e-6f 
) const

Test if oriented box overlaps with axis aligned box each other.

◆ Overlaps() [2/2]

bool OrientedBox::Overlaps ( const OrientedBox inBox,
float  inEpsilon = 1.0e-6f 
) const

Test if two oriented boxes overlap each other.

Member Data Documentation

◆ mHalfExtents

Vec3 OrientedBox::mHalfExtents

Half extents (half the size of the edge) of the local space axis aligned box.

◆ mOrientation

Mat44 OrientedBox::mOrientation

Transform that positions and rotates the local space axis aligned box into world space.


The documentation for this class was generated from the following files: