Example #1
0
        private void panelEdgeTint_Click(object sender, EventArgs e)
        {
//          colorDialog1.Color = IOR_to_Color( outputPanelFresnelGraph.IOR_red, outputPanelFresnelGraph.IOR_green, outputPanelFresnelGraph.IOR_blue );
            Nuaj.Cirrus.Utility.ColorPickerForm colorPicker = new Nuaj.Cirrus.Utility.ColorPickerForm(panelSpecularTintEdge.BackColor);
            colorPicker.ColorChanged += colorPicker_ColorChanged_EdgeTint;
            colorPicker.ShowDialog(this);
        }
Example #2
0
        void colorPicker_ColorChanged(Nuaj.Cirrus.Utility.ColorPickerForm _sender)
        {
            Color pickedColor = _sender.ColorLDR;

            panelSpecularTintNormal.BackColor = pickedColor;

//          floatTrackbarControlIOR.Value = Math.Max( Math.Max( IOR_red, IOR_green ), IOR_blue );
//          floatTrackbarControlIOR.VisibleRangeMax = Math.Max( 10.0f, 2.0f * floatTrackbarControlIOR.Value );
//
            outputPanelFresnelGraph.SpecularTintNormal = pickedColor;

            float F0_red   = pickedColor.R / 255.0f;
            float F0_green = pickedColor.G / 255.0f;
            float F0_blue  = pickedColor.B / 255.0f;

            float IOR_red   = F0_to_IOR(F0_red);
            float IOR_green = F0_to_IOR(F0_green);
            float IOR_blue  = F0_to_IOR(F0_blue);

            outputPanelFresnelGraph.IOR_red          = IOR_red;
            outputPanelFresnelGraph.IOR_green        = IOR_green;
            outputPanelFresnelGraph.IOR_blue         = IOR_blue;
            outputPanelDiffuseFresnelReflectance.IOR = Math.Max(Math.Max(IOR_red, IOR_green), IOR_blue);

            outputPanelFresnelGraph.Refresh();
        }
Example #3
0
        void colorPicker_ColorChanged_EdgeTint(Nuaj.Cirrus.Utility.ColorPickerForm _sender)
        {
            Color pickedColor = _sender.ColorLDR;

            panelSpecularTintEdge.BackColor          = pickedColor;
            outputPanelFresnelGraph.SpecularTintEdge = pickedColor;

            outputPanelFresnelGraph.Refresh();
        }