PathEngine home previous: iObstacleSet::getAgent()next: iObstacleSet::getConnectedRegionForAgent()
Contents, API Reference, Interfaces, iObstacleSet, getConnectedRegionFor

iObstacleSet::getConnectedRegionFor()

Description

Returns an index for the connected region at a given position. This can be used to quickly determine the reachability between positions.

Syntax

tSigned32 getConnectedRegionFor(iShape* shape, const cPosition& p) const;

Parameters

shape The collision shape to use for this query.
p The position to test.

Requirements

Requires that this obstacle set has been marked for preprocessing and that connected region queries have been enabled with the relevant preprocess generation attribute.

See Obstacle Management for details about setting up preprocessed obstacle sets.

Return Value

An index value for the connected region at the given position.

Remarks

A position is reachable from another position if both positions are unobstructed and this query returns the same connected region indices for both positions.

If called with an obstructed position, this method will return -1.

This method enables you to query against the set of 'semi-dynamic' obstacles in a 'preprocessed obstacle set', in addition to static geometry.
For queries against just the static geometry on this mesh (i.e. external edges and burnt in obstacles), use iMesh::getConnectedRegionFor().

See Also

iObstacleSet::getConnectedRegionForAgent()
Documentation for PathEngine release 5.17 - Copyright © 2002-2008 PathEnginenext: iObstacleSet::getConnectedRegionForAgent()