| PathEngine home | previous: | next: |
Enables you to resolve a position in 3d space to a nearby position on the surface of this ground mesh.
cPosition positionNear3DPoint(const tSigned32* point, tSigned32 horizontalRange, tSigned32 verticalRange) const; |
| point |
This parameter must point to an array of three elements. These are interpreted as x,y,z, where z is height. | ||
| horizontalRange | Looks for a position with x and y components within plus or minus horizontalRange of the target point x and y. | ||
| verticalRange | Looks for a position with ground height within plus or minus verticalRange of the target point z. |
The method uses a 'generate and test' approach to resolving the queried position,
base on positions generated directly above and below the queried position,
and just inside the ground mesh boundaries.
The closest position to the supplied query point is then returned.
In most situations where there is geometry close to the query point, this method should do a good job of resolving a suitable ground position, and is therefore a good choice for things like resolving positions corresponding to mouse clicks, and so forth.
In certain situations where ground immediately below the
queried point is outside the vertical range and then
dips or rises back into the query volume within the horizontal range,
the method may not find the geometrically closest point within that query volume
and (in certain pathological conditions) may even fail to resolve a point even though a potential candidate does exist.
('Query volume', here refers to the volume
obtained by adding horizontal and vertical ranges to the queried position.)
See
| Documentation for PathEngine release 5.29 - Copyright © 2002-2012 PathEngine | next: |