Module rgg

Class MAdd

All Implemented Interfaces:
Transformation, Manageable, PersistenceCapable, Shareable, UserFields, XObject, TurtleModifier, Map, Serializable

public class MAdd extends Move
The turtle command MAdd(x) represents a movement along the local z-direction. The length of the movement is the length of the current TurtleState incremented by the specified argument.
This corresponds to the turtle command f+(x) of the GROGRA software.
Author:
Ole Kniemeyer
See Also:
  • Field Details

  • Constructor Details

    • MAdd

      public MAdd()
    • MAdd

      public MAdd(float argument)
  • Method Details

    • getNTypeImpl

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class ShadedNull
      Returns:
      type describing the managed fields of the class of this node
    • newInstance

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class ShadedNull
      Returns:
      new instance of class of this node
    • getLength

      public float getLength(Object node, GraphState gs)
      Specified by:
      getLength in class TurtleStep
    • execute

      public void execute(Object node, TurtleState state, GraphState gs)