我一直在使用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