Module rgg

Class P

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

public class P extends Assignment
The turtle command P(x) sets TurtleState.color to the specified argument x. Then the value of color is copied to its local counterpart TurtleState.localColor.
This corresponds to the turtle command P(x) of the GROGRA software.
There exists an extended command P(s) where s is a Shader. This sets the field shader, which is in turn used to set TurtleState.shader and TurtleState.localShader.
Author:
Ole Kniemeyer
See Also:
  • Field Details

  • Constructor Details

    • P

      public P(Shader shader)
    • P

      public P(Shader front, Shader back)
    • P

      public P(int argument)
    • P

      public P()
    • P

      public P(float argument)
  • Method Details

    • setShaders

      public void setShaders(Shader front, Shader back)
    • 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 Node
      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 Node
      Returns:
      new instance of class of this node
    • getShader

      public Shader getShader()
    • setShader

      public void setShader(Shader value)
    • execute

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