All Packages Class Hierarchy This Package Previous Next Index
Class EDU.gatech.cc.is.abstractrobot.KinSensorSim
java.lang.Object
|
+----EDU.gatech.cc.is.abstractrobot.KinSensorSim
- public class KinSensorSim
- extends Object
A class that implements the KinSensor interface. You can use
objects of this class in your simulated robot code to easily
implement the KinSensor interface for your simulated robot.
Copyright
(c)1997, 1998 Tucker Balch
- Version:
- $Revision: 1.3 $
- Author:
- Tucker Balch
-
DEBUG
-
-
KinSensorSim(SimulatedObject)
- Instantiate a KinSensorSim object.
-
getOpponents(SimulatedObject[])
- Get an array of Vec2s that point egocentrically from the
center of the robot to the opponents currently sensed by the
robot.
-
getPlayerNumber(SimulatedObject[])
- Return this robot's player number.
-
getTeammates(SimulatedObject[])
- Get an array of Vec2s that point egocentrically from the
center of the robot to the teammates currently sensed by the
robot.
-
setKinMaxRange(double)
- Set the maximum range at which a sensor reading should be considered
kin.
DEBUG
public static final boolean DEBUG
KinSensorSim
public KinSensorSim(SimulatedObject r)
- Instantiate a KinSensorSim object.
- Parameters:
- r - SimulatedObject, the robot on which the KinSensor resides.
getPlayerNumber
public int getPlayerNumber(SimulatedObject all_objects[])
- Return this robot's player number. This is distinct
from the simulation-oriented unique_id.
- Parameters:
- ignored - long, ignored.
- Returns:
- the player number.
getTeammates
public Vec2[] getTeammates(SimulatedObject all_objects[])
- Get an array of Vec2s that point egocentrically from the
center of the robot to the teammates currently sensed by the
robot.
- Parameters:
- all_objects - SimulatedObject[] other objects in the
simulation.
- Returns:
- the sensed teammates.
getOpponents
public Vec2[] getOpponents(SimulatedObject all_objects[])
- Get an array of Vec2s that point egocentrically from the
center of the robot to the opponents currently sensed by the
robot.
- Parameters:
- all_objects - SimulatedObject[] other objects in the
simulation.
- Returns:
- the sensed opponents.
setKinMaxRange
public void setKinMaxRange(double range)
- Set the maximum range at which a sensor reading should be considered
kin. Beyond this range, the readings are ignored.
- Parameters:
- range - the range in meters.
All Packages Class Hierarchy This Package Previous Next Index