PathEngine home previous: iObstacleSet::updatePathfindPreprocessFor()next: iPath::addExternalRef()
Contents, API Reference, Interfaces, iPath

Interface iPath

Description

A sequence of positions on a mesh. Returned by Pathfinding queries.

Defined in SDKRoot/code/externalAPI/i_pathengine.h.

Pooling

iPath objects are pooled internally, with iPathEngine::setPathPoolParameters() providing control over the pool parameters.

Special cases

Paths with one position are used to indicate that an agent has arrived at their target or are already at their target when a pathfinding query is made.
Since release 5.00, paths always contain one or more positions.

Construction and Deletion

iPath objects are generally constructed and returned by pathfinding queries, but can also be constructed directly by calling iMesh::constructPath().
iPath objects can be released explicitly by calling delete on the pointer or by calling the object's release() function. A pointer to an iPath object must not be used after the object has been deleted.

Methods:

addExternalRef

Increments the internal reference count for this API object.

advanceAlong

Provides the same functionality as iAgent::advanceAlongPathWithPrecision(), but without requiring creation of an iAgent.

advanceAlongWithCollisionInfo

Provides the same functionality as iAgent::advanceAlongPathWithCollisionInfo(), but without requiring creation of an iAgent.

connectionIndex

Enables the client application to determine whether a given segment in a path corresponds to an 'off-mesh connection'.

getLength

Returns the total length of the path.

getMesh

A helper function to access the mesh on which this path was created.

Note that this method gives you an API object reference to the mesh, with the API object reference count for the returned mesh incremented accordingly. You need to ensure that delete is called for the returned mesh pointer (or it's release() method), when it is no longer required.

If you want to access the mesh object temporarily, without incrementing the API object reference count, use iPath::refMesh().

hasRefs

Enables you to check whether there are any outstanding references on this object, other than the interface reference through which you are calling, and therefore whether this object will actually be deleted if you call it's release method.

position

Returns a position in the path at a specified index.

refMesh

A helper function to access the mesh on which this path was created.

Unlike iPath::getMesh(), the API object reference count for the mesh is not incremented. The returned reference should not be converted to a pointer, it's release() method should not be called, and it should only be considered valid as long as a reference is held to the path object you call this on.

release

Releases the API object pointer.

renderOnGround

A helper method for drawing paths flush with the surface of the 3D ground mesh.

size

Returns the number of points that comprise the path.


Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iPath::addExternalRef()