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

iMesh::generatePathfindPreprocessFor()

Description

Generates preprocess to support pathfinding queries about movement for the specified shape on this mesh.

Syntax

void generatePathfindPreprocessFor(iShape* shape, const char *const* attributes);

Parameters

shape The shape for which preprocess should be generated.
attributes This parameter enables attributes to be passed in to control aspects of the preprocess.
See Handling Attributes for information about passing attributes.
If you dont need to pass any attributes just pass zero in for this parameter.

Requirements

Collision preprocess must already be present for this shape on this mesh.
(So this should already have been generated with a call to iMesh::generateCollisionPreprocessFor(), or loaded with a call to iMesh::loadCollisionPreprocessFor().)
Pathfind preprocess should not already be present.

Remarks

Preprocess must be generated in order to make collision or pathfinding queries about movement for a given shape.
This method controls generation of pathfinding related preprocess for movement of the specified shape on this mesh.

Pathfinding preprocess includes a visibility graph of potential connections between points of visibility, also lookup tables for 'silhouette regions'.

If a method in the PathEngine API requires preprocess, then this is specified in the method documention.
The method documentation also species which type of preprocess is required.

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

Refer to Pathfind Preprocess Attributes for a list of the attributes that can be passed in to this method.

See Also

iMesh::releasePathfindPreprocessFor(), iMesh::shapeCanPathfind(), iMesh::generateCollisionPreprocessFor()
Documentation for PathEngine release 5.17 - Copyright © 2002-2008 PathEnginenext: iMesh::generateRandomPosition()