PathEngine home previous: iMesh::positionInSection()next: iMesh::positionInSectionFor3DPointF()
Contents, API Reference, Interfaces, iMesh, positionInSectionFor3DPoint

iMesh::positionInSectionFor3DPoint()

Description

Variation on iMesh::positionFor3DPoint() enabling the resulting position to be restricted to a specified section.

Syntax

cPosition positionInSectionFor3DPoint(tSigned32 sectionID, const tSigned32* point) const;

Parameters

sectionID The section to which the resulting position should be restricted.
A value of -1 may be passed in to indicate the entire mesh.
point This parameter must point to an array of three elements.
These are interpreted as x,y,z, where z is height.

Return Value

A cPosition representing a point on the mesh directly underneath the specified 3D point, and in the specified section.
If there is no such position then an explicitly invalid position is returned (i.e. a cPosition with cell set to -1).

Remarks

If there is no mesh face directly underneath the specified point then an invalid position is returned. (cell=-1)
If there is more than one layer of overlapping geometry directly under the point then a position on the highest layer is returned.
Layers above the point are ignored.

To obtain a position for an object that might be lying flush against the mesh it is advisable to add a small amount to the height of the 3d point passed in to these functions, to ensure the 3D point is actually above the desired ground.

See Converting to and from PathEngine's Position Representation for an overview of all the position conversion methods.


Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEnginenext: iMesh::positionInSectionFor3DPointF()