コード例 #1
0
        public MedicalState createState(String name)
        {
            MedicalState state = new MedicalState(name);

            state.update();
            return(state);
        }
コード例 #2
0
 public void alertStateUpdated(MedicalState state)
 {
     if (StateUpdated != null && states.Contains(state))
     {
         StateUpdated.Invoke(state);
     }
 }
コード例 #3
0
 public void blend(float percent, MedicalState target)
 {
     boneState.blend(target.boneState, percent);
     discState.blend(target.discState, percent);
     teethState.blend(target.teethState, percent);
     fossaState.blend(target.fossaState, percent);
 }
コード例 #4
0
 public override void applyToState(MedicalState state)
 {
     foreach (ToothState tooth in teeth)
     {
         state.Teeth.addPosition(new ToothState(tooth));
     }
 }
コード例 #5
0
 public override void applyToState(MedicalState state)
 {
     foreach (PresetState subState in subStates)
     {
         subState.applyToState(state);
     }
 }
コード例 #6
0
 public override void applyToState(MedicalState state)
 {
     foreach (AnimationManipulatorStateEntry position in positions)
     {
         state.BoneManipulator.addPosition(position.clone());
     }
 }
コード例 #7
0
        public MedicalState createAndAddState(String name)
        {
            MedicalState state = createState(name);

            addState(state);
            return(state);
        }
コード例 #8
0
        public MedicalState createFromPreset(PresetState preset)
        {
            MedicalState state = new MedicalState(preset.Name);

            state.update();
            preset.applyToState(state);
            return(state);
        }
コード例 #9
0
 public void destroyState(MedicalState state)
 {
     stopBlending();
     states.Remove(state);
     if (StateRemoved != null)
     {
         StateRemoved.Invoke(this, state);
     }
     state.Dispose();
 }
コード例 #10
0
 public void blendTo(MedicalState state, float duration)
 {
     this.directStartState = createState("DirectStart");
     this.directEndState   = state;
     blendElapsed          = 0.0f;
     blendDuration         = duration;
     if (blendDuration <= 0.0f)
     {
         blendDuration = float.Epsilon;
     }
     startPlayback();
 }
コード例 #11
0
 /// <summary>
 /// Use the current setup of the scene to create a "normal" state.
 /// </summary>
 public void sceneLoaded(SimScene scene)
 {
     sceneLoadNormalState                  = this.createState("Normal");
     sceneLoadNormalState.Notes.Notes      = "Normal";
     sceneLoadNormalState.Notes.DataSource = "Automatic";
     sceneLoadNormalState.Thumbnail        = imageRenderer.renderImage(imageProperties);
     states.Add(sceneLoadNormalState);
     if (StateAdded != null)
     {
         StateAdded.Invoke(this, sceneLoadNormalState);
     }
 }
コード例 #12
0
 public void sceneUnloading(SimScene scene)
 {
     if (sceneLoadNormalState != null)
     {
         states.Remove(sceneLoadNormalState);
         if (StateRemoved != null)
         {
             StateRemoved.Invoke(this, sceneLoadNormalState);
         }
         sceneLoadNormalState.Dispose();
         sceneLoadNormalState = null;
     }
 }
コード例 #13
0
 public override void applyToState(MedicalState state)
 {
     if (state != null)
     {
         DiscStateProperties disc = new DiscStateProperties(discName);
         disc.DiscOffset          = discOffset;
         disc.HorizontalOffset    = horizontalOffset;
         disc.Locked              = locked;
         disc.PopLocation         = popLocation;
         disc.RDAOffset           = rdaOffset;
         disc.DisplaceLateralPole = displaceLateralPole;
         disc.ClockFaceOffset     = clockFaceOffset;
         state.Disc.addPosition(disc);
     }
 }
コード例 #14
0
 public void addState(MedicalState state)
 {
     //No states and normal state defined, add it as the first state.
     if (states.Count == 0)
     {
         states.Add(sceneLoadNormalState);
         if (StateAdded != null)
         {
             StateAdded.Invoke(this, sceneLoadNormalState);
         }
     }
     states.Add(state);
     if (state.Thumbnail == null)
     {
         state.Thumbnail = imageRenderer.renderImage(imageProperties);
     }
     if (StateAdded != null)
     {
         StateAdded.Invoke(this, state);
     }
 }
コード例 #15
0
        public PresetState createPresetState(String name)
        {
            MedicalState medicalState = new MedicalState(name);

            medicalState.update();
            CompoundPresetState compoundPresetState = new CompoundPresetState("", "", "");

            DiscPresetState leftDiscPreset = new DiscPresetState("LeftTMJDisc", "", "", "");

            leftDiscPreset.captureFromState(medicalState.Disc.getPosition("LeftTMJDisc"));
            compoundPresetState.addSubState(leftDiscPreset);

            DiscPresetState rightDiscPreset = new DiscPresetState("RightTMJDisc", "", "", "");

            rightDiscPreset.captureFromState(medicalState.Disc.getPosition("RightTMJDisc"));
            compoundPresetState.addSubState(rightDiscPreset);

            FossaPresetState leftFossaPreset = new FossaPresetState("", "", "");

            leftFossaPreset.captureFromState("LeftFossa", medicalState.Fossa);
            compoundPresetState.addSubState(leftFossaPreset);

            FossaPresetState rightFossaPreset = new FossaPresetState("", "", "");

            rightFossaPreset.captureFromState("RightFossa", medicalState.Fossa);
            compoundPresetState.addSubState(rightFossaPreset);

            AnimationManipulatorPresetState animationManipPresetState = new AnimationManipulatorPresetState("", "", "");

            animationManipPresetState.captureFromState(medicalState.BoneManipulator);
            compoundPresetState.addSubState(animationManipPresetState);

            TeethPresetState teethPreset = new TeethPresetState("", "", "");

            teethPreset.captureFromState(medicalState.Teeth);
            compoundPresetState.addSubState(teethPreset);

            return(compoundPresetState);
        }
コード例 #16
0
 public abstract void applyToState(MedicalState state);
コード例 #17
0
 public override void applyToState(MedicalState state)
 {
     state.Fossa.addPosition(fossaName, position);
 }
コード例 #18
0
 public ChangeMedicalStateAction(MedicalState state, float startTime)
 {
     State          = state;
     this.StartTime = StartTime;
     Duration       = 1.0f;
 }