Class GlobalView
java.lang.Object
|
+--GlobalView
- public class GlobalView
- extends java.lang.Object
The class GlobalView
is responsible for all needed calculations with absolute and relative
coordinates
Constructor Summary |
GlobalView(char side,
java.lang.String teamName)
Creates a new GlobalView instance. |
Method Summary |
void |
actualize(java.util.Vector visualInfoVector)
actualizes the Vector with the relative Information |
int |
getBallProperty(VisualInfo ball)
tests, if there are players within the kickable margine of the ball(currently not used) |
double |
getTurnDir(java.awt.geom.Point2D.Double selfPosition,
double x,
double y,
double headAngle)
calcutes the turn angle in order to turn to a certain absolute position |
java.awt.geom.Point2D.Double |
initialize()
goes 2 times through the the visualInfoVector and calculates the absolute position of the player,
the absolute position of all other players that he see and of the ball if he sees it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlobalView
public GlobalView(char side,
java.lang.String teamName)
- Creates a new
GlobalView
instance.
- Parameters:
side
- a side of the field, where the players home zone is atteamName
- a current name of the team
actualize
public void actualize(java.util.Vector visualInfoVector)
- actualizes the Vector with the relative Information
- Parameters:
Vector
- which contains the relative Infomation about the seen Objects in the current cycle
initialize
public java.awt.geom.Point2D.Double initialize()
- goes 2 times through the the visualInfoVector and calculates the absolute position of the player,
the absolute position of all other players that he see and of the ball if he sees it.
- Returns:
- an
Point2D.Double
value which contains the absolute position of the player
getBallProperty
public int getBallProperty(VisualInfo ball)
- tests, if there are players within the kickable margine of the ball(currently not used)
- Parameters:
an
- VisualInfo
value which contains all the informatio of the ball- Returns:
- int
getTurnDir
public double getTurnDir(java.awt.geom.Point2D.Double selfPosition,
double x,
double y,
double headAngle)
- calcutes the turn angle in order to turn to a certain absolute position
- Parameters:
selfPosition
- an Point2D.Double
which contains the absolute position of the playerx
- the x-coordinates of the turn positiony
- the y-coordinates of the turn positionheadAngle
- the head angle of the player- Returns:
- an
double
value which contains the turn angle