Class CellMove
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,java.io.Serializable
public final class CellMove extends AbstractMoveNode<T, P>
An action moving cells (Nodes with a CellProperty) in the environment.
-
-
Constructor Summary
Constructors Constructor Description CellMove(Environment<Double, Euclidean2DPosition> environment, Node<Double> node, boolean inPercent, double delta)
Initialize an Action that move the cell of a given space delta, which can be expressed in percent of the cell's diameter or in absolute.
-
Method Summary
Modifier and Type Method Description CellMove
cloneAction(Node<Double> node, Reaction<Double> reaction)
Euclidean2DPosition
getNextPosition()
void
execute()
-
Methods inherited from class it.unibo.alchemist.model.actions.AbstractMoveNode
getContext
-
Methods inherited from class it.unibo.alchemist.model.actions.AbstractAction
getOutboundDependencies, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CellMove
CellMove(Environment<Double, Euclidean2DPosition> environment, Node<Double> node, boolean inPercent, double delta)
Initialize an Action that move the cell of a given space delta, which can be expressed in percent of the cell's diameter or in absolute.- Parameters:
environment
- the Environmentnode
- the Node in which the it.unibo.alchemist.model.Action is contained.inPercent
- a boolean parameter which set the way of expressing delta: if is true the cell movement will be (delta * cellDiameter), otherwise will be simply delta.delta
- the distance at which the cell will be moved.
-
-
Method Detail
-
getNextPosition
Euclidean2DPosition getNextPosition()
-
execute
void execute()
-
-
-
-