Пример #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            _cubesInfo = CubesInfo.Default;
            _form.SetCubesInfo(_cubesInfo);

            // Don't perform any transformations
            world = Matrix.Identity;

            // Place the camera at vector (5,5,5) and look at vector (0,0,0)
            view = Matrix.CreateLookAt(new Vector3(30, 30, 30), new Vector3(0, 0, 0), Vector3.Up);

            // Create the projection
            projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, GraphicsDevice.Viewport.AspectRatio, 0.1f, 100.0f);

            base.Initialize();
        }
Пример #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            _cubesInfo = CubesInfo.Default;
            _form.SetCubesInfo(_cubesInfo);

            // Don't perform any transformations
            world = Matrix.Identity;

            // Place the camera at vector (5,5,5) and look at vector (0,0,0)
            view = Matrix.CreateLookAt(new Vector3(30, 30, 30), new Vector3(0, 0, 0), Vector3.Up);

            // Create the projection
            projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, GraphicsDevice.Viewport.AspectRatio, 0.1f, 100.0f);


            base.Initialize();
        }
Пример #3
0
 public void SetCubesInfo(CubesInfo info)
 {
     _cubesInfo = info;
     this.dimSizeNumericUpDown.Value = info.DimensionSize;
     this.polygonsColorPicker.Color = ColorUtils.DrawingColor(_cubesInfo.Color);
 }
Пример #4
0
 public void SetCubesInfo(CubesInfo info)
 {
     _cubesInfo = info;
     this.dimSizeNumericUpDown.Value = info.DimensionSize;
     this.polygonsColorPicker.Color  = ColorUtils.DrawingColor(_cubesInfo.Color);
 }