PathEngine home previous: iPath::advanceAlongWithCollisionInfo()next: iPath::getLength()
Contents, API Reference, Interfaces, iPath, connectionIndex

iPath::connectionIndex()

Description

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

Syntax

int32_t connectionIndex(int32_t segmentIndex) const;

Parameters

segmentIndex The index for the point at the beginning of the path segment to be queried.

Return Value

-1 if the segment being queried is a standard 'on-mesh' path segment, or else an ID value for the off-mesh connection corresponding to the segment being queried.

Remarks

If you are not using PathEngine's off-mesh connections then you don't need to call this method. (In this case, this method will always return -1.)

Values other than -1 can correspond to either static or dynamic off-mesh connections.
When both static and dynamic off-mesh connections are being used it is up to application code to ensure these can be differentiated in some way.
(See iCollisionContext::addRunTimeOffMeshConnection().)

Static off-mesh connection IDs correspond with the index value returned by iMesh::addOffMeshConnection() when adding the connection.

Dynamic off-mesh connection IDs correspond with the ID value passed in to iCollisionContext::addRunTimeOffMeshConnection() for the connection.

See Off‑Mesh Connections for a general overview of the off-mesh connection functionality.

C# Mapping

int connectionIndex(int segmentIndex);

Java Mapping

int connectionIndex(int segmentIndex);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iPath::getLength()