Image Environment
This environment loads an image from the file system, and marks as obstacles all the pixels of a given color.
Parameters
concentration type
Constructors
Properties
A factory of shapes compatible with this environment.
Functions
Computes the farthest position reachable by a node towards a desiredPosition, avoiding node overlapping. If no node is located in between, desiredPosition is returned. Otherwise, the first position where the node collides with someone else is returned. For collision purposes, hitboxes are used: each node is given a circular hitbox of radius equal to its shape's radius (shapeless nodes can't cause overlapping). The client can specify a different radius for the hitbox of the moving node.
Computes the farthest position reachable by a node towards a desiredPosition, avoiding node overlapping. If no node is located in between, desiredPosition is returned. Otherwise, the first position where the node collides with someone else is returned. For collision purposes, hitboxes are used: each node is given a circular hitbox of radius equal to its shape's radius (shapeless nodes can't cause overlapping). The client can specify a different radius for the hitbox of the moving node.
Gets the heading of a node as a direction vector.
Gets all nodes whose shape.intersect is true for the given shape.
A factory of shapes compatible with this environment.
Creates an euclidean position from the given coordinates.
Moves the node to the farthestPositionReachable towards the desired newPosition. If the node is shapeless, it is simply moved to newPosition.
Returns a random element of the Iterable using the provided randomGenerator.
Sets the heading of a node.
Returns the EnvironmentSubscriptionMonitor of this Environment.
Converts an Environment to a EnvironmentSurrogate.