PathEngine home previous: iObstacleSet::includes()next: iObstacleSet::pathfindPreprocessNeedsUpdate()
Contents, API Reference, Interfaces, iObstacleSet, loadPathfindPreprocessFor



Loads preprocess from persistent storage.


void loadPathfindPreprocessFor(const iShape* shape, char const * data_Buffer, uint32_t data_BufferEntries) const;


shape The shape for which preprocess should be loaded.
data_Buffer, data_BufferEntries (See Passing Arrays.) The data buffer to load from.


Unobstructed space 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 iObstacleSet::savePathfindPreprocessFor().

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 iObstacleSet::getNumberOfAgents() and iObstacleSet::getAgent().

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.

C# Mapping

void loadPathfindPreprocessFor(Shape shape, byte[] data);

Java Mapping

void loadPathfindPreprocessFor(Shape shape, byte[] data);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iObstacleSet::pathfindPreprocessNeedsUpdate()