PathEngine home previous: iPathEngine::connectedRegionPreprocessVersionIsCompatible()next: iPathEngine::extractGroundFootprint()
Contents, API Reference, Interfaces, iPathEngine, extractConvexPolyFootprint

iPathEngine::extractConvexPolyFootprint()

Description

Extracts a set of convex polygons that can be used as a 2D collision footprint for arbitrary 3D mesh data.

Syntax

void extractConvexPolyFootprint(const iFaceVertexMesh& mesh, int32_t optimisationHorizontalRange, iArrayReceiver<int32_t>& result);

Parameters

mesh The face/vertex mesh data for which the convex poly footprint is desired.
optimisationHorizontalRange Maximum horizontal range to be applied during boundary optimisation. Must be greater than or equal to zero. Passing zero turns off boundary optimisation.
result (See Passing Arrays.) An array describing a set of convex polygons that approximates the external boundary of the face/vertex mesh data.

Remarks

As the first step of the process, the mesh data is projected into 2D (by ignoring Z coordinates), and the external boundary of the resulting 2D area is determined.

Note that any 'holes' in the 2D area covered by the mesh data (e.g. an enclosed courtyard entirely surrounded by the rest of a building mesh) will therefore be filled in.

An (optional) optimisation pass is then made on this boundary, before triangulating and decomposing into convex parts.

The convex parts are then passed back encoded as a series of 32 bit integers, as follows:

[number of polygons], followed by repeated polygon data

for each polygon, [number of points], followed by alternating [x] and [y] point data for that number of points

C# Mapping

void extractConvexPolyFootprint(FaceVertexMesh mesh, int optimisationHorizontalRange, out int[] result);

Java Mapping

void extractConvexPolyFootprint(FaceVertexMesh mesh, int optimisationHorizontalRange, Object_OutArgument result);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iPathEngine::extractGroundFootprint()