PxControllerManager Class Reference
[Character]
Manages an array of character controllers.
More...
#include <PxControllerManager.h>
Public Member Functions | |
virtual void | release ()=0 |
Releases the controller manager. | |
virtual PxU32 | getNbControllers () const =0 |
Returns the number of controllers that are being managed. | |
virtual PxController * | getController (PxU32 index)=0 |
Retrieve one of the controllers in the manager. | |
virtual PxController * | createController (PxPhysics &sdk, PxScene *scene, const PxControllerDesc &desc)=0 |
Creates a new character controller. | |
virtual void | purgeControllers ()=0 |
Releases all the controllers that are being managed. | |
virtual PxRenderBuffer & | getRenderBuffer ()=0 |
Retrieves debug data. | |
virtual void | setDebugRenderingFlags (PxU32 flags)=0 |
Sets debug rendering flags. | |
virtual PxObstacleContext * | createObstacleContext ()=0 |
Creates an obstacle context. | |
virtual void | computeInteractions (PxF32 elapsedTime)=0 |
Computes character-character interactions. | |
Protected Member Functions | |
PxControllerManager () | |
virtual | ~PxControllerManager () |
Detailed Description
Manages an array of character controllers.
Constructor & Destructor Documentation
PxControllerManager::PxControllerManager | ( | ) | [inline, protected] |
virtual PxControllerManager::~PxControllerManager | ( | ) | [inline, protected, virtual] |
Member Function Documentation
virtual void PxControllerManager::computeInteractions | ( | PxF32 | elapsedTime | ) | [pure virtual] |
Computes character-character interactions.
This function is an optional helper to properly resolve interactions between characters, in case they overlap (which can happen for gameplay reasons, etc).
You should call this once per frame, before your PxController::move() calls. The function will not move the characters directly, but it will compute overlap information for each character that will be used in the next move() call.
You need to provide a proper time value here so that interactions are resolved in a way that do not depend on the framerate.
If you only have one character in the scene, or if you can guarantee your characters will never overlap, then you do not need to call this function.
- Parameters:
-
[in] elapsedTime Elapsed time since last call
virtual PxController* PxControllerManager::createController | ( | PxPhysics & | sdk, | |
PxScene * | scene, | |||
const PxControllerDesc & | desc | |||
) | [pure virtual] |
Creates a new character controller.
- Parameters:
-
[in] sdk The Physics sdk object [in] scene The scene that the controller will belong to. [in] desc The controllers descriptor
- Returns:
- The new controller
virtual PxObstacleContext* PxControllerManager::createObstacleContext | ( | ) | [pure virtual] |
virtual PxController* PxControllerManager::getController | ( | PxU32 | index | ) | [pure virtual] |
Retrieve one of the controllers in the manager.
- Parameters:
-
index the index of the controller to return
- Returns:
- an array of controller pointers with size getNbControllers().
virtual PxU32 PxControllerManager::getNbControllers | ( | ) | const [pure virtual] |
Returns the number of controllers that are being managed.
- Returns:
- The number of controllers.
virtual PxRenderBuffer& PxControllerManager::getRenderBuffer | ( | ) | [pure virtual] |
Retrieves debug data.
- Returns:
- The render buffer filled with debug-render data
virtual void PxControllerManager::purgeControllers | ( | ) | [pure virtual] |
Releases all the controllers that are being managed.
virtual void PxControllerManager::release | ( | ) | [pure virtual] |
Releases the controller manager.
virtual void PxControllerManager::setDebugRenderingFlags | ( | PxU32 | flags | ) | [pure virtual] |
Sets debug rendering flags.
- Parameters:
-
[in] flags The debug rendering flags (combination of PxControllerDebugRenderFlags)
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com