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

iPathEngine::buildMeshFederation_FromWorldMesh()

Description

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.

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.

Syntax

iMeshFederation* buildMeshFederation_FromWorldMesh(const iMesh* worldMesh, tSigned32 tileSize, tSigned32 overlap, iMeshFederationTileGeneratedCallBack& tileGeneratedCallBack);

Parameters

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.
tileSize The size of the base tiling for the 'handled regions' of tiles in the federation.
A smaller value will result in more tiles being generated.
Must be greater than zero.
overlap The overlap between the 'representation regions' of the tiles in the federation.
This won't affect the number of tiles generated, but determines a 'maximum guaranteed query distance' 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.

Remarks

The created Interface iMeshFederation should be explicitly deleted when no longer required, and will also be deleted if iPathEngine::deleteAllObjects() is called - in either case the pointer can no longer be used.

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.

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.


Documentation for PathEngine release 5.24 - Copyright © 2002-2010 PathEnginenext: iPathEngine::buildMeshFederation_TilingOnly()