/// <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 integerTrackbarControlRaysCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue) { GenerateRays(_Sender.Value, m_SB_Rays); }
private void integerTrackbarControlResultPlanesCount_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { BuildRoom(); }
private void integerTrackbarControlObstacles_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { BuildRoom(); }
private void integerTrackbarControlResultPlanesCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue) { // BuildRoom(); }
private void integerTrackbarControlObstacles_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue) { // BuildRoom(); }
private void integerTrackbarControlLayerDisplayEnd_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { Render(); }
private void integerTrackbarControlLightSamples_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { SetRegKey("LightSamplesCount", _Sender.Value.ToString()); }
private void integerTrackbarControlSetIsolation_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { outputPanel1.IsolatedSetIndex = _Sender.Value; }
private void integerTrackbarControlProbeIndex_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { m_Instance.DebugProbeVoronoiCellIndex = _Sender.Value; UpdateMMF(); }
private void integerTrackbarControlMaxProbeUpdatesPerFrame_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { m_Instance.MaxProbeUpdatesPerFrame = _Sender.Value; UpdateMMF(); }
private void integerTrackbarControlDynamicObjectsCount_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { m_Instance.DynamicObjectsCount = _Sender.Value; UpdateMMF(); }
private void integerTrackbarControlPhiD_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { Redraw(); }
private void integerTrackbarControl255_sRGB_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue) { m_lastChangeIsInteger = true; }
private void integerTrackbarControlRaysCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue) { GenerateRays(_Sender.Value, floatTrackbarControlMaxConeAngle.Value * (float)(Math.PI / 180.0), m_SB_Rays); }