This is a work in progress wrapper around the C++ Leap Motion library.
The idea is to have a minimalistic C API for easy integration with other languages like Common Lisp or Lua.
It does not cover the entire Leap Motion API, current limitations are:
- There is no distinction between
Fingers
andTools
, therefore onlyPointables
are not implemented yet. Pointables
are available only through their associatedHands
(not through theirFrame
).- "find by id" methods are not implemented yet.
- methods on
Hand
that give a result relative to a previousFrame
liketranslation
orrotationAxis
are not implemented yet. - Xcode project only, though it should be fairly easy to port the project to Visual Studio and the code is vanilla C.
- Utilities from the LeapMath library are not implemented, and might never be.
- Clone the repository.
- Copy or make symbolic links from the Leap.h, LeapMath.h and libLeap.dylib files to the
./vendor/
sub-directory. - Open the Xcode project and relocate the libLeap.dylib shared library so Xcode can find it.
- Take a look at the example, it should be fairly easy to understand how to set-up the callbacks.
Feel free to open a ticket or to send me an email camille@osculator.net.
/*
* C wrapper around the Leap Motion library.
* Copyright (c) 2013, Camille Troillard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS
* IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/