Exemplo n.º 1
0
 public void clearManipulator()
 {
     if (manipulator != null)
     {
         this.manipulator = null;
     }
 }
 public override void opening()
 {
     foreach (BoneManipulatorSlider slider in openingValues)
     {
         if (slider != null && MandibleController.Mandible != null)
         {
             if (slider.BoneManipulator != null)
             {
                 AnimationManipulator manipulator = MandibleController.Mandible.getAnimationManipulator(slider.BoneManipulator);
                 if (manipulator != null)
                 {
                     slider.initialize(manipulator);
                     slider.OpeningValue = slider.Value;
                 }
                 else
                 {
                     Log.Default.sendMessage("Could not find manipulator named {0}.", LogLevel.Warning, "Head", slider.BoneManipulator);
                 }
             }
             else
             {
                 Log.Default.sendMessage("No tag set on slider. Cannot search for manipulator.", LogLevel.Warning, "Head");
             }
         }
     }
 }
Exemplo n.º 3
0
 public void clearManipulator()
 {
     if (condyle != null)
     {
         this.condyle = null;
         this.ramus   = null;
     }
 }
Exemplo n.º 4
0
        internal static void addAnimationManipulator(AnimationManipulator boneManipulator)
        {
            String name = boneManipulator.UIName;

            if (name != null && !manipulators.ContainsKey(name))
            {
                manipulators.Add(name, boneManipulator);
            }
            else
            {
                Log.Default.sendMessage("Added duplicate BoneManipulator named {0}. Duplicate ignored.", LogLevel.Warning, "Medical", name);
            }
        }
Exemplo n.º 5
0
        public void sceneChanged()
        {
            if (MandibleController.Mandible != null)
            {
                AnimationManipulator ramus   = MandibleController.Mandible.getAnimationManipulator("leftRamusHeightMandible");
                AnimationManipulator condyle = MandibleController.Mandible.getAnimationManipulator("leftCondyleHeightMandible");
                leftHeightSlider.initialize(condyle, ramus);

                ramus   = MandibleController.Mandible.getAnimationManipulator("rightRamusHeightMandible");
                condyle = MandibleController.Mandible.getAnimationManipulator("rightCondyleHeightMandible");
                rightHeightSlider.initialize(condyle, ramus);
            }
        }
Exemplo n.º 6
0
        public AnimationManipulatorState createMandibleState()
        {
            AnimationManipulatorState state = new AnimationManipulatorState();

            foreach (SimElement element in Owner.getElementIter())
            {
                AnimationManipulator manipulator = element as AnimationManipulator;
                if (manipulator != null)
                {
                    state.addPosition(manipulator.createStateEntry());
                }
            }
            return(state);
        }
Exemplo n.º 7
0
        internal static void removeAnimationManipulator(AnimationManipulator boneManipulator)
        {
            String name = boneManipulator.UIName;

            if (name != null && manipulators.ContainsKey(name))
            {
                if (manipulators[name] == boneManipulator)
                {
                    manipulators.Remove(name);
                }
                else
                {
                    Log.Default.sendMessage("Attempted to remove BoneManipulator named {0} that does not match the manipulator in the controller. No changes made.", LogLevel.Warning, "Medical", name);
                }
            }
            else
            {
                Log.Default.sendMessage("Attempted to remove BoneManipulator named {0}. No changes made.", LogLevel.Warning, "Medical", name);
            }
        }
Exemplo n.º 8
0
 public void initialize(AnimationManipulator manipulator)
 {
     this.manipulator = manipulator;
     synchronizeValue(manipulator, manipulator.Position);
 }
Exemplo n.º 9
0
 public void initialize(AnimationManipulator condyle, AnimationManipulator ramus)
 {
     this.condyle = condyle;
     this.ramus   = ramus;
 }