Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 15307 was 15307, checked in by abeham, 7 years ago

#2817:

  • Added checkbox to control showing extreme points in visualization
    • Automatically determine size of extreme point cubes
  • Fixed some bugs in extreme point generation
File size: 3.9 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        <CheckBox Name="showExtremePointsCheckBox" Content="Show extreme points" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,6,0,0" Unchecked="showExtremePointsCheckBoxOnUnchecked" Checked="showExtremePointsCheckBoxOnChecked"/>
36        <Border BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="0,30,0,0">
37            <Viewport3D Name="viewport3D1" Margin="0,-1,0,0" >
38                <Viewport3D.Camera>
39                    <PerspectiveCamera x:Name="camMain" Position="0.5 8 8" LookDirection="0 -1 -1"> <!-- camera position for design time-->
40                    </PerspectiveCamera>
41                </Viewport3D.Camera>
42                <ModelVisual3D>
43                    <ModelVisual3D.Content>
44                        <DirectionalLight x:Name="dirLightMain" Direction="0,-1,-1"/>
45                    </ModelVisual3D.Content>
46                </ModelVisual3D>
47                <ModelVisual3D>
48                </ModelVisual3D>
49                <ModelVisual3D x:Name="MyModel">
50                    <ModelVisual3D.Content>
51                        <Model3DGroup>
52                        </Model3DGroup>
53                    </ModelVisual3D.Content>
54                    <ModelVisual3D.Transform>
55                        <Transform3DGroup>
56                            <ScaleTransform3D x:Name="scale" ScaleX="1" ScaleY="1" ScaleZ="1"/>
57                            <RotateTransform3D x:Name="rotateX">
58                                <RotateTransform3D.Rotation>
59                                    <AxisAngleRotation3D Axis="0 1 0"/>
60                                </RotateTransform3D.Rotation>
61                            </RotateTransform3D>
62                            <RotateTransform3D x:Name="rotateY">
63                                <RotateTransform3D.Rotation>
64                                    <AxisAngleRotation3D Axis="1 0 0"/>
65                                </RotateTransform3D.Rotation>
66                            </RotateTransform3D>
67                            <ScaleTransform3D x:Name="scaleZoom" ScaleX="1" ScaleY="1" ScaleZ="1"/>
68                        </Transform3DGroup>
69                    </ModelVisual3D.Transform>
70                </ModelVisual3D>
71            </Viewport3D>
72        </Border>
73    </Grid>
74</UserControl>
Note: See TracBrowser for help on using the repository browser.