public void captureFromState(TeethState teethState)
 {
     foreach (ToothState tooth in teethState.StateEnum)
     {
         teeth.Add(new ToothState(tooth));
     }
 }
Example #2
0
 public void update()
 {
     boneState  = MandibleController.createMandibleState();
     discState  = DiscController.createDiscState();
     teethState = TeethController.createTeethState();
     fossaState = FossaController.createState();
 }
Example #3
0
 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";
     }
 }
Example #4
0
 public MedicalState(String name)
 {
     Name       = name;
     boneState  = new AnimationManipulatorState();
     discState  = new DiscState();
     teethState = new TeethState();
     fossaState = new FossaState();
     notes      = new MedicalStateNotes();
 }
Example #5
0
 public void blend(TeethState target, float percent)
 {
     foreach (String key in teeth.Keys)
     {
         ToothState start = teeth[key];
         ToothState end   = target.teeth[key];
         start.blend(end, percent);
     }
 }
Example #6
0
        public static TeethState createTeethState()
        {
            TeethState state = new TeethState();

            foreach (Tooth tooth in teeth.Values)
            {
                state.addPosition(new ToothState(tooth.Owner.Name, tooth.Extracted, tooth.Offset, tooth.Rotation));
            }
            return(state);
        }