public void blend(AnimationManipulatorState target, float percent)
 {
     foreach (String key in positions.Keys)
     {
         positions[key].blend(target.positions[key], percent);
     }
 }
 public void update()
 {
     boneState  = MandibleController.createMandibleState();
     discState  = DiscController.createDiscState();
     teethState = TeethController.createTeethState();
     fossaState = FossaController.createState();
 }
 protected MedicalState(LoadInfo info)
 {
     boneState  = info.GetValue <AnimationManipulatorState>(BONE_MANIPULATOR_STATE);
     discState  = info.GetValue <DiscState>(DISC_STATE);
     teethState = info.GetValue <TeethState>(TEETH_STATE);
     fossaState = info.GetValue <FossaState>(FOSSA_STATE);
     if (info.hasValue(NOTES))
     {
         notes = info.GetValue <MedicalStateNotes>(NOTES);
     }
     else
     {
         notes = new MedicalStateNotes();
     }
     if (info.hasValue(THUMBNAIL))
     {
         using (MemoryStream memStream = new MemoryStream(info.GetBlob(THUMBNAIL)))
         {
             thumbnail = new FreeImageBitmap(memStream);
             memStream.Close();
         }
     }
     else
     {
         thumbnail = null;
     }
     if (info.hasValue(NAME))
     {
         Name = info.GetString(NAME);
     }
     else
     {
         Name = "Unnamed";
     }
 }
 public void captureFromState(AnimationManipulatorState animManipulator)
 {
     foreach (AnimationManipulatorStateEntry entry in animManipulator.Entries)
     {
         captureFromState(entry);
     }
 }
 public MedicalState(String name)
 {
     Name       = name;
     boneState  = new AnimationManipulatorState();
     discState  = new DiscState();
     teethState = new TeethState();
     fossaState = new FossaState();
     notes      = new MedicalStateNotes();
 }
Beispiel #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);
        }