PathEngine home previous: Working with the TestBednext: Preprocess Generation
Contents, Programmers Guide, Applying the SDK, Shape Validation

Shape Validation

The array of coordinates used to create an Interface iShape object is subject to certain constraints.

General constraints

Vertices supplied are local, i.e. relative to the shape origin.
The shape must be convex, contain the shape origin, and be ordered in sequence clockwise around this origin (as seen from above).

There must be at least 3 points.
Each point must be on the right of the line formed by the previous 2 points.
(So a shape with three points in line is not legal.)

For SDK releases after 5.36 there is also a maximum sides constraint, and the number of points for a shape must then be less than 100. (This is a sanity check, as opposed to a technical constraint.)

Range constraint for iShape instances

All vertex coordinates supplied for iShape instances must be in the range -8191 to 8191 inclusive.

Placing obstacles without range constraints

Obstacles placed with iMesh::placeLargeStaticObstacle() or iMesh::placeLargeStatic2DObstacle() are not subject to the range constraints on iShape instances.

In this case, vertices are supplied in world coordinates, and are subject instead to the general world coordinate range constraint, i.e. values must be -1500000 to 1500000 inclusive.

The shape vertices supplied when placing large static obstacles are also subject to the general constraints above, i.e. there must be more than 3 vertices, these must describe a convex shape, and the shape must still contain the root position that is supplied when placing the shape.

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: Preprocess Generation