20230724_MBJC_upperpc/Views/FirstPageView.xaml

147 lines
7.9 KiB
Plaintext
Raw Normal View History

2023-11-15 05:34:33 +00:00
<UserControl
x:Class="_20230724_MBJC_upperpc.Views.FirstPageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_20230724_MBJC_upperpc.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2023-11-16 08:18:55 +00:00
xmlns:tool="clr-namespace:_3DTools;assembly=3DTools"
2023-11-15 05:34:33 +00:00
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
2023-11-13 07:46:12 +00:00
<Grid Background="Gray">
<Grid.ColumnDefinitions>
2023-11-15 05:34:33 +00:00
<ColumnDefinition />
<ColumnDefinition />
2023-11-13 07:46:12 +00:00
</Grid.ColumnDefinitions>
2023-11-16 08:18:55 +00:00
<tool:TrackballDecorator Name="tra">
<Viewport3D
2023-11-15 05:34:33 +00:00
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="500"
Height="500"
HorizontalAlignment="Left"
VerticalAlignment="Bottom">
2023-11-16 08:18:55 +00:00
<Viewport3D.Camera>
<!--<PerspectiveCamera Position="0,2.5,10" LookDirection="0,-0.1,-1" NearPlaneDistance="1" FarPlaneDistance="10" />-->
<PerspectiveCamera
2023-11-15 05:34:33 +00:00
FarPlaneDistance="50"
LookDirection="-0.5,-0.5,-1"
NearPlaneDistance="1"
2023-11-16 08:18:55 +00:00
Position="4,4,8" x:Name="camera1" />
</Viewport3D.Camera>
<Viewport3D.Children>
<ModelVisual3D>
<ModelVisual3D.Children>
<ModelVisual3D>
<ModelVisual3D.Content>
<GeometryModel3D>
<GeometryModel3D.Geometry>
<MeshGeometry3D
2023-11-15 05:34:33 +00:00
Normals="0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1"
Positions="0,-0.2,0 0,0.2,0 4,0.2,0 4,0.4,0 5,0,0 4,-0.4,0 4,-0.2,0"
TriangleIndices="0 2 1 0 6 2 2 4 3 6 4 2 5 4 6 1 2 0 2 6 0 3 4 2 2 4 6 6 4 5" />
2023-11-16 08:18:55 +00:00
</GeometryModel3D.Geometry>
<GeometryModel3D.Material>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<SolidColorBrush Opacity="0.5" Color="Red" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D>
<ModelVisual3D.Content>
<GeometryModel3D>
<GeometryModel3D.Geometry>
<MeshGeometry3D
2023-11-15 05:34:33 +00:00
Normals="0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1"
Positions="0,-0.2,0 0,0.2,0 0,0.2,4 0,0.4,4 0,0,5 0,-0.4,4 0,-0.2,4"
TriangleIndices="6 0 1 6 1 2 4 2 3 4 6 2 4 5 6 1 0 6 2 1 6 3 2 4 2 6 4 6 5 4" />
2023-11-16 08:18:55 +00:00
</GeometryModel3D.Geometry>
<GeometryModel3D.Material>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<SolidColorBrush Opacity="0.5" Color="Blue" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D>
<ModelVisual3D.Content>
<GeometryModel3D>
<GeometryModel3D.Geometry>
<MeshGeometry3D
2023-11-15 05:34:33 +00:00
Normals="0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1"
Positions="0,0,0.2 0,0,-0.2 0,5,-0.2 0,5,-0.4 0,6,0 0,5,0.4 0,5,0.2"
TriangleIndices="0 1 2 6 0 2 4 2 3 4 6 2 4 5 6 2 1 0 2 0 6 3 2 4 2 6 4 6 5 4 0 1 2 6 0 2" />
2023-11-16 08:18:55 +00:00
</GeometryModel3D.Geometry>
<GeometryModel3D.Material>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<SolidColorBrush Opacity="0.3" Color="Yellow" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
</ModelVisual3D>
</ModelVisual3D.Children>
<ModelVisual3D.Transform>
<Transform3DGroup>
<RotateTransform3D
2023-11-15 05:34:33 +00:00
CenterX="0"
CenterY="0"
CenterZ="0">
2023-11-16 08:18:55 +00:00
<RotateTransform3D.Rotation>
<AxisAngleRotation3D Angle="{Binding Rotate_X}" Axis="1,0,0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<RotateTransform3D
2023-11-15 05:34:33 +00:00
CenterX="0"
CenterY="0"
CenterZ="0">
2023-11-16 08:18:55 +00:00
<RotateTransform3D.Rotation>
<AxisAngleRotation3D Angle="{Binding Rotate_Y}" Axis="0,1,0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<RotateTransform3D
2023-11-15 05:34:33 +00:00
CenterX="0"
CenterY="0"
CenterZ="0">
2023-11-16 08:18:55 +00:00
<RotateTransform3D.Rotation>
<AxisAngleRotation3D Angle="{Binding Rotate_Z}" Axis="0,0,1" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<ScaleTransform3D
2023-11-15 05:34:33 +00:00
CenterX="0"
CenterY="0"
CenterZ="0"
ScaleX="0.8"
ScaleY="0.6"
ScaleZ="0.8" />
2023-11-16 08:18:55 +00:00
</Transform3DGroup>
</ModelVisual3D.Transform>
</ModelVisual3D>
</Viewport3D.Children>
</Viewport3D>
</tool:TrackballDecorator>
2023-11-15 05:34:33 +00:00
<StackPanel
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Button
Width="100"
Height="100"
Click="Button_Click"
Content="变化" />
2023-11-13 07:46:12 +00:00
</StackPanel>
2023-10-24 02:41:55 +00:00
</Grid>
2023-11-15 05:34:33 +00:00
</UserControl>