PathEngine home previous: iMesh::firstCollision()next: iMesh::generateCurvedPath()
Contents, API Reference, Interfaces, iMesh, generateCollisionPreprocessFor

iMesh::generateCollisionPreprocessFor()

Description

Generates preprocess to support collision queries relating to movement for the specified shape on this mesh.

Syntax

void generateCollisionPreprocessFor(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 not already be present for this shape on this mesh.

Remarks

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

The collision preprocess includes a minkowski expansion of the external edges of this mesh by that shape, and enables point and line collision queries, but does not enable pathfinding queries.

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.

NOTE: Preprocess does not need to be generated for a shape in order for that shape to be placed as an obstruction.
Obstruction shapes can also be moved by removing and replacing at a new position without preprocess being required.

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

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

See Also

iMesh::generatePathfindPreprocessFor(), iMesh::releaseAllPreprocessFor(), iMesh::shapeCanCollide()
Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEnginenext: iMesh::generateCurvedPath()