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

iMeshFederation::translatePosition()

Description

Translates positions between the overlapping sections of adjacent meshes in this federation.

Syntax

cPosition translatePosition(int32_t fromTileIndex, const iMesh* fromMesh, int32_t toTileIndex, const iMesh* toMesh, const cPosition& fromPosition) const;

Parameters

fromTileIndexThe index of the mesh within this federation for the source point.
fromMesh An iMesh built for the tile at fromTileIndex.
toTileIndex The index of the mesh within this federation to translate the position to.
This mesh must be adjacent to the source mesh.
toMesh An iMesh built for the tile at toTileIndex.
fromPosition The position to translate.
In addition to being a valid position on the source mesh, this position must also be within the 'represented region' for that mesh.

Return Value

A position equivalent to fromPosition, but on the target mesh.
If the to and from meshes have been built correctly to correspond with the specified tiles in this federation, and if the source position is within the 'represented region' for the source mesh, then this translation should not fail, and a valid position on the target mesh will be returned. Otherwise, the translation may fail, in which case an explicitly invalid position will be returned.

C# Mapping

PathEngine.Position translatePosition(int fromTileIndex, Mesh fromMesh, int toTileIndex, Mesh toMesh, PathEngine.Position fromPosition);

Java Mapping

Position translatePosition(int fromTileIndex, Mesh fromMesh, int toTileIndex, Mesh toMesh, Position fromPosition);

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