Class OffsetOriginStep

java.lang.Object
org.opensourcephysics.cabrillo.tracker.Step
org.opensourcephysics.cabrillo.tracker.OffsetOriginStep
All Implemented Interfaces:
Cloneable

public class OffsetOriginStep extends Step
This is a Step for a OffsetOrigin. It is used for setting the origin of an ImageCoordSystem.
Author:
Douglas Brown
  • Field Details

    • worldX

      protected double worldX
    • worldY

      protected double worldY
  • Constructor Details

    • OffsetOriginStep

      public OffsetOriginStep(OffsetOrigin track, int n, double x, double y)
      Constructs a OffsetOriginStep with specified image coordinates.
      Parameters:
      track - the offset origin
      n - the frame number
      x - the image x coordinate
      y - the image y coordinate
  • Method Details

    • getPosition

      public OffsetOriginStep.Position getPosition()
      Gets the position.
      Returns:
      the position
    • setWorldXY

      public void setWorldXY(double x, double y)
      Sets the world coordinates. This moves the origin so the image location does not change.
      Parameters:
      x - the world x coordinate
      y - the world y coordinate
    • getMark

      protected Mark getMark(TrackerPanel trackerPanel)
      Overrides Step getMark method.
      Overrides:
      getMark in class Step
      Parameters:
      trackerPanel - the tracker panel
      Returns:
      the mark
    • clone

      public Object clone()
      Clones this Step.
      Overrides:
      clone in class Step
      Returns:
      a clone of this step
    • toString

      public String toString()
      Returns a String describing this step.
      Overrides:
      toString in class Step
      Returns:
      a descriptive string