All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface EDU.gatech.cc.is.abstractrobot.KinSensor

public interface KinSensor
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

Version:
$Revision: 1.3 $
Author:
Tucker Balch

Method Index

 o getOpponents(long)
Get an array of Vec2s that represent the locations of opponents.
 o getPlayerNumber(long)
Get the robot's player number, between 0 and the number of robots on the team.
 o getTeammates(long)
Get an array of Vec2s that represent the locations of teammates (Kin).
 o setKinMaxRange(double)
Set the maximum range at which kin may be sensed.

Methods

 o getTeammates
 public abstract Vec2[] getTeammates(long timestamp)
Get an array of Vec2s that represent the locations of teammates (Kin).

Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
Returns:
the sensed teammates.
See Also:
Vec2
 o getOpponents
 public abstract Vec2[] getOpponents(long timestamp)
Get an array of Vec2s that represent the locations of opponents.

Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
Returns:
the sensed opponents.
See Also:
Vec2
 o getPlayerNumber
 public abstract int getPlayerNumber(long timestamp)
Get the robot's player number, between 0 and the number of robots on the team. Don't confuse this with getID which returns a unique number for the object in the simulation as a whole, not on its individual team.

Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
Returns:
the player number.
 o setKinMaxRange
 public abstract void setKinMaxRange(double r)
Set the maximum range at which kin may be sensed. Primarily for use in simulation.

Parameters:
r - double, the maximum range.

All Packages  Class Hierarchy  This Package  Previous  Next  Index