| PathEngine home | previous: | next: |
Attempts to find a cPosition that is both within the specified section and also inside the supplied polygon.
cPosition positionInSectionInShape(tSigned32 sectionID, tSigned32 shapeOriginX, tSigned32 shapeOriginY, tSigned32 numberOfPoints, const tSigned32* coordinateData) const; |
| sectionID |
Looks for a position in the set of faces with this value for sectionID attribute. A value of -1 may be passed into this parameter to indicate the entire mesh. | ||
| shapeOriginX | The x coordinate of the shape origin. | ||
| shapeOriginY | The y coordinate of the shape origin. | ||
| numberOfPoints | The number of vertices in the shape. | ||
| coordinateData | Points to an array of tSigned32, of size numberOfPoints * 2. This array is copied, and can therefore be safely deleted after the call returns. |
A
If a suitable position cannot be found then an explicitly invalid position is returned (i.e. a cPosition with cell set to -1).
This method is provided to help with obstacle placement in the case where the obstacle centre is outside the valid ground of a mesh.
If a position exists that satisfies both the section and shape constraints
then this method will usually succeed, but this is not guaranteed.
Certain pathological situations, such as sliver polygons being passed in for the shape
argument, may result in the method failing to find a valid position.
| Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEngine | next: |