예제 #1
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;
        }
예제 #2
0
 private void integerTrackbarControlRaysCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue)
 {
     GenerateRays(_Sender.Value, m_SB_Rays);
 }
예제 #3
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
 private void integerTrackbarControlResultPlanesCount_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     BuildRoom();
 }
예제 #4
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
 private void integerTrackbarControlObstacles_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     BuildRoom();
 }
예제 #5
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
        private void integerTrackbarControlResultPlanesCount_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue)
        {
//			BuildRoom();
        }
예제 #6
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
        private void integerTrackbarControlObstacles_SliderDragStop(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue)
        {
//			BuildRoom();
        }
예제 #7
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
 private void integerTrackbarControlLayerDisplayEnd_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     Render();
 }
예제 #8
0
 private void integerTrackbarControlLightSamples_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     SetRegKey("LightSamplesCount", _Sender.Value.ToString());
 }
예제 #9
0
 private void integerTrackbarControlSetIsolation_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     outputPanel1.IsolatedSetIndex = _Sender.Value;
 }
예제 #10
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
 private void integerTrackbarControlProbeIndex_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_Instance.DebugProbeVoronoiCellIndex = _Sender.Value;
     UpdateMMF();
 }
예제 #11
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
 private void integerTrackbarControlMaxProbeUpdatesPerFrame_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_Instance.MaxProbeUpdatesPerFrame = _Sender.Value;
     UpdateMMF();
 }
예제 #12
0
파일: Form1.cs 프로젝트: vr3d/GodComplex
 private void integerTrackbarControlDynamicObjectsCount_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_Instance.DynamicObjectsCount = _Sender.Value;
     UpdateMMF();
 }
예제 #13
0
 private void integerTrackbarControlPhiD_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     Redraw();
 }
예제 #14
0
 private void integerTrackbarControl255_sRGB_ValueChanged(Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue)
 {
     m_lastChangeIsInteger = true;
 }
예제 #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);
 }