Panda3D
Public Member Functions | Public Attributes | List of all members
PhysxBox Class Reference

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

#include "physxBox.h"

Public Member Functions

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

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

Member Function Documentation

◆ get_center()

LPoint3f PhysxBox::get_center ( ) const

Return center of the box.

Definition at line 61 of file physxBox.cxx.

References PhysxManager::nxVec3_to_point3().

◆ get_extents()

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().

◆ get_rot()

LMatrix3f PhysxBox::get_rot ( ) const

Return the rotation of the box.

Definition at line 79 of file physxBox.cxx.

References PhysxManager::nxMat33_to_mat3().

◆ is_valid()

bool PhysxBox::is_valid ( ) const

Returns TRUE if the box is valid.

Definition at line 32 of file physxBox.cxx.

◆ rotate()

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.

◆ set_center()

void PhysxBox::set_center ( LPoint3f  center)

Sets the center of the box.

Definition at line 88 of file physxBox.cxx.

◆ set_empty()

void PhysxBox::set_empty ( )

Setups an empty box.

Definition at line 52 of file physxBox.cxx.

◆ set_extents()

void PhysxBox::set_extents ( LVector3f  extents)

Sets the extents of the box.

Definition at line 99 of file physxBox.cxx.

◆ set_rot()

void PhysxBox::set_rot ( LMatrix3f  rot)

Sets the rotation of the box.

Definition at line 110 of file physxBox.cxx.


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