Komposten/LeapJna

Mapping LeapJNA events to JavaFX Gestures

Opened this issue · 3 comments

Hello @Komposten ! Great job with maintaining this functionality after Leap stopped doing so. Thank you.
I make a lot of JavaFX visualizations and one of them is for a touch screen. We have purchased an Ultra Leap and would like to try to map Leap motion "gestures" to normal JavaFX gestures. (Rotate, Zoom, Swipe, Tap, Scroll etc).

Have you ever tried this with your library? Is using your library the correct approach?

Hi @Birdasaur,

Previous versions of the Leap Motion SDK (up until version 3.0, I think) had built-in gesture recognition for basic gestures like swiping, making circles and pinching. The later SDK versions do not have this, unless it has been added since I last checked, so you would have to do the gesture recognition yourself. There are probably a libraries out there to help with this, though.

I haven't tried gesture recognition myself, but unless there is another library to help you communicate with the Leap using java, this one is probably a good choice.

I'll see if I can take some time to verify that everything works with the latest SDK version.

I've verified by running your Swing tester app that your latest master works on Win10 using Leap's Beta release of their Orion 5.0 platform. This was done on an Ultraleap device.

I know the gesture support you are referring to... you can still technically access older SDK releases on their archive pages. There is a LeapJava.jar which provides the gestures you refer to. I wonder if this older jar would still possibly work when used together with your LeapJNA library? Thoughts?

I'm willing to experiment if you think there is at least a small hope. ;-)

It should indeed work with the latest release, though there are some new API features (from Gemini 5.1 and onwards) which are not yet supported by LeapJna since I last built it for a 5.0 pre-release. But I hope to finish testing an updated version during the weekend. :)

I wonder if this older jar would still possibly work when used together with your LeapJNA library? Thoughts?

I doubt it, unfortunately. It's been a while since I used the pre-Orion SDK's but if my memory serves they had a fairly different API. And on top of that, LeapJna doesn't provide any bindings for any features related to gestures. 😦

Your best bet, if you want to use the latest UltraLeap software, is probably to feed tracking data to a shape recognition (or even a computer vision) library. I don't have any experience with that myself, though, so I'm afraid I won't be of much help there.