PxObstacleContext
Defined in include/characterkinematic/PxControllerObstacles.h
-
class PxObstacleContext
Context class for obstacles.
An obstacle context class contains and manages a set of user-defined obstacles.
See also
Public Functions
-
inline PxObstacleContext()
-
inline virtual ~PxObstacleContext()
-
virtual void release() = 0
Releases the context.
-
virtual PxControllerManager &getControllerManager() const = 0
Retrieves the controller manager associated with this context.
- Returns
The associated controller manager
-
virtual PxObstacleHandle addObstacle(const PxObstacle &obstacle) = 0
Adds an obstacle to the context.
- Parameters
obstacle – [in] Obstacle data for the new obstacle. The data gets copied.
- Returns
Handle for newly-added obstacle
-
virtual bool removeObstacle(PxObstacleHandle handle) = 0
Removes an obstacle from the context.
- Parameters
handle – [in] Handle for the obstacle object that needs to be removed.
- Returns
True if success
-
virtual bool updateObstacle(PxObstacleHandle handle, const PxObstacle &obstacle) = 0
Updates data for an existing obstacle.
- Parameters
handle – [in] Handle for the obstacle object that needs to be updated.
obstacle – [in] New obstacle data
- Returns
True if success
-
virtual PxU32 getNbObstacles() const = 0
Retrieves number of obstacles in the context.
- Returns
Number of obstacles in the context
-
virtual const PxObstacle *getObstacle(PxU32 i) const = 0
Retrieves desired obstacle.
- Parameters
i – [in] Obstacle index
- Returns
Desired obstacle
-
virtual const PxObstacle *getObstacleByHandle(PxObstacleHandle handle) const = 0
Retrieves desired obstacle by given handle.
- Parameters
handle – [in] Obstacle handle
- Returns
Desired obstacle
-
inline PxObstacleContext()