holoracer.vehicles
Class Vehicle

java.lang.Object
  extended by holoracer.GameObject
      extended by holoracer.vehicles.Vehicle
All Implemented Interfaces:
I3DObject
Direct Known Subclasses:
EnemyVehicle, PlayersVehicle

public abstract class Vehicle
extends GameObject
implements I3DObject


Field Summary
static float ACC
           
protected  float highest_speed
           
protected  TrackTile last_tile
           
protected  int lean_lr
           
protected  Model model
           
static float RAD
           
protected  float speed
           
static float TURN_SPEED
           
static java.util.ArrayList vehicles
           
 
Fields inherited from class holoracer.GameObject
location, y_angle
 
Constructor Summary
Vehicle()
           
 
Method Summary
 void accelerate(float acc)
           
static void calcPositions()
          Todo - make this correct
 void draw(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
           
 int getHighestSpeedAsInt()
           
 int getPosition()
          Todo - store this so we don't calc it every time!
 int getSpeedAsInt()
           
protected  TrackTile getTrackTile()
           
 int getXAsInt()
           
 void leanCentre()
           
 void leanLeft()
           
 void leanRight()
           
 void process()
           
 void stopAccelerating()
           
 
Methods inherited from class holoracer.GameObject
moveToPosition, restorePosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ssmith.opengl.I3DObject
shouldBeDrawn
 

Field Detail

TURN_SPEED

public static final float TURN_SPEED
See Also:
Constant Field Values

ACC

public static final float ACC
See Also:
Constant Field Values

RAD

public static final float RAD
See Also:
Constant Field Values

speed

protected float speed

highest_speed

protected float highest_speed

last_tile

protected TrackTile last_tile

model

protected Model model

vehicles

public static java.util.ArrayList vehicles

lean_lr

protected int lean_lr
Constructor Detail

Vehicle

public Vehicle()
Method Detail

calcPositions

public static void calcPositions()
Todo - make this correct


getPosition

public int getPosition()
Todo - store this so we don't calc it every time!

Returns:

getSpeedAsInt

public int getSpeedAsInt()

getHighestSpeedAsInt

public int getHighestSpeedAsInt()

leanLeft

public void leanLeft()

leanRight

public void leanRight()

leanCentre

public void leanCentre()

draw

public void draw(net.java.games.jogl.GL gl,
                 net.java.games.jogl.GLU glu)
          throws java.io.IOException
Specified by:
draw in interface I3DObject
Throws:
java.io.IOException

process

public void process()
Specified by:
process in class GameObject

accelerate

public void accelerate(float acc)

stopAccelerating

public void stopAccelerating()

getTrackTile

protected TrackTile getTrackTile()

getXAsInt

public int getXAsInt()