-
Notifications
You must be signed in to change notification settings - Fork 6
/
BVHView.xaml
88 lines (88 loc) · 5.41 KB
/
BVHView.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<UserControl x:Class="WpfApplication1.BVHView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:my="clr-namespace:WpfApplication1" Height="431" Width="377">
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
<TextBlock Text="{Binding ElementName=slider1, Path=Value}" DockPanel.Dock="Right" VerticalAlignment="Center" />
<TextBlock Text="/" DockPanel.Dock="Right" VerticalAlignment="Center" />
<TextBlock Text="{Binding ElementName=slider1, Path=Maximum}" DockPanel.Dock="Right" VerticalAlignment="Center" />
<ToggleButton Margin="12,6" DockPanel.Dock="Right" Height="20" Width="42" Checked="ToggleButton_Checked" Unchecked="ToggleButton_Unchecked">Run</ToggleButton>
</StackPanel>
<Slider Margin="12,6" Name="slider1" IsSnapToTickEnabled="True" ValueChanged="slider1_ValueChanged" />
</DockPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="166*" />
<RowDefinition Height="217*" />
</Grid.RowDefinitions>
<DockPanel Margin="12,6" Background="Black" MouseMove="DockPanel_MouseMove" MouseLeftButtonDown="DockPanel_MouseLeftButtonDown" MouseWheel="DockPanel_MouseWheel" MouseRightButtonDown="DockPanel_MouseRightButtonDown">
<Viewport3D Name="viewport">
<Viewport3D.Camera>
<PerspectiveCamera
x:Name="camera"
FarPlaneDistance="100"
NearPlaneDistance="0"
LookDirection="0,0,-1"
UpDirection="0,1,0"
Position="0,10,40"
FieldOfView="45">
<PerspectiveCamera.Transform>
<Transform3DGroup>
<TranslateTransform3D x:Name="cameraOffset"/>
<RotateTransform3D CenterY="10">
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="cameraRotationX" Axis="1,0,0" Angle="0"/>
</RotateTransform3D.Rotation>
</RotateTransform3D>
<RotateTransform3D CenterY="10">
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="cameraRotationY" Axis="0,1,0" Angle="0"/>
</RotateTransform3D.Rotation>
</RotateTransform3D>
</Transform3DGroup>
</PerspectiveCamera.Transform>
</PerspectiveCamera>
</Viewport3D.Camera>
<ModelVisual3D>
<ModelVisual3D.Content>
<AmbientLight Color="#ffffff"/>
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D x:Name="modelRoot">
<ModelVisual3D.Transform>
<Transform3DGroup>
<ScaleTransform3D x:Name="globalScale"/>
<TranslateTransform3D x:Name="globalOffset" />
</Transform3DGroup>
</ModelVisual3D.Transform>
</ModelVisual3D>
</Viewport3D>
</DockPanel>
<TreeView HorizontalAlignment="Stretch" Margin="12,14,12,12" Name="treeView1" Grid.Row="1" FontFamily="MS Gothic" SelectedItemChanged="treeView1_SelectedItemChanged">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type my:CompositeElement}" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding ElementName}" />
<TextBlock Text=" "/>
<TextBlock Text="{Binding Name}" />
<TextBlock Text=" <"/>
<TextBlock Text="{Binding Offset}"/>
<TextBlock Text="> ["/>
<TextBlock Text="{Binding Channels}" />
<TextBlock Text="]"/>
</StackPanel>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate DataType="{x:Type my:JointFrameList}" ItemsSource="{Binding Frames}">
<TextBlock Text="Frames" />
</HierarchicalDataTemplate>
<HierarchicalDataTemplate DataType="{x:Type my:FrameElementList}" ItemsSource="{Binding Frames}">
<TextBlock Text="Frames" />
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
<GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" Name="gridSplitter1" Height="8" VerticalAlignment="Top" />
</Grid>
</DockPanel>
</UserControl>