Panda3D
|
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. | |
LVector3f | get_extents () const |
Returns the extents (radii) of the box. | |
LMatrix3f | get_rot () const |
Return the rotation of the box. | |
bool | is_valid () const |
Returns TRUE if the box is valid. | |
void | rotate (const LMatrix4f &m, PhysxBox &obb) const |
Recomputes the box after an arbitrary transform by a 4x4 matrix. | |
void | set_center (LPoint3f center) |
Sets the center of the box. | |
void | set_empty () |
Setups an empty box. | |
void | set_extents (LVector3f extents) |
Sets the extents of the box. | |
void | set_rot (LMatrix3f rot) |
Sets the rotation of the box. | |
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.
|
inline |
Definition at line 17 of file physxBox.I.
|
inline |
Definition at line 25 of file physxBox.I.
PhysxBox::PhysxBox | ( | const LPoint3f & | center, |
const LVector3f & | extents, | ||
const LMatrix3f & | rot ) |
Definition at line 20 of file physxBox.cxx.
LPoint3f PhysxBox::get_center | ( | ) | const |
Return center of the box.
Definition at line 60 of file physxBox.cxx.
References PhysxManager::nxVec3_to_point3().
LVector3f PhysxBox::get_extents | ( | ) | const |
Returns the extents (radii) of the box.
Definition at line 69 of file physxBox.cxx.
References PhysxManager::nxVec3_to_vec3().
LMatrix3f PhysxBox::get_rot | ( | ) | const |
Return the rotation of the box.
Definition at line 78 of file physxBox.cxx.
References PhysxManager::nxMat33_to_mat3().
bool PhysxBox::is_valid | ( | ) | const |
Returns TRUE if the box is valid.
Definition at line 31 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 40 of file physxBox.cxx.
References PhysxManager::mat4_to_nxMat34().
void PhysxBox::set_center | ( | LPoint3f | center | ) |
Sets the center of the box.
Definition at line 87 of file physxBox.cxx.
References PhysxManager::vec3_to_nxVec3().
void PhysxBox::set_empty | ( | ) |
Setups an empty box.
Definition at line 51 of file physxBox.cxx.
void PhysxBox::set_extents | ( | LVector3f | extents | ) |
Sets the extents of the box.
Definition at line 98 of file physxBox.cxx.
References PhysxManager::vec3_to_nxVec3().
void PhysxBox::set_rot | ( | LMatrix3f | rot | ) |
Sets the rotation of the box.
Definition at line 109 of file physxBox.cxx.
References PhysxManager::mat3_to_nxMat33().
NxBox PhysxBox::_box |
Definition at line 49 of file physxBox.h.