public RemoveSingleFrame(KinectRecording rec, int index) { _recording = rec; _index = index; _frame = _recording.GetFrame(_index); Execute(); }
public void DrawFrame() { //Don't do anything if no recording if (_recording == null) { return; } //get the current frame from the recording var currFrame = _recording.GetFrame(CurrentFrameIndex); //draw it _frameDrawer.Draw(currFrame); }
public AnimationClip ConvertRecording() { //Check if a converison method is set if (_frameToKeyFrameMethod == null) { Debug.Log(LogLevel.Warning, "No conversion method set"); return null; } //make a copy of the active clip var newClip = Clip.Copy(); //Clamp Interval if (FrameInterval >= (_recording.Frames)) FrameInterval = _recording.Frames - 1; var div = _recording.Frames/FrameInterval; var tickInterval = newClip.Duration / div; //In the end Tick == Duration var tick = -tickInterval; //Go through all the frames for (var i = 0; i < _recording.Frames; ++i) { if (i % FrameInterval != 0) continue; //Create a keyFrame var frame = _recording.GetFrame(i); var keyFrame = _frameToKeyFrameMethod(frame); tick += tickInterval; keyFrame.Tick = tick; newClip.Keys.Add(keyFrame); } //New animation clip is created return newClip; }