AvoidPath (Kernel)¶
-
AvoidPath
(x y polygon)¶ Important
SCI1.1 only.
Determines if a point is inside the given polygon.
Parameters: - x (number) – The x coordinate of the point.
- y (number) – The y coordinate of the point.
- polygon (heapPtr) – An instance of
Polygon
.
Returns: TRUE if the point is inside the polygon, otherwise FALSE.
-
AvoidPath
(xStart yStart xEnd yEnd polygons polyCount [options]) Calculates a path between two points given the polygon obstacles. Returns a memory address pointing to an array of points. The memory address returned must be freed with Memory(memFREE).
The returned array consists of (x, y) pairs of points, followed by a sentinel ending point ($7777, $7777).
Parameters: - xStart (number) – The x coordinate of the starting point.
- yStart (number) – The y coordinate of the starting point.
- xEnd (number) – The x coordinate of the destination.
- yEnd (number) – The y coordinate of the destination.
- polygons (k_list) – A list of polygons.
- polyCount (number) – The number of polygons in the list.
- options (number) – Optimization levels. Optimization level 0 is for keyboard support, and changes some of the polygons.
Returns: A list of points comprising the path, or NULL on failure. The points should be freed by Memory(memFREE).