All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EDU.gatech.cc.is.simulation.SocFieldSmallSim

java.lang.Object
   |
   +----EDU.gatech.cc.is.simulation.SocFieldSmallSim

public class SocFieldSmallSim
extends Object
implements SimulatedObject
Draw an official RoboCup soccer field.

Copyright (c)1997 Georgia Tech Research Corporation

Version:
$Revision: 1.5 $
Author:
Tucker Balch

Variable Index

 o all_objects
 o bottom
 o DEBUG
 o foreground
 o height
 o left
 o meterspp
 o position
 o RADIUS
 o right
 o top
 o unique_id
 o visionclass
 o width

Constructor Index

 o SocFieldSmallSim()
Instantiate a SocFieldSmallSim object.

Method Index

 o clearTrail()
Clear the trail.
 o draw(Graphics, int, int, double, double, double, double)
Draw the field.
 o draw(Vec2, Graphics, int, int, double, double, double, double)
Draw the soccer field 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 an SocFieldSmallSim object.
 o isObstacle()
 o isPickupable()
 o isPushable()
 o main(String[])
 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 size(double)
Convert from size in meters to pixels.
 o takeStep(long, SimulatedObject[])
Take a simulated step;
 o X(double)
Convert x in field coordinates to X in pixel coordinates.
 o Y(double)
Convert y in field coordinates to Y in pixel coordinates.

Variables

 o position
 protected Vec2 position
 o foreground
 protected Color foreground
 o all_objects
 protected SimulatedObject all_objects[]
 o visionclass
 protected int visionclass
 o unique_id
 protected int unique_id
 o RADIUS
 protected double RADIUS
 o top
 protected double top
 o bottom
 protected double bottom
 o left
 protected double left
 o right
 protected double right
 o width
 protected double width
 o height
 protected double height
 o meterspp
 protected double meterspp
 o DEBUG
 public static final boolean DEBUG

Constructors

 o SocFieldSmallSim
 public SocFieldSmallSim()
Instantiate a SocFieldSmallSim 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 an SocFieldSmallSim object. Called automatically by JavaBotSim. None of the arguments are used except unique id.

Parameters:
xp - ignored.
yp - ignored.
t - ingored.
r - ignored.
f - ignored.
b - ignored.
v - vision class (should be 0 for invisible).
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 receive
 public void receive(Message m)
 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 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 size
 public int size(double m)
Convert from size in meters to pixels.

 o Y
 public int Y(double y)
Convert y in field coordinates to Y in pixel coordinates.

 o X
 public int X(double x)
Convert x in field coordinates to X in pixel coordinates.

 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 drawID
 public void drawID(Graphics g,
                    int w,
                    int h,
                    double t,
                    double b,
                    double l,
                    double r)
Draw the objects's ID.

 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 field.

 o draw
 public void draw(Vec2 pos,
                  Graphics g,
                  int w,
                  int h,
                  double t,
                  double b,
                  double l,
                  double r)
Draw the soccer field in a specific spot. This doesn't really make sense for the soccer field, but we need to handle it just in case someone calls it.

 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index