PathEngine home previous: iMesh::findClosestUnobstructedPositionEx()next: iMesh::findPathAway_WithQueryCallBack()
Contents, API Reference, Interfaces, iMesh, findPathAway

iMesh::findPathAway()

Description

Finds the shortest path of escape from a specified region from a given start position.

Syntax

std::unique_ptr<iPath> findPathAway(const iShape& shape, const iCollisionContext* context, const cPosition& start, const cPosition& awayFrom, int32_t distanceAway) const

Parameters

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 nullptr for this argument.
start The start point for pathfinding.
This position must be a valid position on this mesh, and must not be obstructed by the base mesh or burnt-in obstacles.
awayFrom A position defining the centre of a region to escape from.
This position must be a valid position on this mesh.
distanceAway Controls the size of the region to escape from.
Must be greater than zero.

Requirements

Requires that pathfind preprocess has been generated on this mesh for the collision shape specified.

Return Value

A newly created Interface iPath object, if a path can be found.
Otherwise a zero pointer is returned.

Remarks

Calling this method is functionally equivalent to calling iMesh::findPathAway_WithQueryCallBack(), with null for the callback parameter.

C# Mapping

Path findPathAway(Shape shape, CollisionContext context, PathEngine.Position start, PathEngine.Position awayFrom, int distanceAway);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iMesh::findPathAway_WithQueryCallBack()