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/code/externalAPI/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 released explicitly by calling delete on the pointer or by calling the object's release() function. A pointer to an iCollisionContext object must not be used after the object has been deleted.

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.

clear

Removes all agents.

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.

getConnectedRegionFor

Returns an index for the connected region at a given position. This can be used to quickly determine the reachability between positions.

getConnectedRegionForAgent

Returns an index for the connected region for an agent's current position.

getNumberOfAgents

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

getNumberOfConnectedRegions

Returns the number of connected regions in connected region preprocess associated with this object.

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.

hasRefs

Enables you to check whether there are any outstanding references on this object, other than the interface reference through which you are calling, and therefore whether this object will actually be deleted if you call it's release method.

includes

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

release

Releases the API object pointer.

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().

restoreTemporarilyIgnoredAgent

Restores an agent that was previously marked as excluded from collision state.

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.

temporarilyIgnoreAgent

Flags a specified agent as excluded from the context collision state, without invalidating cached state data.

updateCollisionPreprocessFor

(Depreciated)
Enabled the application to force generation of cached data associated with the collision context dynamic state.

updatePathfindingPreprocessFor

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


Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iCollisionContext::addAgent()