| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface CarController
Interface CarController must be implemented by every
 car controller.
| Method Summary | |
|---|---|
 void | 
draw(java.awt.Graphics2D g2,
     java.awt.Dimension D)
Method draw() should be used if you want to draw
 anything on the GUI. | 
 double | 
getControl(int i)
Method getControl() is called by the GUI to extract
 the current values of the control. | 
 void | 
init(double initX,
     double initY,
     double initTheta,
     double endX,
     double endY,
     double endTheta,
     java.util.ArrayList<java.awt.geom.Rectangle2D.Double> obstacles,
     SensorPack sensors)
Method init is called by the GUI. | 
 void | 
move()
Method move() is called by the GUI at each step. | 
| Method Detail | 
|---|
void init(double initX,
          double initY,
          double initTheta,
          double endX,
          double endY,
          double endTheta,
          java.util.ArrayList<java.awt.geom.Rectangle2D.Double> obstacles,
          SensorPack sensors)
init is called by the GUI.
initX - a double value - the x value of the initial position.initY - a double value - the y value of the initial position.initTheta - a double value - the initial orientationendX - a double value - desired final x valueendY - a double value - desired final y valueendTheta - a double value - desired final orientationobstacles - an ArrayList value - a list of obstacles, each an instance of Java's rectangle class.sensors - a SensorPack - a class that you can query for position info
void draw(java.awt.Graphics2D g2,
          java.awt.Dimension D)
draw() should be used if you want to draw
 anything on the GUI. For example, you might want to draw a path
 towards the target that you pre-computed in init().
g2 - a Graphics2D value - the graphics instance.D - a Dimension value - the dimensions of the drawing area.void move()
move() is called by the GUI at each step.
 This is where you implement code to adjust the controls. Note that
 the controls themselves are not returned by this method. Instead,
 the GUI gets them by calling getControl() once for each control.
double getControl(int i)
getControl() is called by the GUI to extract
 the current values of the control. There are only two right now
 and so i=1 or i=2 are the only values.
i - an int value
double value
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||