Contents, API Reference, Interfaces, iMesh, getCellForEndOfLine
Traverses along the surface of a ground mesh to disambiguate overlapping geometry at a target point.
int32_t getCellForEndOfLine(const cPosition& start, int32_t endX, int32_t endY) const;
A position for the start of traversal.|
This must be a valid position on this mesh.
The x coordinate of the target.
The y coordinate of the target.
The internal 'cell' index for the position reached by traversing from the start position to the target
coordinates in a straight line along the surface of this mesh.
If the traversal exits the mesh then -1 is returned.
This method enables you to implement 2d movement along the surface of a mesh whilst disambiguating between layers
of overlapping geometry.
The return value of this method can be used to build a cPosition at the target coordinates.
int getCellForEndOfLine(PathEngine.Position start, int endX, int endY);
int getCellForEndOfLine(Position start, int endX, int endY);