Properties

Link copied to clipboard
abstract val dimensions: Int
Link copied to clipboard
abstract val globalReactions: ListSet<GlobalReaction<T>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val isTerminated: Boolean
Link copied to clipboard
abstract val layers: ListSet<Layer<T, Euclidean2DPosition>>
Link copied to clipboard
Link copied to clipboard
abstract val nodeCount: Int
Link copied to clipboard
abstract val nodes: ListSet<Node<T>>
Link copied to clipboard
abstract val obstacles: List<W>
Link copied to clipboard
abstract val offset: DoubleArray
Link copied to clipboard
Link copied to clipboard

A factory of shapes compatible with this environment.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val size: DoubleArray
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun addGlobalReaction(reaction: GlobalReaction<T>)
Link copied to clipboard
abstract fun addLayer(molecule: Molecule, layer: Layer<T, Euclidean2DPosition>)
Link copied to clipboard
abstract fun addNode(node: Node<T>, position: Euclidean2DPosition): Boolean
Link copied to clipboard
abstract fun addObstacle(obstacle: W)
Link copied to clipboard
Link copied to clipboard
abstract fun farthestPositionReachable(node: Node<T>, desiredPosition: Euclidean2DPosition, hitboxRadius: Double = getShape(node).radius): Euclidean2DPosition

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.

Link copied to clipboard
abstract fun getDistanceBetweenNodes(n1: Node<T>, n2: Node<T>): Double
Link copied to clipboard
abstract fun getHeading(node: Node<T>): Euclidean2DPosition

Gets the heading of a node as a direction vector.

Link copied to clipboard
abstract fun getLayer(molecule: Molecule): Layer<T, Euclidean2DPosition>?
Link copied to clipboard
abstract fun getNeighborhood(node: Node<T>): Neighborhood<T>
Link copied to clipboard
abstract fun getNodeByID(id: Int): Node<T>
Link copied to clipboard

Gets all nodes whose shape.intersect is true for the given shape.

Link copied to clipboard
abstract fun getNodesWithinRange(node: Node<T>, range: Double): ListSet<Node<T>>
abstract fun getNodesWithinRange(position: Euclidean2DPosition, range: Double): ListSet<Node<T>>
Link copied to clipboard
abstract fun getObstaclesInRange(center: Euclidean2DPosition, range: Double): List<W>
abstract fun getObstaclesInRange(centerx: Double, centery: Double, range: Double): List<W>
Link copied to clipboard
abstract fun getPosition(node: Node<T>): Euclidean2DPosition
Link copied to clipboard

Gets the shape of a node relatively to its position and heading in the environment.

Link copied to clipboard
abstract fun hasMobileObstacles(): Boolean
Link copied to clipboard
Link copied to clipboard
abstract operator fun iterator(): Iterator<Node<T>>
Link copied to clipboard
Link copied to clipboard
open fun moveNode(node: Node<T>, direction: Euclidean2DPosition)
Link copied to clipboard
abstract fun moveNodeToPosition(node: Node<T>, position: Euclidean2DPosition)
Link copied to clipboard
Link copied to clipboard
abstract fun removeGlobalReaction(reaction: GlobalReaction<T>)
Link copied to clipboard
abstract fun removeNode(node: Node<T>)
Link copied to clipboard
abstract fun removeObstacle(obstacle: W): Boolean
Link copied to clipboard
abstract fun setHeading(node: Node<T>, direction: Euclidean2DPosition)

Sets the heading of a node.