コード例 #1
0
ファイル: OutputPanel.cs プロジェクト: vr3d/GodComplex
        protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            if (!m_LeftButtonDown)
            {
                return;
            }

            int   MotionX = e.Location.X - m_ButtonDownPosition.X;
            int   MotionY = e.Location.Y - m_ButtonDownPosition.Y;
            float AngleX  = 1.5f * (float)Math.PI * MotionX / Width;
            float AngleY  = -1.2f * (float)Math.PI * MotionY / Height;

            WMath.Matrix3x3 RotX = new WMath.Matrix3x3(WMath.Matrix3x3.INIT_TYPES.ROT_Y, AngleX);
            WMath.Matrix3x3 RotY = new WMath.Matrix3x3(WMath.Matrix3x3.INIT_TYPES.ROT_X, AngleY);
            WMath.Matrix3x3 Rot  = RotY * RotX;

            WMath.Vector NewAt = m_ButtonDownAt * Rot;

            this.At = NewAt;

            // Force refresh for faster update...
            Refresh();
        }
コード例 #2
0
ファイル: GeneratorForm.cs プロジェクト: neodyme60/GodComplex
        /// <summary>
        /// Computes the ambient occlusion of the specified coordinate by shooting N rays in a lobe oriented in the specified light direction
        /// </summary>
        /// <param name="_Light"></param>
        /// <param name="_X"></param>
        /// <param name="_Y"></param>
        /// <param name="_Z2HeightScale">Scale factor to apply to world Z coordinate to be remapped into the heights' [0,1] range</param>
        /// <param name="_LobeExponent">1 is a simple cosine lobe</param>
        /// <returns></returns>
        ///
        private float   ComputeAO(int _LightIndex, int _X, int _Y, float _Z2HeightScale, WMath.Vector[,] _Rays)
        {
            int RaysCount     = _Rays.GetLength(1);
            int MaxStepsCount = integerTrackbarControlMaxStepsCount.Value;

            float  Z0           = m_BitmapSource.ContentXYZ[_X, _Y].y;
            double AO           = 0.0f;
            int    SamplesCount = 0;

            for (int RayIndex = 0; RayIndex < RaysCount; RayIndex++)
            {
                WMath.Vector RayWorld = _Rays[_LightIndex, RayIndex];
                if (RayWorld.z < 0.0f)
                {
// AO += 1.0;
// SamplesCount++;
                    continue;                           // Pointing to the ground so don't account for it...
                }

                // Make sure the ray has a unit step so we always travel at least one pixel
//				m_RayWorld.z *= _Z2HeightScale;
//              float	Normalizer = 1.0f / Math.Max( Math.Abs( m_RayWorld.x ), Math.Abs( m_RayWorld.y ) );
//              float	Normalizer = 1.0f;
//              Normalizer = Math.Max( Normalizer, (1.0f - Z) / (128.0f * m_RayWorld.z) );	// This makes sure we can't use more than 128 steps to escape the heightfield
//
//              float	Normalizer = (1.0f - Z) / (128.0f * m_RayWorld.z);
//
//              m_RayWorld.x *= Normalizer;
//              m_RayWorld.y *= Normalizer;
//              m_RayWorld.z *= Normalizer;

                // Start from the provided coordinates
                float X = _X;
                float Y = _Y;
                float Z = Z0;

                // Compute intersection with the height field
                int StepIndex = 0;
                while (StepIndex < MaxStepsCount && Z < 1.0f && X > 0.0f && Y > 0.0f && X < W && Y < H)
                {
                    X += RayWorld.x;
                    Y += RayWorld.y;
                    Z += RayWorld.z;

                    float Height = SampleHeightField(X, Y);
                    if (Height > Z)
                    {                           // Hit!
                        AO += 1.0;
                        break;
                    }

                    StepIndex++;
                }

                SamplesCount++;
            }
            AO /= SamplesCount;

            return((float)(1.0 - AO));
        }
コード例 #3
0
ファイル: OutputPanel.cs プロジェクト: vr3d/GodComplex
        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);

            m_LeftButtonDown    |= (e.Button & System.Windows.Forms.MouseButtons.Left) != 0;
            m_ButtonDownPosition = e.Location;
            m_ButtonDownAt       = m_At;
        }
コード例 #4
0
ファイル: OutputPanel.cs プロジェクト: vr3d/GodComplex
        protected override void OnSizeChanged(EventArgs e)
        {
            if (m_Bitmap != null)
            {
                m_Bitmap.Dispose();
            }

            m_Bitmap = new Bitmap(Width, Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);

            At = m_At;                          // Update view transform

            UpdateBitmap();

            base.OnSizeChanged(e);
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: neodyme60/GodComplex
        private void integerTrackbarControlNeighborsCount_ValueChanged(IntegerTrackbarControl _Sender, int _FormerValue)
        {
            int NeighborsCount = integerTrackbarControlNeighborsCount.Value;

            if (m_SB_Neighbors != null)
            {
                m_SB_Neighbors.Dispose();
            }
            m_SB_Neighbors = new StructuredBuffer <SB_Neighbor>(m_Device, NeighborsCount, true);

            WMath.Vector[] Directions = null;
            if (radioButtonHammersley.Checked)
            {
                double[,]               Samples = m_Hammersley.BuildSequence(NeighborsCount, 2);
                Directions = m_Hammersley.MapSequenceToSphere(Samples);
            }
            else
            {
                Random TempRNG = new Random();
                Directions = new WMath.Vector[NeighborsCount];
                for (int i = 0; i < NeighborsCount; i++)
                {
                    Directions[i] = new WMath.Vector(2.0f * (float)TempRNG.NextDouble() - 1.0f, 2.0f * (float)TempRNG.NextDouble() - 1.0f, 2.0f * (float)TempRNG.NextDouble() - 1.0f);
                    Directions[i].Normalize();
                }
            }

            Random RNG = new Random(1);

            m_NeighborPositions = new float3[NeighborsCount];
            m_NeighborColors    = new float3[NeighborsCount];
            for (int NeighborIndex = 0; NeighborIndex < NeighborsCount; NeighborIndex++)
            {
                float Radius = 2.0f;                    // Make that random!
                m_NeighborPositions[NeighborIndex] = Radius * new float3(Directions[NeighborIndex].x, Directions[NeighborIndex].y, Directions[NeighborIndex].z);

                float R = (float)RNG.NextDouble();
                float G = (float)RNG.NextDouble();
                float B = (float)RNG.NextDouble();
                m_NeighborColors[NeighborIndex] = new float3(R, G, B);

                m_SB_Neighbors.m[NeighborIndex].m_Position = m_NeighborPositions[NeighborIndex];
                m_SB_Neighbors.m[NeighborIndex].m_Color    = m_NeighborColors[NeighborIndex];
            }

            m_SB_Neighbors.Write();             // Upload
        }
コード例 #6
0
        void    TestEigenVectors()
        {
//			WMath.Vector	Axis = new WMath.Vector( 1, 1, 1 );
            WMath.Vector Axis = new WMath.Vector(1, 0, 0);
            Axis.Normalize();
            WMath.Matrix3x3 Rot = (WMath.Matrix3x3) new WMath.Quat(new WMath.AngleAxis(0.5f * (float)Math.PI, Axis));
            Rot.Transpose();

            WMath.Vector Eigen = Rot.EigenValues();

            WMath.Matrix3x3 M0 = Rot - Eigen.x * WMath.Matrix3x3.IDENTITY;
            WMath.Matrix3x3 M1 = Rot - Eigen.y * WMath.Matrix3x3.IDENTITY;
            WMath.Matrix3x3 M2 = Rot - Eigen.z * WMath.Matrix3x3.IDENTITY;

            WMath.Vector X = M0.GetRow0();
            WMath.Vector Y = M0.GetRow1();
            WMath.Vector Z = M0.GetRow2();
        }
コード例 #7
0
        private void    GenerateRays(int _RaysCount, float _MaxConeAngle, RendererManaged.StructuredBuffer <RendererManaged.float3> _Target)
        {
            _RaysCount = Math.Min(MAX_THREADS, _RaysCount);

            WMath.Hammersley hammersley = new WMath.Hammersley();
            double[,]                       sequence = hammersley.BuildSequence(_RaysCount, 2);
            WMath.Vector[] rays = hammersley.MapSequenceToSphere(sequence, 0.5f * _MaxConeAngle);
            for (int RayIndex = 0; RayIndex < _RaysCount; RayIndex++)
            {
                WMath.Vector ray = rays[RayIndex];

//              // Scale the ray so we ensure to always walk at least a texel in the texture
//              float	SinTheta = (float) Math.Sqrt( 1.0 - ray.y * ray.y );
//              float	LengthFactor = 1.0f / SinTheta;
//              ray *= LengthFactor;

                _Target.m[RayIndex].Set(ray.x, -ray.z, ray.y);
            }

            _Target.Write();
        }
コード例 #8
0
ファイル: OutputPanel.cs プロジェクト: Patapom/GodComplex
		protected override void OnMouseMove( MouseEventArgs e )
		{
			base.OnMouseMove( e );

			if ( !m_LeftButtonDown )
				return;

			int		MotionX = e.Location.X - m_ButtonDownPosition.X;
			int		MotionY = e.Location.Y - m_ButtonDownPosition.Y;
			float	AngleX = 1.5f * (float) Math.PI * MotionX / Width;
			float	AngleY = -1.2f * (float) Math.PI * MotionY / Height;

			WMath.Matrix3x3	RotX = new WMath.Matrix3x3( WMath.Matrix3x3.INIT_TYPES.ROT_Y, AngleX );
			WMath.Matrix3x3	RotY = new WMath.Matrix3x3( WMath.Matrix3x3.INIT_TYPES.ROT_X, AngleY );
			WMath.Matrix3x3	Rot = RotY * RotX;

			WMath.Vector	NewAt = m_ButtonDownAt * Rot;

			this.At = NewAt;

			// Force refresh for faster update...
			Refresh();
		}
コード例 #9
0
ファイル: OutputPanel.cs プロジェクト: Patapom/GodComplex
		protected override void OnMouseDown( MouseEventArgs e )
		{
			base.OnMouseDown( e );

			m_LeftButtonDown |= (e.Button & System.Windows.Forms.MouseButtons.Left) != 0;
			m_ButtonDownPosition = e.Location;
			m_ButtonDownAt = m_At;
		}
コード例 #10
0
ファイル: OutputPanel.cs プロジェクト: Patapom/GodComplex
		protected override void OnSizeChanged( EventArgs e )
		{
			if ( m_Bitmap != null )
				m_Bitmap.Dispose();

			m_Bitmap = new Bitmap( Width, Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb );

			At = m_At;		// Update view transform

			UpdateBitmap();

			base.OnSizeChanged( e );
		}
コード例 #11
0
ファイル: OutputPanel.cs プロジェクト: vr3d/GodComplex
        private void    CubeMapSamplerSH(Probe.Pixel _Pixel, out byte _R, out byte _G, out byte _B)
        {
            WMath.Vector Dir = _Pixel.View;

            // Dot the SH together
            WMath.Vector Color = WMath.Vector.Zero;
            if (m_IsolateSet)
            {
                float Factor = 1.0f;
                if (m_bShowSHDynamic)
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Color += (float)_Pixel.SHCoeffs[i] * m_Probe.m_Sets[m_IsolatedSetIndex].SH[i];
                    }

                    Factor = m_bNormalizeSH ? 2.0f * m_Probe.m_Sets[m_IsolatedSetIndex].SH[0].Max() : 1.0f;
                }

                if (m_bShowSHEmissive)
                {
                    int EmissiveSetIndex = Math.Min(m_IsolatedSetIndex, m_Probe.m_EmissiveSets.Length - 1);
                    if (EmissiveSetIndex >= 0)
                    {
                        for (int i = 0; i < 9; i++)
                        {
                            Color += (float)_Pixel.SHCoeffs[i] * m_Probe.m_EmissiveSets[EmissiveSetIndex].SH[i];
                        }
                    }

                    Factor = m_bNormalizeSH ? 2.0f * m_Probe.m_EmissiveSets[EmissiveSetIndex].SH[0].Max() : 1.0f;
                }

//				Color *= 100.0f;
                Color *= 1.0f / Factor;
            }
            else
            {
                float Factor = 0.0f;
                if (m_bShowSHStatic)
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Color += (float)_Pixel.SHCoeffs[i] * m_SHStatic[i];
                    }
                    Factor = Math.Max(Factor, m_SHStatic[0].Max());
                }
                if (m_bShowSHDynamic)
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Color += (float)_Pixel.SHCoeffs[i] * m_SHDynamic[i];
                    }
                    Factor = Math.Max(Factor, m_SHDynamic[0].Max());
                }
                if (m_bShowSHEmissive)
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Color += (float)_Pixel.SHCoeffs[i] * m_SHEmissive[i];
                    }
                    Factor = Math.Max(Factor, m_SHEmissive[0].Max());
                }
                if (m_bShowSHOcclusion)
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Color += (float)_Pixel.SHCoeffs[i] * m_SHOcclusion[i] * WMath.Vector.One;
                    }
                    Factor = Math.Max(Factor, m_SHOcclusion[0]);
                }

//				Color *= 50.0f;

                Color *= m_bNormalizeSH ? 1.0f / Factor : 1.0f;
            }

            if (Color.x < 0.0f || Color.y < 0.0f || Color.z < 0.0f)
            {
                Color.Set(1, 0, 1);
            }

            _R = (byte)Math.Min(255, 255 * Color.x);
            _G = (byte)Math.Min(255, 255 * Color.y);
            _B = (byte)Math.Min(255, 255 * Color.z);
        }
コード例 #12
0
ファイル: GeneratorForm.cs プロジェクト: neodyme60/GodComplex
        private void    Generate_CPU(int _RaysCount)
        {
            try
            {
                tabControlGenerators.Enabled = false;

                // Half-life basis (Z points outside of the surface, as in normal maps)
                WMath.Vector[] Basis = new WMath.Vector[] {
                    new WMath.Vector((float)Math.Sqrt(2.0 / 3.0), 0.0f, (float)Math.Sqrt(1.0 / 3.0)),
                    new WMath.Vector((float)-Math.Sqrt(1.0 / 6.0), (float)Math.Sqrt(1.0 / 2.0), (float)Math.Sqrt(1.0 / 3.0)),
                    new WMath.Vector((float)-Math.Sqrt(1.0 / 6.0), (float)-Math.Sqrt(1.0 / 2.0), (float)Math.Sqrt(1.0 / 3.0)),
                };

//              // 1] Compute normal map
//              WMath.Vector	dX = new WMath.Vector();
//              WMath.Vector	dY = new WMath.Vector();
//              WMath.Vector	N;
//              float			ddX = floatTrackbarControlPixelSize.Value;
//              float			ddH = floatTrackbarControlHeight.Value;
//              for ( int Y=0; Y < H; Y++ )
//              {
//                  int	Y0 = Math.Max( 0, Y-1 );
//                  int	Y1 = Math.Min( H-1, Y+1 );
//                  for ( int X=0; X < W; X++ )
//                  {
//                      int	X0 = Math.Max( 0, X-1 );
//                      int	X1 = Math.Min( W-1, X+1 );
//
//                      float	Hx0 = m_BitmapSource.ContentXYZ[X0,Y].y;
//                      float	Hx1 = m_BitmapSource.ContentXYZ[X1,Y].y;
//                      float	Hy0 = m_BitmapSource.ContentXYZ[X,Y0].y;
//                      float	Hy1 = m_BitmapSource.ContentXYZ[X,Y1].y;
//
//                      dX.Set( 2.0f * ddX, 0.0f, ddH * (Hx1 - Hx0) );
//                      dY.Set( 0.0f, 2.0f * ddX, ddH * (Hy1 - Hy0) );
//
//                      N = dX.Cross( dY ).Normalized;
//
//                      m_Normal[X,Y] = new WMath.Vector(
//                          N.Dot( Basis[0] ),
//                          N.Dot( Basis[1] ),
//                          N.Dot( Basis[2] ) );
//                  }
//
//                  // Update and show progress
//                  UpdateProgress( m_Normal, Y, true );
//              }
//              UpdateProgress( m_Normal, H, true );

                float LobeExponent = 4.0f;                  //floatTrackbarControlLobeExponent.Value;

                float PixelSize_mm = 1000.0f / floatTrackbarControlPixelDensity.Value;

                float Scale = 0.1f * PixelSize_mm / floatTrackbarControlHeight.Value;                   // Scale factor to apply to pixel distances so they're renormalized in [0,1], our "heights space"...
//						Scale *= floatTrackbarControlZFactor.Value;	// Cheat Z velocity so AO is amplified!

                // 2] Build local rays only once
                int RaysCount = integerTrackbarControlRaysCount.Value;
                WMath.Vector[,] Rays = new WMath.Vector[3, RaysCount];

                // Create orthonormal bases to orient the lobe
                WMath.Vector Xr = Basis[0].Cross(WMath.Vector.UnitZ).Normalized;                        // We can safely use (0,0,1) as the "up" direction since the HL2 basis doesn't have any vertical direction
                WMath.Vector Yr = Xr.Cross(Basis[0]);
                WMath.Vector Xg = Basis[1].Cross(WMath.Vector.UnitZ).Normalized;                        // We can safely use (0,0,1) as the "up" direction since the HL2 basis doesn't have any vertical direction
                WMath.Vector Yg = Xg.Cross(Basis[1]);
                WMath.Vector Xb = Basis[2].Cross(WMath.Vector.UnitZ).Normalized;                        // We can safely use (0,0,1) as the "up" direction since the HL2 basis doesn't have any vertical direction
                WMath.Vector Yb = Xb.Cross(Basis[2]);

                double Exponent = 1.0 / (1.0 + LobeExponent);
                for (int RayIndex = 0; RayIndex < RaysCount; RayIndex++)
                {
//                  if ( false ) {
//                      double	Phi = 2.0 * Math.PI * WMath.SimpleRNG.GetUniform();
// //						double	Theta = Math.Acos( Math.Pow( WMath.SimpleRNG.GetUniform(), Exponent ) );
//                      double	Theta = Math.PI / 3.0 * WMath.SimpleRNG.GetUniform();
//
//                      WMath.Vector	RayLocal = new WMath.Vector(
//                          (float) (Math.Cos( Phi ) * Math.Sin( Theta )),
//                          (float) (Math.Sin( Phi ) * Math.Sin( Theta )),
//                          (float) Math.Cos( Theta ) );
//
//                      Rays[0,RayIndex] = RayLocal.x * Xr + RayLocal.y * Yr + RayLocal.z * Basis[0];
//                      Rays[1,RayIndex] = RayLocal.x * Xg + RayLocal.y * Yg + RayLocal.z * Basis[1];
//                      Rays[2,RayIndex] = RayLocal.x * Xb + RayLocal.y * Yb + RayLocal.z * Basis[2];
//                  }
//                  else
                    {
                        double Phi   = Math.PI / 3.0 * (2.0 * WMath.SimpleRNG.GetUniform() - 1.0);
                        double Theta = 0.49 * Math.PI * WMath.SimpleRNG.GetUniform();
                        Rays[0, RayIndex] = new WMath.Vector(
                            (float)(Math.Cos(Phi) * Math.Sin(Theta)),
                            (float)(Math.Sin(Phi) * Math.Sin(Theta)),
                            (float)Math.Cos(Theta));

                        Phi               = Math.PI / 3.0 * (2.0 * WMath.SimpleRNG.GetUniform() - 1.0 + 2.0);
                        Theta             = 0.49 * Math.PI * WMath.SimpleRNG.GetUniform();
                        Rays[1, RayIndex] = new WMath.Vector(
                            (float)(Math.Cos(Phi) * Math.Sin(Theta)),
                            (float)(Math.Sin(Phi) * Math.Sin(Theta)),
                            (float)Math.Cos(Theta));

                        Phi               = Math.PI / 3.0 * (2.0 * WMath.SimpleRNG.GetUniform() - 1.0 + 4.0);
                        Theta             = 0.49 * Math.PI * WMath.SimpleRNG.GetUniform();
                        Rays[2, RayIndex] = new WMath.Vector(
                            (float)(Math.Cos(Phi) * Math.Sin(Theta)),
                            (float)(Math.Sin(Phi) * Math.Sin(Theta)),
                            (float)Math.Cos(Theta));
                    }

                    Rays[0, RayIndex].z *= Scale;
                    Rays[1, RayIndex].z *= Scale;
                    Rays[2, RayIndex].z *= Scale;
                }

                // 3] Compute directional occlusion
                for (int Y = 0; Y < H; Y++)
                {
                    for (int X = 0; X < W; X++)
                    {
                        float R = ComputeAO(0, X, Y, Scale, Rays);
                        float G = ComputeAO(1, X, Y, Scale, Rays);
                        float B = ComputeAO(2, X, Y, Scale, Rays);
//						N = m_Normal[X,Y];
//
                        m_BitmapResult.ContentXYZ[X, Y] = m_LinearProfile.RGB2XYZ(new ImageUtility.float4(R, G, B, (R + G + B) / 3.0f));
                    }

                    // Update and show progress
                    UpdateProgress(m_BitmapResult, Y, true);
                }
                UpdateProgress(m_BitmapResult, H, true);

//				m_BitmapResult.Save( "eye_generic_01_disp_hl2.png", ImageFormat.Png );
            }
            catch (Exception _e)
            {
                MessageBox("An error occurred during generation:\r\n" + _e.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                tabControlGenerators.Enabled = true;
            }
        }
コード例 #13
0
ファイル: Form1.cs プロジェクト: Patapom/GodComplex
        void TestEigenVectors()
        {
            //			WMath.Vector	Axis = new WMath.Vector( 1, 1, 1 );
            WMath.Vector	Axis = new WMath.Vector( 1, 0, 0 );
                            Axis.Normalize();
            WMath.Matrix3x3	Rot = (WMath.Matrix3x3) new WMath.Quat( new WMath.AngleAxis( 0.5f * (float) Math.PI, Axis ));
                            Rot.Transpose();

            WMath.Vector	Eigen = Rot.EigenValues();

            WMath.Matrix3x3	M0 = Rot - Eigen.x * WMath.Matrix3x3.IDENTITY;
            WMath.Matrix3x3	M1 = Rot - Eigen.y * WMath.Matrix3x3.IDENTITY;
            WMath.Matrix3x3	M2 = Rot - Eigen.z * WMath.Matrix3x3.IDENTITY;

            WMath.Vector	X = M0.GetRow0();
            WMath.Vector	Y = M0.GetRow1();
            WMath.Vector	Z = M0.GetRow2();
        }
コード例 #14
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     WMath.Vector vector1  = new WMath.Vector();
     WMath.Vector vector2  = new WMath.Vector();
     WMath.Vector vector3  = new WMath.Vector();
     WMath.Vector vector4  = new WMath.Vector();
     WMath.Vector vector5  = new WMath.Vector();
     WMath.Vector vector6  = new WMath.Vector();
     WMath.Vector vector7  = new WMath.Vector();
     WMath.Vector vector8  = new WMath.Vector();
     WMath.Vector vector9  = new WMath.Vector();
     WMath.Vector vector10 = new WMath.Vector();
     WMath.Vector vector11 = new WMath.Vector();
     WMath.Vector vector12 = new WMath.Vector();
     WMath.Vector vector13 = new WMath.Vector();
     WMath.Vector vector14 = new WMath.Vector();
     WMath.Vector vector15 = new WMath.Vector();
     WMath.Vector vector16 = new WMath.Vector();
     WMath.Vector vector17 = new WMath.Vector();
     WMath.Vector vector18 = new WMath.Vector();
     WMath.Vector vector19 = new WMath.Vector();
     WMath.Vector vector20 = new WMath.Vector();
     WMath.Vector vector21 = new WMath.Vector();
     WMath.Vector vector22 = new WMath.Vector();
     WMath.Vector vector23 = new WMath.Vector();
     WMath.Vector vector24 = new WMath.Vector();
     WMath.Vector vector25 = new WMath.Vector();
     WMath.Vector vector26 = new WMath.Vector();
     WMath.Vector vector27 = new WMath.Vector();
     WMath.Vector vector28 = new WMath.Vector();
     this.menuStrip                         = new System.Windows.Forms.MenuStrip();
     this.fileToolStripMenuItem             = new System.Windows.Forms.ToolStripMenuItem();
     this.loadProbeToolStripMenuItem        = new System.Windows.Forms.ToolStripMenuItem();
     this.saveResultsToolStripMenuItem      = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripMenuItem1                = new System.Windows.Forms.ToolStripSeparator();
     this.batchEncodeToolStripMenuItem      = new System.Windows.Forms.ToolStripMenuItem();
     this.toolsToolStripMenuItem            = new System.Windows.Forms.ToolStripMenuItem();
     this.encodeFaceProbesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.openFileDialog                    = new System.Windows.Forms.OpenFileDialog();
     this.saveFileDialog                    = new System.Windows.Forms.SaveFileDialog();
     this.buttonCompute                     = new System.Windows.Forms.Button();
     this.radioButtonAlbedo                 = new System.Windows.Forms.RadioButton();
     this.radioButtonDistance               = new System.Windows.Forms.RadioButton();
     this.radioButtonSetIndex               = new System.Windows.Forms.RadioButton();
     this.radioButtonSetColor               = new System.Windows.Forms.RadioButton();
     this.radioButtonNormal                 = new System.Windows.Forms.RadioButton();
     this.radioButtonSetDistance            = new System.Windows.Forms.RadioButton();
     this.radioButtonSetNormal              = new System.Windows.Forms.RadioButton();
     this.textBoxResults                    = new System.Windows.Forms.TextBox();
     this.floatTrackbarControlAlbedo        = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
     this.label1 = new System.Windows.Forms.Label();
     this.floatTrackbarControlNormal = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
     this.label2 = new System.Windows.Forms.Label();
     this.floatTrackbarControlPosition = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
     this.label3 = new System.Windows.Forms.Label();
     this.integerTrackbarControlSetIsolation = new Nuaj.Cirrus.Utility.IntegerTrackbarControl();
     this.checkBoxSetIsolation    = new System.Windows.Forms.CheckBox();
     this.integerTrackbarControlK = new Nuaj.Cirrus.Utility.IntegerTrackbarControl();
     this.label4 = new System.Windows.Forms.Label();
     this.floatTrackbarControlLambda = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
     this.label5 = new System.Windows.Forms.Label();
     this.buttonComputeFilling = new System.Windows.Forms.Button();
     this.radioButtonSHStatic  = new System.Windows.Forms.RadioButton();
     this.label6 = new System.Windows.Forms.Label();
     this.integerTrackbarControlLightSamples = new Nuaj.Cirrus.Utility.IntegerTrackbarControl();
     this.radioButtonSetSamples    = new System.Windows.Forms.RadioButton();
     this.folderBrowserDialog      = new System.Windows.Forms.FolderBrowserDialog();
     this.progressBarBatchConvert  = new System.Windows.Forms.ProgressBar();
     this.radioButtonStaticLit     = new System.Windows.Forms.RadioButton();
     this.radioButtonEmissiveMatID = new System.Windows.Forms.RadioButton();
     this.checkBoxSHStatic         = new System.Windows.Forms.CheckBox();
     this.checkBoxSHDynamic        = new System.Windows.Forms.CheckBox();
     this.checkBoxSHEmissive       = new System.Windows.Forms.CheckBox();
     this.checkBoxSHOcclusion      = new System.Windows.Forms.CheckBox();
     this.checkBoxSHNormalized     = new System.Windows.Forms.CheckBox();
     this.radioButtonFaceIndex     = new System.Windows.Forms.RadioButton();
     this.buttonReset = new System.Windows.Forms.Button();
     this.radioButtonNeighborProbeID   = new System.Windows.Forms.RadioButton();
     this.openFileDialogProbeInfluence = new System.Windows.Forms.OpenFileDialog();
     this.openFileDialogScene          = new System.Windows.Forms.OpenFileDialog();
     this.progressBarSubTask           = new System.Windows.Forms.ProgressBar();
     this.outputPanel1 = new ProbeSHEncoder.OutputPanel(this.components);
     this.menuStrip.SuspendLayout();
     this.SuspendLayout();
     //
     // menuStrip
     //
     this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.fileToolStripMenuItem,
         this.toolsToolStripMenuItem
     });
     this.menuStrip.Location = new System.Drawing.Point(0, 0);
     this.menuStrip.Name     = "menuStrip";
     this.menuStrip.Size     = new System.Drawing.Size(1027, 24);
     this.menuStrip.TabIndex = 1;
     this.menuStrip.Text     = "menuStrip1";
     //
     // fileToolStripMenuItem
     //
     this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.loadProbeToolStripMenuItem,
         this.saveResultsToolStripMenuItem,
         this.toolStripMenuItem1,
         this.batchEncodeToolStripMenuItem
     });
     this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
     this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
     this.fileToolStripMenuItem.Text = "&File";
     //
     // loadProbeToolStripMenuItem
     //
     this.loadProbeToolStripMenuItem.Name         = "loadProbeToolStripMenuItem";
     this.loadProbeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
     this.loadProbeToolStripMenuItem.Size         = new System.Drawing.Size(187, 22);
     this.loadProbeToolStripMenuItem.Text         = "&Load Probe";
     this.loadProbeToolStripMenuItem.Click       += new System.EventHandler(this.loadProbeToolStripMenuItem_Click);
     //
     // saveResultsToolStripMenuItem
     //
     this.saveResultsToolStripMenuItem.Enabled      = false;
     this.saveResultsToolStripMenuItem.Name         = "saveResultsToolStripMenuItem";
     this.saveResultsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
     this.saveResultsToolStripMenuItem.Size         = new System.Drawing.Size(187, 22);
     this.saveResultsToolStripMenuItem.Text         = "&Save Results";
     this.saveResultsToolStripMenuItem.Click       += new System.EventHandler(this.saveResultsToolStripMenuItem_Click);
     //
     // toolStripMenuItem1
     //
     this.toolStripMenuItem1.Name = "toolStripMenuItem1";
     this.toolStripMenuItem1.Size = new System.Drawing.Size(184, 6);
     //
     // batchEncodeToolStripMenuItem
     //
     this.batchEncodeToolStripMenuItem.Name         = "batchEncodeToolStripMenuItem";
     this.batchEncodeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B)));
     this.batchEncodeToolStripMenuItem.Size         = new System.Drawing.Size(187, 22);
     this.batchEncodeToolStripMenuItem.Text         = "&Batch Encode";
     this.batchEncodeToolStripMenuItem.Click       += new System.EventHandler(this.batchEncodeToolStripMenuItem_Click);
     //
     // toolsToolStripMenuItem
     //
     this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.encodeFaceProbesToolStripMenuItem
     });
     this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
     this.toolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20);
     this.toolsToolStripMenuItem.Text = "&Tools";
     //
     // encodeFaceProbesToolStripMenuItem
     //
     this.encodeFaceProbesToolStripMenuItem.Name   = "encodeFaceProbesToolStripMenuItem";
     this.encodeFaceProbesToolStripMenuItem.Size   = new System.Drawing.Size(179, 22);
     this.encodeFaceProbesToolStripMenuItem.Text   = "&Encode Face Probes";
     this.encodeFaceProbesToolStripMenuItem.Click += new System.EventHandler(this.encodeFaceProbesToolStripMenuItem_Click);
     //
     // openFileDialog
     //
     this.openFileDialog.DefaultExt       = "pom";
     this.openFileDialog.Filter           = "Probe File (*.pom)|*.pom|All Files (*.*)|*.*";
     this.openFileDialog.RestoreDirectory = true;
     this.openFileDialog.Title            = "Choose a probe file to convert...";
     //
     // saveFileDialog
     //
     this.saveFileDialog.DefaultExt = "probesets";
     this.saveFileDialog.Filter     = "Probe Sets File (*.probeset)|*.probeset|All Files (*.*)|*.*";
     this.saveFileDialog.Title      = "Choose a target file to save the encoded probe to...";
     //
     // buttonCompute
     //
     this.buttonCompute.Enabled  = false;
     this.buttonCompute.Location = new System.Drawing.Point(776, 109);
     this.buttonCompute.Name     = "buttonCompute";
     this.buttonCompute.Size     = new System.Drawing.Size(97, 38);
     this.buttonCompute.TabIndex = 2;
     this.buttonCompute.Text     = "Compute k-Means";
     this.buttonCompute.UseVisualStyleBackColor = true;
     this.buttonCompute.Visible = false;
     this.buttonCompute.Click  += new System.EventHandler(this.buttonCompute_Click);
     //
     // radioButtonAlbedo
     //
     this.radioButtonAlbedo.AutoSize = true;
     this.radioButtonAlbedo.Checked  = true;
     this.radioButtonAlbedo.Location = new System.Drawing.Point(712, 195);
     this.radioButtonAlbedo.Name     = "radioButtonAlbedo";
     this.radioButtonAlbedo.Size     = new System.Drawing.Size(58, 17);
     this.radioButtonAlbedo.TabIndex = 4;
     this.radioButtonAlbedo.TabStop  = true;
     this.radioButtonAlbedo.Text     = "Albedo";
     this.radioButtonAlbedo.UseVisualStyleBackColor = true;
     this.radioButtonAlbedo.CheckedChanged         += new System.EventHandler(this.radioButtonAlbedo_CheckedChanged);
     //
     // radioButtonDistance
     //
     this.radioButtonDistance.AutoSize = true;
     this.radioButtonDistance.Location = new System.Drawing.Point(712, 218);
     this.radioButtonDistance.Name     = "radioButtonDistance";
     this.radioButtonDistance.Size     = new System.Drawing.Size(67, 17);
     this.radioButtonDistance.TabIndex = 4;
     this.radioButtonDistance.Text     = "Distance";
     this.radioButtonDistance.UseVisualStyleBackColor = true;
     this.radioButtonDistance.CheckedChanged         += new System.EventHandler(this.radioButtonDistance_CheckedChanged);
     //
     // radioButtonSetIndex
     //
     this.radioButtonSetIndex.AutoSize = true;
     this.radioButtonSetIndex.Location = new System.Drawing.Point(712, 356);
     this.radioButtonSetIndex.Name     = "radioButtonSetIndex";
     this.radioButtonSetIndex.Size     = new System.Drawing.Size(70, 17);
     this.radioButtonSetIndex.TabIndex = 4;
     this.radioButtonSetIndex.Text     = "Set Index";
     this.radioButtonSetIndex.UseVisualStyleBackColor = true;
     this.radioButtonSetIndex.CheckedChanged         += new System.EventHandler(this.radioButtonSetIndex_CheckedChanged);
     //
     // radioButtonSetColor
     //
     this.radioButtonSetColor.AutoSize = true;
     this.radioButtonSetColor.Location = new System.Drawing.Point(712, 379);
     this.radioButtonSetColor.Name     = "radioButtonSetColor";
     this.radioButtonSetColor.Size     = new System.Drawing.Size(77, 17);
     this.radioButtonSetColor.TabIndex = 4;
     this.radioButtonSetColor.Text     = "Set Albedo";
     this.radioButtonSetColor.UseVisualStyleBackColor = true;
     this.radioButtonSetColor.CheckedChanged         += new System.EventHandler(this.radioButtonSetColor_CheckedChanged);
     //
     // radioButtonNormal
     //
     this.radioButtonNormal.AutoSize = true;
     this.radioButtonNormal.Location = new System.Drawing.Point(712, 241);
     this.radioButtonNormal.Name     = "radioButtonNormal";
     this.radioButtonNormal.Size     = new System.Drawing.Size(58, 17);
     this.radioButtonNormal.TabIndex = 4;
     this.radioButtonNormal.Text     = "Normal";
     this.radioButtonNormal.UseVisualStyleBackColor = true;
     this.radioButtonNormal.CheckedChanged         += new System.EventHandler(this.radioButtonNormal_CheckedChanged);
     //
     // radioButtonSetDistance
     //
     this.radioButtonSetDistance.AutoSize = true;
     this.radioButtonSetDistance.Location = new System.Drawing.Point(712, 402);
     this.radioButtonSetDistance.Name     = "radioButtonSetDistance";
     this.radioButtonSetDistance.Size     = new System.Drawing.Size(86, 17);
     this.radioButtonSetDistance.TabIndex = 4;
     this.radioButtonSetDistance.Text     = "Set Distance";
     this.radioButtonSetDistance.UseVisualStyleBackColor = true;
     this.radioButtonSetDistance.CheckedChanged         += new System.EventHandler(this.radioButtonSetDistance_CheckedChanged);
     //
     // radioButtonSetNormal
     //
     this.radioButtonSetNormal.AutoSize = true;
     this.radioButtonSetNormal.Location = new System.Drawing.Point(712, 425);
     this.radioButtonSetNormal.Name     = "radioButtonSetNormal";
     this.radioButtonSetNormal.Size     = new System.Drawing.Size(77, 17);
     this.radioButtonSetNormal.TabIndex = 4;
     this.radioButtonSetNormal.Text     = "Set Normal";
     this.radioButtonSetNormal.UseVisualStyleBackColor = true;
     this.radioButtonSetNormal.CheckedChanged         += new System.EventHandler(this.radioButtonSetNormal_CheckedChanged);
     //
     // textBoxResults
     //
     this.textBoxResults.Location   = new System.Drawing.Point(827, 130);
     this.textBoxResults.Multiline  = true;
     this.textBoxResults.Name       = "textBoxResults";
     this.textBoxResults.ReadOnly   = true;
     this.textBoxResults.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
     this.textBoxResults.Size       = new System.Drawing.Size(188, 259);
     this.textBoxResults.TabIndex   = 5;
     //
     // floatTrackbarControlAlbedo
     //
     this.floatTrackbarControlAlbedo.Location        = new System.Drawing.Point(711, 665);
     this.floatTrackbarControlAlbedo.MaximumSize     = new System.Drawing.Size(10000, 20);
     this.floatTrackbarControlAlbedo.MinimumSize     = new System.Drawing.Size(70, 20);
     this.floatTrackbarControlAlbedo.Name            = "floatTrackbarControlAlbedo";
     this.floatTrackbarControlAlbedo.RangeMax        = 100F;
     this.floatTrackbarControlAlbedo.RangeMin        = 0F;
     this.floatTrackbarControlAlbedo.Size            = new System.Drawing.Size(303, 20);
     this.floatTrackbarControlAlbedo.TabIndex        = 6;
     this.floatTrackbarControlAlbedo.Value           = 1F;
     this.floatTrackbarControlAlbedo.VisibleRangeMax = 1F;
     this.floatTrackbarControlAlbedo.ValueChanged   += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlAlbedo_ValueChanged);
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(708, 649);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(150, 13);
     this.label1.TabIndex = 7;
     this.label1.Text     = "Albedo Separation Importance";
     //
     // floatTrackbarControlNormal
     //
     this.floatTrackbarControlNormal.Location        = new System.Drawing.Point(711, 626);
     this.floatTrackbarControlNormal.MaximumSize     = new System.Drawing.Size(10000, 20);
     this.floatTrackbarControlNormal.MinimumSize     = new System.Drawing.Size(70, 20);
     this.floatTrackbarControlNormal.Name            = "floatTrackbarControlNormal";
     this.floatTrackbarControlNormal.RangeMax        = 100F;
     this.floatTrackbarControlNormal.RangeMin        = 0F;
     this.floatTrackbarControlNormal.Size            = new System.Drawing.Size(303, 20);
     this.floatTrackbarControlNormal.TabIndex        = 6;
     this.floatTrackbarControlNormal.Value           = 1F;
     this.floatTrackbarControlNormal.VisibleRangeMax = 1F;
     this.floatTrackbarControlNormal.ValueChanged   += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlNormal_ValueChanged);
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(708, 610);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(150, 13);
     this.label2.TabIndex = 7;
     this.label2.Text     = "Normal Separation Importance";
     //
     // floatTrackbarControlPosition
     //
     this.floatTrackbarControlPosition.Location        = new System.Drawing.Point(712, 587);
     this.floatTrackbarControlPosition.MaximumSize     = new System.Drawing.Size(10000, 20);
     this.floatTrackbarControlPosition.MinimumSize     = new System.Drawing.Size(70, 20);
     this.floatTrackbarControlPosition.Name            = "floatTrackbarControlPosition";
     this.floatTrackbarControlPosition.RangeMax        = 100F;
     this.floatTrackbarControlPosition.RangeMin        = 0F;
     this.floatTrackbarControlPosition.Size            = new System.Drawing.Size(303, 20);
     this.floatTrackbarControlPosition.TabIndex        = 6;
     this.floatTrackbarControlPosition.Value           = 1F;
     this.floatTrackbarControlPosition.VisibleRangeMax = 1F;
     this.floatTrackbarControlPosition.ValueChanged   += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlPosition_ValueChanged);
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(709, 571);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(149, 13);
     this.label3.TabIndex = 7;
     this.label3.Text     = "Spatial Separation Importance";
     //
     // integerTrackbarControlSetIsolation
     //
     this.integerTrackbarControlSetIsolation.Location        = new System.Drawing.Point(732, 517);
     this.integerTrackbarControlSetIsolation.MaximumSize     = new System.Drawing.Size(10000, 20);
     this.integerTrackbarControlSetIsolation.MinimumSize     = new System.Drawing.Size(70, 20);
     this.integerTrackbarControlSetIsolation.Name            = "integerTrackbarControlSetIsolation";
     this.integerTrackbarControlSetIsolation.RangeMax        = 100;
     this.integerTrackbarControlSetIsolation.RangeMin        = 0;
     this.integerTrackbarControlSetIsolation.Size            = new System.Drawing.Size(248, 20);
     this.integerTrackbarControlSetIsolation.TabIndex        = 8;
     this.integerTrackbarControlSetIsolation.Value           = 0;
     this.integerTrackbarControlSetIsolation.VisibleRangeMax = 10;
     this.integerTrackbarControlSetIsolation.ValueChanged   += new Nuaj.Cirrus.Utility.IntegerTrackbarControl.ValueChangedEventHandler(this.integerTrackbarControlSetIsolation_ValueChanged);
     //
     // checkBoxSetIsolation
     //
     this.checkBoxSetIsolation.AutoSize = true;
     this.checkBoxSetIsolation.Location = new System.Drawing.Point(712, 494);
     this.checkBoxSetIsolation.Name     = "checkBoxSetIsolation";
     this.checkBoxSetIsolation.Size     = new System.Drawing.Size(76, 17);
     this.checkBoxSetIsolation.TabIndex = 9;
     this.checkBoxSetIsolation.Text     = "Isolate Set";
     this.checkBoxSetIsolation.UseVisualStyleBackColor = true;
     this.checkBoxSetIsolation.CheckedChanged         += new System.EventHandler(this.checkBoxSetIsolation_CheckedChanged);
     //
     // integerTrackbarControlK
     //
     this.integerTrackbarControlK.Location        = new System.Drawing.Point(757, 31);
     this.integerTrackbarControlK.MaximumSize     = new System.Drawing.Size(10000, 20);
     this.integerTrackbarControlK.MinimumSize     = new System.Drawing.Size(70, 20);
     this.integerTrackbarControlK.Name            = "integerTrackbarControlK";
     this.integerTrackbarControlK.RangeMax        = 128;
     this.integerTrackbarControlK.RangeMin        = 1;
     this.integerTrackbarControlK.Size            = new System.Drawing.Size(257, 20);
     this.integerTrackbarControlK.TabIndex        = 8;
     this.integerTrackbarControlK.Value           = 32;
     this.integerTrackbarControlK.VisibleRangeMax = 64;
     this.integerTrackbarControlK.VisibleRangeMin = 1;
     this.integerTrackbarControlK.ValueChanged   += new Nuaj.Cirrus.Utility.IntegerTrackbarControl.ValueChangedEventHandler(this.integerTrackbarControlK_ValueChanged);
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(695, 34);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(14, 13);
     this.label4.TabIndex = 7;
     this.label4.Text     = "K";
     //
     // floatTrackbarControlLambda
     //
     this.floatTrackbarControlLambda.Location        = new System.Drawing.Point(757, 57);
     this.floatTrackbarControlLambda.MaximumSize     = new System.Drawing.Size(10000, 20);
     this.floatTrackbarControlLambda.MinimumSize     = new System.Drawing.Size(70, 20);
     this.floatTrackbarControlLambda.Name            = "floatTrackbarControlLambda";
     this.floatTrackbarControlLambda.RangeMax        = 1F;
     this.floatTrackbarControlLambda.RangeMin        = 0F;
     this.floatTrackbarControlLambda.Size            = new System.Drawing.Size(258, 20);
     this.floatTrackbarControlLambda.TabIndex        = 6;
     this.floatTrackbarControlLambda.Value           = 0.5F;
     this.floatTrackbarControlLambda.VisibleRangeMax = 1F;
     this.floatTrackbarControlLambda.ValueChanged   += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlLambda_ValueChanged);
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(695, 60);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(60, 13);
     this.label5.TabIndex = 7;
     this.label5.Text     = "Importance";
     //
     // buttonComputeFilling
     //
     this.buttonComputeFilling.Enabled  = false;
     this.buttonComputeFilling.Location = new System.Drawing.Point(711, 151);
     this.buttonComputeFilling.Name     = "buttonComputeFilling";
     this.buttonComputeFilling.Size     = new System.Drawing.Size(97, 38);
     this.buttonComputeFilling.TabIndex = 2;
     this.buttonComputeFilling.Text     = "Compute Filling";
     this.buttonComputeFilling.UseVisualStyleBackColor = true;
     this.buttonComputeFilling.Click += new System.EventHandler(this.buttonComputeFilling_Click);
     //
     // radioButtonSHStatic
     //
     this.radioButtonSHStatic.AutoSize = true;
     this.radioButtonSHStatic.Location = new System.Drawing.Point(712, 448);
     this.radioButtonSHStatic.Name     = "radioButtonSHStatic";
     this.radioButtonSHStatic.Size     = new System.Drawing.Size(73, 17);
     this.radioButtonSHStatic.TabIndex = 4;
     this.radioButtonSHStatic.Text     = "Result SH";
     this.radioButtonSHStatic.UseVisualStyleBackColor = true;
     this.radioButtonSHStatic.CheckedChanged         += new System.EventHandler(this.radioButtonSH_CheckedChanged);
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(695, 85);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(75, 31);
     this.label6.TabIndex = 7;
     this.label6.Text     = "Amount of light samples";
     //
     // integerTrackbarControlLightSamples
     //
     this.integerTrackbarControlLightSamples.Location        = new System.Drawing.Point(757, 83);
     this.integerTrackbarControlLightSamples.MaximumSize     = new System.Drawing.Size(10000, 20);
     this.integerTrackbarControlLightSamples.MinimumSize     = new System.Drawing.Size(70, 20);
     this.integerTrackbarControlLightSamples.Name            = "integerTrackbarControlLightSamples";
     this.integerTrackbarControlLightSamples.RangeMax        = 256;
     this.integerTrackbarControlLightSamples.RangeMin        = 1;
     this.integerTrackbarControlLightSamples.Size            = new System.Drawing.Size(257, 20);
     this.integerTrackbarControlLightSamples.TabIndex        = 8;
     this.integerTrackbarControlLightSamples.Value           = 64;
     this.integerTrackbarControlLightSamples.VisibleRangeMax = 128;
     this.integerTrackbarControlLightSamples.VisibleRangeMin = 1;
     this.integerTrackbarControlLightSamples.ValueChanged   += new Nuaj.Cirrus.Utility.IntegerTrackbarControl.ValueChangedEventHandler(this.integerTrackbarControlLightSamples_ValueChanged);
     //
     // radioButtonSetSamples
     //
     this.radioButtonSetSamples.AutoSize = true;
     this.radioButtonSetSamples.Location = new System.Drawing.Point(712, 471);
     this.radioButtonSetSamples.Name     = "radioButtonSetSamples";
     this.radioButtonSetSamples.Size     = new System.Drawing.Size(84, 17);
     this.radioButtonSetSamples.TabIndex = 4;
     this.radioButtonSetSamples.Text     = "Set Samples";
     this.radioButtonSetSamples.UseVisualStyleBackColor = true;
     this.radioButtonSetSamples.CheckedChanged         += new System.EventHandler(this.radioButtonSetSamples_CheckedChanged);
     //
     // folderBrowserDialog
     //
     this.folderBrowserDialog.Description = "Select the folder to parse for POM files of probes shooting";
     //
     // progressBarBatchConvert
     //
     this.progressBarBatchConvert.Location = new System.Drawing.Point(12, 652);
     this.progressBarBatchConvert.Name     = "progressBarBatchConvert";
     this.progressBarBatchConvert.Size     = new System.Drawing.Size(677, 19);
     this.progressBarBatchConvert.TabIndex = 10;
     this.progressBarBatchConvert.Visible  = false;
     //
     // radioButtonStaticLit
     //
     this.radioButtonStaticLit.AutoSize = true;
     this.radioButtonStaticLit.Location = new System.Drawing.Point(712, 264);
     this.radioButtonStaticLit.Name     = "radioButtonStaticLit";
     this.radioButtonStaticLit.Size     = new System.Drawing.Size(66, 17);
     this.radioButtonStaticLit.TabIndex = 4;
     this.radioButtonStaticLit.Text     = "Static Lit";
     this.radioButtonStaticLit.UseVisualStyleBackColor = true;
     this.radioButtonStaticLit.CheckedChanged         += new System.EventHandler(this.radioButtonStaticLit_CheckedChanged);
     //
     // radioButtonEmissiveMatID
     //
     this.radioButtonEmissiveMatID.AutoSize = true;
     this.radioButtonEmissiveMatID.Location = new System.Drawing.Point(712, 310);
     this.radioButtonEmissiveMatID.Name     = "radioButtonEmissiveMatID";
     this.radioButtonEmissiveMatID.Size     = new System.Drawing.Size(101, 17);
     this.radioButtonEmissiveMatID.TabIndex = 4;
     this.radioButtonEmissiveMatID.Text     = "Emissive Mat ID";
     this.radioButtonEmissiveMatID.UseVisualStyleBackColor = true;
     this.radioButtonEmissiveMatID.CheckedChanged         += new System.EventHandler(this.radioButtonEmissiveMatID_CheckedChanged);
     //
     // checkBoxSHStatic
     //
     this.checkBoxSHStatic.AutoSize = true;
     this.checkBoxSHStatic.Location = new System.Drawing.Point(791, 448);
     this.checkBoxSHStatic.Name     = "checkBoxSHStatic";
     this.checkBoxSHStatic.Size     = new System.Drawing.Size(53, 17);
     this.checkBoxSHStatic.TabIndex = 9;
     this.checkBoxSHStatic.Text     = "Static";
     this.checkBoxSHStatic.UseVisualStyleBackColor = true;
     this.checkBoxSHStatic.CheckedChanged         += new System.EventHandler(this.checkBoxSHStatic_CheckedChanged);
     //
     // checkBoxSHDynamic
     //
     this.checkBoxSHDynamic.AutoSize   = true;
     this.checkBoxSHDynamic.Checked    = true;
     this.checkBoxSHDynamic.CheckState = System.Windows.Forms.CheckState.Checked;
     this.checkBoxSHDynamic.Location   = new System.Drawing.Point(850, 448);
     this.checkBoxSHDynamic.Name       = "checkBoxSHDynamic";
     this.checkBoxSHDynamic.Size       = new System.Drawing.Size(67, 17);
     this.checkBoxSHDynamic.TabIndex   = 9;
     this.checkBoxSHDynamic.Text       = "Dynamic";
     this.checkBoxSHDynamic.UseVisualStyleBackColor = true;
     this.checkBoxSHDynamic.CheckedChanged         += new System.EventHandler(this.checkBoxSHDynamic_CheckedChanged);
     //
     // checkBoxSHEmissive
     //
     this.checkBoxSHEmissive.AutoSize = true;
     this.checkBoxSHEmissive.Location = new System.Drawing.Point(923, 448);
     this.checkBoxSHEmissive.Name     = "checkBoxSHEmissive";
     this.checkBoxSHEmissive.Size     = new System.Drawing.Size(67, 17);
     this.checkBoxSHEmissive.TabIndex = 9;
     this.checkBoxSHEmissive.Text     = "Emissive";
     this.checkBoxSHEmissive.UseVisualStyleBackColor = true;
     this.checkBoxSHEmissive.CheckedChanged         += new System.EventHandler(this.checkBoxSHEmissive_CheckedChanged);
     //
     // checkBoxSHOcclusion
     //
     this.checkBoxSHOcclusion.AutoSize = true;
     this.checkBoxSHOcclusion.Location = new System.Drawing.Point(923, 471);
     this.checkBoxSHOcclusion.Name     = "checkBoxSHOcclusion";
     this.checkBoxSHOcclusion.Size     = new System.Drawing.Size(73, 17);
     this.checkBoxSHOcclusion.TabIndex = 9;
     this.checkBoxSHOcclusion.Text     = "Occlusion";
     this.checkBoxSHOcclusion.UseVisualStyleBackColor = true;
     this.checkBoxSHOcclusion.CheckedChanged         += new System.EventHandler(this.checkBoxSHOcclusion_CheckedChanged);
     //
     // checkBoxSHNormalized
     //
     this.checkBoxSHNormalized.AutoSize = true;
     this.checkBoxSHNormalized.Location = new System.Drawing.Point(850, 471);
     this.checkBoxSHNormalized.Name     = "checkBoxSHNormalized";
     this.checkBoxSHNormalized.Size     = new System.Drawing.Size(78, 17);
     this.checkBoxSHNormalized.TabIndex = 9;
     this.checkBoxSHNormalized.Text     = "Normalized";
     this.checkBoxSHNormalized.UseVisualStyleBackColor = true;
     this.checkBoxSHNormalized.CheckedChanged         += new System.EventHandler(this.checkBoxSHNormalized_CheckedChanged);
     //
     // radioButtonFaceIndex
     //
     this.radioButtonFaceIndex.AutoSize = true;
     this.radioButtonFaceIndex.Location = new System.Drawing.Point(712, 287);
     this.radioButtonFaceIndex.Name     = "radioButtonFaceIndex";
     this.radioButtonFaceIndex.Size     = new System.Drawing.Size(78, 17);
     this.radioButtonFaceIndex.TabIndex = 4;
     this.radioButtonFaceIndex.Text     = "Face Index";
     this.radioButtonFaceIndex.UseVisualStyleBackColor = true;
     this.radioButtonFaceIndex.CheckedChanged         += new System.EventHandler(this.radioButtonFaceIndex_CheckedChanged);
     //
     // buttonReset
     //
     this.buttonReset.Location = new System.Drawing.Point(948, 557);
     this.buttonReset.Name     = "buttonReset";
     this.buttonReset.Size     = new System.Drawing.Size(66, 24);
     this.buttonReset.TabIndex = 2;
     this.buttonReset.Text     = "Reset";
     this.buttonReset.UseVisualStyleBackColor = true;
     this.buttonReset.Visible = false;
     this.buttonReset.Click  += new System.EventHandler(this.buttonReset_Click);
     //
     // radioButtonNeighborProbeID
     //
     this.radioButtonNeighborProbeID.AutoSize = true;
     this.radioButtonNeighborProbeID.Location = new System.Drawing.Point(712, 333);
     this.radioButtonNeighborProbeID.Name     = "radioButtonNeighborProbeID";
     this.radioButtonNeighborProbeID.Size     = new System.Drawing.Size(113, 17);
     this.radioButtonNeighborProbeID.TabIndex = 4;
     this.radioButtonNeighborProbeID.Text     = "Neighbor Probe ID";
     this.radioButtonNeighborProbeID.UseVisualStyleBackColor = true;
     this.radioButtonNeighborProbeID.CheckedChanged         += new System.EventHandler(this.radioButtonNeighborProbeID_CheckedChanged);
     //
     // openFileDialogProbeInfluence
     //
     this.openFileDialogProbeInfluence.DefaultExt       = "pim";
     this.openFileDialogProbeInfluence.Filter           = "Probe Influence File (*.pim)|*.pim|All Files (*.*)|*.*";
     this.openFileDialogProbeInfluence.RestoreDirectory = true;
     this.openFileDialogProbeInfluence.Title            = "Choose a probe influence file to convert...";
     //
     // openFileDialogScene
     //
     this.openFileDialogScene.DefaultExt       = "gcx";
     this.openFileDialogScene.Filter           = "Scene File (*.gcx)|*.gcx|All Files (*.*)|*.*";
     this.openFileDialogScene.RestoreDirectory = true;
     this.openFileDialogScene.Title            = "Choose a scene file to apply probe influences to...";
     //
     // progressBarSubTask
     //
     this.progressBarSubTask.Location = new System.Drawing.Point(12, 677);
     this.progressBarSubTask.Name     = "progressBarSubTask";
     this.progressBarSubTask.Size     = new System.Drawing.Size(677, 10);
     this.progressBarSubTask.TabIndex = 10;
     this.progressBarSubTask.Visible  = false;
     //
     // outputPanel1
     //
     vector1.X            = 0F;
     vector1.Y            = 0F;
     vector1.Z            = 1F;
     this.outputPanel1.At = vector1;
     this.outputPanel1.IsolatedSetIndex = 0;
     this.outputPanel1.IsolateSet       = false;
     this.outputPanel1.Location         = new System.Drawing.Point(12, 27);
     this.outputPanel1.Name             = "outputPanel1";
     this.outputPanel1.NormalizeSH      = false;
     this.outputPanel1.Probe            = null;
     vector2.X  = 0F;
     vector2.Y  = 0F;
     vector2.Z  = 0F;
     vector3.X  = 0F;
     vector3.Y  = 0F;
     vector3.Z  = 0F;
     vector4.X  = 0F;
     vector4.Y  = 0F;
     vector4.Z  = 0F;
     vector5.X  = 0F;
     vector5.Y  = 0F;
     vector5.Z  = 0F;
     vector6.X  = 0F;
     vector6.Y  = 0F;
     vector6.Z  = 0F;
     vector7.X  = 0F;
     vector7.Y  = 0F;
     vector7.Z  = 0F;
     vector8.X  = 0F;
     vector8.Y  = 0F;
     vector8.Z  = 0F;
     vector9.X  = 0F;
     vector9.Y  = 0F;
     vector9.Z  = 0F;
     vector10.X = 0F;
     vector10.Y = 0F;
     vector10.Z = 0F;
     this.outputPanel1.SHDynamic = new WMath.Vector[] {
         vector2,
         vector3,
         vector4,
         vector5,
         vector6,
         vector7,
         vector8,
         vector9,
         vector10
     };
     vector11.X = 0F;
     vector11.Y = 0F;
     vector11.Z = 0F;
     vector12.X = 0F;
     vector12.Y = 0F;
     vector12.Z = 0F;
     vector13.X = 0F;
     vector13.Y = 0F;
     vector13.Z = 0F;
     vector14.X = 0F;
     vector14.Y = 0F;
     vector14.Z = 0F;
     vector15.X = 0F;
     vector15.Y = 0F;
     vector15.Z = 0F;
     vector16.X = 0F;
     vector16.Y = 0F;
     vector16.Z = 0F;
     vector17.X = 0F;
     vector17.Y = 0F;
     vector17.Z = 0F;
     vector18.X = 0F;
     vector18.Y = 0F;
     vector18.Z = 0F;
     vector19.X = 0F;
     vector19.Y = 0F;
     vector19.Z = 0F;
     this.outputPanel1.SHEmissive = new WMath.Vector[] {
         vector11,
         vector12,
         vector13,
         vector14,
         vector15,
         vector16,
         vector17,
         vector18,
         vector19
     };
     this.outputPanel1.SHOcclusion = new float[] {
         0F,
         0F,
         0F,
         0F,
         0F,
         0F,
         0F,
         0F,
         0F
     };
     this.outputPanel1.ShowSetAverage  = false;
     this.outputPanel1.ShowSHDynamic   = true;
     this.outputPanel1.ShowSHEmissive  = false;
     this.outputPanel1.ShowSHOcclusion = false;
     this.outputPanel1.ShowSHStatic    = false;
     vector20.X = 0F;
     vector20.Y = 0F;
     vector20.Z = 0F;
     vector21.X = 0F;
     vector21.Y = 0F;
     vector21.Z = 0F;
     vector22.X = 0F;
     vector22.Y = 0F;
     vector22.Z = 0F;
     vector23.X = 0F;
     vector23.Y = 0F;
     vector23.Z = 0F;
     vector24.X = 0F;
     vector24.Y = 0F;
     vector24.Z = 0F;
     vector25.X = 0F;
     vector25.Y = 0F;
     vector25.Z = 0F;
     vector26.X = 0F;
     vector26.Y = 0F;
     vector26.Z = 0F;
     vector27.X = 0F;
     vector27.Y = 0F;
     vector27.Z = 0F;
     vector28.X = 0F;
     vector28.Y = 0F;
     vector28.Z = 0F;
     this.outputPanel1.SHStatic = new WMath.Vector[] {
         vector20,
         vector21,
         vector22,
         vector23,
         vector24,
         vector25,
         vector26,
         vector27,
         vector28
     };
     this.outputPanel1.Size     = new System.Drawing.Size(677, 619);
     this.outputPanel1.TabIndex = 3;
     this.outputPanel1.Viz      = ProbeSHEncoder.OutputPanel.VIZ_TYPE.ALBEDO;
     //
     // EncoderForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(1027, 692);
     this.Controls.Add(this.checkBoxSHOcclusion);
     this.Controls.Add(this.progressBarSubTask);
     this.Controls.Add(this.progressBarBatchConvert);
     this.Controls.Add(this.checkBoxSHNormalized);
     this.Controls.Add(this.checkBoxSHEmissive);
     this.Controls.Add(this.checkBoxSHDynamic);
     this.Controls.Add(this.checkBoxSHStatic);
     this.Controls.Add(this.checkBoxSetIsolation);
     this.Controls.Add(this.integerTrackbarControlLightSamples);
     this.Controls.Add(this.integerTrackbarControlK);
     this.Controls.Add(this.integerTrackbarControlSetIsolation);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.floatTrackbarControlLambda);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.floatTrackbarControlPosition);
     this.Controls.Add(this.floatTrackbarControlNormal);
     this.Controls.Add(this.floatTrackbarControlAlbedo);
     this.Controls.Add(this.textBoxResults);
     this.Controls.Add(this.radioButtonSetSamples);
     this.Controls.Add(this.radioButtonSHStatic);
     this.Controls.Add(this.radioButtonSetNormal);
     this.Controls.Add(this.radioButtonSetDistance);
     this.Controls.Add(this.radioButtonSetColor);
     this.Controls.Add(this.radioButtonSetIndex);
     this.Controls.Add(this.radioButtonNeighborProbeID);
     this.Controls.Add(this.radioButtonEmissiveMatID);
     this.Controls.Add(this.radioButtonFaceIndex);
     this.Controls.Add(this.radioButtonStaticLit);
     this.Controls.Add(this.radioButtonNormal);
     this.Controls.Add(this.radioButtonDistance);
     this.Controls.Add(this.radioButtonAlbedo);
     this.Controls.Add(this.outputPanel1);
     this.Controls.Add(this.buttonComputeFilling);
     this.Controls.Add(this.buttonReset);
     this.Controls.Add(this.buttonCompute);
     this.Controls.Add(this.menuStrip);
     this.MainMenuStrip = this.menuStrip;
     this.Name          = "EncoderForm";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "Probe SH Encoder";
     this.menuStrip.ResumeLayout(false);
     this.menuStrip.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
コード例 #15
0
ファイル: Form1.cs プロジェクト: Patapom/GodComplex
        private void integerTrackbarControlNeighborsCount_ValueChanged( IntegerTrackbarControl _Sender, int _FormerValue )
        {
            int	NeighborsCount = integerTrackbarControlNeighborsCount.Value;
            if ( m_SB_Neighbors != null )
                m_SB_Neighbors.Dispose();
            m_SB_Neighbors = new StructuredBuffer< SB_Neighbor >( m_Device, NeighborsCount, true );

            WMath.Vector[]	Directions = null;
            if ( radioButtonHammersley.Checked ) {
                double[,]		Samples = m_Hammersley.BuildSequence( NeighborsCount, 2 );
                Directions = m_Hammersley.MapSequenceToSphere( Samples );
            } else {
                Random	TempRNG = new Random();
                Directions = new WMath.Vector[NeighborsCount];
                for ( int i=0; i < NeighborsCount; i++ ) {
                    Directions[i] = new WMath.Vector( 2.0f * (float) TempRNG.NextDouble() - 1.0f, 2.0f * (float) TempRNG.NextDouble() - 1.0f, 2.0f * (float) TempRNG.NextDouble() - 1.0f );
                    Directions[i].Normalize();
                }
            }

            Random	RNG = new Random( 1 );

            m_NeighborPositions = new float3[NeighborsCount];
            m_NeighborColors = new float3[NeighborsCount];
            for ( int NeighborIndex=0; NeighborIndex < NeighborsCount; NeighborIndex++ ) {
                float	Radius = 2.0f;	// Make that random!
                m_NeighborPositions[NeighborIndex] = Radius * new float3( Directions[NeighborIndex].x, Directions[NeighborIndex].y, Directions[NeighborIndex].z );

                float	R = (float) RNG.NextDouble();
                float	G = (float) RNG.NextDouble();
                float	B = (float) RNG.NextDouble();
                m_NeighborColors[NeighborIndex] = new float3( R, G, B );

                m_SB_Neighbors.m[NeighborIndex].m_Position = m_NeighborPositions[NeighborIndex];
                m_SB_Neighbors.m[NeighborIndex].m_Color = m_NeighborColors[NeighborIndex];
            }

            m_SB_Neighbors.Write();	// Upload
        }
コード例 #16
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			WMath.Vector vector1 = new WMath.Vector();
			WMath.Vector vector2 = new WMath.Vector();
			WMath.Vector vector3 = new WMath.Vector();
			WMath.Vector vector4 = new WMath.Vector();
			WMath.Vector vector5 = new WMath.Vector();
			WMath.Vector vector6 = new WMath.Vector();
			WMath.Vector vector7 = new WMath.Vector();
			WMath.Vector vector8 = new WMath.Vector();
			WMath.Vector vector9 = new WMath.Vector();
			WMath.Vector vector10 = new WMath.Vector();
			WMath.Vector vector11 = new WMath.Vector();
			WMath.Vector vector12 = new WMath.Vector();
			WMath.Vector vector13 = new WMath.Vector();
			WMath.Vector vector14 = new WMath.Vector();
			WMath.Vector vector15 = new WMath.Vector();
			WMath.Vector vector16 = new WMath.Vector();
			WMath.Vector vector17 = new WMath.Vector();
			WMath.Vector vector18 = new WMath.Vector();
			WMath.Vector vector19 = new WMath.Vector();
			WMath.Vector vector20 = new WMath.Vector();
			WMath.Vector vector21 = new WMath.Vector();
			WMath.Vector vector22 = new WMath.Vector();
			WMath.Vector vector23 = new WMath.Vector();
			WMath.Vector vector24 = new WMath.Vector();
			WMath.Vector vector25 = new WMath.Vector();
			WMath.Vector vector26 = new WMath.Vector();
			WMath.Vector vector27 = new WMath.Vector();
			WMath.Vector vector28 = new WMath.Vector();
			this.menuStrip = new System.Windows.Forms.MenuStrip();
			this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.loadProbeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.saveResultsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
			this.batchEncodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.encodeFaceProbesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
			this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
			this.buttonCompute = new System.Windows.Forms.Button();
			this.radioButtonAlbedo = new System.Windows.Forms.RadioButton();
			this.radioButtonDistance = new System.Windows.Forms.RadioButton();
			this.radioButtonSetIndex = new System.Windows.Forms.RadioButton();
			this.radioButtonSetColor = new System.Windows.Forms.RadioButton();
			this.radioButtonNormal = new System.Windows.Forms.RadioButton();
			this.radioButtonSetDistance = new System.Windows.Forms.RadioButton();
			this.radioButtonSetNormal = new System.Windows.Forms.RadioButton();
			this.textBoxResults = new System.Windows.Forms.TextBox();
			this.floatTrackbarControlAlbedo = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
			this.label1 = new System.Windows.Forms.Label();
			this.floatTrackbarControlNormal = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
			this.label2 = new System.Windows.Forms.Label();
			this.floatTrackbarControlPosition = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
			this.label3 = new System.Windows.Forms.Label();
			this.integerTrackbarControlSetIsolation = new Nuaj.Cirrus.Utility.IntegerTrackbarControl();
			this.checkBoxSetIsolation = new System.Windows.Forms.CheckBox();
			this.integerTrackbarControlK = new Nuaj.Cirrus.Utility.IntegerTrackbarControl();
			this.label4 = new System.Windows.Forms.Label();
			this.floatTrackbarControlLambda = new Nuaj.Cirrus.Utility.FloatTrackbarControl();
			this.label5 = new System.Windows.Forms.Label();
			this.buttonComputeFilling = new System.Windows.Forms.Button();
			this.radioButtonSHStatic = new System.Windows.Forms.RadioButton();
			this.label6 = new System.Windows.Forms.Label();
			this.integerTrackbarControlLightSamples = new Nuaj.Cirrus.Utility.IntegerTrackbarControl();
			this.radioButtonSetSamples = new System.Windows.Forms.RadioButton();
			this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
			this.progressBarBatchConvert = new System.Windows.Forms.ProgressBar();
			this.radioButtonStaticLit = new System.Windows.Forms.RadioButton();
			this.radioButtonEmissiveMatID = new System.Windows.Forms.RadioButton();
			this.checkBoxSHStatic = new System.Windows.Forms.CheckBox();
			this.checkBoxSHDynamic = new System.Windows.Forms.CheckBox();
			this.checkBoxSHEmissive = new System.Windows.Forms.CheckBox();
			this.checkBoxSHOcclusion = new System.Windows.Forms.CheckBox();
			this.checkBoxSHNormalized = new System.Windows.Forms.CheckBox();
			this.radioButtonFaceIndex = new System.Windows.Forms.RadioButton();
			this.buttonReset = new System.Windows.Forms.Button();
			this.radioButtonNeighborProbeID = new System.Windows.Forms.RadioButton();
			this.openFileDialogProbeInfluence = new System.Windows.Forms.OpenFileDialog();
			this.openFileDialogScene = new System.Windows.Forms.OpenFileDialog();
			this.progressBarSubTask = new System.Windows.Forms.ProgressBar();
			this.outputPanel1 = new ProbeSHEncoder.OutputPanel(this.components);
			this.menuStrip.SuspendLayout();
			this.SuspendLayout();
			// 
			// menuStrip
			// 
			this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem,
            this.toolsToolStripMenuItem});
			this.menuStrip.Location = new System.Drawing.Point(0, 0);
			this.menuStrip.Name = "menuStrip";
			this.menuStrip.Size = new System.Drawing.Size(1027, 24);
			this.menuStrip.TabIndex = 1;
			this.menuStrip.Text = "menuStrip1";
			// 
			// fileToolStripMenuItem
			// 
			this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.loadProbeToolStripMenuItem,
            this.saveResultsToolStripMenuItem,
            this.toolStripMenuItem1,
            this.batchEncodeToolStripMenuItem});
			this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
			this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
			this.fileToolStripMenuItem.Text = "&File";
			// 
			// loadProbeToolStripMenuItem
			// 
			this.loadProbeToolStripMenuItem.Name = "loadProbeToolStripMenuItem";
			this.loadProbeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
			this.loadProbeToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
			this.loadProbeToolStripMenuItem.Text = "&Load Probe";
			this.loadProbeToolStripMenuItem.Click += new System.EventHandler(this.loadProbeToolStripMenuItem_Click);
			// 
			// saveResultsToolStripMenuItem
			// 
			this.saveResultsToolStripMenuItem.Enabled = false;
			this.saveResultsToolStripMenuItem.Name = "saveResultsToolStripMenuItem";
			this.saveResultsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
			this.saveResultsToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
			this.saveResultsToolStripMenuItem.Text = "&Save Results";
			this.saveResultsToolStripMenuItem.Click += new System.EventHandler(this.saveResultsToolStripMenuItem_Click);
			// 
			// toolStripMenuItem1
			// 
			this.toolStripMenuItem1.Name = "toolStripMenuItem1";
			this.toolStripMenuItem1.Size = new System.Drawing.Size(184, 6);
			// 
			// batchEncodeToolStripMenuItem
			// 
			this.batchEncodeToolStripMenuItem.Name = "batchEncodeToolStripMenuItem";
			this.batchEncodeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B)));
			this.batchEncodeToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
			this.batchEncodeToolStripMenuItem.Text = "&Batch Encode";
			this.batchEncodeToolStripMenuItem.Click += new System.EventHandler(this.batchEncodeToolStripMenuItem_Click);
			// 
			// toolsToolStripMenuItem
			// 
			this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.encodeFaceProbesToolStripMenuItem});
			this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
			this.toolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20);
			this.toolsToolStripMenuItem.Text = "&Tools";
			// 
			// encodeFaceProbesToolStripMenuItem
			// 
			this.encodeFaceProbesToolStripMenuItem.Name = "encodeFaceProbesToolStripMenuItem";
			this.encodeFaceProbesToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
			this.encodeFaceProbesToolStripMenuItem.Text = "&Encode Face Probes";
			this.encodeFaceProbesToolStripMenuItem.Click += new System.EventHandler(this.encodeFaceProbesToolStripMenuItem_Click);
			// 
			// openFileDialog
			// 
			this.openFileDialog.DefaultExt = "pom";
			this.openFileDialog.Filter = "Probe File (*.pom)|*.pom|All Files (*.*)|*.*";
			this.openFileDialog.RestoreDirectory = true;
			this.openFileDialog.Title = "Choose a probe file to convert...";
			// 
			// saveFileDialog
			// 
			this.saveFileDialog.DefaultExt = "probesets";
			this.saveFileDialog.Filter = "Probe Sets File (*.probeset)|*.probeset|All Files (*.*)|*.*";
			this.saveFileDialog.Title = "Choose a target file to save the encoded probe to...";
			// 
			// buttonCompute
			// 
			this.buttonCompute.Enabled = false;
			this.buttonCompute.Location = new System.Drawing.Point(776, 109);
			this.buttonCompute.Name = "buttonCompute";
			this.buttonCompute.Size = new System.Drawing.Size(97, 38);
			this.buttonCompute.TabIndex = 2;
			this.buttonCompute.Text = "Compute k-Means";
			this.buttonCompute.UseVisualStyleBackColor = true;
			this.buttonCompute.Visible = false;
			this.buttonCompute.Click += new System.EventHandler(this.buttonCompute_Click);
			// 
			// radioButtonAlbedo
			// 
			this.radioButtonAlbedo.AutoSize = true;
			this.radioButtonAlbedo.Checked = true;
			this.radioButtonAlbedo.Location = new System.Drawing.Point(712, 195);
			this.radioButtonAlbedo.Name = "radioButtonAlbedo";
			this.radioButtonAlbedo.Size = new System.Drawing.Size(58, 17);
			this.radioButtonAlbedo.TabIndex = 4;
			this.radioButtonAlbedo.TabStop = true;
			this.radioButtonAlbedo.Text = "Albedo";
			this.radioButtonAlbedo.UseVisualStyleBackColor = true;
			this.radioButtonAlbedo.CheckedChanged += new System.EventHandler(this.radioButtonAlbedo_CheckedChanged);
			// 
			// radioButtonDistance
			// 
			this.radioButtonDistance.AutoSize = true;
			this.radioButtonDistance.Location = new System.Drawing.Point(712, 218);
			this.radioButtonDistance.Name = "radioButtonDistance";
			this.radioButtonDistance.Size = new System.Drawing.Size(67, 17);
			this.radioButtonDistance.TabIndex = 4;
			this.radioButtonDistance.Text = "Distance";
			this.radioButtonDistance.UseVisualStyleBackColor = true;
			this.radioButtonDistance.CheckedChanged += new System.EventHandler(this.radioButtonDistance_CheckedChanged);
			// 
			// radioButtonSetIndex
			// 
			this.radioButtonSetIndex.AutoSize = true;
			this.radioButtonSetIndex.Location = new System.Drawing.Point(712, 356);
			this.radioButtonSetIndex.Name = "radioButtonSetIndex";
			this.radioButtonSetIndex.Size = new System.Drawing.Size(70, 17);
			this.radioButtonSetIndex.TabIndex = 4;
			this.radioButtonSetIndex.Text = "Set Index";
			this.radioButtonSetIndex.UseVisualStyleBackColor = true;
			this.radioButtonSetIndex.CheckedChanged += new System.EventHandler(this.radioButtonSetIndex_CheckedChanged);
			// 
			// radioButtonSetColor
			// 
			this.radioButtonSetColor.AutoSize = true;
			this.radioButtonSetColor.Location = new System.Drawing.Point(712, 379);
			this.radioButtonSetColor.Name = "radioButtonSetColor";
			this.radioButtonSetColor.Size = new System.Drawing.Size(77, 17);
			this.radioButtonSetColor.TabIndex = 4;
			this.radioButtonSetColor.Text = "Set Albedo";
			this.radioButtonSetColor.UseVisualStyleBackColor = true;
			this.radioButtonSetColor.CheckedChanged += new System.EventHandler(this.radioButtonSetColor_CheckedChanged);
			// 
			// radioButtonNormal
			// 
			this.radioButtonNormal.AutoSize = true;
			this.radioButtonNormal.Location = new System.Drawing.Point(712, 241);
			this.radioButtonNormal.Name = "radioButtonNormal";
			this.radioButtonNormal.Size = new System.Drawing.Size(58, 17);
			this.radioButtonNormal.TabIndex = 4;
			this.radioButtonNormal.Text = "Normal";
			this.radioButtonNormal.UseVisualStyleBackColor = true;
			this.radioButtonNormal.CheckedChanged += new System.EventHandler(this.radioButtonNormal_CheckedChanged);
			// 
			// radioButtonSetDistance
			// 
			this.radioButtonSetDistance.AutoSize = true;
			this.radioButtonSetDistance.Location = new System.Drawing.Point(712, 402);
			this.radioButtonSetDistance.Name = "radioButtonSetDistance";
			this.radioButtonSetDistance.Size = new System.Drawing.Size(86, 17);
			this.radioButtonSetDistance.TabIndex = 4;
			this.radioButtonSetDistance.Text = "Set Distance";
			this.radioButtonSetDistance.UseVisualStyleBackColor = true;
			this.radioButtonSetDistance.CheckedChanged += new System.EventHandler(this.radioButtonSetDistance_CheckedChanged);
			// 
			// radioButtonSetNormal
			// 
			this.radioButtonSetNormal.AutoSize = true;
			this.radioButtonSetNormal.Location = new System.Drawing.Point(712, 425);
			this.radioButtonSetNormal.Name = "radioButtonSetNormal";
			this.radioButtonSetNormal.Size = new System.Drawing.Size(77, 17);
			this.radioButtonSetNormal.TabIndex = 4;
			this.radioButtonSetNormal.Text = "Set Normal";
			this.radioButtonSetNormal.UseVisualStyleBackColor = true;
			this.radioButtonSetNormal.CheckedChanged += new System.EventHandler(this.radioButtonSetNormal_CheckedChanged);
			// 
			// textBoxResults
			// 
			this.textBoxResults.Location = new System.Drawing.Point(827, 130);
			this.textBoxResults.Multiline = true;
			this.textBoxResults.Name = "textBoxResults";
			this.textBoxResults.ReadOnly = true;
			this.textBoxResults.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
			this.textBoxResults.Size = new System.Drawing.Size(188, 259);
			this.textBoxResults.TabIndex = 5;
			// 
			// floatTrackbarControlAlbedo
			// 
			this.floatTrackbarControlAlbedo.Location = new System.Drawing.Point(711, 665);
			this.floatTrackbarControlAlbedo.MaximumSize = new System.Drawing.Size(10000, 20);
			this.floatTrackbarControlAlbedo.MinimumSize = new System.Drawing.Size(70, 20);
			this.floatTrackbarControlAlbedo.Name = "floatTrackbarControlAlbedo";
			this.floatTrackbarControlAlbedo.RangeMax = 100F;
			this.floatTrackbarControlAlbedo.RangeMin = 0F;
			this.floatTrackbarControlAlbedo.Size = new System.Drawing.Size(303, 20);
			this.floatTrackbarControlAlbedo.TabIndex = 6;
			this.floatTrackbarControlAlbedo.Value = 1F;
			this.floatTrackbarControlAlbedo.VisibleRangeMax = 1F;
			this.floatTrackbarControlAlbedo.ValueChanged += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlAlbedo_ValueChanged);
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(708, 649);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(150, 13);
			this.label1.TabIndex = 7;
			this.label1.Text = "Albedo Separation Importance";
			// 
			// floatTrackbarControlNormal
			// 
			this.floatTrackbarControlNormal.Location = new System.Drawing.Point(711, 626);
			this.floatTrackbarControlNormal.MaximumSize = new System.Drawing.Size(10000, 20);
			this.floatTrackbarControlNormal.MinimumSize = new System.Drawing.Size(70, 20);
			this.floatTrackbarControlNormal.Name = "floatTrackbarControlNormal";
			this.floatTrackbarControlNormal.RangeMax = 100F;
			this.floatTrackbarControlNormal.RangeMin = 0F;
			this.floatTrackbarControlNormal.Size = new System.Drawing.Size(303, 20);
			this.floatTrackbarControlNormal.TabIndex = 6;
			this.floatTrackbarControlNormal.Value = 1F;
			this.floatTrackbarControlNormal.VisibleRangeMax = 1F;
			this.floatTrackbarControlNormal.ValueChanged += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlNormal_ValueChanged);
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(708, 610);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(150, 13);
			this.label2.TabIndex = 7;
			this.label2.Text = "Normal Separation Importance";
			// 
			// floatTrackbarControlPosition
			// 
			this.floatTrackbarControlPosition.Location = new System.Drawing.Point(712, 587);
			this.floatTrackbarControlPosition.MaximumSize = new System.Drawing.Size(10000, 20);
			this.floatTrackbarControlPosition.MinimumSize = new System.Drawing.Size(70, 20);
			this.floatTrackbarControlPosition.Name = "floatTrackbarControlPosition";
			this.floatTrackbarControlPosition.RangeMax = 100F;
			this.floatTrackbarControlPosition.RangeMin = 0F;
			this.floatTrackbarControlPosition.Size = new System.Drawing.Size(303, 20);
			this.floatTrackbarControlPosition.TabIndex = 6;
			this.floatTrackbarControlPosition.Value = 1F;
			this.floatTrackbarControlPosition.VisibleRangeMax = 1F;
			this.floatTrackbarControlPosition.ValueChanged += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlPosition_ValueChanged);
			// 
			// label3
			// 
			this.label3.AutoSize = true;
			this.label3.Location = new System.Drawing.Point(709, 571);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(149, 13);
			this.label3.TabIndex = 7;
			this.label3.Text = "Spatial Separation Importance";
			// 
			// integerTrackbarControlSetIsolation
			// 
			this.integerTrackbarControlSetIsolation.Location = new System.Drawing.Point(732, 517);
			this.integerTrackbarControlSetIsolation.MaximumSize = new System.Drawing.Size(10000, 20);
			this.integerTrackbarControlSetIsolation.MinimumSize = new System.Drawing.Size(70, 20);
			this.integerTrackbarControlSetIsolation.Name = "integerTrackbarControlSetIsolation";
			this.integerTrackbarControlSetIsolation.RangeMax = 100;
			this.integerTrackbarControlSetIsolation.RangeMin = 0;
			this.integerTrackbarControlSetIsolation.Size = new System.Drawing.Size(248, 20);
			this.integerTrackbarControlSetIsolation.TabIndex = 8;
			this.integerTrackbarControlSetIsolation.Value = 0;
			this.integerTrackbarControlSetIsolation.VisibleRangeMax = 10;
			this.integerTrackbarControlSetIsolation.ValueChanged += new Nuaj.Cirrus.Utility.IntegerTrackbarControl.ValueChangedEventHandler(this.integerTrackbarControlSetIsolation_ValueChanged);
			// 
			// checkBoxSetIsolation
			// 
			this.checkBoxSetIsolation.AutoSize = true;
			this.checkBoxSetIsolation.Location = new System.Drawing.Point(712, 494);
			this.checkBoxSetIsolation.Name = "checkBoxSetIsolation";
			this.checkBoxSetIsolation.Size = new System.Drawing.Size(76, 17);
			this.checkBoxSetIsolation.TabIndex = 9;
			this.checkBoxSetIsolation.Text = "Isolate Set";
			this.checkBoxSetIsolation.UseVisualStyleBackColor = true;
			this.checkBoxSetIsolation.CheckedChanged += new System.EventHandler(this.checkBoxSetIsolation_CheckedChanged);
			// 
			// integerTrackbarControlK
			// 
			this.integerTrackbarControlK.Location = new System.Drawing.Point(757, 31);
			this.integerTrackbarControlK.MaximumSize = new System.Drawing.Size(10000, 20);
			this.integerTrackbarControlK.MinimumSize = new System.Drawing.Size(70, 20);
			this.integerTrackbarControlK.Name = "integerTrackbarControlK";
			this.integerTrackbarControlK.RangeMax = 128;
			this.integerTrackbarControlK.RangeMin = 1;
			this.integerTrackbarControlK.Size = new System.Drawing.Size(257, 20);
			this.integerTrackbarControlK.TabIndex = 8;
			this.integerTrackbarControlK.Value = 32;
			this.integerTrackbarControlK.VisibleRangeMax = 64;
			this.integerTrackbarControlK.VisibleRangeMin = 1;
			this.integerTrackbarControlK.ValueChanged += new Nuaj.Cirrus.Utility.IntegerTrackbarControl.ValueChangedEventHandler(this.integerTrackbarControlK_ValueChanged);
			// 
			// label4
			// 
			this.label4.AutoSize = true;
			this.label4.Location = new System.Drawing.Point(695, 34);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(14, 13);
			this.label4.TabIndex = 7;
			this.label4.Text = "K";
			// 
			// floatTrackbarControlLambda
			// 
			this.floatTrackbarControlLambda.Location = new System.Drawing.Point(757, 57);
			this.floatTrackbarControlLambda.MaximumSize = new System.Drawing.Size(10000, 20);
			this.floatTrackbarControlLambda.MinimumSize = new System.Drawing.Size(70, 20);
			this.floatTrackbarControlLambda.Name = "floatTrackbarControlLambda";
			this.floatTrackbarControlLambda.RangeMax = 1F;
			this.floatTrackbarControlLambda.RangeMin = 0F;
			this.floatTrackbarControlLambda.Size = new System.Drawing.Size(258, 20);
			this.floatTrackbarControlLambda.TabIndex = 6;
			this.floatTrackbarControlLambda.Value = 0.5F;
			this.floatTrackbarControlLambda.VisibleRangeMax = 1F;
			this.floatTrackbarControlLambda.ValueChanged += new Nuaj.Cirrus.Utility.FloatTrackbarControl.ValueChangedEventHandler(this.floatTrackbarControlLambda_ValueChanged);
			// 
			// label5
			// 
			this.label5.AutoSize = true;
			this.label5.Location = new System.Drawing.Point(695, 60);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(60, 13);
			this.label5.TabIndex = 7;
			this.label5.Text = "Importance";
			// 
			// buttonComputeFilling
			// 
			this.buttonComputeFilling.Enabled = false;
			this.buttonComputeFilling.Location = new System.Drawing.Point(711, 151);
			this.buttonComputeFilling.Name = "buttonComputeFilling";
			this.buttonComputeFilling.Size = new System.Drawing.Size(97, 38);
			this.buttonComputeFilling.TabIndex = 2;
			this.buttonComputeFilling.Text = "Compute Filling";
			this.buttonComputeFilling.UseVisualStyleBackColor = true;
			this.buttonComputeFilling.Click += new System.EventHandler(this.buttonComputeFilling_Click);
			// 
			// radioButtonSHStatic
			// 
			this.radioButtonSHStatic.AutoSize = true;
			this.radioButtonSHStatic.Location = new System.Drawing.Point(712, 448);
			this.radioButtonSHStatic.Name = "radioButtonSHStatic";
			this.radioButtonSHStatic.Size = new System.Drawing.Size(73, 17);
			this.radioButtonSHStatic.TabIndex = 4;
			this.radioButtonSHStatic.Text = "Result SH";
			this.radioButtonSHStatic.UseVisualStyleBackColor = true;
			this.radioButtonSHStatic.CheckedChanged += new System.EventHandler(this.radioButtonSH_CheckedChanged);
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(695, 85);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(75, 31);
			this.label6.TabIndex = 7;
			this.label6.Text = "Amount of light samples";
			// 
			// integerTrackbarControlLightSamples
			// 
			this.integerTrackbarControlLightSamples.Location = new System.Drawing.Point(757, 83);
			this.integerTrackbarControlLightSamples.MaximumSize = new System.Drawing.Size(10000, 20);
			this.integerTrackbarControlLightSamples.MinimumSize = new System.Drawing.Size(70, 20);
			this.integerTrackbarControlLightSamples.Name = "integerTrackbarControlLightSamples";
			this.integerTrackbarControlLightSamples.RangeMax = 256;
			this.integerTrackbarControlLightSamples.RangeMin = 1;
			this.integerTrackbarControlLightSamples.Size = new System.Drawing.Size(257, 20);
			this.integerTrackbarControlLightSamples.TabIndex = 8;
			this.integerTrackbarControlLightSamples.Value = 64;
			this.integerTrackbarControlLightSamples.VisibleRangeMax = 128;
			this.integerTrackbarControlLightSamples.VisibleRangeMin = 1;
			this.integerTrackbarControlLightSamples.ValueChanged += new Nuaj.Cirrus.Utility.IntegerTrackbarControl.ValueChangedEventHandler(this.integerTrackbarControlLightSamples_ValueChanged);
			// 
			// radioButtonSetSamples
			// 
			this.radioButtonSetSamples.AutoSize = true;
			this.radioButtonSetSamples.Location = new System.Drawing.Point(712, 471);
			this.radioButtonSetSamples.Name = "radioButtonSetSamples";
			this.radioButtonSetSamples.Size = new System.Drawing.Size(84, 17);
			this.radioButtonSetSamples.TabIndex = 4;
			this.radioButtonSetSamples.Text = "Set Samples";
			this.radioButtonSetSamples.UseVisualStyleBackColor = true;
			this.radioButtonSetSamples.CheckedChanged += new System.EventHandler(this.radioButtonSetSamples_CheckedChanged);
			// 
			// folderBrowserDialog
			// 
			this.folderBrowserDialog.Description = "Select the folder to parse for POM files of probes shooting";
			// 
			// progressBarBatchConvert
			// 
			this.progressBarBatchConvert.Location = new System.Drawing.Point(12, 652);
			this.progressBarBatchConvert.Name = "progressBarBatchConvert";
			this.progressBarBatchConvert.Size = new System.Drawing.Size(677, 19);
			this.progressBarBatchConvert.TabIndex = 10;
			this.progressBarBatchConvert.Visible = false;
			// 
			// radioButtonStaticLit
			// 
			this.radioButtonStaticLit.AutoSize = true;
			this.radioButtonStaticLit.Location = new System.Drawing.Point(712, 264);
			this.radioButtonStaticLit.Name = "radioButtonStaticLit";
			this.radioButtonStaticLit.Size = new System.Drawing.Size(66, 17);
			this.radioButtonStaticLit.TabIndex = 4;
			this.radioButtonStaticLit.Text = "Static Lit";
			this.radioButtonStaticLit.UseVisualStyleBackColor = true;
			this.radioButtonStaticLit.CheckedChanged += new System.EventHandler(this.radioButtonStaticLit_CheckedChanged);
			// 
			// radioButtonEmissiveMatID
			// 
			this.radioButtonEmissiveMatID.AutoSize = true;
			this.radioButtonEmissiveMatID.Location = new System.Drawing.Point(712, 310);
			this.radioButtonEmissiveMatID.Name = "radioButtonEmissiveMatID";
			this.radioButtonEmissiveMatID.Size = new System.Drawing.Size(101, 17);
			this.radioButtonEmissiveMatID.TabIndex = 4;
			this.radioButtonEmissiveMatID.Text = "Emissive Mat ID";
			this.radioButtonEmissiveMatID.UseVisualStyleBackColor = true;
			this.radioButtonEmissiveMatID.CheckedChanged += new System.EventHandler(this.radioButtonEmissiveMatID_CheckedChanged);
			// 
			// checkBoxSHStatic
			// 
			this.checkBoxSHStatic.AutoSize = true;
			this.checkBoxSHStatic.Location = new System.Drawing.Point(791, 448);
			this.checkBoxSHStatic.Name = "checkBoxSHStatic";
			this.checkBoxSHStatic.Size = new System.Drawing.Size(53, 17);
			this.checkBoxSHStatic.TabIndex = 9;
			this.checkBoxSHStatic.Text = "Static";
			this.checkBoxSHStatic.UseVisualStyleBackColor = true;
			this.checkBoxSHStatic.CheckedChanged += new System.EventHandler(this.checkBoxSHStatic_CheckedChanged);
			// 
			// checkBoxSHDynamic
			// 
			this.checkBoxSHDynamic.AutoSize = true;
			this.checkBoxSHDynamic.Checked = true;
			this.checkBoxSHDynamic.CheckState = System.Windows.Forms.CheckState.Checked;
			this.checkBoxSHDynamic.Location = new System.Drawing.Point(850, 448);
			this.checkBoxSHDynamic.Name = "checkBoxSHDynamic";
			this.checkBoxSHDynamic.Size = new System.Drawing.Size(67, 17);
			this.checkBoxSHDynamic.TabIndex = 9;
			this.checkBoxSHDynamic.Text = "Dynamic";
			this.checkBoxSHDynamic.UseVisualStyleBackColor = true;
			this.checkBoxSHDynamic.CheckedChanged += new System.EventHandler(this.checkBoxSHDynamic_CheckedChanged);
			// 
			// checkBoxSHEmissive
			// 
			this.checkBoxSHEmissive.AutoSize = true;
			this.checkBoxSHEmissive.Location = new System.Drawing.Point(923, 448);
			this.checkBoxSHEmissive.Name = "checkBoxSHEmissive";
			this.checkBoxSHEmissive.Size = new System.Drawing.Size(67, 17);
			this.checkBoxSHEmissive.TabIndex = 9;
			this.checkBoxSHEmissive.Text = "Emissive";
			this.checkBoxSHEmissive.UseVisualStyleBackColor = true;
			this.checkBoxSHEmissive.CheckedChanged += new System.EventHandler(this.checkBoxSHEmissive_CheckedChanged);
			// 
			// checkBoxSHOcclusion
			// 
			this.checkBoxSHOcclusion.AutoSize = true;
			this.checkBoxSHOcclusion.Location = new System.Drawing.Point(923, 471);
			this.checkBoxSHOcclusion.Name = "checkBoxSHOcclusion";
			this.checkBoxSHOcclusion.Size = new System.Drawing.Size(73, 17);
			this.checkBoxSHOcclusion.TabIndex = 9;
			this.checkBoxSHOcclusion.Text = "Occlusion";
			this.checkBoxSHOcclusion.UseVisualStyleBackColor = true;
			this.checkBoxSHOcclusion.CheckedChanged += new System.EventHandler(this.checkBoxSHOcclusion_CheckedChanged);
			// 
			// checkBoxSHNormalized
			// 
			this.checkBoxSHNormalized.AutoSize = true;
			this.checkBoxSHNormalized.Location = new System.Drawing.Point(850, 471);
			this.checkBoxSHNormalized.Name = "checkBoxSHNormalized";
			this.checkBoxSHNormalized.Size = new System.Drawing.Size(78, 17);
			this.checkBoxSHNormalized.TabIndex = 9;
			this.checkBoxSHNormalized.Text = "Normalized";
			this.checkBoxSHNormalized.UseVisualStyleBackColor = true;
			this.checkBoxSHNormalized.CheckedChanged += new System.EventHandler(this.checkBoxSHNormalized_CheckedChanged);
			// 
			// radioButtonFaceIndex
			// 
			this.radioButtonFaceIndex.AutoSize = true;
			this.radioButtonFaceIndex.Location = new System.Drawing.Point(712, 287);
			this.radioButtonFaceIndex.Name = "radioButtonFaceIndex";
			this.radioButtonFaceIndex.Size = new System.Drawing.Size(78, 17);
			this.radioButtonFaceIndex.TabIndex = 4;
			this.radioButtonFaceIndex.Text = "Face Index";
			this.radioButtonFaceIndex.UseVisualStyleBackColor = true;
			this.radioButtonFaceIndex.CheckedChanged += new System.EventHandler(this.radioButtonFaceIndex_CheckedChanged);
			// 
			// buttonReset
			// 
			this.buttonReset.Location = new System.Drawing.Point(948, 557);
			this.buttonReset.Name = "buttonReset";
			this.buttonReset.Size = new System.Drawing.Size(66, 24);
			this.buttonReset.TabIndex = 2;
			this.buttonReset.Text = "Reset";
			this.buttonReset.UseVisualStyleBackColor = true;
			this.buttonReset.Visible = false;
			this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);
			// 
			// radioButtonNeighborProbeID
			// 
			this.radioButtonNeighborProbeID.AutoSize = true;
			this.radioButtonNeighborProbeID.Location = new System.Drawing.Point(712, 333);
			this.radioButtonNeighborProbeID.Name = "radioButtonNeighborProbeID";
			this.radioButtonNeighborProbeID.Size = new System.Drawing.Size(113, 17);
			this.radioButtonNeighborProbeID.TabIndex = 4;
			this.radioButtonNeighborProbeID.Text = "Neighbor Probe ID";
			this.radioButtonNeighborProbeID.UseVisualStyleBackColor = true;
			this.radioButtonNeighborProbeID.CheckedChanged += new System.EventHandler(this.radioButtonNeighborProbeID_CheckedChanged);
			// 
			// openFileDialogProbeInfluence
			// 
			this.openFileDialogProbeInfluence.DefaultExt = "pim";
			this.openFileDialogProbeInfluence.Filter = "Probe Influence File (*.pim)|*.pim|All Files (*.*)|*.*";
			this.openFileDialogProbeInfluence.RestoreDirectory = true;
			this.openFileDialogProbeInfluence.Title = "Choose a probe influence file to convert...";
			// 
			// openFileDialogScene
			// 
			this.openFileDialogScene.DefaultExt = "gcx";
			this.openFileDialogScene.Filter = "Scene File (*.gcx)|*.gcx|All Files (*.*)|*.*";
			this.openFileDialogScene.RestoreDirectory = true;
			this.openFileDialogScene.Title = "Choose a scene file to apply probe influences to...";
			// 
			// progressBarSubTask
			// 
			this.progressBarSubTask.Location = new System.Drawing.Point(12, 677);
			this.progressBarSubTask.Name = "progressBarSubTask";
			this.progressBarSubTask.Size = new System.Drawing.Size(677, 10);
			this.progressBarSubTask.TabIndex = 10;
			this.progressBarSubTask.Visible = false;
			// 
			// outputPanel1
			// 
			vector1.X = 0F;
			vector1.Y = 0F;
			vector1.Z = 1F;
			this.outputPanel1.At = vector1;
			this.outputPanel1.IsolatedSetIndex = 0;
			this.outputPanel1.IsolateSet = false;
			this.outputPanel1.Location = new System.Drawing.Point(12, 27);
			this.outputPanel1.Name = "outputPanel1";
			this.outputPanel1.NormalizeSH = false;
			this.outputPanel1.Probe = null;
			vector2.X = 0F;
			vector2.Y = 0F;
			vector2.Z = 0F;
			vector3.X = 0F;
			vector3.Y = 0F;
			vector3.Z = 0F;
			vector4.X = 0F;
			vector4.Y = 0F;
			vector4.Z = 0F;
			vector5.X = 0F;
			vector5.Y = 0F;
			vector5.Z = 0F;
			vector6.X = 0F;
			vector6.Y = 0F;
			vector6.Z = 0F;
			vector7.X = 0F;
			vector7.Y = 0F;
			vector7.Z = 0F;
			vector8.X = 0F;
			vector8.Y = 0F;
			vector8.Z = 0F;
			vector9.X = 0F;
			vector9.Y = 0F;
			vector9.Z = 0F;
			vector10.X = 0F;
			vector10.Y = 0F;
			vector10.Z = 0F;
			this.outputPanel1.SHDynamic = new WMath.Vector[] {
        vector2,
        vector3,
        vector4,
        vector5,
        vector6,
        vector7,
        vector8,
        vector9,
        vector10};
			vector11.X = 0F;
			vector11.Y = 0F;
			vector11.Z = 0F;
			vector12.X = 0F;
			vector12.Y = 0F;
			vector12.Z = 0F;
			vector13.X = 0F;
			vector13.Y = 0F;
			vector13.Z = 0F;
			vector14.X = 0F;
			vector14.Y = 0F;
			vector14.Z = 0F;
			vector15.X = 0F;
			vector15.Y = 0F;
			vector15.Z = 0F;
			vector16.X = 0F;
			vector16.Y = 0F;
			vector16.Z = 0F;
			vector17.X = 0F;
			vector17.Y = 0F;
			vector17.Z = 0F;
			vector18.X = 0F;
			vector18.Y = 0F;
			vector18.Z = 0F;
			vector19.X = 0F;
			vector19.Y = 0F;
			vector19.Z = 0F;
			this.outputPanel1.SHEmissive = new WMath.Vector[] {
        vector11,
        vector12,
        vector13,
        vector14,
        vector15,
        vector16,
        vector17,
        vector18,
        vector19};
			this.outputPanel1.SHOcclusion = new float[] {
        0F,
        0F,
        0F,
        0F,
        0F,
        0F,
        0F,
        0F,
        0F};
			this.outputPanel1.ShowSetAverage = false;
			this.outputPanel1.ShowSHDynamic = true;
			this.outputPanel1.ShowSHEmissive = false;
			this.outputPanel1.ShowSHOcclusion = false;
			this.outputPanel1.ShowSHStatic = false;
			vector20.X = 0F;
			vector20.Y = 0F;
			vector20.Z = 0F;
			vector21.X = 0F;
			vector21.Y = 0F;
			vector21.Z = 0F;
			vector22.X = 0F;
			vector22.Y = 0F;
			vector22.Z = 0F;
			vector23.X = 0F;
			vector23.Y = 0F;
			vector23.Z = 0F;
			vector24.X = 0F;
			vector24.Y = 0F;
			vector24.Z = 0F;
			vector25.X = 0F;
			vector25.Y = 0F;
			vector25.Z = 0F;
			vector26.X = 0F;
			vector26.Y = 0F;
			vector26.Z = 0F;
			vector27.X = 0F;
			vector27.Y = 0F;
			vector27.Z = 0F;
			vector28.X = 0F;
			vector28.Y = 0F;
			vector28.Z = 0F;
			this.outputPanel1.SHStatic = new WMath.Vector[] {
        vector20,
        vector21,
        vector22,
        vector23,
        vector24,
        vector25,
        vector26,
        vector27,
        vector28};
			this.outputPanel1.Size = new System.Drawing.Size(677, 619);
			this.outputPanel1.TabIndex = 3;
			this.outputPanel1.Viz = ProbeSHEncoder.OutputPanel.VIZ_TYPE.ALBEDO;
			// 
			// EncoderForm
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(1027, 692);
			this.Controls.Add(this.checkBoxSHOcclusion);
			this.Controls.Add(this.progressBarSubTask);
			this.Controls.Add(this.progressBarBatchConvert);
			this.Controls.Add(this.checkBoxSHNormalized);
			this.Controls.Add(this.checkBoxSHEmissive);
			this.Controls.Add(this.checkBoxSHDynamic);
			this.Controls.Add(this.checkBoxSHStatic);
			this.Controls.Add(this.checkBoxSetIsolation);
			this.Controls.Add(this.integerTrackbarControlLightSamples);
			this.Controls.Add(this.integerTrackbarControlK);
			this.Controls.Add(this.integerTrackbarControlSetIsolation);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.floatTrackbarControlLambda);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.floatTrackbarControlPosition);
			this.Controls.Add(this.floatTrackbarControlNormal);
			this.Controls.Add(this.floatTrackbarControlAlbedo);
			this.Controls.Add(this.textBoxResults);
			this.Controls.Add(this.radioButtonSetSamples);
			this.Controls.Add(this.radioButtonSHStatic);
			this.Controls.Add(this.radioButtonSetNormal);
			this.Controls.Add(this.radioButtonSetDistance);
			this.Controls.Add(this.radioButtonSetColor);
			this.Controls.Add(this.radioButtonSetIndex);
			this.Controls.Add(this.radioButtonNeighborProbeID);
			this.Controls.Add(this.radioButtonEmissiveMatID);
			this.Controls.Add(this.radioButtonFaceIndex);
			this.Controls.Add(this.radioButtonStaticLit);
			this.Controls.Add(this.radioButtonNormal);
			this.Controls.Add(this.radioButtonDistance);
			this.Controls.Add(this.radioButtonAlbedo);
			this.Controls.Add(this.outputPanel1);
			this.Controls.Add(this.buttonComputeFilling);
			this.Controls.Add(this.buttonReset);
			this.Controls.Add(this.buttonCompute);
			this.Controls.Add(this.menuStrip);
			this.MainMenuStrip = this.menuStrip;
			this.Name = "EncoderForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Probe SH Encoder";
			this.menuStrip.ResumeLayout(false);
			this.menuStrip.PerformLayout();
			this.ResumeLayout(false);
			this.PerformLayout();

		}
コード例 #17
0
ファイル: OutputPanel.cs プロジェクト: vr3d/GodComplex
        public void             SampleCubeMap(WMath.Vector _View, CubeMapSampler _Sampler, out byte _R, out byte _G, out byte _B)
        {
            AbsView.Set(Math.Abs(_View.x), Math.Abs(_View.y), Math.Abs(_View.z));
            float MaxComponent = Math.Max(Math.Max(AbsView.x, AbsView.y), AbsView.z);

            fXYZ.Set(_View.x / MaxComponent, _View.y / MaxComponent, _View.z / MaxComponent);
            int FaceIndex = 0;

            if (Math.Abs(fXYZ.x) > 1.0 - 1e-6)
            {                   // +X or -X
                if (_View.x > 0.0)
                {
                    FaceIndex = 0;
                    fXY.Set(-fXYZ.z, fXYZ.y);
                }
                else
                {
                    FaceIndex = 1;
                    fXY.Set(fXYZ.z, fXYZ.y);
                }
            }
            else if (Math.Abs(fXYZ.y) > 1.0 - 1e-6)
            {                   // +Y or -Y
                if (_View.y > 0.0)
                {
                    FaceIndex = 2;
                    fXY.Set(fXYZ.x, -fXYZ.z);
                }
                else
                {
                    FaceIndex = 3;
                    fXY.Set(fXYZ.x, fXYZ.z);
                }
            }
            else             // if ( Math.Abs( fXYZ.z ) > 1.0-1e-6 )
            {                // +Z or -Z
                if (_View.z > 0.0)
                {
                    FaceIndex = 4;
                    fXY.Set(fXYZ.x, fXYZ.y);
                }
                else
                {
                    FaceIndex = 5;
                    fXY.Set(-fXYZ.x, fXYZ.y);
                }
            }

            fXY.y = -fXY.y;

            int X = (int)(Probe.CUBE_MAP_SIZE * 0.5 * (1.0 + fXY.x));
            int Y = (int)(Probe.CUBE_MAP_SIZE * 0.5 * (1.0 + fXY.y));

//          if ( X < 0 || X > Probe.CUBE_MAP_SIZE-1 )
//              throw new Exception();
//          if ( Y < 0 || Y > Probe.CUBE_MAP_SIZE-1 )
//              throw new Exception();

            X = Math.Min(Probe.CUBE_MAP_SIZE - 1, X);
            Y = Math.Min(Probe.CUBE_MAP_SIZE - 1, Y);

            Probe.Pixel[,]  CubeMapFace = m_Probe.m_CubeMap[FaceIndex];

            _Sampler(CubeMapFace[X, Y], out _R, out _G, out _B);
        }