org.opensourcephysics.sip.ch02
Class BouncingBall

java.lang.Object
  extended by org.opensourcephysics.display.Circle
      extended by org.opensourcephysics.sip.ch02.BouncingBall
All Implemented Interfaces:
Drawable

public class BouncingBall
extends Circle

BouncingBall models a falling ball as it bounces off of a floor or a wall.


Field Summary
 
Fields inherited from class org.opensourcephysics.display.Circle
color, pixRadius
 
Constructor Summary
BouncingBall(double x, double vx, double y, double vy)
          Constructs a BouncingBall with the given initial conditions.
 
Method Summary
 void step(double dt)
          Steps (advances) the time.
 
Methods inherited from class org.opensourcephysics.display.Circle
draw, getLoader, getX, getY, setX, setXY, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BouncingBall

public BouncingBall(double x,
                    double vx,
                    double y,
                    double vy)
Constructs a BouncingBall with the given initial conditions.

Parameters:
x - double
vx - double
y - double
vy - double
Method Detail

step

public void step(double dt)
Steps (advances) the time.

Parameters:
dt - double