Class Ball

java.lang.Object
  |
  +--DynObject
        |
        +--Ball
All Implemented Interfaces:
DebugInterface

public class Ball
extends DynObject

This class is used to represent the Ball all attributes of superclass DynObject plus the distance to the ball are stored

Version:
1.00
Author:
Daniel Förderer and Moritz Steiner

Field Summary
private  double distance
           
 
Fields inherited from class DynObject
dirChange, dirVector, formerDirVector, formerPosition, formerTime, position, speedChange, time
 
Fields inherited from interface DebugInterface
DEBUG_SWITCH_STRATEGY_IS_SET, DEBUG_SWITCH_VISUALISATION_IS_SET, DEBUG_SWITCH_WORLDMODEL_AUDIOEVENT_IS_SET, DEBUG_SWITCH_WORLDMODEL_BODYEVENT_IS_SET, DEBUG_SWITCH_WORLDMODEL_VISUALEVENT_IS_SET
 
Constructor Summary
(package private) Ball()
          constructor for a Ball object and all parameters are initialized with 0
(package private) Ball(int time, java.awt.geom.Point2D.Double position, java.awt.geom.Point2D.Double formerPosition, java.awt.geom.Point2D.Double dirVector, java.awt.geom.Point2D.Double formerDirVector, double speedChange, double dirChange, double distance)
          constructor for a Ball object with the parameters time, position, former position, speed change, diection change and distance
 
Method Summary
 double getDistance()
          gets the distance to the ball
 void print()
          prints the information of the ball usefull for debugging
 void setDistance(double distance)
          sets the distance to the ball
 
Methods inherited from class DynObject
getDirChange, getDirVector, getFormerDirVector, getFormerPosition, getPosition, getSpeedChange, getTime, setPosition, setTime
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

distance

private double distance
Constructor Detail

Ball

Ball()
constructor for a Ball object and all parameters are initialized with 0

Ball

Ball(int time,
     java.awt.geom.Point2D.Double position,
     java.awt.geom.Point2D.Double formerPosition,
     java.awt.geom.Point2D.Double dirVector,
     java.awt.geom.Point2D.Double formerDirVector,
     double speedChange,
     double dirChange,
     double distance)
constructor for a Ball object with the parameters time, position, former position, speed change, diection change and distance
Method Detail

getDistance

public double getDistance()
gets the distance to the ball

setDistance

public void setDistance(double distance)
sets the distance to the ball

print

public void print()
prints the information of the ball usefull for debugging
Overrides:
print in class DynObject