|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--soccerclient.datamanager.Ball
Überschrift: Ball
Beschreibung: In this class some information about ball are safed, like coordinates, time of the last information or the probably future coordinates
Copyright: Copyright (c) 2002
Organisation: pm39
Constructor Summary | |
Ball()
Creates a new Ball instance with coordinates (0,0) |
|
Ball(Coordinate k,
int time)
Creates a new Ball |
|
Ball(double xAchse,
double yAchse,
int time)
Creates a new Coordinate |
Method Summary | |
Coordinate |
getAktBall()
Returns the last recieved coordinates |
Coordinate |
getNewBall()
Returns the probably coordinates where the player could get the ball |
Coordinate |
getOldBall()
Returns the second to last recieved coordinates |
double |
getSpeed()
Returns speed of Ball, which is the distance between the last two recieved ballpositions |
int |
getTimeStamp()
Returns the time of the last recieved information |
void |
setBall(Coordinate k,
int time,
Coordinate ownPosition)
Sets the value of the coordinates |
void |
setBall(double xAchse,
double yAchse,
int time,
Coordinate ownPosition)
Sets the value of the coordinates |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Ball()
Ball
instance with coordinates (0,0)public Ball(Coordinate k, int time)
Ball
k
- a Coordinate
value specifying coordinatestime
- a int
value specifying timepublic Ball(double xAchse, double yAchse, int time)
Coordinate
xAchse
- a double
value specifying x-coordinateyAchse
- a double
value specifying y-coordinatetime
- a int
value specifying timeMethod Detail |
public Coordinate getAktBall()
Coordinate
containing the last recieved coordinatespublic Coordinate getOldBall()
Coordinate
containing the second to last recieved coordinatespublic double getSpeed()
double
containing speed of ballpublic int getTimeStamp()
int
containing timestamppublic Coordinate getNewBall()
Coordinate
containing probably next coordinatespublic void setBall(Coordinate k, int time, Coordinate ownPosition)
k
- a Coordinate
value specifying coordinatestime
- a int
value specifying timeownPosition
- a Coordinate
public void setBall(double xAchse, double yAchse, int time, Coordinate ownPosition)
xAchse
- a double
value specifying x-coordinateyAchse
- a double
value specifying y-coordinatetime
- a int
value specifying timeownPosition
- a Coordinate
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |