|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DrawObjectAggregator
public class DrawObjectAggregator
Constructor Summary | |
---|---|
DrawObjectAggregator()
|
Method Summary | |
---|---|
void |
addDrawAgent(IDrawAgent agent)
|
int |
addEl(ISwarmDraw draw,
ISimUICallback callback,
IProjection proj,
int nXOff,
int nYOff)
|
boolean |
doCallback(double[] arrLfState,
IAgent agent,
StateBundle[] arrStates,
ISensor[] arrSensors,
IEnvironment env,
CommGraph graph,
double lfSimTime)
Callback function From ISimUICallback |
java.lang.Object |
getLastObject()
From ISimUICallback. |
java.awt.image.BufferedImage |
grabLastFrame()
|
void |
moveEl(int nWhichEl,
int nNewXOff,
int nNewYOff)
|
double |
realTimeToSimTime(java.util.Date dateRealTime)
Added for interface completeness, probably should not be called from this adapter |
void |
reDraw(java.awt.Graphics g)
|
void |
scaleProjection(int nNewX,
int nNewY)
|
void |
setEnvDraw(IEnvDraw envDraw)
|
void |
setProjection(IProjection proj)
Pass in a projection class to handle mapping points to screen coords. |
java.util.Date |
simTimeToRealTime(double lfSimTime)
Added for interface completeness, probably should not be called from this adapter |
void |
xlateProjection(int nXOff,
int nYOff)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DrawObjectAggregator()
Method Detail |
---|
public void moveEl(int nWhichEl, int nNewXOff, int nNewYOff)
public int addEl(ISwarmDraw draw, ISimUICallback callback, IProjection proj, int nXOff, int nYOff)
public void setEnvDraw(IEnvDraw envDraw)
setEnvDraw
in interface ISwarmDraw
public java.util.Date simTimeToRealTime(double lfSimTime)
simTimeToRealTime
in interface ISwarmDraw
public double realTimeToSimTime(java.util.Date dateRealTime)
realTimeToSimTime
in interface ISwarmDraw
public void setProjection(IProjection proj)
setProjection
in interface ISwarmDraw
public void addDrawAgent(IDrawAgent agent)
addDrawAgent
in interface ISwarmDraw
public java.awt.image.BufferedImage grabLastFrame()
public void reDraw(java.awt.Graphics g)
reDraw
in interface ISwarmDraw
public boolean doCallback(double[] arrLfState, IAgent agent, StateBundle[] arrStates, ISensor[] arrSensors, IEnvironment env, CommGraph graph, double lfSimTime)
doCallback
in interface ISimUICallback
arrLfState
- state vector (initially initial state,
overwritten with final state)agent
- agent mapping (currently only support for homogenous swarms
)arrStates
- non-position components of
state of each agent (logic vars and control
function)arrSensors
- array of sensor interfaces.env
- environmentgraph
- new communication graph (if an update is needed
pass null otherwise)lfSimTime
- current simulated time
public java.lang.Object getLastObject()
getLastObject
in interface ISimUICallback
public void scaleProjection(int nNewX, int nNewY)
scaleProjection
in interface ISwarmDraw
public void xlateProjection(int nXOff, int nYOff)
xlateProjection
in interface ISwarmDraw
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |