Kinect学习经过之Kinect第一天:翻译

Kinect学习经过之Kinect第一天:翻译
今天是刚来公司的第一天,也是正式踏入IT行业的第一天,同时也是我踏入IT第一天自愿加班啊哈哈哈(非常有纪念意义),本来是来整VR的,结果公司之前有Kinect项目没做完,就让我负责Kinect的整合(小公司,加上我就三程序,其中还有一个实习的,虽然我也是小白,但是我编了工作经验,感觉自己坏坏哒)。

学插件的捷径就是撸文档(虽然他娘的是英文的),不多说直接开撸吧。
翻译:
How to Use Gestures or Create Your Own Gestures
如何使用手势/创建自己的手势
There are two ways to add gesture detection to your Unity-project.
这里提供了两种添加手势的方法供你在Unity工程中使用。
The first one is easier and utilizes the KinectManager – a component of the KinectController-game object in the example scenes. It has a list-setting called “Player Common Gestures”. Here you can put the gestures that will be detected for each user during the entire game, or the gestures that you need to test quickly.
第一个方法较简单:直接使用KinectManager ——是实例场景中KinectController-game对象的一个组件。它有一个“玩家共同手势”的列表设置。您可以在这里放置整个游戏期间可以被检测到的玩家手势,或者您需要快速检测的手势。
The second way is to specify user or scene-specific gestures programmatically. You need to create a script that implements KinectGestures.GestureListenerInterface and use its methods for gesture initialization and gesture detection processing. As an example, look at the KinectScripts/Samples/SimpleGestureListener.cs-script. Here is a short description of the GestureListenerInterface’s methods:
第二种方法是以编程的方式为指定的用户提供特定场景的手势。这里你需要创建一个脚本去实现KinectGestures.GestureListenerInterface接口,并用这种方式为手势初始化和对手势进行检测。例如:看看 KinectScripts/Samples/SimpleGestureListener.cs-script案例。这是对GestureListenerInterface方法的一个简短介绍。
如下:
丶UserDetected() – invoked when a new user is detected. It can be used to start the gesture detection.
——当发现一个新用户的时候唤醒UserDetected()方法,它可以被用于最开始的手势检测。
丶UserLost() – invoked when a user is lost. It can be used to clean up or free the allocated resources. You don’t need to stop explicitly the detection of gestures added in UserDetected().
——当丢失玩家的时候唤醒UserLost()方法,它可以被用于清理或释放已被分配的资源。通过UserDetected()方法添加的手势,您不需要显示的移除,他们会在调用UserLost()方法之前被自动移除。
丶GestureInProgress() - invoked when a gesture start is detected, but the gesture is not yet completed or cancelled. Can be used to report the gesture progress or to process continuous gestures (that never get completed), like for instance zooming, leaning, walking or running.
——当手势被检测到的时候唤醒GestureInProgress()方法。但是如果手势是不完整的或者已作废的,这个则将被用来报告已手势的进程和处理连续的手势(永远无法完成),比如:移动、倾斜、行走或跑步。
丶GestureCompleted() - invoked when the gesture is completed. You can process the gesture detection here, and decide whether to reset the gesture (i.e. restart its detecti on) or not.
——当姿势已完成时调用GestureCompleted()方法。您在这里可以处理姿势识别,并且决定是否重置姿势(也就是重新检测姿势)。
丶GestureCancelled() - invoked, if the gesture gets cancelled. The gesture gets automatically cancelled, when it is not completed within the allowed time frame. You can decide, whether to reset the gesture (i.e. restart its detection) or not.
——如果姿势被取消了,则会调用GestureCancelled()方法。当姿势没有在规定的时间内完成时,将会被自动取消。在这里您可以决定是否重置姿势(也就是重新启动姿势检测)。

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值