Example #1
0
        private void numericBox6_ValueChanged(object sender, EventArgs e)
        {
            if (skip)
            {
                return;
            }
            skip = true;
            var rotMatrix = new Matrix3D(numericBox11.Value, numericBox21.Value, numericBox31.Value, numericBox12.Value, numericBox22.Value, numericBox32.Value, numericBox13.Value, numericBox23.Value, numericBox33.Value);

            var(Phi, Theta, Psi)  = Euler.GetEulerAngle(rotMatrix);
            numericBoxPhi.Value   = Phi / Math.PI * 180;
            numericBoxTheta.Value = Theta / Math.PI * 180;
            numericBoxPsi.Value   = Psi / Math.PI * 180;

            skip = false;
        }
Example #2
0
        private void NumericBoxExp_ValueChanged(object sender, EventArgs e)
        {
            if (sender is NumericBox box)
            {
                if (box.Value > 180)
                {
                    box.Value -= 360;
                    return;
                }
                else if (box.Value < -180)
                {
                    box.Value += 360;
                    return;
                }
            }

            if (skip)
            {
                return;
            }

            if (checkBoxLink.Checked)
            {
                skip = true;
                var(Phi, Theta, Psi)     = Euler.GetEulerAngle(RotExp * RotBase);
                FormMain.SkipEulerChange = true;
                FormMain.Phi             = Phi;
                FormMain.Theta           = Theta;
                FormMain.Psi             = Psi;
                FormMain.SkipEulerChange = false;
                FormMain.SetRotation(RotReciPro);
                skip = false;
            }

            SetRotation(false);
        }