|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The KinSensor class provides an abstract interface to the simulated hardware of a robot that can sense it's kin. In simulation this is implemented by searching for objects the same color as the robot. Do not expect these methods to provide useful information before the simulation begins running (i.e. at initiation time).
Copyright (c)1997, 1998 Tucker Balch
Method Summary | |
Vec2[] |
getOpponents(long timestamp)
Get an array of Vec2s that represent the locations of opponents. |
int |
getPlayerNumber(long timestamp)
Get the robot's player number, between 0 and the number of robots on the team. |
Vec2[] |
getTeammates(long timestamp)
Get an array of Vec2s that represent the locations of teammates (Kin). |
void |
setKinMaxRange(double r)
Set the maximum range at which kin may be sensed. |
Method Detail |
public Vec2[] getTeammates(long timestamp)
timestamp
- only get new information if
timestamp > than last call or timestamp == -1.Vec2
public Vec2[] getOpponents(long timestamp)
timestamp
- only get new information if
timestamp > than last call or timestamp == -1.Vec2
public int getPlayerNumber(long timestamp)
timestamp
- only get new information if
timestamp > than last call or timestamp == -1.public void setKinMaxRange(double r)
r
- double, the maximum range.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |