Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13161


Ignore:
Timestamp:
11/15/15 13:56:30 (8 years ago)
Author:
gkronber
Message:

#1966: removed SharpDX binaries since these are available through a transport plugin now (see #2504) and also made some changes to make the code work with the latest stable release of SharpDX

Location:
branches/HeuristicLab.BinPacking
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs.frame

    r13032 r13161  
    2828  [Plugin("HeuristicLab.Problems.BinPacking.Views", "3.3.7.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.BinPacking.Views-3.3.dll", PluginFileType.Assembly)]
     30  [PluginFile("PackingPlanVisualizations.dll", PluginFileType.Assembly)]
    3031  [PluginDependency("HeuristicLab.Common", "3.3")]
    3132  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    3233  [PluginDependency("HeuristicLab.Core", "3.3")]
    3334  [PluginDependency("HeuristicLab.Persistence", "3.3")]
     35  [PluginDependency("HeuristicLab.SharpDX", "2.6.3")]
    3436  public class HeuristicLabProblemsBinPackingViewsPlugin : PluginBase {
    3537  }
  • branches/HeuristicLab.BinPacking/PackingPlanVisualizations/2D/PackingPlan2D.cs

    r13032 r13161  
    6262    private void InitializeRenderTarget() {
    6363      hwndProperties.Hwnd = this.Handle;
    64       hwndProperties.PixelSize = new DrawingSize(this.Width, this.Height);
     64      hwndProperties.PixelSize = new Size2(this.Width, this.Height);
    6565      hwndProperties.PresentOptions = PresentOptions.None;
    6666      textFormat = new TextFormat(dwFactory, "arial", 14);
     
    130130    private void PackingPlan2D_Resize(object sender, EventArgs e) {
    131131      if (wndRender != null)
    132         wndRender.Resize(new DrawingSize(this.Width, this.Height));
     132        wndRender.Resize(new Size2(this.Width, this.Height));
    133133      //this.Refresh();
    134134    }
  • branches/HeuristicLab.BinPacking/PackingPlanVisualizations/3D/PackingGame.cs

    r13032 r13161  
    2222using System;
    2323using SharpDX;
    24 using SharpDX.Toolkit;     
     24using SharpDX.Direct3D11;
     25using SharpDX.Toolkit;
    2526using SharpDX.Toolkit.Graphics;
    2627using SharpDX.Toolkit.Input;
    2728
    2829using ButtonStateDX = SharpDX.Toolkit.Input.ButtonState;
    29 using SharpDX.Direct3D11;
     30
    3031
    3132namespace PackingPlanVisualizations {
     
    3334
    3435
    35     #region Global Private Variables   
     36    #region Global Private Variables
    3637    private GraphicsDeviceManager graphicsDeviceManager;
    3738    private PackingPlan3D control;
     
    4243    private int selectedItemIndex = -1;
    4344
    44     private BasicEffect basicEffect;     
     45    private BasicEffect basicEffect;
    4546    private Color backgroundColor { get; set; }
    4647
    47     private CenteredContainer container;   
     48    private CenteredContainer container;
    4849    private MouseManager Mouse;
    49     #endregion Global Private Variables     
     50    #endregion Global Private Variables
    5051
    5152    protected override void Dispose(bool disposeManagedResources) {
     
    5859    public PackingGame(PackingPlan3D control)
    5960      : base() {
    60         this.control = control;
     61      this.control = control;
    6162      graphicsDeviceManager = new GraphicsDeviceManager(this);
    6263      graphicsDeviceManager.PreferMultiSampling = true;
    63       graphicsDeviceManager.PreparingDeviceSettings += 
    64         (object sender, PreparingDeviceSettingsEventArgs e) => {           
     64      graphicsDeviceManager.PreparingDeviceSettings +=
     65        (object sender, PreparingDeviceSettingsEventArgs e) => {
    6566          e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = MSAALevel.X4;
    6667          return;
    6768        };
    6869      var controlColor = Color.White;//System.Drawing.SystemColors.Control;
    69       backgroundColor = new Color (controlColor.R,controlColor.G, controlColor.B, controlColor.A);
     70      backgroundColor = new Color(controlColor.R, controlColor.G, controlColor.B, controlColor.A);
    7071
    7172      Mouse = new MouseManager(this);
     
    135136      //Primitive color
    136137      basicEffect.AmbientLightColor = new Vector3(0.1f, 0.1f, 0.1f);
    137       basicEffect.DiffuseColor = new Vector3(1.0f, 1.0f, 1.0f);
     138      basicEffect.DiffuseColor = new Vector4(1.0f, 1.0f, 1.0f, 1.0f);
    138139      basicEffect.SpecularColor = new Vector3(0.25f, 0.25f, 0.25f);
    139140      basicEffect.SpecularPower = 5.0f;
     
    204205      GraphicsDevice.Clear(backgroundColor);
    205206
    206       worldMatrix = 
     207      worldMatrix =
    207208        Matrix.RotationY(MathUtil.DegreesToRadians(-currentViewAngle.X / 4)) *
    208209        Matrix.RotationX(MathUtil.DegreesToRadians(currentViewAngle.Y / 4));
     
    229230                item.RenderShapeTriangles(GraphicsDevice);
    230231              } else
    231                 item.RenderShapeLines(GraphicsDevice, new Color(0,0,0));
     232                item.RenderShapeLines(GraphicsDevice, new Color(0, 0, 0));
    232233            }
    233234          }
     
    235236      }
    236237
    237       base.Draw(gameTime);       
     238      base.Draw(gameTime);
    238239    }
    239240
     
    244245
    245246    protected override void Update(GameTime gameTime) {
    246       computeMouseHandling();                                     
     247      computeMouseHandling();
    247248      base.Update(gameTime);
    248249    }
     
    263264    private void computeLeftMouseBtnHandling(MouseState mouseState) {
    264265      //Left btn released
    265       if (mouseState.Left.Equals(ButtonStateDX.Released) && mouseState.Left.Equals(previousMouseState.Left)) {
     266      if (mouseState.LeftButton.Released && mouseState.LeftButton.Equals(previousMouseState.LeftButton)) {
    266267        //Console.WriteLine("Released");
    267268      }
    268269
    269270      //Left btn pressed
    270       else if (mouseState.Left.Equals(ButtonStateDX.Pressed) && mouseState.Left.Equals(previousMouseState.Left)) {
     271      else if (mouseState.LeftButton.Pressed && mouseState.LeftButton.Equals(previousMouseState.LeftButton)) {
    271272        currentViewAngle = new Vector2(
    272273          viewAngleOnBtnRelease.X + mouseState.X - mousePositionOnBtnDown.X,
     
    279280
    280281      //Left btn freshly pressed ==> ONLICK-EVENT
    281       else if (mouseState.Left.Equals(ButtonStateDX.Pressed) && !previousMouseState.Left.Equals(ButtonStateDX.Pressed)) {
     282      else if (mouseState.LeftButton.Pressed && !previousMouseState.LeftButton.Pressed) {
    282283        Console.WriteLine("OnClick");
    283284        PackingPlan3D native = (PackingPlan3D)Window.NativeWindow;
     
    293294
    294295      //Left btn freshly released ==> ONRELEASE-EVENT
    295       else if (mouseState.Left.Equals(ButtonStateDX.Released) && !previousMouseState.Left.Equals(ButtonStateDX.Released)) {
     296      else if (mouseState.LeftButton.Released && !previousMouseState.LeftButton.Released) {
    296297        Console.WriteLine("OnRelease");
    297298        viewAngleOnBtnRelease = currentViewAngle;
  • branches/HeuristicLab.BinPacking/PackingPlanVisualizations/PackingPlanVisualizations.csproj

    r13028 r13161  
    4242  </PropertyGroup>
    4343  <ItemGroup>
    44     <Reference Include="SharpDX, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    45       <SpecificVersion>False</SpecificVersion>
    46       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.dll</HintPath>
     44    <Reference Include="SharpDX">
     45      <HintPath>..\..\..\trunk\sources\bin\SharpDX.dll</HintPath>
     46      <Private>False</Private>
    4747    </Reference>
    48     <Reference Include="SharpDX.D3DCompiler, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    49       <SpecificVersion>False</SpecificVersion>
    50       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.D3DCompiler.dll</HintPath>
     48    <Reference Include="SharpDX.Direct2D1">
     49      <HintPath>..\..\..\trunk\sources\bin\SharpDX.Direct2D1.dll</HintPath>
     50      <Private>False</Private>
    5151    </Reference>
    52     <Reference Include="SharpDX.Direct2D1, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    53       <SpecificVersion>False</SpecificVersion>
    54       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.Direct2D1.dll</HintPath>
     52    <Reference Include="SharpDX.Direct3D11">
     53      <HintPath>..\..\..\trunk\sources\bin\SharpDX.Direct3D11.dll</HintPath>
     54      <Private>False</Private>
    5555    </Reference>
    56     <Reference Include="SharpDX.Direct3D11, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    57       <SpecificVersion>False</SpecificVersion>
    58       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.Direct3D11.dll</HintPath>
     56    <Reference Include="SharpDX.DXGI">
     57      <HintPath>..\..\..\trunk\sources\bin\SharpDX.DXGI.dll</HintPath>
     58      <Private>False</Private>
    5959    </Reference>
    60     <Reference Include="SharpDX.DirectInput, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    61       <SpecificVersion>False</SpecificVersion>
    62       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.DirectInput.dll</HintPath>
     60    <Reference Include="SharpDX.Toolkit">
     61      <HintPath>..\..\..\trunk\sources\bin\SharpDX.Toolkit.dll</HintPath>
     62      <Private>False</Private>
    6363    </Reference>
    64     <Reference Include="SharpDX.DXGI, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    65       <SpecificVersion>False</SpecificVersion>
    66       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.DXGI.dll</HintPath>
     64    <Reference Include="SharpDX.Toolkit.Game">
     65      <HintPath>..\..\..\trunk\sources\bin\SharpDX.Toolkit.Game.dll</HintPath>
     66      <Private>False</Private>
    6767    </Reference>
    68     <Reference Include="SharpDX.Toolkit, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    69       <SpecificVersion>False</SpecificVersion>
    70       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.Toolkit.dll</HintPath>
     68    <Reference Include="SharpDX.Toolkit.Graphics">
     69      <HintPath>..\..\..\trunk\sources\bin\SharpDX.Toolkit.Graphics.dll</HintPath>
     70      <Private>False</Private>
    7171    </Reference>
    72     <Reference Include="SharpDX.Toolkit.Compiler, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    73       <SpecificVersion>False</SpecificVersion>
    74       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.Toolkit.Compiler.dll</HintPath>
    75     </Reference>
    76     <Reference Include="SharpDX.Toolkit.Game, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    77       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.Toolkit.Game.dll</HintPath>
    78     </Reference>
    79     <Reference Include="SharpDX.Toolkit.Graphics, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    80       <SpecificVersion>False</SpecificVersion>
    81       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.Toolkit.Graphics.dll</HintPath>
    82     </Reference>
    83     <Reference Include="SharpDX.Toolkit.Input, Version=2.5.0.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
    84       <SpecificVersion>False</SpecificVersion>
    85       <HintPath>..\..\..\..\..\SharpDXNightly\Bin\Signed-net40\SharpDX.Toolkit.Input.dll</HintPath>
     72    <Reference Include="SharpDX.Toolkit.Input">
     73      <HintPath>..\..\..\trunk\sources\bin\SharpDX.Toolkit.Input.dll</HintPath>
     74      <Private>False</Private>
    8675    </Reference>
    8776    <Reference Include="System" />
     
    128117    <None Include="HeuristicLab.snk" />
    129118  </ItemGroup>
    130   <ItemGroup>
    131     <Content Include="SharpDX\SharpDX.D3DCompiler.dll" />
    132     <Content Include="SharpDX\SharpDX.D3DCompiler.xml" />
    133     <Content Include="SharpDX\SharpDX.Direct2D1.dll" />
    134     <Content Include="SharpDX\SharpDX.Direct2D1.xml" />
    135     <Content Include="SharpDX\SharpDX.Direct3D11.dll" />
    136     <Content Include="SharpDX\SharpDX.Direct3D11.xml" />
    137     <Content Include="SharpDX\SharpDX.DirectInput.dll" />
    138     <Content Include="SharpDX\SharpDX.DirectInput.xml" />
    139     <Content Include="SharpDX\SharpDX.dll" />
    140     <Content Include="SharpDX\SharpDX.DXGI.dll" />
    141     <Content Include="SharpDX\SharpDX.DXGI.xml" />
    142     <Content Include="SharpDX\SharpDX.Toolkit.Compiler.dll" />
    143     <Content Include="SharpDX\SharpDX.Toolkit.Compiler.xml" />
    144     <Content Include="SharpDX\SharpDX.Toolkit.dll" />
    145     <Content Include="SharpDX\SharpDX.Toolkit.Game.dll" />
    146     <Content Include="SharpDX\SharpDX.Toolkit.Game.xml" />
    147     <Content Include="SharpDX\SharpDX.Toolkit.Graphics.dll" />
    148     <Content Include="SharpDX\SharpDX.Toolkit.Graphics.xml" />
    149     <Content Include="SharpDX\SharpDX.Toolkit.Input.dll" />
    150     <Content Include="SharpDX\SharpDX.Toolkit.Input.xml" />
    151     <Content Include="SharpDX\SharpDX.Toolkit.xml" />
    152     <Content Include="SharpDX\SharpDX.xml" />
    153   </ItemGroup>
    154119  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    155120  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset for help on using the changeset viewer.