Panda3D
Public Member Functions | Public Attributes

PhysxBox Class Reference

Represents an oriented bounding box, as a center point, extents(radii) and a rotation. More...

#include "physxBox.h"

List of all members.

Public Member Functions

 PhysxBox (const LPoint3f &center, 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

Detailed Description

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 32 of file physxBox.h.


Member Function Documentation

LPoint3f PhysxBox::get_center ( ) const

Return center of the box.

Definition at line 73 of file physxBox.cxx.

References PhysxManager::nxVec3_to_point3().

LVector3f PhysxBox::get_extents ( ) const

Returns the extents (radii) of the box.

Definition at line 84 of file physxBox.cxx.

References PhysxManager::nxVec3_to_vec3().

LMatrix3f PhysxBox::get_rot ( ) const

Return the rotation of the box.

Definition at line 95 of file physxBox.cxx.

References PhysxManager::nxMat33_to_mat3().

bool PhysxBox::is_valid ( ) const

Returns TRUE if the box is valid.

Definition at line 37 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 49 of file physxBox.cxx.

References LMatrix4f::is_nan(), and PhysxManager::mat4_to_nxMat34().

void PhysxBox::set_center ( LPoint3f  center)

Sets the center of the box.

Definition at line 106 of file physxBox.cxx.

References LVecBase3f::is_nan(), and PhysxManager::vec3_to_nxVec3().

void PhysxBox::set_empty ( )

Setups an empty box.

Definition at line 62 of file physxBox.cxx.

void PhysxBox::set_extents ( LVector3f  extents)

Sets the extents of the box.

Definition at line 119 of file physxBox.cxx.

References LVecBase3f::is_nan(), and PhysxManager::vec3_to_nxVec3().

void PhysxBox::set_rot ( LMatrix3f  rot)

Sets the rotation of the box.

Definition at line 132 of file physxBox.cxx.

References LMatrix3f::is_nan(), and PhysxManager::mat3_to_nxMat33().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations