PxCapsuleController Class Referenceabstract

A capsule character controller. More...

#include <PxCapsuleController.h>

Inheritance diagram for PxCapsuleController:
Collaboration diagram for PxCapsuleController:

Public Member Functions

virtual PxF32 getRadius () const =0
 Gets controller's radius. More...
 
virtual bool setRadius (PxF32 radius)=0
 Sets controller's radius. More...
 
virtual PxF32 getHeight () const =0
 Gets controller's height. More...
 
virtual bool setHeight (PxF32 height)=0
 Resets controller's height. More...
 
virtual PxCapsuleClimbingMode::Enum getClimbingMode () const =0
 Gets controller's climbing mode. More...
 
virtual bool setClimbingMode (PxCapsuleClimbingMode::Enum mode)=0
 Sets controller's climbing mode. More...
 
- Public Member Functions inherited from PxController
virtual PxControllerShapeType::Enum getType () const =0
 Return the type of controller. More...
 
virtual void release ()=0
 Releases the controller. More...
 
virtual PxControllerCollisionFlags move (const PxVec3 &disp, PxF32 minDist, PxF32 elapsedTime, const PxControllerFilters &filters, const PxObstacleContext *obstacles=NULL)=0
 Moves the character using a "collide-and-slide" algorithm. More...
 
virtual bool setPosition (const PxExtendedVec3 &position)=0
 Sets controller's position. More...
 
virtual const PxExtendedVec3getPosition () const =0
 Retrieve the raw position of the controller. More...
 
virtual bool setFootPosition (const PxExtendedVec3 &position)=0
 Set controller's foot position. More...
 
virtual PxExtendedVec3 getFootPosition () const =0
 Retrieve the "foot" position of the controller, i.e. the position of the bottom of the CCT's shape. More...
 
virtual PxRigidDynamicgetActor () const =0
 Get the rigid body actor associated with this controller (see PhysX documentation). The behavior upon manually altering this actor is undefined, you should primarily use it for reading const properties. More...
 
virtual void setStepOffset (const PxF32 offset)=0
 The step height. More...
 
virtual PxF32 getStepOffset () const =0
 Retrieve the step height. More...
 
virtual void setNonWalkableMode (PxControllerNonWalkableMode::Enum flag)=0
 Sets the non-walkable mode for the CCT. More...
 
virtual PxControllerNonWalkableMode::Enum getNonWalkableMode () const =0
 Retrieves the non-walkable mode for the CCT. More...
 
virtual PxF32 getContactOffset () const =0
 Retrieve the contact offset. More...
 
virtual void setContactOffset (PxF32 offset)=0
 Sets the contact offset. More...
 
virtual PxVec3 getUpDirection () const =0
 Retrieve the 'up' direction. More...
 
virtual void setUpDirection (const PxVec3 &up)=0
 Sets the 'up' direction. More...
 
virtual PxF32 getSlopeLimit () const =0
 Retrieve the slope limit. More...
 
virtual void setSlopeLimit (PxF32 slopeLimit)=0
 Sets the slope limit. More...
 
virtual void invalidateCache ()=0
 Flushes internal geometry cache. More...
 
virtual PxScenegetScene ()=0
 Retrieve the scene associated with the controller. More...
 
virtual void * getUserData () const =0
 Returns the user data associated with this controller. More...
 
virtual void setUserData (void *userData)=0
 Sets the user data associated with this controller. More...
 
virtual void getState (PxControllerState &state) const =0
 Returns information about the controller's internal state. More...
 
virtual void getStats (PxControllerStats &stats) const =0
 Returns the controller's internal statistics. More...
 
virtual void resize (PxReal height)=0
 Resizes the controller. More...
 

Protected Member Functions

PX_INLINE PxCapsuleController ()
 
virtual ~PxCapsuleController ()
 
- Protected Member Functions inherited from PxController
PX_INLINE PxController ()
 
virtual ~PxController ()
 

Detailed Description

A capsule character controller.

The capsule is defined as a position, a vertical height, and a radius. The height is the distance between the two sphere centers at the end of the capsule. In other words:

p = pos (returned by controller)
h = height
r = radius

p = center of capsule
top sphere center = p.y + h*0.5
bottom sphere center = p.y - h*0.5
top capsule point = p.y + h*0.5 + r
bottom capsule point = p.y - h*0.5 - r

Constructor & Destructor Documentation

◆ PxCapsuleController()

PX_INLINE PxCapsuleController::PxCapsuleController ( )
inlineprotected

◆ ~PxCapsuleController()

virtual PxCapsuleController::~PxCapsuleController ( )
inlineprotectedvirtual

Member Function Documentation

◆ getClimbingMode()

virtual PxCapsuleClimbingMode::Enum PxCapsuleController::getClimbingMode ( ) const
pure virtual

Gets controller's climbing mode.

Returns
The capsule controller's climbing mode.
See also
PxCapsuleControllerDesc.climbingMode setClimbingMode()

◆ getHeight()

virtual PxF32 PxCapsuleController::getHeight ( ) const
pure virtual

Gets controller's height.

Returns
The height of the capsule controller.
See also
PxCapsuleControllerDesc.height setHeight()

◆ getRadius()

virtual PxF32 PxCapsuleController::getRadius ( ) const
pure virtual

Gets controller's radius.

Returns
The radius of the controller.
See also
PxCapsuleControllerDesc.radius setRadius()

◆ setClimbingMode()

virtual bool PxCapsuleController::setClimbingMode ( PxCapsuleClimbingMode::Enum  mode)
pure virtual

Sets controller's climbing mode.

Parameters
[in]modeThe capsule controller's climbing mode.
See also
PxCapsuleControllerDesc.climbingMode getClimbingMode()

◆ setHeight()

virtual bool PxCapsuleController::setHeight ( PxF32  height)
pure virtual

Resets controller's height.

Warning
this doesn't check for collisions.
Parameters
[in]heightThe new height for the controller.
Returns
Currently always true.
See also
PxCapsuleControllerDesc.height getHeight()

◆ setRadius()

virtual bool PxCapsuleController::setRadius ( PxF32  radius)
pure virtual

Sets controller's radius.

Warning
this doesn't check for collisions.
Parameters
[in]radiusThe new radius for the controller.
Returns
Currently always true.
See also
PxCapsuleControllerDesc.radius getRadius()

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