PathEngine home previous: iMesh::generatePathfindPreprocess6For()next: iMesh::generateRandomPosition()
Contents, API Reference, Interfaces, iMesh, generatePathfindPreprocessFor

iMesh::generatePathfindPreprocessFor()

Description

Generates preprocess data for pathfinding around agent unobstructed space.

Syntax

void generatePathfindPreprocessFor(const iShape& shape, const char *const* options);

Parameters

shape The shape for which pathfind preprocess should be generated.
options

This parameter enables optional attributes to be passed in to control aspects of the preprocess generation, if special behaviour is desired.

If special bevaviour is desired, then see Handling Attributes for general information about passing attributes, and Pathfind Preprocess Generation Attributes for a list of the attributes that can be passed in specifically to this method.

See Handling Attributes for general information about passing attributes.

If no special behaviour is desired then you can just pass zero in for this parameter, to indicate no attributes.

Requirements

Unobstructed space must be present for the shape on this mesh, and must be 'combined' (i.e. the 'combine' argument should have been set to true when generating unobstructed space).

Pathfind preprocess must not already be present for the shape on this mesh.

Remarks

You can avoid the overhead of generating preprocess at runtime by using iMesh::savePathfindPreprocessFor() and iMesh::loadPathfindPreprocessFor() to save and load the data to and from a persistent store.

Multithreading details: Base mesh preprocess generation operations are non-blocking between shapes, so preprocess can be generated for multiple shapes simultaneously.
(See Using PathEngine with Multithreaded Applications.)

See Also

iMesh::generateUnobstructedSpaceFor(), iMesh::releasePathfindPreprocessFor(), iMesh::shapeCanPathfind()

C# Mapping

void generatePathfindPreprocessFor(Shape shape, string[] options);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iMesh::generateRandomPosition()