fishbowl
Interface MovingBody

All Superinterfaces:
CenterLocatable, Colorable, ColorableGraphic, Graphic, Locatable, Rotatable, Sizeable
All Known Implementing Classes:
MovingBodyAdapter

public interface MovingBody
extends ColorableGraphic

Normal users can ignore this interface. Methods needed for body that can be animated and moved. Motion accomplished either through updates of velocity or by use of Vectors.

Version:
2.0 (February 17, 2006)
Author:
Phil Ventura with updates by Adrienne Decker

Method Summary
 Vector getVector()
          This method is to be used to obtain a Vector from a MovingBody.
 void setVector(Vector newVector)
          This method is to be used to pass a Vector to a MovingBody.
 void update()
          Called frequently to update the body's position on the screen.
 
Methods inherited from interface cse115.graphics.Colorable
getColor, setColor
 
Methods inherited from interface cse115.graphics.Graphic
actualPaint, addMouseListener, addMouseMotionListener, contains, getBounds, getMouseListeners, getMouseMotionListeners, getShape, intersects, paint, setContainer
 
Methods inherited from interface cse115.graphics.Sizeable
getDimension, setDimension
 
Methods inherited from interface cse115.graphics.CenterLocatable
getCenterLocation, setCenterLocation
 
Methods inherited from interface cse115.graphics.Locatable
getLocation, move, setLocation
 
Methods inherited from interface cse115.graphics.Rotatable
getRotation, rotate, setRotation
 

Method Detail

setVector

void setVector(Vector newVector)
This method is to be used to pass a Vector to a MovingBody. The Vector controls the motion of the MovingBody.

Parameters:
newVector - The Vector to pass to the MovingBody.

getVector

Vector getVector()
This method is to be used to obtain a Vector from a MovingBody. It can tell you what motion the MovingBody had.

Returns:
A Vector.

update

void update()
Called frequently to update the body's position on the screen.