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



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


cPosition positionInSectionInShape(int32_t sectionID, int32_t shapeOriginX, int32_t shapeOriginY, int32_t const * shapeCoordinates_Buffer, uint32_t shapeCoordinates_BufferEntries) 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.
shapeCoordinates_Buffer, shapeCoordinates_BufferEntries (See Passing Arrays.) A sequence of x and y coordinate value pairs for the shape.

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).


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.

C# Mapping

PathEngine.Position positionInSectionInShape(int sectionID, int shapeOriginX, int shapeOriginY, int[] shapeCoordinates);

Java Mapping

Position positionInSectionInShape(int sectionID, int shapeOriginX, int shapeOriginY, int[] shapeCoordinates);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iMesh::positionInSectionNear3DPoint()