Exemplo n.º 1
0
        public RenderSettings(MainForm mainForm)
        {
            InitializeComponent();
            this.mainForm = mainForm;
            data = mainForm.CoonsPatch.settings;

            checkBox1.Checked = data.wireframe;
            checkBox2.Checked = data.controlPoints;
            checkBox3.Checked = data.controlCurve;
            checkBox4.Checked = data.smoothColor;

            checkBox5.Checked = data.patch;
            checkBox6.Checked = data.contour;

            numericUpDown1.Value = (decimal)data.dv;
            numericUpDown2.Value = (decimal)data.du;

            numericUpDown3.Value = (decimal)data.A;
            numericUpDown4.Value = (decimal)data.B;
            numericUpDown5.Value = (decimal)data.C;

            if (data.lerp == new RenderSettingsData.InBetweenDelegate(RenderSettingsData.sincos))
                radioButton5.Checked = true;
            else if (data.lerp == new RenderSettingsData.InBetweenDelegate(RenderSettingsData.hermite))
                radioButton4.Checked = true;
            else
                radioButton3.Checked = true;

            trackBarV.Value = Convert.ToInt32(data.maxv * 100.0f);
            trackBarU.Value = Convert.ToInt32(data.maxu * 100.0f);
        }
Exemplo n.º 2
0
        public CurvesEditor(MainForm mainForm, Model.Spline curve_)
        {
            InitializeComponent();
            this.parent = mainForm;
            this.curve = curve_;
            switch (curve)
            {
            case Model.Spline.P0: this.Text = "Krzywa P_0"; break;
            case Model.Spline.P1: this.Text = "Krzywa P_1"; break;
            case Model.Spline.Q0: this.Text = "Krzywa Q_0"; break;
            case Model.Spline.Q1: this.Text = "Krzywa Q_1"; break;
                default:
                Close();
                break;
            }

            bindingSource.DataSource = parent.CoonsPatch.GetSpline(curve);
            ready = true;
        }
Exemplo n.º 3
0
 public RenderForm(MainForm parent_)
 {
     InitializeComponent();
     this.parent = parent_;
     settings = new RenderSettingsData();
 }