Class TrackableCircle

java.lang.Object
org.opensourcephysics.display.Circle
org.opensourcephysics.media.core.TrackableCircle
All Implemented Interfaces:
Drawable, Trackable

public class TrackableCircle extends Circle implements Trackable
This is a circle that implements the Trackable interface and is associated with a single video frame. The draw method illustrates the process of transforming imagespace to worldspace coordinates.
Version:
1.0
Author:
Douglas Brown
  • Field Details

    • n

      protected int n
  • Constructor Details

    • TrackableCircle

      public TrackableCircle(int n, double imageX, double imageY)
      Constructs a TrackableCircle.
      Parameters:
      n - the video frame number
      imageX - the x position in imagespace
      imageY - the y position in imagespace
  • Method Details

    • getFrameNumber

      public int getFrameNumber()
      Gets the frame number.
      Returns:
      the frame number
    • draw

      public void draw(DrawingPanel panel, Graphics g)
      Overrides the Circle draw method.
      Specified by:
      draw in interface Drawable
      Overrides:
      draw in class Circle
      Parameters:
      panel - the drawing panel requesting the drawing
      g - the graphics context on which to draw