Esempio n. 1
0
        public MapTester1()
        {
            InitializeComponent();

            // Setup the map
            _map.CollisionHandler = new CollisionHandler();
            trkElapsedTime_Scroll(this, new EventArgs());
            trkThreshold_Scroll(this, new EventArgs());

            // Setup the viewer
            pictureBox1.SetBorder(_boundryLower, _boundryUpper);
            pictureBox1.ShowBorder(Color.GhostWhite, 3);
            trkYBoundry_Scroll(this, new EventArgs());
            pictureBox1.ZoomFit();

            // Setup the vector field
            _vectorField = new VectorField2D();
            _vectorField.SquaresPerSideX = 10;
            _vectorField.SquaresPerSideY = 10;
            trkVectorFieldForce_Scroll(this, new EventArgs());
            trkVectorFieldSize_Scroll(this, new EventArgs());

            // Setup the vector field combo
            foreach (string enumName in Enum.GetNames(typeof(VectorField2DMode)))
            {
                cboVectorField.Items.Add(enumName);
            }
            cboVectorField.Text = VectorField2DMode.None.ToString();

            // Misc
            radGravity_CheckedChanged(this, new EventArgs());
            chkDrawCollisionsRed_CheckedChanged(this, new EventArgs());
            trkElasticity_Scroll(this, new EventArgs());
            radPullApart_CheckedChanged(this, new EventArgs());
            trkPullApartPercent_Scroll(this, new EventArgs());
            trkPullApartSpring_Scroll(this, new EventArgs());
            trkGravityForce_Scroll(this, new EventArgs());

            toolTip1.SetToolTip(chkSmallObjectsAreMassive, "(doesn't affect rigid bodies)");

            // Run it
            chkRunning.Checked = true;

            trkElapsedTime.BackColor = tabControl1.BackColor;

        }
Esempio n. 2
0
 public void DrawVectorField(VectorField2D field, DrawMode mode)
 {
 }