|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DynObject
This class is used to represent all dynamic objects of the game. For every object the following information is stored:
Field Summary | |
private double |
dirChange
|
private java.awt.geom.Point2D.Double |
dirVector
|
private java.awt.geom.Point2D.Double |
formerDirVector
|
private java.awt.geom.Point2D.Double |
formerPosition
|
private int |
formerTime
|
private java.awt.geom.Point2D.Double |
position
|
private double |
speedChange
|
private int |
time
|
Constructor Summary | |
(package private) |
DynObject(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)
contructor for a dynamic object with its parameters: position, former position, direction vector, former direction vector, speed change, direction change |
Method Summary | |
double |
getDirChange()
gets the direction change of the object |
java.awt.geom.Point2D.Double |
getDirVector()
gets the direction vector of the object |
java.awt.geom.Point2D.Double |
getFormerDirVector()
gets the former direction vector of the object |
java.awt.geom.Point2D.Double |
getFormerPosition()
gets the former position of the object |
java.awt.geom.Point2D.Double |
getPosition()
gets the position of the object |
double |
getSpeedChange()
gets the speed change of the object |
int |
getTime()
gets the timestamp when the object has been perceived |
void |
print()
prints all infos of the object usefull for debugging |
void |
setPosition(double x,
double y,
char side)
sets the position of the object, saves the former position and the former direction vector and calculates the actual direction vector, the speed change and the direction change 30.06.2002 added seen, sb |
void |
setTime(int time)
sets the timestamp when the object has been perceived |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int time
private int formerTime
private java.awt.geom.Point2D.Double position
private java.awt.geom.Point2D.Double formerPosition
private java.awt.geom.Point2D.Double dirVector
private java.awt.geom.Point2D.Double formerDirVector
private double speedChange
private double dirChange
Constructor Detail |
DynObject(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)
Method Detail |
public int getTime()
public void setTime(int time)
public java.awt.geom.Point2D.Double getPosition()
public void setPosition(double x, double y, char side)
public java.awt.geom.Point2D.Double getFormerPosition()
public void print()
public java.awt.geom.Point2D.Double getDirVector()
public java.awt.geom.Point2D.Double getFormerDirVector()
public double getDirChange()
public double getSpeedChange()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |