<!--

 RageLib
 Copyright (C) 2008  Arushan/Aru <oneforaru at gmail.com>

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->
    
<UserControl x:Class="RageLib.Models.Model3DViewer.Model3DView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Loaded="OnLoaded"
    Height="300" Width="300" Background="Black">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#688AD5" Offset="0"/>
                    <GradientStop Color="#425C94" Offset="1"/>
                </LinearGradientBrush.GradientStops>
            </LinearGradientBrush>
        </Grid.Background>
        
        <Border Grid.Row="0" Grid.Column="0">

            <Viewport3D Name="MainViewport" ClipToBounds="True">
                
                <Viewport3D.Camera>
                    <PerspectiveCamera x:Name="Camera"
                                       FarPlaneDistance="100000"
                                       UpDirection="0,1,0"
                                       NearPlaneDistance="0.1"
                                       LookDirection="0,0,-1"
                                       Position="0,0,5"
                                       FieldOfView="70" />
                </Viewport3D.Camera>

                <Viewport3D.Children>
                    <ModelVisual3D>
                        <ModelVisual3D.Content>
                            <Model3DGroup>
                                <AmbientLight x:Name="AmbientLight" Color="#ff888888" />
                                <DirectionalLight x:Name="Headlight" Color="#ffeeeeee" Direction="-0.7,-0.7,-0.8" />
                            </Model3DGroup>
                        </ModelVisual3D.Content>
                    </ModelVisual3D>
                    <ModelVisual3D x:Name="Root" />
                </Viewport3D.Children>
                
            </Viewport3D>

        </Border>
        
        <Border Name="CaptureBorder" Background="Transparent" Grid.Row="0" Grid.Column="0" />
        
    </Grid>
</UserControl>
