Contents, API Reference, Interfaces, iMeshFederation, getRepresentedRegionOverlappedRange
iMeshFederation::getRepresentedRegionOverlappedRange()
Description
Queries the set of tile represented regions overlapped by the specific horizontal region.
Syntax
void getRepresentedRegionOverlappedRange(const cHorizontalRange& queryRegion, int32_t& minTileX, int32_t& minTileY, int32_t& maxTileX, int32_t& maxTileY) const; |
Parameters
| queryRegion | |
Minimum and maximum bounds of the query region, in X and Y.
|
| minTileX | |
The minimum x coordinate for overlapped represented regions, in federation tile coordinates.
|
| minTileY | |
The minimum y coordinate for overlapped represented regions, in federation tile coordinates.
|
| maxTileX | |
The maximum y coordinate for overlapped represented regions, in federation tile coordinates.
|
| maxTileY | |
The maximum y coordinate for overlapped represented regions, in federation tile coordinates.
|
Remarks
This method can be used to place dynamic obstacles or agents into individual tiles of a mesh federation,
to update the set of represented regions overlapped after positions change,
and to detect transitions where new tiles become overlapped or tiles are no longer overlapped, after positions change.
To detect transitions efficiently, store the minimum and maximum federation tile coordinates before the position change, and then compare.
A federation tile index can be calculated from x and y in federation tile coordinates, as follows:
federationTileIndex = federationTileCoordinateY * federationIilesInX + federationTileCoordinateX
(Use iMeshFederation::tilesInX() to obtain the value to use for federationIilesInX, here.)
See Also
iMeshFederation::getRepresentedRegionsOverlapped()
C# Mapping
void getRepresentedRegionOverlappedRange(PathEngine.HorizontalRange queryRegion, out int minTileX, out int minTileY, out int maxTileX, out int maxTileY); |
Java Mapping
void getRepresentedRegionOverlappedRange(HorizontalRange queryRegion, int_OutArgument minTileX, int_OutArgument minTileY, int_OutArgument maxTileX, int_OutArgument maxTileY);
|