PathEngine home previous: iCollisionContext::removeObstacleSet()next: iCollisionContext::setQueryBounds()
Contents, API Reference, Interfaces, iCollisionContext, setOverlayConnectionPenalty

iCollisionContext::setOverlayConnectionPenalty()

Description

Enables the penalty values associated with off-mesh connection to be overlaid and managed dynamically.

Syntax

void setOverlayConnectionPenalty(tSigned32 connectionIndex, tSigned32 penalty);

Parameters

connectionIndex The index for the connection for which an overlay penalty is to be set.
(Must be non-negative and less than the number of off-mesh connections on the mesh for which this context was created.)
penalty The penalty value to set for the specified connection.
Must be greater than or equal to -1. Passing a value of -1 disables the connection.

Remarks

Set connectionIndex to the value returned by iMesh::addOffMeshConnection() for the connection for which the penalty is to be modified.

Setting overlay connection penalties adds a small additional cost to pathfinding queries.
When overlay penalties are no longer required for a context these can be removed by calling iCollisionContext::clearOverlayConnectionPenalties().


Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEnginenext: iCollisionContext::setQueryBounds()