PathEngine home previous: iAgent::testCollisionTo_XY()next: iCollisionContext::addAgent()
Contents, API Reference, Interfaces, iCollisionContext

Interface iCollisionContext

Description

Represents a state of dynamic collision for an iMesh.

Defined in SDKRoot/include/i_pathengine.h.

iCollisionContext can be used to represent either an actual state of collision in the game world, or to represent an AI's current understanding about the state of collision in the world.
The iCollisionContext object stores a set of agents on that mesh. When you pass the collision context in to pathfinding or collision queries on the mesh, those agents will automatically be included in the pathfinding or collision.
iCollisionContext objects store some preprocess about this set of agents and automatically update this preprocess when agents move or are destroyed.

Refer to this page for a discussion of run-time obstacle management.

Construction and Deletion

iCollisionContext objects can be constructed with iMesh::newContext().
iCollisionContext objects can be deleted explicitly by calling delete on the pointer or by calling the object's destroy() function. All iCollisionContext objects are deleted by a call to iPathEngine::deleteAllObjects().
A pointer to an iCollisionContext object must not be used after the object has been deleted.

All collision contexts created for a mesh get destroyed automatically when the mesh is destroyed.

Methods:

addAgent

Adds a specified agent to this context.

addObstacleSet

Adds a free standing obstacle set to this context.

addRunTimeOffMeshConnection

Tells PathEngine about the possibility for agents to move 'off-mesh' between a pair of endpoints, with this movement possibility specified completely dynamically at run-time.

clearOverlayConnectionPenalties

Clears any connection penalties previously set with iCollisionContext::setOverlayConnectionPenalty().

clearQueryBounds

Clears any query bounds previously set for this context.

clearRunTimeOffMeshConnections

Removes any run-time off-mesh connections associated with this context.

getAgent

Provided for iterating through the set of agents in a context.

getNumberOfAgents

Tells you how many agents are currently included in the context.

getNumberOfObstacleSets

Helper method for iterating through obstacle sets in a context.

getObstacleSet

Helper method for iterating through obstacle sets in a context.

getOverlayConnectionPenalty

Helper method for querying the value of overlay connection penalties set previously for this context (with iCollisionContext::setOverlayConnectionPenalty()).

hasOverlayConnectionPenalties

Helper method for testing if any overlay connection penalties are set for a context.

includes

Tells you if a specified agent is included directly in this context.

removeAgent

Removes a specified agent from this context.

removeObstacleSet

Removes a free standing obstacle set to this context.

removeRunTimeOffMeshConnection

Removes a run-time off-mesh connection previously added to this context with iCollisionContext::addRunTimeOffMeshConnection().

setOverlayConnectionPenalty

Enables the penalty values associated with off-mesh connection to be overlaid and managed dynamically.

setQueryBounds

Sets a rectangular region outside which PathEngine may discard potential paths.

setSurfaceTypeTraverseCost

Associates a traverse cost with regions marked with a specified surface type.

setSurfaceTypeTraverseCostDirection

Associates a direction with the traverse cost for regions marked with a specified surface type.

updateCollisionPreprocessFor

Enables the application to force generation of collision preprocess associated with the collision context.

updatePathfindingPreprocessFor

Enables the application to force generation of pathfinding preprocess associated with the collision context.


Documentation for PathEngine release 5.24 - Copyright © 2002-2010 PathEnginenext: iCollisionContext::addAgent()