org.opensourcephysics.media.core
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 Summary |
protected int |
n
|
Constructor Summary |
TrackableCircle(int n,
double imageX,
double imageY)
Constructs a TrackableCircle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
n
protected int n
TrackableCircle
public TrackableCircle(int n,
double imageX,
double imageY)
- Constructs a TrackableCircle.
- Parameters:
n
- the video frame numberimageX
- the x position in imagespaceimageY
- the y position in imagespace
getFrameNumber
public int getFrameNumber()
- Gets the frame number.
- Returns:
- the frame number
draw
public void draw(DrawingPanel panel,
java.awt.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 drawingg
- the graphics context on which to draw