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
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 java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
distance
private double distance
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
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