PathEngine home previous: iObstacleSet::pathfindPreprocessNeedsUpdate()next: iObstacleSet::release()
Contents, API Reference, Interfaces, iObstacleSet, refAgent

iObstacleSet::refAgent()

Description

Provided for iterating through the agents in an obstacle set.

Syntax

iAgent& refAgent(int32_t index) const;

Parameters

indexThis must be a positive integer less than the number of agents in the set.

Return Value

The agent at the specified index.

Remarks

The agent index here is only an iteration mechanism.
The order of these indices should not be assumed to coincide with the order in which agents were added, and may be different across different releases.
Also, indices should not be assumed to refer consistently to a single agent after changes to the set.

Unlike iObstacleSet::getAgent(), the API object reference count for the agent 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.

See Also

iObstacleSet::getNumberOfAgents()

C# Mapping

Agent refAgent(int index);

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