PathEngine home previous: iPathEngine::buildMeshByCopyingConnectedGround()next: iPathEngine::buildMeshFederation_TilingOnly()
Contents, API Reference, Interfaces, iPathEngine, buildMeshFederation_FromWorldMesh



Returns a newly created Interface iMeshFederation object, and generates the corresponding set of federated iMeshes, from a single large 'world mesh', with range determined by the range of worldMesh, and with the specified tile size, and overlap.


std::unique_ptr<iMeshFederation> buildMeshFederation_FromWorldMesh(const iMesh& worldMesh, int32_t tileStep, int32_t overlap, iMeshFederationTileGeneratedCallBack& tileGeneratedCallBack)


worldMesh The world mesh from which the federation should be generated.
Federation tiles are generated by copying sections of this mesh without changing the original mesh.
tileStep The coordinate increment between adjacent tiles in the federation.
A smaller value will result in more tiles being generated.
Must be greater than zero.
overlap The overlap between the tiles in the federation.
This determines a minimum guaranteed query range constraint on pathfinding across the federation.
Larger values for this overlap parameter enable queries to be supported across greater distances but at the cost of larger meshes for each tile.
Must be greater than zero.
tileGeneratedCallBack An instance of Interface iMeshFederationTileGeneratedCallBack to call back to with tile meshes as they are generated.

Return Value

A newly created Interface iMeshFederation object, to encapsulate the tiling of the resulting mesh federation and manage transitions between meshes for agents moving across that federation.


This method will usually be called during content generation time, and the resulting federation and mesh objects then saved out and reloaded at run-time.

Federation tiles will be generated during this process and passed in to tileGeneratedCallBack.
These are numbered according to a 'tile index' within the federation, (which is passed into the callback). Note, however, that it is possible for there to be tiles within a federation with no ground geometry, and meshes will not be generated for any such tiles.

Most of content data that can be attached to worldMesh (including 3d face data channels, anchors, named obstacles, burnt in obstacles) is correctly copied down to the tile meshes.
Off-mesh connections and burnt in 'surface-type based traversal costs' are not currently supported by this method, however.
In cases where worldMesh includes unsupported content data a non-fatal error will be emitted and the generation process will continue with the unsupported data ommitted from generated tile meshes.

C# Mapping

MeshFederation buildMeshFederation_FromWorldMesh(Mesh worldMesh, int tileStep, int overlap, MeshFederationTileGeneratedCallBack tileGeneratedCallBack);

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: iPathEngine::buildMeshFederation_TilingOnly()