Class SwarmPathDraw

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

public class SwarmPathDraw
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)
           
 void scaleProjection(int nNewX, int nNewY)
           
 void setDrawAllLinks(boolean bDrawAllLinks)
           
 void setDrawVoronoi(boolean bDrawVoronoi)
           
 void setDynamicEnvironment(IEnvironment env)
          does nothing in this implementation
 void setEnvDraw(IEnvDraw envDraw)
           
 void setProjection(IProjection proj)
          Pass in a projection class to handle mapping points to screen coords.
 void setSampFreq(int nSampFreq)
           
 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

setDrawVoronoi

public void setDrawVoronoi(boolean bDrawVoronoi)

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)
Specified by:
setEnvDraw in interface ISwarmDraw

addDrawAgent

public void addDrawAgent(IDrawAgent agent)
Specified by:
addDrawAgent 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

setSampFreq

public void setSampFreq(int nSampFreq)

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

reDraw

public void reDraw(java.awt.Graphics g)
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