import java.awt.Graphics; public class DrawAgentStartState implements IDrawAgent { double [] m_arrLfStartPts; double m_lfRadius; int m_nDrawColor; public DrawAgentStartState() { m_arrLfStartPts = null; m_lfRadius = 0.01; m_nDrawColor = 11; } public DrawAgentStartState(double [] arrLfStartPositions) { m_arrLfStartPts = null; m_lfRadius = 0.01; m_arrLfStartPts = MathUtils.arrDblCpy(arrLfStartPositions, arrLfStartPositions.length); m_nDrawColor = 11; } public DrawAgentStartState(double [] arrLfStartPositions, int nDrawColor) { m_arrLfStartPts = null; m_lfRadius = 0.01; m_arrLfStartPts = MathUtils.arrDblCpy(arrLfStartPositions, arrLfStartPositions.length); m_nDrawColor = nDrawColor; } public void setStartPositions(double [] arrLfStartPositions) { m_arrLfStartPts = MathUtils.arrDblCpy(arrLfStartPositions, arrLfStartPositions.length); } public void draw(java.awt.Graphics g, IProjection p, double[] arrLfPoints, StateBundle[] arrAgentStates, CommGraph graph) { if(m_arrLfStartPts == null) { if(arrLfPoints != null) { m_arrLfStartPts = MathUtils.arrDblCpy(arrLfPoints, arrLfPoints.length); //m_arrLfStartPts = java.util.Arrays.copyOf(arrLfPoints, // arrLfPoints.length); } } else { int nIdx = 0; g.setColor(globalsUI.getColorMap().getColor(m_nDrawColor)); try { int nRadScreen = p.scaleRadius(m_lfRadius); for(; nIdx < m_arrLfStartPts.length; nIdx += 2) { // g.drawRoundRect(arg0, arg1, arg2, arg3, arg4, arg5) g.drawArc(p.getScreenComp(0, m_arrLfStartPts, nIdx)-nRadScreen, p.getScreenComp(1, m_arrLfStartPts, nIdx)-nRadScreen, 2*nRadScreen, 2*nRadScreen, 0, 360); } } catch(Exception e) { } } } }