Class ObjectInfo

java.lang.Object
  |
  +--ObjectInfo

class ObjectInfo
extends java.lang.Object

Holds the necessary information about field objects, which were parsed

Version:
1.00
Author:
Daniel Förderer and Moritz Steiner

Field Summary
private  double bodyDir
           
private  double dirChng
           
protected  double direction
           
protected  double distance
           
private  double distChng
           
private  boolean gotChanges
           
private  double headDir
           
private  java.lang.String objectName
           
private  int timeStamp
           
 
Constructor Summary
ObjectInfo()
          Constructs a new ObjectInfo object with all fields initialized to null or 0.
ObjectInfo(java.lang.String objectName, int timeStamp)
          Constructs a new ObjectInfo object initializing the objectName and timeStamp fields.
ObjectInfo(java.lang.String objectName, int timeStamp, double distance, double direction, double distChng, double dirChng)
          Constructs a new ObjectInfo object initializing all fields.
 
Method Summary
 double getBodyDir()
          Returns the direction the body is facing
 double getDirChng()
          Returns the approximate change of direction from the last update of the directions by the server
 double getDirection()
          Returns the direction of the object from the agent's facing direction.
 double getDistance()
          Returns the distance of the object from the agent
 double getDistChng()
          Returns the approximate change of distance from the last update of positions by the server
 double getHeadDir()
          Returns the returns the direction the head is facing relative to the body
 java.lang.String getObjectName()
          Returns the objectName
 boolean isGotChanges()
          Get the value of gotChanges
 void setBodyDir(double bodyDir)
          Sets the body direction
 void setDirChng(double dirChng)
          Sets the direction change
 void setDirection(double direction)
          Sets the direction
 void setDistance(double distance)
          Sets the distance
 void setDistChng(double distChng)
          Sets the distance change
 void setGotChanges(boolean v)
          Set the value of gotChanges.
 void setHeadDir(double headDir)
          Sets the head direction
 void setObjectName(java.lang.String objectName)
          Sets the object name
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

objectName

private java.lang.String objectName

distance

protected double distance

direction

protected double direction

gotChanges

private boolean gotChanges

distChng

private double distChng

dirChng

private double dirChng

bodyDir

private double bodyDir

headDir

private double headDir

timeStamp

private int timeStamp
Constructor Detail

ObjectInfo

public ObjectInfo()
Constructs a new ObjectInfo object with all fields initialized to null or 0. Not currently used by the program

ObjectInfo

public ObjectInfo(java.lang.String objectName,
                  int timeStamp)
Constructs a new ObjectInfo object initializing the objectName and timeStamp fields. All other fields are set to zero.

ObjectInfo

public ObjectInfo(java.lang.String objectName,
                  int timeStamp,
                  double distance,
                  double direction,
                  double distChng,
                  double dirChng)
Constructs a new ObjectInfo object initializing all fields.
Method Detail

isGotChanges

public boolean isGotChanges()
Get the value of gotChanges
Returns:
value of gotChanges

setGotChanges

public void setGotChanges(boolean v)
Set the value of gotChanges.
Parameters:
v - Value to assign to gotChanges

getObjectName

public java.lang.String getObjectName()
Returns the objectName

getDistance

public double getDistance()
Returns the distance of the object from the agent

getDirection

public double getDirection()
Returns the direction of the object from the agent's facing direction. If the object is the agent, then it returns the agents facing direction

getDistChng

public double getDistChng()
Returns the approximate change of distance from the last update of positions by the server

getDirChng

public double getDirChng()
Returns the approximate change of direction from the last update of the directions by the server

getBodyDir

public double getBodyDir()
Returns the direction the body is facing

getHeadDir

public double getHeadDir()
Returns the returns the direction the head is facing relative to the body

setObjectName

public void setObjectName(java.lang.String objectName)
Sets the object name

setDistance

public void setDistance(double distance)
Sets the distance

setDirection

public void setDirection(double direction)
Sets the direction

setDistChng

public void setDistChng(double distChng)
Sets the distance change

setDirChng

public void setDirChng(double dirChng)
Sets the direction change

setBodyDir

public void setBodyDir(double bodyDir)
Sets the body direction

setHeadDir

public void setHeadDir(double headDir)
Sets the head direction