PathEngine home previous: iMesh::positionInSectionFor3DPointF()next: iMesh::positionInSectionNear3DPoint()
Contents, API Reference, Interfaces, iMesh, positionInSectionInShape

iMesh::positionInSectionInShape()

Description

Attempts to find a cPosition that is both within the specified section and also inside the supplied polygon.

Syntax

cPosition positionInSectionInShape(tSigned32 sectionID, tSigned32 shapeOriginX, tSigned32 shapeOriginY, tSigned32 numberOfPoints, const tSigned32* coordinateData) const;

Parameters

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.
numberOfPointsThe number of vertices in the shape.
coordinateDataPoints to an array of tSigned32, of size numberOfPoints * 2. This array is copied, and can therefore be safely deleted after the call returns.

Return Value

A cPosition inside the specified section and the specified shape, if such a position can be found.
If a suitable position cannot be found then an explicitly invalid position is returned (i.e. a cPosition with cell set to -1).

Remarks

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 PathEnginenext: iMesh::positionInSectionNear3DPoint()