Contents, API Reference, Interfaces, iMesh, positionInSectionNear3DPoint
iMesh::positionInSectionNear3DPoint()
Description
Variation on iMesh::positionNear3DPoint() enabling the resulting position to be
restricted to a specified section.
Syntax
cPosition positionInSectionNear3DPoint(int32_t sectionID, int32_t x, int32_t y, int32_t z, int32_t horizontalRange, int32_t verticalRange) 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.
|
| 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.
|
| 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.
|
Requirements
The range resulting from adding and subtracting horizontalRange
to the horizontal components of point
must not overflow the supported range for world coordinates.
(See PathEngine Coordinates.)
Return Value
A cPosition representing a point on the mesh and
in the specified section within (approximately) the specified range.
If there is no such position then an explicitly invalid position is returned (i.e. a cPosition with cell set to -1).
Remarks
This method works in a similar way to iMesh::positionNear3DPoint(),
so refer to the remarks for that method for details about
the actual approach used for resolving a ground point,
and limitations resulting from this approach.
See Converting to and from PathEngine's Position Representation
for an overview of all the position conversion methods.
C# Mapping
PathEngine.Position positionInSectionNear3DPoint(int sectionID, int x, int y, int z, int horizontalRange, int verticalRange); |
Java Mapping
Position positionInSectionNear3DPoint(int sectionID, int x, int y, int z, int horizontalRange, int verticalRange);
|