|PathEngine home||previous: ||next: |
Finds the shortest path from the agent's current position to a specified target position.
(This version supports passing in a callback object to enable the query to be aborted early.)
iPath* findShortestPathTo_WithQueryCallBack(const iCollisionContext* context, const cPosition& target, iQueryCallBack* queryCallBack) const;
The state of dynamic collision that will apply for this query.|
An empty context can be specified by passing a value of zero for this argument.
Note that the agent is not considered to obstruct itself even if included in this context.
|target||The target position for pathfinding. This position must be a valid position on the agent's mesh.|
|queryCallBack||A pointer to a valid implementation of the iQueryCallBack interface, or else null.|
Requires that the agent is moveable and that pathfinding preprocess has been generated on the agent's mesh for the agent's collision shape.
The start point for pathfinding (i.e. the agent's current position) must not be obstructed by the base mesh or burnt-in obstacles.
Queries for which the target position is obstructed can be alot more expensive,
so if the target position is potentially obstructed then it is a good idea to
If the target position is obstructed then you know that the query will fail.
This check is not performed internally to avoid adding overhead in cases where the target position is known in advance to be unobstructed.
Note that if the search is aborted by the query callback then the path returned will not reach the goal.
Path findShortestPathTo_WithQueryCallBack(CollisionContext context, PathEngine.Position target, QueryCallBack queryCallBack);
Path findShortestPathTo_WithQueryCallBack(CollisionContext context, Position target, QueryCallBack queryCallBack);
|Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEngine||next: |