Beispiel #1
0
        /// <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;
        }
Beispiel #2
0
 private void integerTrackbarControlRaysCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue)
 {
     GenerateRays(_Sender.Value, m_SB_Rays);
 }
Beispiel #3
0
 private void integerTrackbarControlResultPlanesCount_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     BuildRoom();
 }
Beispiel #4
0
 private void integerTrackbarControlObstacles_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     BuildRoom();
 }
Beispiel #5
0
        private void integerTrackbarControlResultPlanesCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue)
        {
//			BuildRoom();
        }
Beispiel #6
0
        private void integerTrackbarControlObstacles_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue)
        {
//			BuildRoom();
        }
Beispiel #7
0
 private void integerTrackbarControlLayerDisplayEnd_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     Render();
 }
Beispiel #8
0
 private void integerTrackbarControlLightSamples_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     SetRegKey("LightSamplesCount", _Sender.Value.ToString());
 }
Beispiel #9
0
 private void integerTrackbarControlSetIsolation_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     outputPanel1.IsolatedSetIndex = _Sender.Value;
 }
Beispiel #10
0
 private void integerTrackbarControlProbeIndex_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_Instance.DebugProbeVoronoiCellIndex = _Sender.Value;
     UpdateMMF();
 }
Beispiel #11
0
 private void integerTrackbarControlMaxProbeUpdatesPerFrame_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_Instance.MaxProbeUpdatesPerFrame = _Sender.Value;
     UpdateMMF();
 }
Beispiel #12
0
 private void integerTrackbarControlDynamicObjectsCount_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_Instance.DynamicObjectsCount = _Sender.Value;
     UpdateMMF();
 }
Beispiel #13
0
 private void integerTrackbarControlPhiD_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     Redraw();
 }
Beispiel #14
0
 private void integerTrackbarControl255_sRGB_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_lastChangeIsInteger = true;
 }
Beispiel #15
0
 private void integerTrackbarControlRaysCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue)
 {
     GenerateRays(_Sender.Value, floatTrackbarControlMaxConeAngle.Value * (float)(Math.PI / 180.0), m_SB_Rays);
 }