Class Rotate2D

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class Rotate2D
    extends GRTransform2D
    Rotate a two-dimensional figure based on the angle, and anchor point provided by the user. The angle, step, and anchor points can either be preset in the parameter edit window, or updated dynamically through the actor's ports. The angle can be specified in radians or degrees by selecting the angle type in the parameter edit window. Angles increase clockwise beginning at the positive X-axis in a Cartesian plane. If the accumulate parameter defined in the base class is set to true, any changes to the angle of rotation will be relative to the figure's current orientation. Otherwise, the angle specified will be relative to the positive X-axis.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Ismael M. Sarmiento, Steve Neuendorffer
    Pt.AcceptedRating:
    Yellow (chf)
    Pt.ProposedRating:
    Green (ismael)
    • Field Detail

      • theta

        public TypedIOPort theta
        The angle the figure is to be rotated by, measured clockwise from the positive X-axis on a Cartesian plane. The default double value is 0.0.
      • anchorX

        public TypedIOPort anchorX
        The X coordinate of the point the figure is to be rotated about. The default double value is 0.0.
      • anchorY

        public TypedIOPort anchorY
        The Y coordinate of the point the figure is to be rotated about. The default double value is 0.0.
      • initialTheta

        public Parameter initialTheta
        The initial angle of rotation. The default double value is 0.0.
      • initialAnchorX

        public Parameter initialAnchorX
        The initial x-coordinate of the anchor point. The default double value is 0.0.
      • initialAnchorY

        public Parameter initialAnchorY
        The initial y-coordinate of the anchor point. The default double value is 0.0.
      • angleType

        public StringAttribute angleType
        How the angle is specified. Can be degrees or radians (default).