EDU.cmu.cs.coral.simulation
Interface SimulatedLinearObject
- All Known Implementing Classes:
- LinearObstacleSim, TerrainSim
- public interface SimulatedLinearObject
- extends SimulatedObject
If you want to include a new linear object for TB simulation,
you must implement this interface.
Most of these methods are used by other simulated objects to either
generate simulated sensor values or reproduce accurate dynamic results.
Copyright
(c)1998 Tucker Balch and Carnegie Mellon University
Method Summary |
void |
init(double x1,
double y1,
double x2,
double y2,
double r,
java.awt.Color fg,
java.awt.Color bg,
int vc,
int id,
long s)
Initialize a simulated object. |
Methods inherited from interface EDU.gatech.cc.is.simulation.SimulatedObject |
checkCollision,
checkCollision,
clearTrail,
draw,
draw,
drawIcon,
drawID,
drawState,
drawTrail,
getCenter,
getClosestPoint,
getID,
getPosition,
getVisionClass,
init,
isObstacle,
isPickupable,
isPushable,
pickUp,
push,
putDown,
quit,
receive,
setID,
setTrailLength,
setVisionClass,
takeStep |
init
public void init(double x1,
double y1,
double x2,
double y2,
double r,
java.awt.Color fg,
java.awt.Color bg,
int vc,
int id,
long s)
- Initialize a simulated object. Called automatically by
TBSim.
- Parameters:
x1
- x coord of first pointy1
- y coord of first pointx2
- x coord of second pointy2
- y coord of second pointr
- radius.fg
- the foreground color of the object when drawn.bg
- the background color of the object when drawn.vc
- the vision class of the object - for use
by simulated vision.id
- a unique ID number fore the object.s
- random number seed.