| PathEngine home | previous: | next: |
Calculates the movement cost for a given line, as applied during pathfinding.
tUnsigned32 calculatePathfindingCostForLine(const iShape* shape, const iCollisionContext* context, const cPosition& start, const cPosition& end, bool& blocked) const; |
| shape | The collision shape to use for this query. | ||
| context |
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. | ||
| start | The start of the line. This position must be a valid position on this mesh | ||
| end | The end of the line. This position must be a valid position on this mesh | ||
| blocked | Returns true, if the line is not passible for pathfinding. |
This method applies the same calculations as are applied during pathfinding for the cost of movement along a line.
Any soft obstacle traverse costs or surface type based traverse costs, either 'burnt in' to the base mesh, or set dynamically on the supplied collision context, will be included in this calculation, as well as a base cost corresponding to the horizontal distance travelled by the line.
The line can be blocked either by hard collision, or by a special surface type traverse cost value of -1 indicating an 'impassible' surface type region.
| Documentation for PathEngine release 5.29 - Copyright © 2002-2012 PathEngine | next: |