Panda3D
|
Descriptor class for PhysxBoxController. More...
#include "physxBoxControllerDesc.h"
Public Member Functions | |
LVector3f | get_extents () const |
Returns the dimensions of the box. | |
bool | get_interaction_flag () const |
Returns the interaction flag. | |
LPoint3f | get_pos () const |
Returns the position of the character. | |
float | get_skin_width () const |
Returns the skin width used by the controller. | |
float | get_slope_limit () const |
Returns the maximum slope which the character can walk up. | |
float | get_step_offset () const |
Returns the maximum height of an obstacle which the character can climb. | |
bool | is_valid () const |
Returns true if the descriptor is valid. | |
NxControllerDesc * | ptr () const |
void | set_extents (const LVector3f &extents) |
Sets the dimensions of the box. | |
void | set_interaction_flag (bool interactionFlag) |
The interaction flag controls if a character controller collides with other controllers. | |
void | set_pos (const LPoint3f &pos) |
Set the position of the character. | |
void | set_skin_width (float skinWidth) |
Sets the skin width used by the controller. | |
void | set_slope_limit (float slopeLimit) |
Sets the maximum slope which the character can walk up. | |
void | set_step_offset (float setpOffset) |
Defines the maximum height of an obstacle which the character can climb. | |
void | set_to_default () |
(re)sets the structure to the default. | |
Public Attributes | |
NxBoxControllerDesc | _desc |
Descriptor class for PhysxBoxController.
Definition at line 28 of file physxBoxControllerDesc.h.
LVector3f PhysxBoxControllerDesc::get_extents | ( | ) | const |
Returns the dimensions of the box.
Definition at line 39 of file physxBoxControllerDesc.cxx.
References PhysxManager::nxVec3_to_vec3().
bool PhysxControllerDesc::get_interaction_flag | ( | ) | const [inherited] |
Returns the interaction flag.
Definition at line 144 of file physxControllerDesc.cxx.
LPoint3f PhysxControllerDesc::get_pos | ( | ) | const [inherited] |
Returns the position of the character.
Definition at line 98 of file physxControllerDesc.cxx.
References PhysxManager::nxExtVec3_to_point3().
float PhysxControllerDesc::get_skin_width | ( | ) | const [inherited] |
Returns the skin width used by the controller.
Definition at line 121 of file physxControllerDesc.cxx.
float PhysxControllerDesc::get_slope_limit | ( | ) | const [inherited] |
Returns the maximum slope which the character can walk up.
Definition at line 110 of file physxControllerDesc.cxx.
float PhysxControllerDesc::get_step_offset | ( | ) | const [inherited] |
Returns the maximum height of an obstacle which the character can climb.
Definition at line 133 of file physxControllerDesc.cxx.
bool PhysxBoxControllerDesc::is_valid | ( | ) | const [inline, virtual] |
Returns true if the descriptor is valid.
Implements PhysxControllerDesc.
Definition at line 55 of file physxBoxControllerDesc.I.
void PhysxBoxControllerDesc::set_extents | ( | const LVector3f & | extents | ) |
Sets the dimensions of the box.
The dimensions are the 'radii' of the box, meaning 1/2 extents in x dimension, 1/2 extents in y dimension, 1/2 extents in z dimension.
Definition at line 28 of file physxBoxControllerDesc.cxx.
References PhysxManager::vec3_to_nxVec3().
void PhysxControllerDesc::set_interaction_flag | ( | bool | interactionFlag | ) | [inherited] |
The interaction flag controls if a character controller collides with other controllers.
The default is to collide with other controllers.
Definition at line 87 of file physxControllerDesc.cxx.
void PhysxControllerDesc::set_pos | ( | const LPoint3f & | pos | ) | [inherited] |
Set the position of the character.
Definition at line 24 of file physxControllerDesc.cxx.
References PhysxManager::point3_to_nxExtVec3().
void PhysxControllerDesc::set_skin_width | ( | float | skinWidth | ) | [inherited] |
Sets the skin width used by the controller.
A "skin" around the controller is necessary to avoid numerical precision issues. This is dependant on the scale of the users world, but should be a small, positive non zero value. Default: 0.1
Definition at line 57 of file physxControllerDesc.cxx.
void PhysxControllerDesc::set_slope_limit | ( | float | slopeLimit | ) | [inherited] |
Sets the maximum slope which the character can walk up.
In general it is desirable to limit where the character can walk, in particular it is unrealistic for the character to be able to climb arbitary slopes. The value is expressed in degrees. Default: 45.0 degrees.
Definition at line 41 of file physxControllerDesc.cxx.
void PhysxControllerDesc::set_step_offset | ( | float | stepOffset | ) | [inherited] |
Defines the maximum height of an obstacle which the character can climb.
A small value will mean that the character gets stuck and cannot walk up stairs etc, a value which is too large will mean that the character can climb over unrealistically high obstacles. Default: 0.5
Definition at line 74 of file physxControllerDesc.cxx.
void PhysxBoxControllerDesc::set_to_default | ( | ) | [inline, virtual] |
(re)sets the structure to the default.
Implements PhysxControllerDesc.
Definition at line 44 of file physxBoxControllerDesc.I.