MoveForwardAndTeleport

class MoveForwardAndTeleport<T, P : Position2D<P>>(environment: Environment<T, P>, reaction: NodeReaction<T>, val deltaX: Double, val minX: Double, val maxX: Double) : AbstractMoveNode<T, P> (source)

Moves the node along the x axis up to maxX, with steps of size deltaX; once beyond maxX, the node is teleported back to minX. It mimics the movement of a node in a cylindrical environment.

Type Parameters

T

concentration type

P

position type

Constructors

Link copied to clipboard
constructor(environment: Environment<T, P>, reaction: NodeReaction<T>, deltaX: Double, minX: Double, maxX: Double)

Properties

Link copied to clipboard

the step along the x axis

Link copied to clipboard

the environment where the node moves

Link copied to clipboard

the x coordinate beyond which the node is teleported

Link copied to clipboard

the teleport destination along the x axis

Link copied to clipboard
override val reaction: NodeReaction<T>

The NodeReaction owning this action, hosted by targetNode.

Link copied to clipboard

Functions

Link copied to clipboard
override fun cloneAction(newReaction: Reaction<T>): Action<T>
Link copied to clipboard
open override fun execute()

Moves the node according to getNextPosition, in absolute or relative coordinates depending on isAbsolute.

Link copied to clipboard
open override fun getNextPosition(): P

The next position to reach, in absolute or relative coordinates depending on isAbsolute.

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