Class DrawStartState

java.lang.Object
  extended by DrawStartState
All Implemented Interfaces:
ISimUICallback, ISwarmDraw

public class DrawStartState
extends java.lang.Object
implements ISimUICallback, ISwarmDraw


Method Summary
 void addDrawAgent(IDrawAgent agent)
           
 boolean doCallback(double[] arrLfState, IAgent agent, StateBundle[] arrStates, ISensor[] arrSensors, IEnvironment env, CommGraph graph, double lfSimTime)
          Callback function
 java.lang.Object getLastObject()
          In case we need more info then true/false from doCallback
 void paint(java.awt.Graphics g)
           
 double realTimeToSimTime(java.util.Date dateRealTime)
           
 void reDraw(java.awt.Graphics g)
          This code should be fixed to be more readable Currently it is copied from TreeAlgDraw, but with the "adding to the state queue" and "removing from the state queue" disabled
 void scaleProjection(int nNewX, int nNewY)
           
 void setDrawAllLinks(boolean bDrawAllLinks)
           
 void setDynamicEnvironment(IEnvironment env)
          does nothing in this implementation
 void setEnvDraw(IEnvDraw envDraw)
          set class for drawing the environment
 void setProjection(IProjection proj)
          Pass in a projection class to handle mapping points to screen coords.
 void setStaticEnvironment(IEnvironment env)
          does nothing in this implementation
 java.util.Date simTimeToRealTime(double lfSimTime)
           
 void xlateProjection(int nXOff, int nYOff)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

simTimeToRealTime

public java.util.Date simTimeToRealTime(double lfSimTime)
Specified by:
simTimeToRealTime in interface ISwarmDraw

realTimeToSimTime

public double realTimeToSimTime(java.util.Date dateRealTime)
Specified by:
realTimeToSimTime in interface ISwarmDraw

setDrawAllLinks

public void setDrawAllLinks(boolean bDrawAllLinks)

setStaticEnvironment

public void setStaticEnvironment(IEnvironment env)
does nothing in this implementation


setDynamicEnvironment

public void setDynamicEnvironment(IEnvironment env)
does nothing in this implementation


setEnvDraw

public void setEnvDraw(IEnvDraw envDraw)
set class for drawing the environment

Specified by:
setEnvDraw in interface ISwarmDraw

setProjection

public void setProjection(IProjection proj)
Pass in a projection class to handle mapping points to screen coords.

Specified by:
setProjection in interface ISwarmDraw

scaleProjection

public void scaleProjection(int nNewX,
                            int nNewY)
Specified by:
scaleProjection in interface ISwarmDraw

xlateProjection

public void xlateProjection(int nXOff,
                            int nYOff)
Specified by:
xlateProjection in interface ISwarmDraw

addDrawAgent

public void addDrawAgent(IDrawAgent agent)
Specified by:
addDrawAgent in interface ISwarmDraw

reDraw

public void reDraw(java.awt.Graphics g)
This code should be fixed to be more readable Currently it is copied from TreeAlgDraw, but with the "adding to the state queue" and "removing from the state queue" disabled

Specified by:
reDraw in interface ISwarmDraw

paint

public void paint(java.awt.Graphics g)

doCallback

public boolean doCallback(double[] arrLfState,
                          IAgent agent,
                          StateBundle[] arrStates,
                          ISensor[] arrSensors,
                          IEnvironment env,
                          CommGraph graph,
                          double lfSimTime)
Callback function

Specified by:
doCallback in interface ISimUICallback
Parameters:
arrLfState - state vector (initially initial state, overwritten with final state)
agent - agent mapping (currently only support for homogenous swarms )
arrStates - discrete state and control function of each agent (assumed not to change over integration)
arrSensors - array of sensor interfaces.
env - environment
graph - new communication graph (if an update is needed pass null otherwise)
lfSimTime - current simulated time
Returns:
true if something unusual has happened

getLastObject

public java.lang.Object getLastObject()
In case we need more info then true/false from doCallback

Specified by:
getLastObject in interface ISimUICallback
Returns:
null