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;
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.
The x coordinate of the shape origin.
The y coordinate of the shape origin.
(See Passing Arrays.)
A sequence of x and y coordinate value pairs for the shape.
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.
PathEngine.Position positionInSectionInShape(int sectionID, int shapeOriginX, int shapeOriginY, int shapeCoordinates);
Position positionInSectionInShape(int sectionID, int shapeOriginX, int shapeOriginY, int shapeCoordinates);