PathEngine home previous: iMesh::loadPath()next: iMesh::newContext()
Contents, API Reference, Interfaces, iMesh, loadPathfindPreprocessFor

iMesh::loadPathfindPreprocessFor()

Description

Loads pathfinding preprocess from persistent storage.

Syntax

void loadPathfindPreprocessFor(iShape* shape, const char* dataBuffer, tUnsigned32 bufferSize);

Parameters

shape The shape for which preprocess should be loaded.
dataBufferA byte buffer. This buffer is not retained after the call and can subsequently be safely deleted.
bufferSizeThe size of the buffer pointed to by dataBuffer, in bytes.

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.

The ground mesh and base circuits must be identical to the mesh for which the preprocess was originally saved.
The shape must be identical to the shape for which the preprocess was originally saved.

Remarks

The buffer passed in must contain data previously saved out by iMesh::savePathfindPreprocessFor().

This method can be called where you would previously have called iMesh::generatePathfindPreprocessFor(), to save time generating preprocess.

The structure of PathEngine's pathfinding preproces may be changed between releases.
iPathEngine::pathfindPreprocessVersionIsCompatible() can be used to check whether preprocess saved out of an older release can be loaded into the current release.
In the case where the preprocess version is not compatible a warning will be emitted and new preprocess will be generated with the same attributes as the original preprocess.


Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEnginenext: iMesh::newContext()