/**
* Returns the latest frame object.
*
* If the recorder object is playing a recording, then the frame is taken from the recording.
* Otherwise, the frame comes from the Leap Motion Controller itself.
*/
public virtual Frame GetFrame()
{
if (enableRecordPlayback && (recorder_.state == RecorderState.Playing || recorder_.state == RecorderState.Paused))
{
return(recorder_.GetCurrentFrame());
}
return(leap_controller_.Frame());
}