PathEngine home previous: iMeshFederation::getRepresentedRegionsOverlapped()next: iMeshFederation::getTileCentre()
Contents, API Reference, Interfaces, iMeshFederation, getSourceTileForPosition

iMeshFederation::getSourceTileForPosition()

Description

Looks up the source tile index for a position in a mesh federation.

Syntax

int32_t getSourceTileForPosition(int32_t federationTileIndex, const cPosition& position, const iSourceTiling* sourceTiling) const;

Parameters

federationTileIndex The federation tile index for the mesh containing the query position.
position The position for which source tile location is being queried.
This must be a valid position on the federation mesh at federationTileIndex.
sourceTiling The source tiling in which to lookup source tile index. (Normally, the source tiling used to construct the mesh federation.)

Return Value

The source tile index for the source tile at the position's horizontal coordinates, or -1 if the position is outside of the source tiling.

Remarks

Note that federation tile meshes use local coordinates, to avoid overflow, and the horizontal coordinates of the query position will be in federation tile local coordinates.
This method just converts from federation tile local to world coordinates, and then looks up a tile index based on these world coordinates in the supplied source tiling.

C# Mapping

int getSourceTileForPosition(int federationTileIndex, PathEngine.Position position, SourceTiling sourceTiling);

Java Mapping

int getSourceTileForPosition(int federationTileIndex, Position position, SourceTiling sourceTiling);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iMeshFederation::getTileCentre()