예제 #1
0
 void trackFilter_AddTrackItem(string name, Object trackUserObject)
 {
     if (movementSequence != null)
     {
         MovementSequenceState state = new MovementSequenceState();
         state.captureState();
         state.StartTime = timelineView.MarkerTime;
         movementSequence.addState(state);
         addStateToTimeline(state);
     }
 }
예제 #2
0
 public void addKeyFramesToSequence(MovementSequence movementSequence, MovementSequenceEditor editor, float markerTime, float totalDuration)
 {
     foreach (MovementSequenceState copiedAction in copiedActions)
     {
         copiedAction.StartTime = copiedAction.StartTime - startTimeZeroOffset + markerTime;
         if (copiedAction.StartTime > totalDuration)
         {
             copiedAction.StartTime = totalDuration;
         }
         movementSequence.addState(copiedAction);
         editor.addStateToTimeline(copiedAction);
     }
 }
 void MedicalController_OnLoopUpdate(Clock time)
 {
     if (lastFrameRecordTime >= frequencyMicro)
     {
         MovementSequenceState state = new MovementSequenceState();
         state.captureState();
         state.StartTime = Clock.MicrosecondsToSeconds(totalTimeMicro);
         recordingSequence.addState(state);
         lastFrameRecordTime = 0;
     }
     else
     {
         lastFrameRecordTime += time.DeltaTimeMicro;
     }
     totalTimeMicro            += time.DeltaTimeMicro;
     recordingSequence.Duration = Clock.MicrosecondsToSeconds(totalTimeMicro);
 }