Example #1
0
 internal ContainerField(string debugName, XType ltype)
 {
     this.debugName = debugName;
     this.ltype     = ltype;
     if (ltype == null)
     {
         val.Clear();
     }
     else
     {
         val.Clear(ltype);
     }
 }
Example #2
0
        private void UpdateAxisAngleSettings(object sender, EventArgs e)
        {
            //Clear prior values
            myprocTransformGroup.Children.Clear();
            WValue.Clear();
            XValue.Clear();
            YValue.Clear();
            ZValue.Clear();

            //<SnippetQuaternionView3DN4>
            //Read new settings
            Double angle = System.Convert.ToDouble(AngleValue.Text);

            try
            {
                Double xaxis = System.Convert.ToDouble(XAxisValue.Text);
                Double yaxis = System.Convert.ToDouble(YAxisValue.Text);
                Double zaxis = System.Convert.ToDouble(ZAxisValue.Text);

                endQuaternion = new Quaternion(new Vector3D(xaxis, yaxis, zaxis), angle);
            }
            catch
            {
                XAxisValue.Text = "Axis must be nonzero Vector3D";
                YAxisValue.Text = "Axis must be nonzero Vector3D";
                ZAxisValue.Text = "Axis must be nonzero Vector3D";
            }

            endRotation.Quaternion = endQuaternion;
            //</SnippetQuaternionView3DN4>

            //Update quaternion display
            WValue.Text = endQuaternion.W.ToString();
            XValue.Text = endQuaternion.X.ToString();
            YValue.Text = endQuaternion.Y.ToString();
            ZValue.Text = endQuaternion.Z.ToString();

            //build in some if clauses to determine the animation method to call
            startAnimation();
        }