All Packages Class Hierarchy This Package Previous Next Index
Class EDU.gatech.cc.is.simulation.ObstacleSim
java.lang.Object
|
+----EDU.gatech.cc.is.simulation.ObstacleSim
- public class ObstacleSim
- extends Object
- implements SimulatedObject
an obstacle for simulation.
Copyright
(c)1997 Georgia Tech Research Corporation
- Version:
- $Revision: 1.5 $
- Author:
- Tucker Balch
-
DEBUG
-
-
ObstacleSim()
- Instantiate an ObstacleSim object.
-
clearTrail()
- Clear the trail.
-
draw(Graphics, int, int, double, double, double, double)
- Draw the object.
-
draw(Vec2, Graphics, int, int, double, double, double, double)
- Draw the object in a specific spot.
-
drawID(Graphics, int, int, double, double, double, double)
- Draw the objects's ID.
-
drawState(Graphics, int, int, double, double, double, double)
- Draw the objects's State.
-
drawTrail(Graphics, int, int, double, double, double, double)
- Draw the objects's Trail.
-
getCenter(Vec2)
-
-
getClosestPoint(Vec2)
-
-
getID()
-
-
getPosition()
-
-
getVisionClass()
-
-
init(double, double, double, double, Color, Color, int, int, long)
- Initialize a ObstacleSim object.
-
isObstacle()
-
-
isPickupable()
-
-
isPushable()
-
-
pickUp(SimulatedObject)
-
-
push(Vec2, Vec2)
-
-
putDown(Vec2)
-
-
quit()
-
-
receive(Message)
-
-
setID(int)
-
-
setTrailLength(int)
- Set the length of the trail (in movement steps).
-
setVisionClass(int)
-
-
takeStep(long, SimulatedObject[])
- Take a simulated step;
DEBUG
public static final boolean DEBUG
ObstacleSim
public ObstacleSim()
- Instantiate an ObstacleSim object. Be sure
to also call init with proper values.
- See Also:
- init
init
public void init(double xp,
double yp,
double t,
double r,
Color f,
Color b,
int v,
int i,
long s)
- Initialize a ObstacleSim object.
This is called automatically by JavaBotSim.
- Parameters:
- xp - the x coordinate.
- yp - the y coordinate.
- t - ingored.
- r - the radius.
- f - the foreground color.
- b - ignored.
- v - the vision class.
- i - the unique id.
- s - random number seed.
takeStep
public void takeStep(long time_increment,
SimulatedObject all_objs[])
- Take a simulated step;
isObstacle
public boolean isObstacle()
isPushable
public boolean isPushable()
isPickupable
public boolean isPickupable()
getPosition
public Vec2 getPosition()
getClosestPoint
public Vec2 getClosestPoint(Vec2 from)
getCenter
public Vec2 getCenter(Vec2 from)
push
public void push(Vec2 d,
Vec2 v)
pickUp
public void pickUp(SimulatedObject o)
receive
public void receive(Message m)
putDown
public void putDown(Vec2 p)
setVisionClass
public void setVisionClass(int v)
getVisionClass
public int getVisionClass()
setID
public void setID(int i)
getID
public int getID()
quit
public void quit()
drawID
public void drawID(Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the objects's ID.
drawState
public void drawState(Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the objects's State.
setTrailLength
public void setTrailLength(int l)
- Set the length of the trail (in movement steps).
Non-robots can ignore this.
- Parameters:
- l - int, the length of the trail.
clearTrail
public void clearTrail()
- Clear the trail.
Non-robots can ignore this.
drawTrail
public void drawTrail(Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the objects's Trail.
draw
public void draw(Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the object.
draw
public void draw(Vec2 pos,
Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the object in a specific spot.
All Packages Class Hierarchy This Package Previous Next Index