Represents an oriented bounding box, as a center point, extents(radii) and a rotation. More...
#include "physxBox.h"
Public Member Functions | |
PhysxBox (const LPoint3f ¢er, const LVector3f &extents, const LMatrix3f &rot) | |
LPoint3f | get_center () const |
Return center of the box. More... | |
LVector3f | get_extents () const |
Returns the extents (radii) of the box. More... | |
LMatrix3f | get_rot () const |
Return the rotation of the box. More... | |
bool | is_valid () const |
Returns TRUE if the box is valid. More... | |
void | rotate (const LMatrix4f &m, PhysxBox &obb) const |
Recomputes the box after an arbitrary transform by a 4x4 matrix. More... | |
void | set_center (LPoint3f center) |
Sets the center of the box. More... | |
void | set_empty () |
Setups an empty box. More... | |
void | set_extents (LVector3f extents) |
Sets the extents of the box. More... | |
void | set_rot (LMatrix3f rot) |
Sets the rotation of the box. More... | |
Public Attributes | |
NxBox | _box |
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.
Definition at line 29 of file physxBox.h.
LPoint3f PhysxBox::get_center | ( | ) | const |
Return center of the box.
Definition at line 61 of file physxBox.cxx.
References PhysxManager::nxVec3_to_point3().
LVector3f PhysxBox::get_extents | ( | ) | const |
Returns the extents (radii) of the box.
Definition at line 70 of file physxBox.cxx.
References PhysxManager::nxVec3_to_vec3().
LMatrix3f PhysxBox::get_rot | ( | ) | const |
Return the rotation of the box.
Definition at line 79 of file physxBox.cxx.
References PhysxManager::nxMat33_to_mat3().
bool PhysxBox::is_valid | ( | ) | const |
Returns TRUE if the box is valid.
Definition at line 32 of file physxBox.cxx.
void PhysxBox::rotate | ( | const LMatrix4f & | m, |
PhysxBox & | obb | ||
) | const |
Recomputes the box after an arbitrary transform by a 4x4 matrix.
Definition at line 41 of file physxBox.cxx.
void PhysxBox::set_center | ( | LPoint3f | center | ) |
Sets the center of the box.
Definition at line 88 of file physxBox.cxx.
void PhysxBox::set_empty | ( | ) |
Setups an empty box.
Definition at line 52 of file physxBox.cxx.
void PhysxBox::set_extents | ( | LVector3f | extents | ) |
Sets the extents of the box.
Definition at line 99 of file physxBox.cxx.
void PhysxBox::set_rot | ( | LMatrix3f | rot | ) |
Sets the rotation of the box.
Definition at line 110 of file physxBox.cxx.