PathEngine home previous: iCollisionContext::updatePathfindingPreprocessFor()next: iObstacleSet::addAgent()
Contents, API Reference, Interfaces, iObstacleSet

Interface iObstacleSet

Description

Used to create free standing sets of obstacles, that can then be combined in collision contexts.

Defined in SDKRoot/include/i_pathengine.h.

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

Construction and Deletion

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

All obstacle sets created for a mesh get destroyed automatically when the mesh is destroyed.

Methods:

addAgent

Adds a specified agent to this obstacle set.

clear

Removes all agents.

empty

Returns true if the set is empty.

getAgent

Provided for iterating through the agents in the set.

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 set.

getNumberOfConnectedRegions

Returns the number of distinct connected regions in the unobstructed space for a given shape.

includes

Tells you if a specified agent is included in this set.

pathfindPreprocessNeedsUpdate

Checks the state of pathfinding preprocess, on obstacle sets marked for full preprocessing.

removeAgent

Removes a specified agent from this set.

size

Equivalent to calling getNumberOfAgents()

updateCollisionPreprocessFor

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

updatePathfindingPreprocessFor

Enables the application to force generation of any pathfinding preprocess associated with the obstacle set.


Documentation for PathEngine release 5.17 - Copyright © 2002-2008 PathEnginenext: iObstacleSet::addAgent()