Ignore:
Timestamp:
01/12/16 10:42:58 (5 years ago)
Author:
gkronber
Message:

#1966: fixed various problems: bugs in cloning, bugs in persistence, method names, various minor improvements of source code for readability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/PackingPlanVisualizations/3D/PackingGame.cs

    r13478 r13497  
    2222using System;
    2323using System.Drawing.Printing;
     24using System.Windows.Forms;
    2425using SharpDX;
    2526using SharpDX.Direct3D11;
     
    6566      graphicsDeviceManager.PreparingDeviceSettings +=
    6667        (object sender, PreparingDeviceSettingsEventArgs e) => {
    67           e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = MSAALevel.X4;
     68          e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = MSAALevel.X4;         
    6869          return;
    6970        };
    70       var controlColor = Color.White;//System.Drawing.SystemColors.Control;
     71      var controlColor = Color.White; // System.Drawing.SystemColors.Control;
    7172      backgroundColor = new Color(controlColor.R, controlColor.G, controlColor.B, controlColor.A);
    7273
     
    103104    protected override void Initialize() {
    104105      base.Initialize();
    105       initializeWorld();
     106      InitializeWorld();
    106107      previousMouseState = Mouse.GetState();
    107108      Console.WriteLine("Initial bounds:" + Window.ClientBounds);
    108109      this.Window.IsMouseVisible = true;
    109110    }
    110     private void initializeWorld() {
     111    private void InitializeWorld() {
    111112      #region Matrix-Initialization
    112113      worldMatrix = Matrix.Identity;
     
    233234
    234235    protected override void Update(GameTime gameTime) {
    235       computeMouseHandling();
     236      ComputeMouseHandling();
    236237      base.Update(gameTime);
    237238    }
     
    242243    private Vector2 currentViewAngle = new Vector2(0, 0);
    243244    #endregion Mouse-Handling Variables
    244     private void computeMouseHandling() {
     245    private void ComputeMouseHandling() {
    245246      MouseState mouseState = Mouse.GetState();
    246247
    247       computeLeftMouseBtnHandling(mouseState);
    248       computeMouseWheelHandling(mouseState);
     248      ComputeLeftMouseBtnHandling(mouseState);
     249      ComputeMouseWheelHandling(mouseState);
    249250
    250251      previousMouseState = mouseState;
    251252    }
    252     private void computeLeftMouseBtnHandling(MouseState mouseState) {
     253    private void ComputeLeftMouseBtnHandling(MouseState mouseState) {
    253254      //Left btn pressed
    254255      if (mouseState.LeftButton.Down && (previousMouseState.LeftButton.Pressed || previousMouseState.LeftButton.Down)) {
     
    268269      }
    269270    }
    270     private void computeMouseWheelHandling(MouseState mouseState) {
     271    private void ComputeMouseWheelHandling(MouseState mouseState) {
    271272      int curr = mouseState.WheelDelta;
    272273      if (curr < 0 && zoom > 1) {
Note: See TracChangeset for help on using the changeset viewer.