Exemplo n.º 1
0
 public void update()
 {
     boneState  = MandibleController.createMandibleState();
     discState  = DiscController.createDiscState();
     teethState = TeethController.createTeethState();
     fossaState = FossaController.createState();
 }
Exemplo n.º 2
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";
     }
 }
Exemplo n.º 3
0
 public MedicalState(String name)
 {
     Name       = name;
     boneState  = new AnimationManipulatorState();
     discState  = new DiscState();
     teethState = new TeethState();
     fossaState = new FossaState();
     notes      = new MedicalStateNotes();
 }
Exemplo n.º 4
0
        public static FossaState createState()
        {
            FossaState state = new FossaState();

            foreach (Fossa fossa in fossas.Values)
            {
                state.addPosition(fossa.Owner.Name, fossa.getEminanceDistortion());
            }
            return(state);
        }
Exemplo n.º 5
0
 public void blend(FossaState target, float percent)
 {
     foreach (String key in positions.Keys)
     {
         Fossa fossa = FossaController.get(key);
         if (fossa != null)
         {
             float start = positions[key];
             float end   = target.positions[key];
             float delta = end - start;
             fossa.setEminanceDistortion(start + delta * percent);
         }
     }
 }
Exemplo n.º 6
0
 public void captureFromState(String fossaName, FossaState state)
 {
     this.fossaName = fossaName;
     position       = state.getPosition(fossaName);
 }