|
<UserControl x:Class="_3DView._3DViewControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:My3D="clr-namespace:_3DTools;assembly=3DTools"
xmlns:tb="clr-namespace:Infragistics.ToyBox;assembly=Infragistics.ToyBox" Height="Auto">
<UserControl.Resources>
<!-- Objects mesh -->
<MeshGeometry3D x:Key="ItemMesh" Positions="1.0 1.4 0.0 -1.0 1.4 0.0 -1.0 -1.4 0.0 1.0 -1.4 0.0"
Normals="0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0" TextureCoordinates="0,0 0,1 1,1 1,0"
TriangleIndices="0 1 2 0 2 3" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>
<My3D:TrackballDecorator Grid.Row="0">
<My3D:Interactive3DDecorator>
<Viewport3D>
<Viewport3D.Camera>
<PerspectiveCamera x:Name="MyCamera" Position="0,.5,4" LookDirection="0,0,-1" FieldOfView="110" />
</Viewport3D.Camera>
<My3D:InteractiveVisual3D x:Name="MyInteractiveVisual3D" IsBackVisible="False">
<My3D:InteractiveVisual3D.Children>
</My3D:InteractiveVisual3D.Children>
</My3D:InteractiveVisual3D>
<!--<My3D:ScreenSpaceLines3D Color="Red" Points="-10,0,0 10,0,0"/>
<My3D:ScreenSpaceLines3D Color="Blue" Points="0,-10,0 0,10,0"/>
<My3D:ScreenSpaceLines3D Color="Green" Points="0,0,-10 0,0,10"/>-->
<ModelVisual3D>
<ModelVisual3D.Children>
<ModelVisual3D>
<ModelVisual3D.Content>
<DirectionalLight Color="Transparent" Direction="0,0,5"/>
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D>
<ModelVisual3D.Content>
<DirectionalLight Color="Transparent" Direction="0,0,-5"/>
</ModelVisual3D.Content>
</ModelVisual3D>
</ModelVisual3D.Children>
</ModelVisual3D>
</Viewport3D>
</My3D:Interactive3DDecorator>
</My3D:TrackballDecorator>
<Button Template="{StaticResource Buttons}" Grid.Row="1" ToolTip="Previous item" Margin="5,0,0,0"
x:Name="LeftButton" Click="LeftButton_Click" Content="<<" FontWeight="Bold" VerticalAlignment="Bottom"
HorizontalAlignment="Left" Effect="{StaticResource DropShadowEffect}"></Button>
<Button Template="{StaticResource Buttons}" Grid.Row="1" x:Name="RightButton" Click="RightButton_Click" FontWeight="Bold" VerticalAlignment="Bottom"
HorizontalAlignment="Right" Content=">>" ToolTip="Next item" Margin="0,0,5,0"
Effect="{StaticResource DropShadowEffect}"></Button>
<Button Template="{StaticResource Buttons}" Grid.Row="1" x:Name="FlipButton" Click="FlipButton_Click" FontWeight="Bold" VerticalAlignment="Bottom"
HorizontalAlignment="Center" Content="Flip" Effect="{StaticResource DropShadowEffect}"></Button>
</Grid>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.