ImageEnvironmentWithGraph
An ImageEnvironment providing an Euclidean2DNavigationGraph. The NaviGator algorithm is used to produce such graph (see generateNavigationGraph). The positions where to plant initial seeds should be specified directly in the image, marking each area of the environment with one or more pixels of a given color (defaults to blue).
Constructors
Functions
node.canFit must be true for the returned position.
Gets the heading of a node as a direction vector.
Gets all nodes whose shape.intersect is true for the given shape.
Given a point and a range, retrieves all the obstacles within.
Gets the shape of a node relatively to its position and heading in the environment.
Creates an euclidean position from the given coordinates.
Creates a new Euclidean2DPosition.
Moves the node to the farthestPositionReachable towards the desired newPosition. If the node is shapeless, it is simply moved to newPosition.
This method must calculate the ABSOLUTE next allowed position given the current position and the position in which the node wants to move. For example, if your node is in position [2,3], wants to move to [3,4] but the next allowed position (because, e.g., of physical obstacles) is [2.5,3.5], the result must be a Position containing coordinates [2.5,3.5].
Sets the heading of a node.