PathEngine home previous: iMesh::getCellForEndOfLine()next: iMesh::getConnectedRegionForAgent()
Contents, API Reference, Interfaces, iMesh, getConnectedRegionFor



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


int32_t getConnectedRegionFor(const iShape& shape, const cPosition& p) const;


shape The agent shape for which connected region preprocess should be queried.
p The position to test.


Requires that connected region preprocess has been generated on this mesh for the collision shape specified.

Return Value

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


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 queries against the static geometry on this mesh (i.e. external edges and burnt in obstacles).
Use iObstacleSet::getConnectedRegionFor() or iCollisionContext::getConnectedRegionFor() to perform the same query for static geometry together with a set of 'semi-dynamic' obstacles in a 'preprocessed obstacle set'.

See Also


C# Mapping

int getConnectedRegionFor(Shape shape, PathEngine.Position p);

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: iMesh::getConnectedRegionForAgent()