<commit_before>﻿<Window x:Class="LightingDemo.MultiViewport"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:LightingDemo"
        xmlns:hx="http://helix-toolkit.org/wpf/SharpDX"
        mc:Ignorable="d"
        Title="MultiViewport" Height="600" Width="600">
    <Window.Resources>
        <hx:RenderTechniqueConverter x:Key="RenderTechniqueConverter" />
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <hx:ModelContainer3DX x:Name="sharedContainer"
                              RenderTechnique="{Binding RenderTechnique}">
            <hx:ShadowMap3D />
            <hx:AmbientLight3D Color="{Binding AmbientLightColor}" />
            <hx:DirectionalLight3D
                Direction="{Binding Light1Direction}"
                DirectionTransform="{Binding Light1DirectionTransform}"
                IsRendering="{Binding RenderLight1}"
                Color="{Binding Light1Color}" />
            <hx:PointLight3D
                Attenuation="{Binding Light2Attenuation}"
                IsRendering="{Binding RenderLight2}"
                Transform="{Binding Light2Transform}"
                Color="{Binding Light2Color}" />
            <hx:PointLight3D
                Attenuation="{Binding Light3Attenuation}"
                IsRendering="{Binding RenderLight3}"
                Transform="{Binding Light3Transform}"
                Color="{Binding Light3Color}" />
            <hx:SpotLight3D
                Attenuation="{Binding Light4Attenuation}"
                Direction="{Binding Light4Direction}"
                DirectionTransform="{Binding Light4DirectionTransform}"
                IsRendering="{Binding RenderLight4}"
                Transform="{Binding Light4Transform}"
                Color="{Binding Light4Color}" />

            <!--<hx:EnvironmentMap x:Name="envMap" Filename="Cubemap_Grandcanyon.dds"/>-->
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight1}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light1Transform}" />
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight2}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light2Transform}" />
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight3}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light3Transform}" />
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight4}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light4Transform}" />
            <hx:MeshGeometryModel3D
                x:Name="model"
                Geometry="{Binding Model}"
                Material="{Binding ModelMaterial}"
                Transform="{Binding ModelTransform}" />
            <hx:MeshGeometryModel3D
                x:Name="floor"
                Geometry="{Binding Floor}"
                Material="{Binding FloorMaterial}"
                Transform="{Binding FloorTransform}" />
            <!--<hx:LineGeometryModel3D Geometry="{Binding CubeEdges}" Color="{x:Static SharpDX:Color.Red}" Thickness="4"/>-->
        </hx:ModelContainer3DX>
        <hx:Viewport3DX
            x:Name="view1"
            Title="{Binding Title}"
            Grid.Row="0" Grid.Column="0" MSAA="Four"
            Camera="{Binding Camera}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>

        </hx:Viewport3DX>
        <hx:Viewport3DX
            x:Name="view2"
            Title="{Binding Title}"
            Grid.Row="0" Grid.Column="1" MSAA="Four"
            Camera="{Binding Camera2}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>

        </hx:Viewport3DX>
        <hx:Viewport3DX
            x:Name="view3"
            Title="{Binding Title}"
            Grid.Row="1" Grid.Column="0" MSAA="Four"
            Camera="{Binding Camera3}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>

        </hx:Viewport3DX>
        <hx:Viewport3DX
            x:Name="view4"
            Title="{Binding Title}"
            Grid.Row="1" Grid.Column="1" MSAA="Four"
            Camera="{Binding Camera4}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>

        </hx:Viewport3DX>
    </Grid>
</Window>
<commit_msg>Demo update. Multiple viewports with different lighting setup<commit_after>﻿<Window x:Class="LightingDemo.MultiViewport"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:LightingDemo"
        xmlns:hx="http://helix-toolkit.org/wpf/SharpDX"
        mc:Ignorable="d"
        Title="MultiViewport" Height="600" Width="600">
    <Window.Resources>
        <hx:RenderTechniqueConverter x:Key="RenderTechniqueConverter" />
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <hx:ModelContainer3DX x:Name="sharedContainer"
                              RenderTechnique="{Binding RenderTechnique}">
            <hx:ShadowMap3D />


            <!--<hx:EnvironmentMap x:Name="envMap" Filename="Cubemap_Grandcanyon.dds"/>-->
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight1}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light1Transform}" />
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight2}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light2Transform}" />
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight3}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light3Transform}" />
            <hx:MeshGeometryModel3D
                Geometry="{Binding Sphere}"
                IsRendering="{Binding RenderLight4}"
                Material="{Binding LightModelMaterial}"
                Transform="{Binding Light4Transform}" />
            <hx:MeshGeometryModel3D
                x:Name="model"
                Geometry="{Binding Model}"
                Material="{Binding ModelMaterial}"
                Transform="{Binding ModelTransform}" />
            <hx:MeshGeometryModel3D
                x:Name="floor"
                Geometry="{Binding Floor}"
                Material="{Binding FloorMaterial}"
                Transform="{Binding FloorTransform}" />
            <!--<hx:LineGeometryModel3D Geometry="{Binding CubeEdges}" Color="{x:Static SharpDX:Color.Red}" Thickness="4"/>-->
        </hx:ModelContainer3DX>
        <hx:Viewport3DX
            x:Name="view1"
            Title="{Binding Title}"
            Grid.Row="0" Grid.Column="0" MSAA="Four"
            Camera="{Binding Camera}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>
            <hx:DirectionalLight3D
                Direction="{Binding Light1Direction}"
                DirectionTransform="{Binding Light1DirectionTransform}"
                IsRendering="{Binding RenderLight1}"
                Color="{Binding Light1Color}" />
            <hx:SpotLight3D
                Attenuation="{Binding Light4Attenuation}"
                Direction="{Binding Light4Direction}"
                DirectionTransform="{Binding Light4DirectionTransform}"
                IsRendering="{Binding RenderLight4}"
                Transform="{Binding Light4Transform}"
                Color="{Binding Light4Color}" />
        </hx:Viewport3DX>
        <hx:Viewport3DX
            x:Name="view2"
            Title="{Binding Title}"
            Grid.Row="0" Grid.Column="1" MSAA="Four"
            Camera="{Binding Camera2}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>
            <hx:DirectionalLight3D
                Direction="{Binding Light1Direction}"
                DirectionTransform="{Binding Light1DirectionTransform}"
                IsRendering="{Binding RenderLight1}"
                Color="{Binding Light1Color}" />
        </hx:Viewport3DX>
        <hx:Viewport3DX
            x:Name="view3"
            Title="{Binding Title}"
            Grid.Row="1" Grid.Column="0" MSAA="Four"
            Camera="{Binding Camera3}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>
            <hx:PointLight3D
                Attenuation="{Binding Light2Attenuation}"
                IsRendering="{Binding RenderLight2}"
                Transform="{Binding Light2Transform}"
                Color="{Binding Light2Color}" />
            <hx:PointLight3D
                Attenuation="{Binding Light3Attenuation}"
                IsRendering="{Binding RenderLight3}"
                Transform="{Binding Light3Transform}"
                Color="{Binding Light3Color}" />
        </hx:Viewport3DX>
        <hx:Viewport3DX
            x:Name="view4"
            Title="{Binding Title}"
            Grid.Row="1" Grid.Column="1" MSAA="Four"
            Camera="{Binding Camera4}"
            CoordinateSystemLabelForeground="White"
            IsShadowMappingEnabled="True"
            ShowCoordinateSystem="False"
            SubTitle="{Binding SubTitle}"
            TextBrush="Black"
            UseDefaultGestures="False" EnableSharedModelMode="True" SharedModelContainer="{Binding ElementName=sharedContainer}">
            <hx:Viewport3DX.InputBindings>
                <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
            </hx:Viewport3DX.InputBindings>
            <hx:SpotLight3D
                Attenuation="{Binding Light4Attenuation}"
                Direction="{Binding Light4Direction}"
                DirectionTransform="{Binding Light4DirectionTransform}"
                IsRendering="{Binding RenderLight4}"
                Transform="{Binding Light4Transform}"
                Color="{Binding Light4Color}" />
        </hx:Viewport3DX>
    </Grid>
</Window>

{'fraction_non_alphanumeric': 0.12011008452919206, 'fraction_numerical': 0.009878120699823079, 'mean_word_length': 2.3662531017369726, 'pattern_counts': {'":': 0, '<': 186, '<?xml version=': 0, '>': 186, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6612093', 'n_tokens_mistral': 5692, 'n_tokens_neox': 5284, 'n_words': 720}