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

Variable Index

 o DEBUG

Constructor Index

 o KinSensorSim(SimulatedObject)
Instantiate a KinSensorSim object.

Method Index

 o getOpponents(SimulatedObject[])
Get an array of Vec2s that point egocentrically from the center of the robot to the opponents currently sensed by the robot.
 o getPlayerNumber(SimulatedObject[])
Return this robot's player number.
 o getTeammates(SimulatedObject[])
Get an array of Vec2s that point egocentrically from the center of the robot to the teammates currently sensed by the robot.
 o setKinMaxRange(double)
Set the maximum range at which a sensor reading should be considered kin.

Variables

 o DEBUG
 public static final boolean DEBUG

Constructors

 o KinSensorSim
 public KinSensorSim(SimulatedObject r)
Instantiate a KinSensorSim object.

Parameters:
r - SimulatedObject, the robot on which the KinSensor resides.

Methods

 o 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.
 o 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.
 o 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.
 o 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