PathEngine home previous: iPathEngine::buildRegularSourceTiling_RoundUpForVoxels()next: iPathEngine::connectedRegionPreprocessVersionIsCompatible()
Contents, API Reference, Interfaces, iPathEngine, buildUnobstructedSpaceGround



A helper method for generating a ground mesh representation of agent unobstructed space.


std::unique_ptr<iMesh> buildUnobstructedSpaceGround(const iMesh& mesh, const iShape& shape, const char *const* options)


mesh The ground mesh on which to perform a minkowski expansion.
shape The agent shape to expand by.

A set of named attributes to control exactly how the mesh result is created.
Refer to this page for information about the set of attributes relating to mesh construction in general.

Return Value

If the result of minkowski expansion by the supplied agent shape is non-empty then a new iMesh object is constructed for the expansion and returned.
If the minkowski expansion is empty (i.e. if there is no ground left after expansion by the agent shape) then a null pointer is returned.


This method can be used to generate an obstructed space represention in

form, i.e. with height detail and ground attribute information preserved and included in the resulting mesh data.

This can be used, for example, to take advantage of PathEngine's robust minkowski expansion to generate an expanded mesh for use with external code where a 'standard' 3D ground representation is expected.

Note that the term 'expansion' here refers to the fact that a 'minkowski expansion' is being performed against the external edge geometry of the mesh, but actually the resulting mesh will be smaller than the mesh passed in!
You can think of this also as a shrinking operation, with the key point being that various operations that would have required the agent shape to be taken into account can be performed against the shrunk mesh, with only the actual agent origin position then needing to be taken into account.

The expansion is exact within the limitation that 'intersection corners' in the result have to be approximated to the integer grid (e.g. at ground attribute boundaries). This approximation operation is then handled reobustly and guarantees that the resulting mesh remains valid within the standard PathEngine ground mesh validation constraints.

This method is not needed for, and should not be used with the built-in pathfinding and collision functionality (because this is based on an alternative, less heavyweight, representation of agent unobstructed space, generated internally by iMesh when the preprocess generation methods are called).

C# Mapping

Mesh buildUnobstructedSpaceGround(Mesh mesh, Shape shape, string[] options);

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