Advertisement
yetisergey

Untitled

May 9th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.05 KB | None | 0 0
  1. <Window x:Class="WpfApp1.MainWindow"
  2.        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5.        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6.        xmlns:local="clr-namespace:WpfApp1"
  7.        mc:Ignorable="d"
  8.        Title="MainWindow" Height="450" Width="800">
  9.     <Grid>
  10.         <Viewport3D Name="viewport3D1">
  11.             <Viewport3D.Camera>
  12.                 <PerspectiveCamera x:Name="camMain" Position="5 5 4" LookDirection="-6 -5 -4">
  13.                 </PerspectiveCamera>
  14.             </Viewport3D.Camera>
  15.             <ModelVisual3D>
  16.                 <ModelVisual3D.Content>
  17.                     <DirectionalLight x:Name="dirLightMain" Direction="-1,-1,-1">
  18.                     </DirectionalLight>
  19.                 </ModelVisual3D.Content>
  20.             </ModelVisual3D>
  21.             <ModelVisual3D>
  22.                 <ModelVisual3D.Content>
  23.                     <GeometryModel3D>
  24.                         <GeometryModel3D.Geometry>
  25.                             <MeshGeometry3D x:Name="meshMain"
  26.                                Positions="0 0 0  1 0 0  0 1 0  1 1 0  0 0 1  1 0 1  0 1 1  1 1 1"
  27.                                TriangleIndices="2 3 1  2 1 0  7 1 3  7 5 1  6 5 7  6 4 5  6 2 0  2 0 4  2 7 3  2 6 7  0 1 5  0 5 4">
  28.                             </MeshGeometry3D>
  29.                         </GeometryModel3D.Geometry>
  30.                         <GeometryModel3D.Material>
  31.                             <DiffuseMaterial x:Name="matDiffuseMain">
  32.                                 <DiffuseMaterial.Brush>
  33.                                     <SolidColorBrush Color="Red"/>
  34.                                 </DiffuseMaterial.Brush>
  35.                             </DiffuseMaterial>
  36.                         </GeometryModel3D.Material>
  37.                     </GeometryModel3D>
  38.                 </ModelVisual3D.Content>
  39.             </ModelVisual3D>
  40.         </Viewport3D>
  41.     </Grid>
  42. </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement