Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml @ 15488

Last change on this file since 15488 was 15488, checked in by rhanghof, 6 years ago

#2817:

  • Added line projection based bin packing
  • Added residual spaces to the view
File size: 4.5 KB
Line 
1<!--
2/* HeuristicLab
3 * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see<http://www.gnu.org/licenses/> .
19 */
20-->
21
22<UserControl x:Class="HeuristicLab.Problems.BinPacking.Views.Container3DView"
23             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
24             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
25             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
26             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
27             mc:Ignorable="d"
28             d:DesignHeight="300" d:DesignWidth="300"
29             MouseMove="Container3DView_MouseMove" MouseDown="Container3DView_MouseDown" MouseUp="Container3DView_MouseUp"
30             MouseWheel="Container3DView_OnMouseWheel"
31             MouseEnter="Container3DView_OnMouseEnter"
32             Focusable="true"
33             >
34    <Grid Margin="0,0,-64,-57">
35        <StackPanel>
36            <CheckBox Name="showExtremePointsCheckBox"
37                      Content="Show extreme points"
38                      VerticalAlignment="Top"
39                      HorizontalAlignment="Left"
40                      Margin="10,6,0,0"
41                      Unchecked="ShowExtremePointsCheckBoxOnUnchecked"
42                      Checked="ShowExtremePointsCheckBoxOnChecked"/>
43            <CheckBox Name="showResidualSpaceCheckBox"
44                      Content="Show residual spaces"
45                      VerticalAlignment="Top"
46                      HorizontalAlignment="Left"
47                      Margin="10,6,0,0"
48                      Unchecked="ShowResidualSpacesCheckBoxOnUnchecked"
49                      Checked="ShowResidualSpacesCheckBoxOnChecked"/>
50        </StackPanel>
51        <Border BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="0,52,0,0">
52            <Viewport3D Name="viewport3D1" Margin="0,-1,0,0" >
53                <Viewport3D.Camera>
54                    <PerspectiveCamera x:Name="camMain" Position="0.5 8 8" LookDirection="0 -1 -1"> <!-- camera position for design time-->
55                    </PerspectiveCamera>
56                </Viewport3D.Camera>
57                <ModelVisual3D>
58                    <ModelVisual3D.Content>
59                        <DirectionalLight x:Name="dirLightMain" Direction="0,-1,-1"/>
60                    </ModelVisual3D.Content>
61                </ModelVisual3D>
62                <ModelVisual3D>
63                </ModelVisual3D>
64                <ModelVisual3D x:Name="MyModel">
65                    <ModelVisual3D.Content>
66                        <Model3DGroup>
67                        </Model3DGroup>
68                    </ModelVisual3D.Content>
69                    <ModelVisual3D.Transform>
70                        <Transform3DGroup>
71                            <ScaleTransform3D x:Name="scale" ScaleX="1" ScaleY="1" ScaleZ="1"/>
72                            <RotateTransform3D x:Name="rotateX">
73                                <RotateTransform3D.Rotation>
74                                    <AxisAngleRotation3D Axis="0 1 0"/>
75                                </RotateTransform3D.Rotation>
76                            </RotateTransform3D>
77                            <RotateTransform3D x:Name="rotateY">
78                                <RotateTransform3D.Rotation>
79                                    <AxisAngleRotation3D Axis="1 0 0"/>
80                                </RotateTransform3D.Rotation>
81                            </RotateTransform3D>
82                            <ScaleTransform3D x:Name="scaleZoom" ScaleX="1" ScaleY="1" ScaleZ="1"/>
83                        </Transform3DGroup>
84                    </ModelVisual3D.Transform>
85                </ModelVisual3D>
86            </Viewport3D>
87        </Border>
88    </Grid>
89</UserControl>
Note: See TracBrowser for help on using the repository browser.