【VR】Leap Motion 官网文档 LeapRecorder (Leap记录器)

LeapRecorder Leap记录器

Defines helper functions for the record/playback mechanism of the HandController.

定义了手部控制器的记录/播放机制的辅助方法。


class LeapRecorder Leap记录器类

Maintains a buffer of recorded frames and tracks the state of playback and recording.

维护一个记录帧的缓存并跟踪播放和记录状态。


Public Functions 公共方法


LeapRecorder() Leap记录器


Creates a new LeapRecorder object. 创建一个新的Leap记录器对象。

This doesn’t make sense outside the context of a HandController object.

如果不在手部控制器对象之内,该方法无效。


void AddFrame(Frame frame) 添加帧(Frame 帧)


Serializes a Leap Frame object and adds it to the end of the recording.

序列化一个Leap帧对象并且把它添加到记录的最后。


Frame GetCurrentFrame() Frame 获取当前帧


Returns the current frame without advancing the playhead.

返回当前帧并且不向下一帧推进。

This frame could be invalid.

该帧可能失效。


List< Frame > GetFrames() List<Frame> 获取帧

Deserializes all the recorded frames and returns them in a new list.

反序列化所有记录的帧并用一个新的List返回它们。


int GetFramesCount() int 获取帧数


The number of recorded frames.

记录的帧数。


int GetIndex() int 获取索引


Returns the playback position.

返回播放位置。


float GetProgress() float 获取进度


Returns the ratio of the current playback position to the total recording length.

返回当前播放位置与总记录长度的比例。


void Load(TextAsset text_asset)  载入(TextAsset 文本_资源)


Loads saved frames from a file.

从一个文件里载入已保存的帧。


Frame NextFrame() Frame 下一帧


Advances the playhead, deserializes the frame, and returns it.

向下推进一帧,反序列化该帧并将其返回。


void Pause() 暂停


Sets the play state to idle.

暂停播放。


void Play() 播放


Sets the play state to playing.

播放。


void Record() 记录


Sets the play state to recording.

开始记录。


void Reset() 重置


Discards any recorded frames.

删除所有已录制的帧。


string SaveToNewFile() string 保存成新的文件


Saves the recorded frames to a file, overwriting an existing file.

将已录制好的帧保存成一个文件,覆盖存在的文件。


void SetDefault() 设置默认


Restores the default behaviors.

复原默认行为。


void SetIndex(int new_index) 设置索引(int 新的索引)


Sets the playback position to the specified frame count (or the last frame if the specified index is after the last frame.

设置播放位置到指定帧数(如果指定索引在最后一帧之后则设置到最后一帧)。


void Stop() 停止


Sets the play state to idle.

停止播放。


Public Members 公共变量

bool loop bool 循环

Whether to lop back to the beginning when the last recorded frame is played.

记录的最后一帧播放完毕时是否循环回开始


float speed float 速度

Playback speed.

播放速度


RecorderState state RecorderState 状态

The current play state.

当前的播放状态。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值