private void floatTrackbarControlIOR_SliderDragStop(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fStartValue) { if (_Sender.Value < 10.0f) { _Sender.VisibleRangeMax = 10.0f; // Restore visibility range } }
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); }
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; } }
/// <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; }
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); }
/// <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; }
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(); }
private void floatTrackbarControlOffset_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { RebuildNoise(); }
private void floatTrackbarControlLambda_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { SetRegKey("Lambda", _Sender.Value.ToString()); }
private void floatTrackbarControlAlbedo_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { SetRegKey("AlbedoSeparationImportance", _Sender.Value.ToString()); }
private void floatTrackbarControlDebugProbeIntensity_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { m_Instance.DebugProbesIntensity = _Sender.Value; UpdateMMF(); }
private void floatTrackbarControlGamma_SliderDragStop(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fStartValue) { viewportPanelResult.Gamma = _Sender.Value; }
protected void WriteRegistry(Nuaj.Cirrus.Utility.FloatTrackbarControl _Trackbar, string _KeyName) { m_ROOT.SetValue(_KeyName, _Trackbar.Value.ToString()); }
private void floatTrackbarControlRoughness_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { outputPanelDiffuseFresnelReflectance.Roughness = floatTrackbarControlRoughness.Value; }
private void floatTrackbarControlWeightExponent_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { BuildRoom(); }
private void floatTrackbarControlScaleFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { }
private void floatTrackbarControlWarpFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { Redraw(); }
private void floatTrackbarControlClipAbove_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { Render(); }
private void floatTrackbarControlFluxMultiplier_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { Render(); }
private void floatTrackbarControlProbaFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { displayPanel.m_Factor = _Sender.Value; displayPanel.Update(m_Param.m_Probabilities); }
private void floatTrackbarControlMaxConeAngle_SliderDragStop(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fStartValue) { GenerateRays(integerTrackbarControlRaysCount.Value, floatTrackbarControlMaxConeAngle.Value * (float)(Math.PI / 180.0), m_SB_Rays); }
private void floatTrackbarControlNoiseShapingPower_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { m_Instance.NoiseShapingPower = (float)Math.Pow(10.0, _Sender.Value); UpdateMMF(); }
private void floatTrackbarControlVerticalScale_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { outputPanelDiffuseFresnelReflectance.VerticalScale = floatTrackbarControlVerticalScale.Value; }
private void floatTrackbarControlEmissiveLightsBounceFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { m_Instance.BounceFactorEmissive = _Sender.Value; UpdateMMF(); }
private void floatTrackbarControlPeakFactor_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { outputPanelDiffuseFresnelReflectance.PeakFactor = floatTrackbarControlPeakFactor.Value; }
private void floatTrackbarControlNeighborProbesContribution_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { m_Instance.NeighborProbesContributionBoost = _Sender.Value; UpdateMMF(); }
private void floatTrackbarControlDisplayIntensity_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { Render(); }
private void floatTrackbarControlNormalized_sRGB_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { m_lastChangeIsInteger = false; }
private void floatTrackbarControl1_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { panelOutput.UpdateBitmap(); }
private void floatTrackbarControlSunAzimuth_ValueChanged(Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue) { m_Instance.SunPhi = 0.01745329251994329576923690768489f * _Sender.Value; UpdateMMF(); }