| PathEngine home | previous: | next: |
Loads pathfinding preprocess from persistent storage.
void loadPathfindPreprocessFor(const iShape* shape, const char* dataBuffer, tUnsigned32 bufferSize) const; |
| shape | The shape for which preprocess should be loaded. | ||
| dataBuffer | A byte buffer. This buffer is not retained after the call and can subsequently be safely deleted. | ||
| bufferSize | The size of the buffer pointed to by dataBuffer, in bytes. |
Pathfind preprocess must have been generated for the shape on the mesh for which this obstacle set was created.
The pathfinding state corresponding to this obstacle set must be identical to the state against which the saved preprocess was generated, specifically:
The buffer passed in must contain data previously saved out by
Note that any preprocess generation attributes passed in to obstacle set creation will affect preprocess generation and not preprocess loading. Attributes of any loaded preprocess depend on the set of attributes passed in when the preprocess was originally generated.
The order of obstacles included in an obstacle set is significant.
The simplest way to ensure that obstacle ordering is identical to the state for which preprocess was saved is
to ensure that obstacles are added to a newly created obstacle set in exactly the same order
for loading as before generation and saving.
For more dynamic obstacle set creation scenarios, it is also possible to reconstruct an obstacle set with
identical ordering, by ensuring that agents are added in the same order as the iteration provided by
The structure of PathEngine's pathfinding preproces may be changed between releases.
In the case where the preprocess version is not compatible
a non fatal error will be emitted and preprocess will not be loaded.
| Documentation for PathEngine release 5.29 - Copyright © 2002-2012 PathEngine | next: |