示例#1
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlIOR_SliderDragStop(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fStartValue)
 {
     if (_Sender.Value < 10.0f)
     {
         _Sender.VisibleRangeMax = 10.0f;                        // Restore visibility range
     }
 }
示例#2
0
        private void floatTrackbarControlCameraTheta_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
        {
            BuildProbabilities(_Sender.Value * Math.PI / 180.0, m_Param);

//			m_Param.m_Probabilities[64,64] = 1;

            displayPanel.Update(m_Param.m_Probabilities);
        }
示例#3
0
        protected void  ReadRegistry(Nuaj.Cirrus.Utility.FloatTrackbarControl _Trackbar, string _KeyName, float _DefaultValue)
        {
            string sValue = m_ROOT.GetValue(_KeyName, _DefaultValue.ToString()) as string;
            float  Value;

            if (float.TryParse(sValue, out Value))
            {
                _Trackbar.Value = Value;
            }
        }
示例#4
0
        /// <summary>
        /// Initializes the struct from the sliders' current values
        /// </summary>
        private void    InitFromSliders()
        {
            FieldInfo[] Fields = GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
            foreach (FieldInfo Field in Fields)
            {
                if (Field.FieldType == typeof(Nuaj.Cirrus.Utility.FloatTrackbarControl))
                {
                    Nuaj.Cirrus.Utility.FloatTrackbarControl Slider = Field.GetValue(this) as Nuaj.Cirrus.Utility.FloatTrackbarControl;
                    Slider.SimulateValueChange();                       // This should trigger a change which will in turn write the slider's value into the struct's field...
                }
            }

            m_Instance.TerrainEnabled = checkBoxTerrainEnabled.Checked ? 1 : 0;
        }
示例#5
0
文件: Form1.cs 项目: vr3d/GodComplex
        private void floatTrackbarControl1_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
        {
            outputPanelDiffuseFresnelReflectance.MaxIOR = floatTrackbarControlIOR.VisibleRangeMax;              // So we match the visible range

            if (!floatTrackbarControlIOR.Enabled)
            {
                return;                 // Changed externally from specular tint modification, don't change panels' values!
            }
            outputPanelFresnelGraph.IOR_red   = _Sender.Value;
            outputPanelFresnelGraph.IOR_green = _Sender.Value;
            outputPanelFresnelGraph.IOR_blue  = _Sender.Value;

            outputPanelDiffuseFresnelReflectance.IOR = _Sender.Value;

            panelSpecularTintNormal.BackColor = IOR_to_Color(_Sender.Value, _Sender.Value, _Sender.Value);
        }
示例#6
0
文件: Form1.cs 项目: vr3d/GodComplex
        /// <summary>
        /// Initializes the struct from the sliders' current values
        /// </summary>
        private void    InitFromUI()
        {
            FieldInfo[] Fields = GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
            foreach (FieldInfo Field in Fields)
            {
                if (Field.FieldType == typeof(Nuaj.Cirrus.Utility.FloatTrackbarControl))
                {
                    Nuaj.Cirrus.Utility.FloatTrackbarControl Slider = Field.GetValue(this) as Nuaj.Cirrus.Utility.FloatTrackbarControl;
                    Slider.SimulateValueChange();                       // This should trigger a change which will in turn write the slider's value into the struct's field...
                }
                else if (Field.FieldType == typeof(Nuaj.Cirrus.Utility.IntegerTrackbarControl))
                {
                    Nuaj.Cirrus.Utility.IntegerTrackbarControl Slider = Field.GetValue(this) as Nuaj.Cirrus.Utility.IntegerTrackbarControl;
                    Slider.SimulateValueChange();                       // This should trigger a change which will in turn write the slider's value into the struct's field...
                }
                else if (Field.FieldType == typeof(CheckBox))
                {
                    CheckBox checkBox = Field.GetValue(this) as CheckBox;
                    checkBox.Checked = !checkBox.Checked;
                    checkBox.Checked = !checkBox.Checked;
                }
            }

            // Update colors
            m_Instance.SkyColorR = panelSkyColor.BackColor.R / 255.0f;
            m_Instance.SkyColorG = panelSkyColor.BackColor.G / 255.0f;
            m_Instance.SkyColorB = panelSkyColor.BackColor.B / 255.0f;

            m_Instance.PointLightColorR = panelLightColor.BackColor.R / 255.0f;
            m_Instance.PointLightColorG = panelLightColor.BackColor.G / 255.0f;
            m_Instance.PointLightColorB = panelLightColor.BackColor.B / 255.0f;

            m_Instance.EmissiveColorR = panelEmissiveColor.BackColor.R / 255.0f;
            m_Instance.EmissiveColorG = panelEmissiveColor.BackColor.G / 255.0f;
            m_Instance.EmissiveColorB = panelEmissiveColor.BackColor.B / 255.0f;
        }
示例#7
0
        private void floatTrackbarControlSmoothRadius_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
        {
            if (!checkBoxSmooth.Checked)
            {
                return;
            }

            m_Device.SetRenderStates(RASTERIZER_STATE.CULL_NONE, DEPTHSTENCIL_STATE.DISABLED, BLEND_STATE.DISABLED);

            m_Tex_Photons.RemoveFromLastAssignedSlots();
            m_Tex_Photons.SetPS(0);

            m_SB_PhotonOut.SetInput(0);

//          // Splat data
//          m_CB_SplatPhoton.m.SplatSize = 2.0f * (2.0f / m_Tex_Photons.Width);
//          m_CB_SplatPhoton.UpdateData();
//
//          View2D[]	Views = new View2D[] {
//              m_Tex_Photons.GetView( 0, 0, 6*0, 6 ),
//              m_Tex_Photons.GetView( 0, 0, 6*1, 6 ),
//          };
//          m_Device.SetRenderTargets( Views, null );
//
//          m_PS_PhotonSplatter.Use();
//          m_Prim_Point.RenderInstanced( m_PS_PhotonSplatter, PHOTONS_COUNT );
//
//          // Apply smoothing
//          m_PS_PhotonsSmooth
//
//          // Compute hi-frequency by difference
//          m_Tex_Photons.SetPS( 0 );
//          m_Tex_PhotonsSmooth.SetPS( 1 );

            Render();
        }
示例#8
0
 private void floatTrackbarControlOffset_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     RebuildNoise();
 }
示例#9
0
 private void floatTrackbarControlLambda_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     SetRegKey("Lambda", _Sender.Value.ToString());
 }
示例#10
0
 private void floatTrackbarControlAlbedo_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     SetRegKey("AlbedoSeparationImportance", _Sender.Value.ToString());
 }
示例#11
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlDebugProbeIntensity_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     m_Instance.DebugProbesIntensity = _Sender.Value;
     UpdateMMF();
 }
示例#12
0
 private void floatTrackbarControlGamma_SliderDragStop(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fStartValue)
 {
     viewportPanelResult.Gamma = _Sender.Value;
 }
示例#13
0
 protected void  WriteRegistry(Nuaj.Cirrus.Utility.FloatTrackbarControl _Trackbar, string _KeyName)
 {
     m_ROOT.SetValue(_KeyName, _Trackbar.Value.ToString());
 }
示例#14
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlRoughness_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     outputPanelDiffuseFresnelReflectance.Roughness = floatTrackbarControlRoughness.Value;
 }
示例#15
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlWeightExponent_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     BuildRoom();
 }
示例#16
0
 private void floatTrackbarControlScaleFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
 }
示例#17
0
 private void floatTrackbarControlWarpFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     Redraw();
 }
示例#18
0
 private void floatTrackbarControlClipAbove_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     Render();
 }
示例#19
0
 private void floatTrackbarControlFluxMultiplier_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     Render();
 }
示例#20
0
 private void floatTrackbarControlProbaFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     displayPanel.m_Factor = _Sender.Value;
     displayPanel.Update(m_Param.m_Probabilities);
 }
示例#21
0
 private void floatTrackbarControlMaxConeAngle_SliderDragStop(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fStartValue)
 {
     GenerateRays(integerTrackbarControlRaysCount.Value, floatTrackbarControlMaxConeAngle.Value * (float)(Math.PI / 180.0), m_SB_Rays);
 }
示例#22
0
 private void floatTrackbarControlNoiseShapingPower_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     m_Instance.NoiseShapingPower = (float)Math.Pow(10.0, _Sender.Value);
     UpdateMMF();
 }
示例#23
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlVerticalScale_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     outputPanelDiffuseFresnelReflectance.VerticalScale = floatTrackbarControlVerticalScale.Value;
 }
示例#24
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlEmissiveLightsBounceFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     m_Instance.BounceFactorEmissive = _Sender.Value;
     UpdateMMF();
 }
示例#25
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlPeakFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     outputPanelDiffuseFresnelReflectance.PeakFactor = floatTrackbarControlPeakFactor.Value;
 }
示例#26
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlNeighborProbesContribution_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     m_Instance.NeighborProbesContributionBoost = _Sender.Value;
     UpdateMMF();
 }
示例#27
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlDisplayIntensity_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     Render();
 }
示例#28
0
 private void floatTrackbarControlNormalized_sRGB_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     m_lastChangeIsInteger = false;
 }
示例#29
0
 private void floatTrackbarControl1_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     panelOutput.UpdateBitmap();
 }
示例#30
0
文件: Form1.cs 项目: vr3d/GodComplex
 private void floatTrackbarControlSunAzimuth_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue)
 {
     m_Instance.SunPhi = 0.01745329251994329576923690768489f * _Sender.Value;
     UpdateMMF();
 }