EDU.cmu.cs.coral.simulation
Class ColorTransitionSim

java.lang.Object
  |
  +--EDU.gatech.cc.is.simulation.ObstacleSim
        |
        +--EDU.cmu.cs.coral.simulation.LandmarkSim
              |
              +--EDU.cmu.cs.coral.simulation.ColorTransitionSim

public class ColorTransitionSim
extends LandmarkSim


Fields inherited from class EDU.cmu.cs.coral.simulation.LandmarkSim
all_objects, background, foreground, position, RADIUS, unique_id, visionclass
 
Fields inherited from class EDU.gatech.cc.is.simulation.ObstacleSim
all_objects, background, DEBUG, foreground, lastx, lasty, position, RADIUS, unique_id, visionclass
 
Constructor Summary
ColorTransitionSim()
           
 
Method Summary
 boolean checkCollision(Circle2 c)
          determine if the object is intersecting with a specified circle.
 boolean checkCollision(Polygon2 p)
          determine if the object is intersecting with a specified polygon.
 void draw(java.awt.Graphics g, int w, int h, double t, double b, double l, double r)
          Draw the object.
 
Methods inherited from class EDU.cmu.cs.coral.simulation.LandmarkSim
draw, getCenter, getClosestPoint, getID, getPosition, getRadius, getVisionClass, init, setID, setVisionClass, takeStep
 
Methods inherited from class EDU.gatech.cc.is.simulation.ObstacleSim
clearTrail, drawIcon, drawID, drawState, drawTrail, isObstacle, isPickupable, isPushable, pickUp, push, putDown, quit, receive, setTrailLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorTransitionSim

public ColorTransitionSim()
Method Detail

checkCollision

public boolean checkCollision(Circle2 c)
Description copied from class: ObstacleSim
determine if the object is intersecting with a specified circle. This is useful for obstacle avoidance and so on.
Overrides:
checkCollision in class ObstacleSim
Tags copied from class: ObstacleSim
Parameters:
c - the circle which may be intersecting the current object.
Returns:
true if collision detected.

checkCollision

public boolean checkCollision(Polygon2 p)
Description copied from class: ObstacleSim
determine if the object is intersecting with a specified polygon. This is useful for obstacle avoidance and so on.
Overrides:
checkCollision in class ObstacleSim
Tags copied from class: ObstacleSim
Parameters:
p - the polygon which may be intersecting the current object.
Returns:
true if collision detected.

draw

public void draw(java.awt.Graphics g,
                 int w,
                 int h,
                 double t,
                 double b,
                 double l,
                 double r)
Draw the object.
Overrides:
draw in class LandmarkSim
Tags copied from interface: SimulatedObject
Parameters:
g - graphics area to draw the object.
w - the width in pixels of g.
h - the height in pixels of g.
t - the y coordinate represented by the top boundary of the drawing area.
b - the y coordinate represented by the bottom boundary of the drawing area.
l - the x coordinate represented by the left boundary of the drawing area.
r - the x coordinate represented by the right boundary of the drawing area.