我一直在使用2个库直到现在我的飞跃项目作为一个bodge,因为它们都允许不同的功能,独特(更好地实现)到彼此。不过,我想只是使用一个库作为多个导致问题。闰盘 - 处理 - 滑动手势方向?
基本上我使用迈克尔豪雅的Leap Motion(我需要使用这个库,因为它是目前唯一一个我可以找到的库,它允许我设置优化hmd以及缩放因子)。
手势的实现如下,有没有办法从这个滑动方向?
void onInit(final Controller controller)
{
controller.enableGesture(Gesture.Type.TYPE_SWIPE);
// enable top mounted policy
controller.setPolicyFlags(Controller.PolicyFlag.POLICY_OPTIMIZE_HMD);
}
void onFrame(final Controller controller)
{
Frame frame = controller.frame();
for (Gesture gesture : frame.gestures())
{
if ("TYPE_SWIPE".equals(gesture.type().toString()) && "STATE_START".equals(gesture.state().toString())) {
}
println("gesture " + gesture + " id " + gesture.id() + " type " + gesture.type() + " state " + gesture.state() + " duration " + gesture.duration() + " durationSeconds " + gesture.durationSeconds());
}
}
我试着gesture.direction()枉然希望它可能工作,但方向不是一个公认的功能。
任何帮助非常感谢!提前致谢!将
您好,我是[捐献的图书馆]的开发人员(https://developer.leapmotion.com/gallery/category/processing)。我注意到,自然需要滑动方向。所以我会用这个功能来实现和更新库。之后,我会在这里通知你一个简短的评论。 – 2015-05-27 06:36:46