Spin

class Spin<T>(node: Node<T>, reaction: Reaction<T>, environment: Physics2DEnvironment<T>, angularSpeedDegrees: Double) : AbstractAction<T>

Spins a node around itself at angularSpeedDegrees normalized according to the speed of the reaction.

Constructors

Link copied to clipboard
constructor(node: Node<T>, reaction: Reaction<T>, environment: Physics2DEnvironment<T>, angularSpeedDegrees: Double)

Properties

Link copied to clipboard
open override val context: Context
Link copied to clipboard
override val outboundDependencies: @EnhancedNullability org/danilopianini/util/ListSet<out it/unibo/alchemist/model/Dependency!>

Functions

Link copied to clipboard
open override fun cloneAction(node: Node<T>, reaction: Reaction<T>): Spin<T>

This method allows to clone this action on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.

Link copied to clipboard
open override fun execute()

Spins the node around itself.

Link copied to clipboard
open override fun getContext(): Context