|PathEngine home||previous: ||next: |
Extracts a set of convex polygons that can be used as a 2D collision footprint for arbitrary 3D mesh data.
void extractConvexPolyFootprint(const iFaceVertexMesh& mesh, int32_t optimisationHorizontalRange, iArrayReceiver<int32_t>& result);
|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.|
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
void extractConvexPolyFootprint(FaceVertexMesh mesh, int optimisationHorizontalRange, out int result);
void extractConvexPolyFootprint(FaceVertexMesh mesh, int optimisationHorizontalRange, Object_OutArgument result);
|Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEngine||next: |