org.opensourcephysics.cabrillo.tracker
Class OffsetOriginStep

java.lang.Object
  extended by org.opensourcephysics.cabrillo.tracker.Step
      extended by org.opensourcephysics.cabrillo.tracker.OffsetOriginStep
All Implemented Interfaces:
java.lang.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

Nested Class Summary
 class OffsetOriginStep.Position
          A class to represent the position of the offset origin.
 
Field Summary
protected  double worldX
           
protected  double worldY
           
 
Fields inherited from class org.opensourcephysics.cabrillo.tracker.Step
dataVisible, defaultIndex, footprint, format, frc, hitRect, marks, n, points, screenPoints, selectionShape, track, transform, valid
 
Constructor Summary
OffsetOriginStep(OffsetOrigin track, int n, double x, double y)
          Constructs a OffsetOriginStep with specified image coordinates.
 
Method Summary
 java.lang.Object clone()
          Clones this Step.
protected  Mark getMark(TrackerPanel trackerPanel)
          Overrides Step getMark method.
 OffsetOriginStep.Position getPosition()
          Gets the position.
 void setWorldXY(double x, double y)
          Sets the world coordinates.
 java.lang.String toString()
          Returns a String describing this step.
 
Methods inherited from class org.opensourcephysics.cabrillo.tracker.Step
draw, erase, erase, findInteractive, getBounds, getDefaultPoint, getFrameNumber, getLength, getPointIndex, getPoints, getTrack, remark, remark, repaint, repaint, setDefaultPointIndex, setFootprint, setHitRectCenter
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

worldX

protected double worldX

worldY

protected double worldY
Constructor Detail

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 Detail

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 java.lang.Object clone()
Clones this Step.

Overrides:
clone in class Step
Returns:
a clone of this step

toString

public java.lang.String toString()
Returns a String describing this step.

Overrides:
toString in class Step
Returns:
a descriptive string