SmartFrog 3.10.000

org.smartfrog.examples.pong
Class Ball

java.lang.Object
  extended by org.smartfrog.examples.pong.Mass
      extended by org.smartfrog.examples.pong.Obstacle
          extended by org.smartfrog.examples.pong.Ball

public class Ball
extends Obstacle

Defines the utility methods for Ball object.


Field Summary
 
Fields inherited from class org.smartfrog.examples.pong.Obstacle
size
 
Constructor Summary
Ball(int mass, java.awt.geom.Point2D initialPosition, java.awt.Dimension initialSize)
          Constructor.
 
Method Summary
 void draw(java.awt.Graphics2D g2d)
          Draws the Ball object.
 
Methods inherited from class org.smartfrog.examples.pong.Obstacle
collide, collide, elasticCollision, getDimension, getLowerRightBound, getUpperLeftBound, setDimension, setDimension
 
Methods inherited from class org.smartfrog.examples.pong.Mass
getAccel, getMass, getPosition, getSpeed, setAccel, setMass, setPosition, setPosition, setSpeed, setSpeed, toString, updatePosition, updateSpeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ball

public Ball(int mass,
            java.awt.geom.Point2D initialPosition,
            java.awt.Dimension initialSize)
Constructor.

Parameters:
mass - the mass of the ball
initialPosition - the initial position of the ball
initialSize - the dimension size
Method Detail

draw

public void draw(java.awt.Graphics2D g2d)
Draws the Ball object.

Overrides:
draw in class Obstacle
Parameters:
g2d - the graphics object

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP