private void OnKeyDownInViewport(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Space)
     {
         if (RobotLaunchStoryboard.GetIsPaused(this))
         {
             RobotLaunchStoryboard.Resume(this);
         }
         else
         {
             RobotLaunchStoryboard.Pause(this);
         }
         e.Handled = true;
     }
     else
     {
     }
 }
        private void ACTmodelSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            RobotLaunchStoryboard.Stop(this);
            String s = ((TextBlock)(e.AddedItems[0])).Tag.ToString();

            switch (s)
            {
            case "F":
                PlaceSoleObjOnTurntable("GM3D_Camel_FOOT");
                break;

            case "S":
                PlaceSoleObjOnTurntable("GM3D_Camel_SHIN");
                break;

            case "T":
                PlaceSoleObjOnTurntable("GM3D_Camel_THIGH");
                break;

            case "B":
                PlaceSoleObjOnTurntable("GM3D_Camel_TRUNK");
                break;

            case "H":
                PlaceSoleObjOnTurntable("GM3D_Camel_HEAD");
                break;

            case "HB+":
            {
                Model3DGroup cam = CreateCamel();
                AutoCompositeHeadTrunk(cam);

                ModelsOnTurntable.Children.Clear();
                ModelsOnTurntable.Children.Add(cam);

                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(new TRVU_Model3DGroup(cam));
            }
            break;

            case "FS":
            {
                Model3DGroup thelowerleg = CreateLowerLeg();
                ModelsOnTurntable.Children.Clear();
                ModelsOnTurntable.Children.Add(thelowerleg);

                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(new TRVU_Model3DGroup(thelowerleg));
            }
            break;

            case "FST":
            {
                Model3DGroup theleg = CreateLeg();
                ModelsOnTurntable.Children.Clear();
                ModelsOnTurntable.Children.Add(theleg);

                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(new TRVU_Model3DGroup(theleg));
            }
            break;

            case "FST+":
            {
                Model3DGroup theleg = CreateLeg();
                AutoCompositeLeg(theleg);
                ModelsOnTurntable.Children.Clear();
                ModelsOnTurntable.Children.Add(theleg);

                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(new TRVU_Model3DGroup(theleg));
            }
            break;


            case "HBLeg_fr_left":
            {
                Model3DGroup      cam = CreateEntireCamel(1, false);
                TRVU_Model3DGroup xyz = new TRVU_Model3DGroup(cam);
                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(xyz);
            }
            break;

            case "HBLegs_fr":
            {
                Model3DGroup      cam = CreateEntireCamel(2, false);
                TRVU_Model3DGroup xyz = new TRVU_Model3DGroup(cam);
                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(xyz);
            }
            break;

            case "HBLegs_fr+":
            {
                Model3DGroup      cam = CreateEntireCamel(2, true);
                TRVU_Model3DGroup xyz = new TRVU_Model3DGroup(cam);
                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(xyz);
            }
            break;

            case "WHOLE+":
            {
                Model3DGroup      cam = CreateEntireCamel(4, true);
                TRVU_Model3DGroup xyz = new TRVU_Model3DGroup(cam);
                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(xyz);
            }
            break;

            case "WHOLE+ANIM":
            {
                Model3DGroup cam = CreateEntireCamel(4, true);
                AddAnimationEnablers();
                TRVU_Model3DGroup xyz = new TRVU_Model3DGroup(cam);
                TRVU_model.Items.Clear();
                TRVU_model.Items.Add(xyz);

                RobotLaunchStoryboard.Stop(this);
                RobotLaunchStoryboard.Seek(this, TimeSpan.Zero, TimeSeekOrigin.BeginTime);
                RobotLaunchStoryboard.Begin(this, true);
                VP3D.Focus();
                ACTcamerareset(sender, e);
            }
            break;
            }
            ComputeXAML();
        }