PathEngine home previous: Collision Queriesnext: Pathfinding Queries
Contents, Programmers Guide, Applying the SDK, Performing Collision Queries without Preprocess

Performing Collision Queries without Preprocess

In addition to the standard code-paths for performing collision queries against a set of expanded boundaries, PathEngine also provides an alternative set of code-paths based on testing agent shape directly against obstacles shapes and the edges of the mesh.

There is no per-shape memory overhead for this functionality so this enables collision queries to be applied for an effectively unlimited set of shapes.
This can be useful, for example, for testing collision when placing obstacles or for performing collision queries for rotations of long thin agent shapes.

To enable the alternative code-paths you just need to set the 'allowCollisionWithoutPreprocess' option to true when initialising a mesh (this defaults to false).
Refer to iPathEngine::loadMeshFromBuffer() for details about initialising a mesh with options, and to Handling Attributes for details specifically about the named attribute system used for specifying options.

The alternative code-paths currently support:

and do not support: When alternative code-paths have been enabled for a mesh you can call any of the supported collision queries with or without specific collision preprocess being for the test shape.
If specific preprocess is present then this will be used, otherwise the calls with fall back on the alternative code-paths.

Note that these alternative code-paths do in fact still require some preprocess, the difference being that there is no requirement for preprocess per agent shape.
The required preprocess is generated once when loading the mesh.

The alternative code-paths are necessarily slower than the code-paths based on more specific queries.

Differences in collision behaviour between code paths

It is important to note that the current implementation of the alternative collision code paths will provide different results in certain situations.
Whether or not this matters will depend on the obstruction geometry against which the queries are called and also the way in which the queries are used by the client application.

The differences relate specifically to base obstacles or context obstacles. Collision against mesh edges will behave in exactly the same way for both code-paths.
The differences then relative specifically to the way in which the influence of a base obstacles is considered to extend through a mesh and against overlapping geometry.

The standard code-paths for collision are based on line and point collision against the expanded boundaries of obstacles and mesh edges.
In this case the expanded boundary of an obstacle is applied through any faces reachable through the mesh within that expanded boundary.
(Refer to The PathEngine Movement Model for a more detailed description of this movement model.)


Point collision implemented in terms of obstacle centre against an expanded boundary returns true

The alternative code-paths test directly for obstacle (or swept obstacles) overlapping other obstacles.


Point collision implemented in terms of an obstacle against obstacle overlap check returns false


Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEnginenext: Pathfinding Queries