|
RavEngine
|
Represents an oriented bounding box. More...
#include <GuBox.h>
Public Member Functions | |
| PX_FORCE_INLINE | Box () |
| Constructor. | |
| PX_FORCE_INLINE | Box (const PxVec3 &origin, const PxVec3 &extent, const PxMat33 &base) |
| Constructor. | |
| PX_FORCE_INLINE | Box (const Box &other) |
| Copy constructor. | |
| PX_FORCE_INLINE | ~Box () |
| Destructor. | |
| PX_FORCE_INLINE const Box & | operator= (const Box &other) |
| Assignment operator. | |
| PX_INLINE void | setEmpty () |
| Setups an empty box. | |
| PX_INLINE bool | isValid () const |
| Checks the box is valid. | |
| PX_FORCE_INLINE void | setAxes (const PxVec3 &axis0, const PxVec3 &axis1, const PxVec3 &axis2) |
| PX_FORCE_INLINE PxVec3 | rotate (const PxVec3 &src) const |
| PX_FORCE_INLINE PxVec3 | rotateInv (const PxVec3 &src) const |
| PX_FORCE_INLINE PxVec3 | transform (const PxVec3 &src) const |
| PX_FORCE_INLINE PxTransform | getTransform () const |
| PX_INLINE PxVec3 | computeAABBExtent () const |
| PX_FORCE_INLINE void | computeBoxPoints (PxVec3 *PX_RESTRICT pts) const |
| void | create (const Gu::Capsule &capsule) |
Public Attributes | |
| PxMat33 | rot |
| PxVec3 | center |
| PxVec3 | extents |
Represents an oriented bounding box.
As a center point, extents(radii) and a rotation. i.e. the center of the box is at the center point, the box is rotated around this point with the rotation and it is 2*extents in width, height and depth. Box geometry
The rot member describes the world space orientation of the box. The center member gives the world space position of the box. The extents give the local space coordinates of the box corner in the positive octant. Dimensions of the box are: 2*extent. Transformation to world space is: worldPoint = rot * localPoint + center Transformation to local space is: localPoint = T(rot) * (worldPoint - center) Where T(M) denotes the transpose of M.
|
inline |
Constructor.
| origin | Center of the OBB |
| extent | Extents/radii of the obb. |
| base | rotation to apply to the obb. Construct from center, extent and rotation |
|
inline |
Computes the obb points.
| pts | [out] 8 box points |
|
inline |
Checks the box is valid.