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
-
all_objects
-
-
bottom
-
-
DEBUG
-
-
foreground
-
-
height
-
-
left
-
-
meterspp
-
-
position
-
-
RADIUS
-
-
right
-
-
top
-
-
unique_id
-
-
visionclass
-
-
width
-
-
SocFieldSmallSim()
- Instantiate a SocFieldSmallSim object.
-
clearTrail()
- Clear the trail.
-
draw(Graphics, int, int, double, double, double, double)
- Draw the field.
-
draw(Vec2, Graphics, int, int, double, double, double, double)
- Draw the soccer field 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 an SocFieldSmallSim object.
-
isObstacle()
-
-
isPickupable()
-
-
isPushable()
-
-
main(String[])
-
-
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)
-
-
size(double)
- Convert from size in meters to pixels.
-
takeStep(long, SimulatedObject[])
- Take a simulated step;
-
X(double)
- Convert x in field coordinates to X in pixel coordinates.
-
Y(double)
- Convert y in field coordinates to Y in pixel coordinates.
position
protected Vec2 position
foreground
protected Color foreground
all_objects
protected SimulatedObject all_objects[]
visionclass
protected int visionclass
unique_id
protected int unique_id
RADIUS
protected double RADIUS
top
protected double top
bottom
protected double bottom
left
protected double left
right
protected double right
width
protected double width
height
protected double height
meterspp
protected double meterspp
DEBUG
public static final boolean DEBUG
SocFieldSmallSim
public SocFieldSmallSim()
- Instantiate a SocFieldSmallSim 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 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.
takeStep
public void takeStep(long time_increment,
SimulatedObject all_objs[])
- Take a simulated step;
isObstacle
public boolean isObstacle()
isPushable
public boolean isPushable()
receive
public void receive(Message m)
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)
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()
size
public int size(double m)
- Convert from size in meters to pixels.
Y
public int Y(double y)
- Convert y in field coordinates to Y in pixel coordinates.
X
public int X(double x)
- Convert x in field coordinates to X in pixel coordinates.
drawState
public void drawState(Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the objects's State.
drawID
public void drawID(Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the objects's ID.
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 field.
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.
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index