jrobots.utils
Class ProximityScan

java.lang.Object
  extended by jrobots.utils.ProximityScan
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ProximityScan
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The proximity scanner has only limited range, but it provides exact data about incoming projectiles and obstacles on the ground.

this class represent a single scan value of the proximity scanner. Data is as follows:

See Also:
pos, speed, timeOfScan, ProximityScan(Vector, Vector, double), predict(double), Serialized Form

Field Summary
 Vector pos
          position of the object at the scan's time
 Vector speed
          velocity of the object at the scan's time
 double timeOfScan
          The scan's time [s]
 
Constructor Summary
ProximityScan(Vector pos, Vector speed, double timeOfScan)
           
 
Method Summary
 Vector predict(double time)
          This method can be used to extrapolate a projectile's path linearly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pos

public final Vector pos
position of the object at the scan's time


speed

public final Vector speed
velocity of the object at the scan's time


timeOfScan

public final double timeOfScan
The scan's time [s]

Constructor Detail

ProximityScan

public ProximityScan(Vector pos,
                     Vector speed,
                     double timeOfScan)
Method Detail

predict

public Vector predict(double time)
This method can be used to extrapolate a projectile's path linearly.

The given parameter specifies the time of interest (since the begin of the encounter)

Parameters:
time - Where will the object be at that time? [s] (Time since the beginning of the match)
Returns:
extrapolated position at given time