GetCurrentFrame() public method

public GetCurrentFrame ( ) : Frame,
return Frame,
    /**
     * 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());
    }
Example #2
0
    /**
     * 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.
     *
     * The returned frame does not contain any image data, use GetImageFrame() for that.
     */
    public virtual Frame GetFrame()
    {
        if (enableRecordPlayback && (recorder_.state == RecorderState.Playing || recorder_.state == RecorderState.Paused))
        {
            return(recorder_.GetCurrentFrame());
        }

        ensureFramesUpToDate();
        return(curr_frame);
    }
Example #3
0
    /**
     * 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 Frame GetFrame()
    {
        if (enableRecordPlayback && recorder_.state == RecorderState.Playing)
        {
            return(recorder_.GetCurrentFrame());
        }

        return(leap_controller_.Frame());
    }