InfiniteHalls

Parameters

<T>

concentration type

Constructors

Link copied to clipboard
constructor(incarnation: Incarnation<T, Euclidean2DPosition>)
Default builder.
constructor(incarnation: Incarnation<T, Euclidean2DPosition>, size: Double)
constructor(incarnation: Incarnation<T, Euclidean2DPosition>, allOpen: Boolean)
constructor(incarnation: Incarnation<T, Euclidean2DPosition>, size: Double, allOpen: Boolean)

Properties

Link copied to clipboard
val cf: Double
Link copied to clipboard
val ci: Double
Link copied to clipboard
val ex: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val nodes: ListSet<Node<T>>
Link copied to clipboard
val sf: Double
Link copied to clipboard

A factory of shapes compatible with this environment.

Link copied to clipboard
val si: Double
Link copied to clipboard
open var simulation: Simulation<T, P>

Functions

Link copied to clipboard
open fun addGlobalReaction(reaction: GlobalReaction<T>)
Link copied to clipboard
fun addLayer(m: Molecule, l: Layer<T, P>)
Link copied to clipboard
fun addNode(node: Node<T>, p: P): Boolean
Link copied to clipboard
fun addTerminator(terminator: Predicate<Environment<T, P>>)
Link copied to clipboard
open fun allowed(xp: Double, yp: Double): Boolean
Checks whether a position is allowed or not.
Link copied to clipboard
abstract fun farthestPositionReachable(node: Node<T>, desiredPosition: P, hitboxRadius: Double): P

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.

open fun farthestPositionReachable(node: Node<T>, desiredPosition: Euclidean2DPosition, hitboxRadius: Double): 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
fun forEach(action: Consumer<in Node<T>>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getHallSize(): Double
Link copied to clipboard
abstract fun getHeading(node: Node<T>): P

Gets the heading of a node as a direction vector.

Link copied to clipboard
Link copied to clipboard
fun getLayers(): ListSet<Layer<T, P>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getNodeByID(id: Int): Node<T>
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
fun getNodesWithinRange(center: Node<T>, range: Double): ListSet<Node<T>>
Link copied to clipboard
Link copied to clipboard
open fun getOrigin(): P
Link copied to clipboard
fun getPosition(node: Node<T>): P
Link copied to clipboard
abstract fun getShape(node: Node<T>): Shape<P, A>

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

Link copied to clipboard
abstract fun getShapeFactory(): F

A factory of shapes compatible with this environment.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isDoorsOpen(): Boolean
Link copied to clipboard
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
abstract fun makePosition(p: Array<Number>): P

open fun makePosition(coordinates: Array<Number>): Euclidean2DPosition

Creates an euclidean position from the given coordinates.

Link copied to clipboard
open fun moveNode(node: Node<T>, direction: P)
Link copied to clipboard
open fun moveNodeToPosition(node: Node<T>, newpos: P)

open fun moveNodeToPosition(node: Node<T>, newPosition: Euclidean2DPosition)

Moves the node to the farthestPositionReachable towards the desired newPosition. If the node is shapeless, it is simply moved to newPosition.

open fun moveNodeToPosition(@Nonnull node: Node<T>, newPos: Euclidean2DPosition)
Moves the node to the farthestPositionReachable towards the desired newPosition.
Link copied to clipboard
Link copied to clipboard
fun removeNode(node: Node<T>)
Link copied to clipboard
open fun setDoorsOpen(isOpen: Boolean)
Link copied to clipboard
open fun setHeading(node: Node<T>, direction: Euclidean2DPosition)

Sets the heading of a node.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun toString(): String