gizmoball.physics
Class Collision

java.lang.Object
  extended by gizmoball.physics.Collision

public class Collision
extends java.lang.Object

A Collision stores information about a collision between a Ball and a GameObject.

Specification Fields

Constructor Summary
Collision(double time, Ball b, GameObject o)
           
 
Method Summary
 java.util.List<GameObject> getObjects()
          Returns the objects involved in the collision
 double getTime()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collision

public Collision(double time,
                 Ball b,
                 GameObject o)
Parameters:
time - the time of the collision
b - the ball
o - the other object
Effects:
creates the desired Collision
Method Detail

getTime

public double getTime()
Returns:
this.time

getObjects

public java.util.List<GameObject> getObjects()
Returns the objects involved in the collision

Returns:
a list with this.ball and this.other