PathEngine home previous: iAgent::setTraverseCost()next: iAgent::setUserData()
Contents, API Reference, Interfaces, iAgent, setTraverseCostDirection

iAgent::setTraverseCostDirection()

Description

Enables a direction to be associated with the traverse cost for a soft obstacle.

Syntax

void setTraverseCostDirection(int32_t directionVectorX, int32_t directionVectorY);

Parameters

directionVectorX The x component of the desired direction vector.
directionVectorY The y component of the desired direction vector.

Remarks

An agent's traverse cost direction defaults to [0,0], which indicates that the agent's traverse cost acts on movement in all directions.

Setting this direction to a non-zero vector changes a soft obstacle into a 'directional soft obstacle'.
The traverse cost is then applied only to the component of movement in the specified direction.
Note that no cost is applied to movement at right angles to or away from the specified direction.

The traverse cost direction has no effect on hard obstacles.

Refer to Representing Regions with Cost to Traverse for more details about the 'soft obstacle' functionality.

The traverse cost direction currently associated with an agent can be obtained with iAgent::getTraverseCostDirection().

C# Mapping

void setTraverseCostDirection(int directionVectorX, int directionVectorY);

Java Mapping

void setTraverseCostDirection(int directionVectorX, int directionVectorY);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iAgent::setUserData()