Revision 776
Code cleanup and documentation
RobotList.java | ||
---|---|---|
15 | 15 |
* For a given Point, finds the robot that conatins this Point |
16 | 16 |
* graphically. The coordinate system is based on the dimensions |
17 | 17 |
* of the image returned by the webcam loader, not the coordinates |
18 |
* of the panel containing the image on in the applet. Returns null
|
|
18 |
* of the panel containing the image in the applet. Returns null |
|
19 | 19 |
* if no robot contains the Point, or if the Point is null. If |
20 | 20 |
* multiple robots overlap the point, one will be chosen arbitrarily. |
21 | 21 |
*/ |
... | ... | |
30 | 30 |
} |
31 | 31 |
return null; |
32 | 32 |
} |
33 |
|
|
34 |
/** |
|
35 |
* Removes the destination coordinate for a specified robot. As |
|
36 |
* a result, no destination vector is painted for the robot on |
|
37 |
* the webcam image. This method does not cause any command |
|
38 |
* to be sent to the robot. |
|
39 |
*/ |
|
40 |
public void cancelMoveTo (int id) { |
|
41 |
RobotIcon r = get(id); |
|
42 |
if (r != null) |
|
43 |
r.destx = r.desty = -1; |
|
44 |
} |
|
45 | 33 |
|
46 | 34 |
} |
Also available in: Unified diff