Panda3D
|
Descriptor class for a character controller. More...
#include "physxControllerDesc.h"
Public Member Functions | |
bool | get_interaction_flag () const |
Returns the interaction flag. More... | |
LPoint3f | get_pos () const |
Returns the position of the character. More... | |
float | get_skin_width () const |
Returns the skin width used by the controller. More... | |
float | get_slope_limit () const |
Returns the maximum slope which the character can walk up. More... | |
float | get_step_offset () const |
Returns the maximum height of an obstacle which the character can climb. More... | |
virtual bool | is_valid () const =0 |
virtual NxControllerDesc * | ptr () const =0 |
void | set_interaction_flag (bool interactionFlag) |
The interaction flag controls if a character controller collides with other controllers. More... | |
void | set_pos (const LPoint3f &pos) |
Set the position of the character. More... | |
void | set_skin_width (float skinWidth) |
Sets the skin width used by the controller. More... | |
void | set_slope_limit (float slopeLimit) |
Sets the maximum slope which the character can walk up. More... | |
void | set_step_offset (float setpOffset) |
Defines the maximum height of an obstacle which the character can climb. More... | |
virtual void | set_to_default ()=0 |
Descriptor class for a character controller.
Definition at line 27 of file physxControllerDesc.h.
bool PhysxControllerDesc::get_interaction_flag | ( | ) | const |
Returns the interaction flag.
Definition at line 144 of file physxControllerDesc.cxx.
Referenced by get_step_offset().
LPoint3f PhysxControllerDesc::get_pos | ( | ) | const |
Returns the position of the character.
Definition at line 98 of file physxControllerDesc.cxx.
References get_slope_limit(), and PhysxManager::nxExtVec3_to_point3().
Referenced by set_interaction_flag().
float PhysxControllerDesc::get_skin_width | ( | ) | const |
Returns the skin width used by the controller.
Definition at line 121 of file physxControllerDesc.cxx.
References get_step_offset().
Referenced by get_slope_limit().
float PhysxControllerDesc::get_slope_limit | ( | ) | const |
Returns the maximum slope which the character can walk up.
Definition at line 110 of file physxControllerDesc.cxx.
References get_skin_width().
Referenced by get_pos().
float PhysxControllerDesc::get_step_offset | ( | ) | const |
Returns the maximum height of an obstacle which the character can climb.
Definition at line 133 of file physxControllerDesc.cxx.
References get_interaction_flag().
Referenced by get_skin_width().
void PhysxControllerDesc::set_interaction_flag | ( | bool | interactionFlag | ) |
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.
References get_pos().
Referenced by set_step_offset().
void PhysxControllerDesc::set_pos | ( | const LPoint3f & | pos | ) |
Set the position of the character.
Definition at line 24 of file physxControllerDesc.cxx.
References PhysxManager::point3_to_nxExtVec3(), and set_slope_limit().
void PhysxControllerDesc::set_skin_width | ( | float | skinWidth | ) |
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.
References set_step_offset().
Referenced by set_slope_limit().
void PhysxControllerDesc::set_slope_limit | ( | float | slopeLimit | ) |
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.
References set_skin_width().
Referenced by set_pos().
void PhysxControllerDesc::set_step_offset | ( | float | stepOffset | ) |
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.
References set_interaction_flag().
Referenced by set_skin_width().