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

iPathEngine::buildMeshByCopyingConnectedGround()

Description

A helper method for stripping out unconnected ground mesh pieces, based on a supplied set of 'root positions'.

Syntax

iMesh* buildMeshByCopyingConnectedGround(const iMesh* baseMesh, cPosition const * rootPositions_Buffer, uint32_t rootPositions_BufferEntries, const char *const* options);

Parameters

baseMesh An iMesh object from which ground parts are to be copied.
rootPositions_Buffer, rootPositions_BufferEntries (See Passing Arrays.) Connectivity is checked from these root positions.
options

A set of named attributes to control exactly how the mesh result is created.
Refer to Handling Attributes for information about passing sets of named attributes in general, and mesh loading options for information about the set of options that may be passed in to this method.

Return Value

A new iMesh object constructed from the parts of the ground in the base mesh with connectivity to the supplied root positions.

Remarks

This method essentially performs a flood fill from the supplied set of root positions, based on triangle to triangle connectivity, and then constructs a new iMesh object to include only the parts of the base mesh that are encountered during this flood fill operation.

At least one root position must be supplied, and each supplied position must be a valid position on the base mesh.
(This then guarantees that the iMesh result cannot be empty.)

This method just copies ground geometry and face attributes from the base mesh, and does not copy other elements associated with the base mesh, such as burnt-in context information, named obstacles, and so on.
(This method is essentially provided as a helper method for use during certain content processing setups, and any additional content elements that are required should be added to the resulting mesh after this method has completed.)

Important note: iMesh objects that are created for use as tiles in mesh federation include some additional information relating to this tiling, including information about how to translate to overlapping ground surfaces in adjacent tiles.
This information is not copied by this method, and the iMesh object that is returned is not then suitable for use as part of an mesh federation tiling.

C# Mapping

Mesh buildMeshByCopyingConnectedGround(Mesh baseMesh, PathEngine.Position[] rootPositions, string[] options);

Java Mapping

Mesh buildMeshByCopyingConnectedGround(Mesh baseMesh, Position[] rootPositions, String[] options);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iPathEngine::buildMeshFederation_FromWorldMesh()