PathEngine home previous: iMeshFederation::translatePosition()next: iMeshFederation::translatePositionToSourceTile()
Contents, API Reference, Interfaces, iMeshFederation, translatePositionFromSourceTile

iMeshFederation::translatePositionFromSourceTile()

Description

Translates a position from the source tiling used to construct the federation to a federation tile mesh.

Syntax

cPosition translatePositionFromSourceTile(const cPosition& fromPosition, const iSourceTiling& sourceTiling, const iMesh& sourceTile, const iMesh& federationTile) const;

Parameters

fromPosition The position to be translated.
This must be a valid position on the mesh passed in for sourceTile.
sourceTiling The source tiling which was used to construct federationTile, and which contains sourceTile.
sourceTile The source tile to translate the position from.
federationTile The federation tile to translate the position from.
The position to be translated must be in the represented region for this tile (as can be queried with iMeshFederation::getRepresentedRegion_World()).

Requirements

The iMesh object passed in for federationTile must be a mesh which was created for this federation with a tile mesh creation method based on construction from source tiles (iMeshFederation::buildTileMeshFromLocalGroundTiles() or iMeshFederation::buildTileMeshFromLocalGroundTiles_IGround()).

Return Value

A position equivalent to fromPosition, but on the specified federation tile mesh.

Remarks

Federation tiles overlap, so in the general case a source tiling position will map to multiple federation tile positions.
The iMeshFederation::getRepresentedRegionsOverlapped() method can then be used (with minimum and maximum values both set to the same coordinate) to obtain a set of potential target federation tiles for a given source tiling position.

C# Mapping

PathEngine.Position translatePositionFromSourceTile(PathEngine.Position fromPosition, SourceTiling sourceTiling, Mesh sourceTile, Mesh federationTile);

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