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

Variable Index

 o DEBUG

Constructor Index

 o ObstacleSim()
Instantiate an ObstacleSim object.

Method Index

 o clearTrail()
Clear the trail.
 o draw(Graphics, int, int, double, double, double, double)
Draw the object.
 o draw(Vec2, Graphics, int, int, double, double, double, double)
Draw the object in a specific spot.
 o drawID(Graphics, int, int, double, double, double, double)
Draw the objects's ID.
 o drawState(Graphics, int, int, double, double, double, double)
Draw the objects's State.
 o drawTrail(Graphics, int, int, double, double, double, double)
Draw the objects's Trail.
 o getCenter(Vec2)
 o getClosestPoint(Vec2)
 o getID()
 o getPosition()
 o getVisionClass()
 o init(double, double, double, double, Color, Color, int, int, long)
Initialize a ObstacleSim object.
 o isObstacle()
 o isPickupable()
 o isPushable()
 o pickUp(SimulatedObject)
 o push(Vec2, Vec2)
 o putDown(Vec2)
 o quit()
 o receive(Message)
 o setID(int)
 o setTrailLength(int)
Set the length of the trail (in movement steps).
 o setVisionClass(int)
 o takeStep(long, SimulatedObject[])
Take a simulated step;

Variables

 o DEBUG
 public static final boolean DEBUG

Constructors

 o ObstacleSim
 public ObstacleSim()
Instantiate an ObstacleSim object. Be sure to also call init with proper values.

See Also:
init

Methods

 o 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.
 o takeStep
 public void takeStep(long time_increment,
                      SimulatedObject all_objs[])
Take a simulated step;

 o isObstacle
 public boolean isObstacle()
 o isPushable
 public boolean isPushable()
 o isPickupable
 public boolean isPickupable()
 o getPosition
 public Vec2 getPosition()
 o getClosestPoint
 public Vec2 getClosestPoint(Vec2 from)
 o getCenter
 public Vec2 getCenter(Vec2 from)
 o push
 public void push(Vec2 d,
                  Vec2 v)
 o pickUp
 public void pickUp(SimulatedObject o)
 o receive
 public void receive(Message m)
 o putDown
 public void putDown(Vec2 p)
 o setVisionClass
 public void setVisionClass(int v)
 o getVisionClass
 public int getVisionClass()
 o setID
 public void setID(int i)
 o getID
 public int getID()
 o quit
 public void quit()
 o drawID
 public void drawID(Graphics g,
                    int w,
                    int h,
                    double t,
                    double b,
                    double l,
                    double r)
Draw the objects's ID.

 o drawState
 public void drawState(Graphics g,
                       int w,
                       int h,
                       double t,
                       double b,
                       double l,
                       double r)
Draw the objects's State.

 o 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.
 o clearTrail
 public void clearTrail()
Clear the trail. Non-robots can ignore this.

 o drawTrail
 public void drawTrail(Graphics g,
                       int w,
                       int h,
                       double t,
                       double b,
                       double l,
                       double r)
Draw the objects's Trail.

 o draw
 public void draw(Graphics g,
                  int w,
                  int h,
                  double t,
                  double b,
                  double l,
                  double r)
Draw the object.

 o 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