Panda3D
Public Member Functions | List of all members
PhysxControllerDesc Class Referenceabstract

Descriptor class for a character controller. More...

#include "physxControllerDesc.h"

Inheritance diagram for PhysxControllerDesc:
PhysxBoxControllerDesc PhysxCapsuleControllerDesc

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
 

Detailed Description

Descriptor class for a character controller.

Definition at line 25 of file physxControllerDesc.h.

Member Function Documentation

◆ get_interaction_flag()

bool PhysxControllerDesc::get_interaction_flag ( ) const

Returns the interaction flag.

Definition at line 112 of file physxControllerDesc.cxx.

◆ get_pos()

LPoint3f PhysxControllerDesc::get_pos ( ) const

Returns the position of the character.

Definition at line 76 of file physxControllerDesc.cxx.

References PhysxManager::nxExtVec3_to_point3().

◆ get_skin_width()

float PhysxControllerDesc::get_skin_width ( ) const

Returns the skin width used by the controller.

Definition at line 94 of file physxControllerDesc.cxx.

◆ get_slope_limit()

float PhysxControllerDesc::get_slope_limit ( ) const

Returns the maximum slope which the character can walk up.

Definition at line 85 of file physxControllerDesc.cxx.

◆ get_step_offset()

float PhysxControllerDesc::get_step_offset ( ) const

Returns the maximum height of an obstacle which the character can climb.

Definition at line 103 of file physxControllerDesc.cxx.

◆ set_interaction_flag()

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 67 of file physxControllerDesc.cxx.

◆ set_pos()

void PhysxControllerDesc::set_pos ( const LPoint3f &  pos)

Set the position of the character.

Definition at line 21 of file physxControllerDesc.cxx.

References PhysxManager::point3_to_nxExtVec3().

◆ set_skin_width()

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 45 of file physxControllerDesc.cxx.

◆ 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 33 of file physxControllerDesc.cxx.

◆ set_step_offset()

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 57 of file physxControllerDesc.cxx.


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