|PathEngine home||previous: ||next: |
Extended position resolution method that can return multiple positions when more than one piece of ground mesh is local to the query point, and also supports filtering by sectionID if this is desired.
void resolvePositionsNear3DPoint(int32_t sectionID, int32_t x, int32_t y, int32_t z, const cHorizontalRange& horizontalQueryRegion, int32_t minimumZ, int32_t maximumZ, iArrayReceiver<cPosition>& positions) const;
The section to which the resulting position should be restricted.|
A value of -1 may be passed in to indicate the entire mesh.
|x||X coordinate of the 3D query point.|
|y||Y coordinate of the 3D query point.|
|z||Z coordinate (height) of the 3D query point.|
|horizontalQueryRegion||Minimum and maximum bounds for the query, in X and Y. (Values must be inside the PathEngine horizontal coordinate range limit, and this range must contain the point specified by the horizontal components of point.)|
|minimumZ||Minimum bound for the query, in the vertical axis.|
|maximumZ||Maximum bound for the query, in the vertical axis.|
The x and y coordinates must be within the PathEngine horizontal coordinate range limit.
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.
Note that, 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 then 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.
In most situations where there are not extreme changes in ground slope, however, this method should generally do a good job of resolving suitable ground positions, without the complexity and overhead that would be required for an exact 3D closest point determination query.
This query version will return multiple positions in situations where there is more than one piece of ground mesh local to the query point.
void resolvePositionsNear3DPoint(int sectionID, int x, int y, int z, PathEngine.HorizontalRange horizontalQueryRegion, int minimumZ, int maximumZ, out PathEngine.Position positions);
void resolvePositionsNear3DPoint(int sectionID, int x, int y, int z, HorizontalRange horizontalQueryRegion, int minimumZ, int maximumZ, Object_OutArgument positions);
|Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEngine||next: |