Beispiel #1
0
 public Style(float strokeweight, Color strokecolor, Color fillcolor, Color tintcolor, drawModes rectmode, drawModes ellipsemode, angleModes anglemode) : this()
 {
     strokeWidth   = strokeweight;
     strokeColor   = strokecolor;
     fillColor     = fillcolor;
     tintColor     = tintcolor;
     RectangleMode = rectmode;
     CircleMode    = ellipsemode;
     angleMode     = anglemode;
 }
Beispiel #2
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Modifies the location from which rectangles are drawn by changing the way in which parameters given to rect() are interpreted. </summary>
        ///
        /// <remarks>   Jan Tamis, 27-8-2017. </remarks>
        ///
        /// <param name="modes">    The modes. </param>

        public static void rectMode(drawModes modes)
        {
            RectangleMode = modes;
        }
        public SimulatorVisualizer(string experimentName,string genome)
        {
            frame = new CoordinateFrame(0.0f, 0.0f, 5.0f, 0.0f);

			ExperimentWrapper wr = ExperimentWrapper.load(experimentName);

            experiment = wr.experiment;
			if(genome!=null) {
			 experiment.loadGenome(genome);
			}
			
            experiment.initialize();
			
			
			frame.syncFromEnvironment(experiment.environment);

            selected_POI = -1;
            bDrawFOV = false;
            bDrawFOV = false;
            bDrawLabel = true;
            displayAOIRectangle = false;
            displayEvolution = true;

            bEvolve = false;                    //by default we are not evolving, just displaying the CurrentEnvironment
            drawMode = drawModes.selectMode;    //default mode is selecting and moving walls
            selectMode = selectModes.dragMode;

            display_tempwall = false;           //no temporary wall exists at creation
            display_snap = false;               //we have nothing to snap to at creation

            InitializeComponent();

            this.Text = "MultiAgent-HyperSharpNEAT Simulator - " + experimentName;
            //set up double buffering
            this.SetStyle(
              ControlStyles.AllPaintingInWmPaint |
              ControlStyles.UserPaint |
              ControlStyles.DoubleBuffer, true);
        }
Beispiel #4
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Modifies the location from which ellipses are drawn by changing the way in which parameters given to ellipse() are interpreted. </summary>
        ///
        /// <remarks>   Jan Tamis, 27-8-2017. </remarks>
        ///
        /// <param name="modes">    The modes. </param>

        public static void ellipseMode(drawModes modes)
        {
            CircleMode = modes;
        }
 private void areaOfInterestToolStripMenuItem_Click(object sender, EventArgs e)
 {
     drawMode = drawModes.AOIMode;
     updateSelection();
 }
 private void pOIToolStripMenuItem_Click(object sender, EventArgs e)
 {
     drawMode = drawModes.POIMode;
     updateSelection();
 }
 private void goalModeClick(object sender, EventArgs e)
 {
     drawMode = drawModes.goalMode;
     updateSelection();
 }
 private void toolStripButton6_Click(object sender, EventArgs e)
 {
     drawMode = drawModes.POIMode;
     updateSelection();
 }
 private void toolStripButton1_Click_1(object sender, EventArgs e)
 {
     drawMode = drawModes.wallMode;
     updateSelection();
 }