|PathEngine home||previous: ||next: |
Calculates the movement cost for a given line, as applied during pathfinding.
uint32_t 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.|
The state of dynamic collision that will apply for this query.|
An empty context can be specified by passing nullptr 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.
uint calculatePathfindingCostForLine(Shape shape, CollisionContext context, PathEngine.Position start, PathEngine.Position end, out bool blocked);
|Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEngine||next: |