Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj	(revision 13532)
@@ -140,16 +140,16 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
     <Reference Include="System.Windows.Forms" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="PackingPlans\PackingPlan2DView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="PackingPlans\PackingPlan2DView.Designer.cs">
-      <DependentUpon>PackingPlan2DView.cs</DependentUpon>
-    </Compile>
+    <Reference Include="System.Xaml" />
+    <Reference Include="UIAutomationProvider" />
+    <Reference Include="WindowsBase" />
+    <Reference Include="WindowsFormsIntegration" />
+  </ItemGroup>
+  <ItemGroup>
     <Compile Include="PackingPlans\PackingPlan3DView.cs">
       <SubType>UserControl</SubType>
@@ -158,4 +158,7 @@
       <DependentUpon>PackingPlan3DView.cs</DependentUpon>
     </Compile>
+    <Compile Include="Shapes\Container3DView.xaml.cs">
+      <DependentUpon>Container3DView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Shapes\CuboidPackingItemView.cs">
       <SubType>UserControl</SubType>
@@ -169,16 +172,4 @@
     <Compile Include="Shapes\CuboidPackingShapeView.Designer.cs">
       <DependentUpon>CuboidPackingShapeView.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Shapes\RectangularPackingItemView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="Shapes\RectangularPackingItemView.Designer.cs">
-      <DependentUpon>RectangularPackingItemView.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Shapes\RectangularPackingShapeView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="Shapes\RectangularPackingShapeView.Designer.cs">
-      <DependentUpon>RectangularPackingShapeView.cs</DependentUpon>
     </Compile>
     <None Include="HeuristicLab.snk" />
@@ -194,8 +185,15 @@
       <Private>False</Private>
     </ProjectReference>
-    <ProjectReference Include="..\..\PackingPlanVisualizations\PackingPlanVisualizations.csproj">
-      <Project>{0fd5ea67-a284-4166-9f45-9c6bc07d5b83}</Project>
-      <Name>PackingPlanVisualizations</Name>
-    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="PackingPlans\PackingPlan3DView.resx">
+      <DependentUpon>PackingPlan3DView.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="Shapes\Container3DView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan2DView.resx
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan2DView.resx	(revision 13532)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan2DView.resx	(revision 13532)
@@ -0,0 +1,120 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.Designer.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.Designer.cs	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.Designer.cs	(revision 13532)
@@ -45,18 +45,9 @@
     /// </summary>
     private void InitializeComponent() {
-      this.packingPlan3D = new PackingPlanVisualizations.PackingPlan3D();
       this.binSelection = new System.Windows.Forms.ListBox();
       this.itemSelection = new System.Windows.Forms.ListBox();
+      this.elementHost = new System.Windows.Forms.Integration.ElementHost();
+      this.packingPlan3D = new HeuristicLab.Problems.BinPacking.Views.Shapes.Container3DView();
       this.SuspendLayout();
-      // 
-      // packingPlan3D
-      // 
-      this.packingPlan3D.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.packingPlan3D.Location = new System.Drawing.Point(119, 3);
-      this.packingPlan3D.Name = "packingPlan3D";
-      this.packingPlan3D.Size = new System.Drawing.Size(229, 293);
-      this.packingPlan3D.TabIndex = 3;
       // 
       // binSelection
@@ -82,11 +73,23 @@
       this.itemSelection.SelectedIndexChanged += new System.EventHandler(this.itemSelection_SelectedIndexChanged);
       // 
+      // elementHost
+      // 
+      this.elementHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.elementHost.Location = new System.Drawing.Point(119, 3);
+      this.elementHost.Name = "elementHost";
+      this.elementHost.Size = new System.Drawing.Size(229, 290);
+      this.elementHost.TabIndex = 6;
+      this.elementHost.Text = "elementHost1";
+      this.elementHost.Child = this.packingPlan3D;
+      // 
       // PackingPlan3DView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.elementHost);
       this.Controls.Add(this.itemSelection);
       this.Controls.Add(this.binSelection);
-      this.Controls.Add(this.packingPlan3D);
       this.Name = "PackingPlan3DView";
       this.Size = new System.Drawing.Size(351, 299);
@@ -97,7 +100,8 @@
     #endregion
 
-    private PackingPlanVisualizations.PackingPlan3D packingPlan3D;
     private System.Windows.Forms.ListBox binSelection;
     private System.Windows.Forms.ListBox itemSelection;
+    private System.Windows.Forms.Integration.ElementHost elementHost;
+    private Shapes.Container3DView packingPlan3D;
   }
 }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs	(revision 13532)
@@ -39,10 +39,8 @@
 
     protected override void DeregisterContentEvents() {
-      Content.QualityChanged -= new EventHandler(Content_QualityChanged);
       base.DeregisterContentEvents();
     }
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.QualityChanged += new EventHandler(Content_QualityChanged);
     }
 
@@ -56,6 +54,6 @@
       base.OnContentChanged();
       binSelection.Items.Clear();
-      if (Content == null) { 
-        packingPlan3D.InitializeContainer(0, 0, 0);
+      if (Content == null) {
+         packingPlan3D.Clear();
       } else {
         int i = 0;
@@ -65,5 +63,6 @@
         binSelection.SelectedIndex = 0;
         UpdateModel();
-        packingPlan3D.StartRendering();
+        packingPlan3D.Focus(); // for mouse wheel?
+        // packingPlan3D.StartRendering();
       }
     }
@@ -71,14 +70,15 @@
     private void UpdateModel() {
       int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0;
-      var bin = Content.BinPackings[currentBin].BinMeasures;
-      packingPlan3D.InitializeContainer(bin.Width, bin.Height, bin.Depth);
-      foreach (var entry in Content.BinPackings[currentBin].ItemMeasures) {
-        var position = Content.BinPackings[currentBin].ItemPositions[entry.Key];
-        packingPlan3D.AddItemToContainer(
-        position.Rotated ? entry.Value.Depth : entry.Value.Width,
-        entry.Value.Height,
-        position.Rotated ? entry.Value.Width : entry.Value.Depth,
-        position.X, position.Y, position.Z, entry.Key, entry.Value.Material);
-      }
+      packingPlan3D.ShowContainer(Content.BinPackings[currentBin]);
+      // var bin = Content.BinPackings[currentBin].BinMeasures;
+      // // packingPlan3D.InitializeContainer(bin.Width, bin.Height, bin.Depth);
+      // foreach (var entry in Content.BinPackings[currentBin].ItemMeasures) {
+      //   var position = Content.BinPackings[currentBin].ItemPositions[entry.Key];
+      //    packingPlan3D.AddItemToContainer(
+      //    position.Rotated ? entry.Value.Depth : entry.Value.Width,
+      //    entry.Value.Height,
+      //    position.Rotated ? entry.Value.Width : entry.Value.Depth,
+      //    position.X, position.Y, position.Z, entry.Key, entry.Value.Material);
+      // }
     }
 
@@ -89,10 +89,6 @@
       itemSelection.Items.Clear();
       int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0;
-      foreach (var entry in Content.BinPackings[currentBin].ItemMeasures) {
-        itemSelection.Items.Add(entry.Key);
-      }
+      packingPlan3D.ShowContainer(Content.BinPackings[currentBin]);
 
-      packingPlan3D.Invalidate();
-      packingPlan3D.Update();
     }
 
@@ -103,28 +99,25 @@
       if ((itemSelection != null && itemSelection.SelectedItem != null) && Int32.TryParse(itemSelection.SelectedItem.ToString(), out selectedItem)) {
         packingPlan3D.SelectItem(selectedItem);
-      } else      
-        packingPlan3D.UnselectItem();
-
-      packingPlan3D.Invalidate();
-      packingPlan3D.Update();
+      } else
+        packingPlan3D.ClearSelection();
     }
 
-    private void Content_QualityChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_QualityChanged), sender, e);
-      else {
-        binSelection.Items.Clear();
-        if (Content == null) {
-          packingPlan3D.InitializeContainer(0, 0, 0);
-        } else {
-          int i = 0;
-          foreach (var bp in Content.BinPackings)
-            binSelection.Items.Add(i++ + " (" + Math.Round(bp.PackingDensity * 100, 2) + "%)");
-          binSelection.SelectedIndex = 0;
-          UpdateModel();
-          packingPlan3D.StartRendering();
-        }
-      }
-    }  
+    // private void Content_QualityChanged(object sender, EventArgs e) {
+    //   if (InvokeRequired)
+    //     Invoke(new EventHandler(Content_QualityChanged), sender, e);
+    //   else {
+    //     binSelection.Items.Clear();
+    //     if (Content == null) {
+    //       packingPlan3D.InitializeContainer(0, 0, 0);
+    //     } else {
+    //       int i = 0;
+    //       foreach (var bp in Content.BinPackings)
+    //         binSelection.Items.Add(i++ + " (" + Math.Round(bp.PackingDensity * 100, 2) + "%)");
+    //       binSelection.SelectedIndex = 0;
+    //       UpdateModel();
+    //       // packingPlan3D.StartRendering();
+    //     }
+    //   }
+    // }
   }
 }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.resx
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.resx	(revision 13532)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.resx	(revision 13532)
@@ -0,0 +1,120 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs.frame
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs.frame	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs.frame	(revision 13532)
@@ -28,5 +28,4 @@
   [Plugin("HeuristicLab.Problems.BinPacking.Views", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.BinPacking.Views-3.3.dll", PluginFileType.Assembly)]
-  [PluginFile("PackingPlanVisualizations.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/Container3DView.xaml
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/Container3DView.xaml	(revision 13532)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/Container3DView.xaml	(revision 13532)
@@ -0,0 +1,65 @@
+﻿<UserControl x:Class="HeuristicLab.Problems.BinPacking.Views.Shapes.Container3DView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             mc:Ignorable="d" 
+             d:DesignHeight="300" d:DesignWidth="300"
+             MouseWheel="viewport3D1_MouseWheel" MouseMove="viewport3D1_MouseMove" MouseDown="viewport3D1_MouseDown" MouseUp="viewport3D1_MouseUp"
+             >
+    <Grid>
+        <Viewport3D Name="viewport3D1" >
+            <Viewport3D.Camera>
+                <PerspectiveCamera x:Name="camMain" Position="0.5 3 3" LookDirection="0 -1 -1">
+                </PerspectiveCamera>
+            </Viewport3D.Camera>
+            <ModelVisual3D>
+                <ModelVisual3D.Content>
+                    <DirectionalLight x:Name="dirLightMain" Direction="0,-1,-1"/>
+                </ModelVisual3D.Content>
+            </ModelVisual3D>
+            <ModelVisual3D>
+                <ModelVisual3D.Content>
+                    <AmbientLight Color="DarkGray"/>
+                </ModelVisual3D.Content>
+            </ModelVisual3D>
+            <ModelVisual3D x:Name="MyModel">
+                <ModelVisual3D.Content>
+                    <GeometryModel3D>
+                        <GeometryModel3D.Geometry>
+                            <MeshGeometry3D x:Name="meshMain" 
+                                Positions="0 0 0  1 0 0  0 1 0  1 1 0  0 0 1  1 0 1  0 1 1  1 1 1" 
+                                TriangleIndices="2 3 1  2 1 0  7 1 3  7 5 1  6 5 7  6 4 5  6 2 0  2 0 4  2 7 3  2 6 7  0 1 5  0 5 4">
+                            </MeshGeometry3D>
+                        </GeometryModel3D.Geometry>
+                        <GeometryModel3D.Material>
+                            <DiffuseMaterial x:Name="matDiffuseMain">
+                                <DiffuseMaterial.Brush>
+                                    <SolidColorBrush Color="LightGray"/>
+                                </DiffuseMaterial.Brush>
+                            </DiffuseMaterial>
+                        </GeometryModel3D.Material>
+                    </GeometryModel3D>
+                </ModelVisual3D.Content>
+                <ModelVisual3D.Transform>
+                    <Transform3DGroup>
+                        <TranslateTransform3D OffsetX="-0.5" OffsetY="-0.5" OffsetZ="-0.5" />
+                        <RotateTransform3D>
+                            <RotateTransform3D.Rotation>
+                                <AxisAngleRotation3D x:Name="rotateX" Axis="0 1 0"/>
+                            </RotateTransform3D.Rotation>
+                        </RotateTransform3D>
+                        <RotateTransform3D>
+                            <RotateTransform3D.Rotation>
+                                <AxisAngleRotation3D x:Name="rotateY" Axis="1 0 0"/>
+                            </RotateTransform3D.Rotation>
+                        </RotateTransform3D>
+                        <TranslateTransform3D OffsetX="0.5" OffsetY="0.5" OffsetZ="0.5" />
+                        <ScaleTransform3D x:Name ="scale" CenterX="0.5" CenterY="0.5" CenterZ="0.5" ScaleX="1" ScaleY="1" ScaleZ="1">
+                        </ScaleTransform3D>
+                    </Transform3DGroup>
+                </ModelVisual3D.Transform>
+            </ModelVisual3D>
+        </Viewport3D>
+    </Grid>
+</UserControl>
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/Container3DView.xaml.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/Container3DView.xaml.cs	(revision 13532)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/Container3DView.xaml.cs	(revision 13532)
@@ -0,0 +1,181 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
+using HeuristicLab.Problems.BinPacking.Dimensions;
+using HeuristicLab.Problems.BinPacking.PackingBin;
+using HeuristicLab.Problems.BinPacking.PackingItem;
+
+namespace HeuristicLab.Problems.BinPacking.Views.Shapes {
+  public partial class Container3DView : UserControl {
+    private Point startPos;
+    private bool mouseDown = false;
+    private double startAngleX;
+    private double startAngleY;
+    private int selectedItemIndex;
+
+    public Container3DView() {
+      InitializeComponent();
+      Clear();
+    }
+
+    public void Clear() {
+      meshMain.Positions.Clear();
+      meshMain.TriangleIndices.Clear();
+
+      mouseDown = false;
+      startAngleX = 0;
+      startAngleY = 0;
+      selectedItemIndex = -1;
+
+      AddCube(0, 0, 0, 1, 1, 1); // add an empty cube (TODO: remove)
+    }
+
+
+    public void ShowContainer(BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> packing) {
+      var container = packing.BinMeasures;
+      // TODO: draw transparent container
+      // packingPlan3D.InitializeContainer(bin.Width, bin.Height, bin.Depth);
+
+      foreach (var item in packing.ItemMeasures) {
+        var position = packing.ItemPositions[item.Key];
+
+        // ignore the item.Key
+        // ignore the item.Material
+
+        AddCube(position.X, position.Y, position.Z,
+          position.Rotated ? item.Value.Depth : item.Value.Width,
+          item.Value.Height,
+          position.Rotated ? item.Value.Width : item.Value.Depth);
+      }
+    }
+
+    public void SelectItem(int itemIndex) {
+      // selection of an item should make all other items semi-transparent
+      selectedItemIndex = itemIndex;
+    }
+    public void ClearSelection() {
+      // remove all transparency
+      selectedItemIndex = -1;
+    }
+
+    private void viewport3D1_MouseWheel(object sender, MouseWheelEventArgs e) {
+      if (e.Delta > 0) {
+        camMain.Position -= 0.5 * camMain.LookDirection;
+      } else if (e.Delta < 0) {
+        camMain.Position += 0.5 * camMain.LookDirection;
+      }
+    }
+
+    private void viewport3D1_MouseMove(object sender, MouseEventArgs e) {
+      if (!mouseDown) return;
+      var pos = e.GetPosition((IInputElement)this);
+      rotateX.Angle = startAngleX + (pos.X - startPos.X) / 4;
+      rotateY.Angle = startAngleY + (pos.Y - startPos.Y) / 4;
+    }
+
+    private void viewport3D1_MouseDown(object sender, MouseButtonEventArgs e) {
+      startAngleX = rotateX.Angle;
+      startAngleY = rotateY.Angle;
+      this.startPos = e.GetPosition((IInputElement)this);
+      this.mouseDown = true;
+    }
+
+    private void viewport3D1_MouseUp(object sender, MouseButtonEventArgs e) {
+      mouseDown = false;
+    }
+
+
+    #region helper for cubes
+
+    private void AddCube(int x, int y, int z, int width, int height, int depth) {
+      AddTriangles(AddPoints(x, y, z, width, height, depth));
+    }
+
+    private void AddTriangles(int[] pointIdx) {
+      // back side
+      meshMain.TriangleIndices.Add(pointIdx[0]);
+      meshMain.TriangleIndices.Add(pointIdx[2]);
+      meshMain.TriangleIndices.Add(pointIdx[1]);
+
+      meshMain.TriangleIndices.Add(pointIdx[0]);
+      meshMain.TriangleIndices.Add(pointIdx[3]);
+      meshMain.TriangleIndices.Add(pointIdx[2]);
+
+      // right side
+      meshMain.TriangleIndices.Add(pointIdx[2]);
+      meshMain.TriangleIndices.Add(pointIdx[6]);
+      meshMain.TriangleIndices.Add(pointIdx[5]);
+
+      meshMain.TriangleIndices.Add(pointIdx[1]);
+      meshMain.TriangleIndices.Add(pointIdx[2]);
+      meshMain.TriangleIndices.Add(pointIdx[5]);
+
+      // left side
+      meshMain.TriangleIndices.Add(pointIdx[7]);
+      meshMain.TriangleIndices.Add(pointIdx[3]);
+      meshMain.TriangleIndices.Add(pointIdx[4]);
+
+      meshMain.TriangleIndices.Add(pointIdx[4]);
+      meshMain.TriangleIndices.Add(pointIdx[3]);
+      meshMain.TriangleIndices.Add(pointIdx[0]);
+
+      // front side
+      meshMain.TriangleIndices.Add(pointIdx[6]);
+      meshMain.TriangleIndices.Add(pointIdx[7]);
+      meshMain.TriangleIndices.Add(pointIdx[4]);
+
+      meshMain.TriangleIndices.Add(pointIdx[6]);
+      meshMain.TriangleIndices.Add(pointIdx[4]);
+      meshMain.TriangleIndices.Add(pointIdx[5]);
+
+      // top side
+      meshMain.TriangleIndices.Add(pointIdx[3]);
+      meshMain.TriangleIndices.Add(pointIdx[7]);
+      meshMain.TriangleIndices.Add(pointIdx[6]);
+
+      meshMain.TriangleIndices.Add(pointIdx[3]);
+      meshMain.TriangleIndices.Add(pointIdx[6]);
+      meshMain.TriangleIndices.Add(pointIdx[2]);
+
+      // bottom side
+      meshMain.TriangleIndices.Add(pointIdx[5]);
+      meshMain.TriangleIndices.Add(pointIdx[4]);
+      meshMain.TriangleIndices.Add(pointIdx[0]);
+
+      meshMain.TriangleIndices.Add(pointIdx[5]);
+      meshMain.TriangleIndices.Add(pointIdx[0]);
+      meshMain.TriangleIndices.Add(pointIdx[1]);
+
+
+    }
+
+    private int[] AddPoints(int x, int y, int z, int w, int h, int d) {
+      // ground
+      meshMain.Positions.Add(new Point3D(x, y, z));
+      meshMain.Positions.Add(new Point3D(x + w, y, z));
+      meshMain.Positions.Add(new Point3D(x + w, y + h, z));
+      meshMain.Positions.Add(new Point3D(x, y + h, z));
+      // top
+      meshMain.Positions.Add(new Point3D(x, y, z + d));
+      meshMain.Positions.Add(new Point3D(x + w, y, z + d));
+      meshMain.Positions.Add(new Point3D(x + w, y + h, z + d));
+      meshMain.Positions.Add(new Point3D(x, y + h, z + d));
+
+      return Enumerable.Range(meshMain.Positions.Count - 8, 8).ToArray();
+    }
+    #endregion
+  }
+}
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.Designer.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.Designer.cs	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.Designer.cs	(revision 13532)
@@ -48,19 +48,9 @@
     /// </summary>
     private void InitializeComponent() {
-      this.packingPlan3D = new PackingPlanVisualizations.PackingPlan3D();
       this.SuspendLayout();
-      // 
-      // packingPlan3D
-      // 
-      this.packingPlan3D.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.packingPlan3D.Location = new System.Drawing.Point(0, 0);
-      this.packingPlan3D.Name = "packingPlan3D";
-      this.packingPlan3D.Size = new System.Drawing.Size(351, 299);
-      this.packingPlan3D.TabIndex = 3;
       // 
       // CuboidPackingItemView
       // 
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
-      this.Controls.Add(this.packingPlan3D);
       this.Name = "CuboidPackingItemView";
       this.Size = new System.Drawing.Size(351, 299);
@@ -71,6 +61,4 @@
     #endregion
 
-    private PackingPlanVisualizations.PackingPlan3D packingPlan3D;
-
   }
 }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.cs	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.cs	(revision 13532)
@@ -43,15 +43,14 @@
       } else {
         Redraw(Content);
-        packingPlan3D.StartRendering();
       }
     }
 
     private void Redraw() {
-      packingPlan3D.InitializeContainer(0, 0, 0);
+      // packingPlan3D.InitializeContainer(0, 0, 0);
     }
 
     private void Redraw(CuboidPackingItem item) {
-      packingPlan3D.InitializeContainer(item.TargetBin.Width, item.TargetBin.Height, item.TargetBin.Depth);
-      packingPlan3D.AddItemToContainer(item.Width, item.Height, item.Depth, 0, 0, 0, 0);
+      // packingPlan3D.InitializeContainer(item.TargetBin.Width, item.TargetBin.Height, item.TargetBin.Depth);
+      // packingPlan3D.AddItemToContainer(item.Width, item.Height, item.Depth, 0, 0, 0, 0);
     }
   }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.Designer.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.Designer.cs	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.Designer.cs	(revision 13532)
@@ -48,19 +48,9 @@
     /// </summary>
     private void InitializeComponent() {
-      this.packingPlan3D = new PackingPlanVisualizations.PackingPlan3D();
       this.SuspendLayout();
-      // 
-      // packingPlan3D
-      // 
-      this.packingPlan3D.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.packingPlan3D.Location = new System.Drawing.Point(0, 0);
-      this.packingPlan3D.Name = "packingPlan3D";
-      this.packingPlan3D.Size = new System.Drawing.Size(351, 299);
-      this.packingPlan3D.TabIndex = 3;
       // 
       // CuboidPackingShapeView
       // 
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
-      this.Controls.Add(this.packingPlan3D);
       this.Name = "CuboidPackingShapeView";
       this.Size = new System.Drawing.Size(351, 299);
@@ -71,6 +61,4 @@
     #endregion
 
-    private PackingPlanVisualizations.PackingPlan3D packingPlan3D;
-
   }
 }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.cs	(revision 13531)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.cs	(revision 13532)
@@ -43,14 +43,13 @@
       } else {
         Redraw(Content);
-        packingPlan3D.StartRendering();
       }
     }
 
     private void Redraw() {
-      packingPlan3D.InitializeContainer(0, 0, 0);
+      // packingPlan3D.InitializeContainer(0, 0, 0);
     }
 
     private void Redraw(CuboidPackingShape shape) {
-      packingPlan3D.InitializeContainer(shape.Width, shape.Height, shape.Depth);
+      // packingPlan3D.InitializeContainer(shape.Width, shape.Height, shape.Depth);
     }
   }
