Permalink
Browse files

first commit - simple example of getting finger tips. will do an upda…

…te showing hand representation.
  • Loading branch information...
0 parents commit ec5bb07aa91772de185461c1df0dfaa6a8c4731d @ofTheo committed Jan 7, 2013
9 Project.xcconfig
@@ -0,0 +1,9 @@
+//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
+//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
+OF_PATH = ../../..
+
+//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
+#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
+
+OTHER_LDFLAGS = $(OF_CORE_LIBS)
+HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
0 bin/data/.gitkeep
No changes.
690 ofxLeapMotion.xcodeproj/project.pbxproj
@@ -0,0 +1,690 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; };
+ E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; };
+ E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; };
+ E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; };
+ E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; };
+ E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; };
+ E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; };
+ E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; };
+ E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; };
+ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; };
+ E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; };
+ E48D77601695DA7C00900C70 /* libLeap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E48D77571695DA7C00900C70 /* libLeap.dylib */; };
+ E48D77701695DB1B00900C70 /* libLeap.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = E48D77571695DA7C00900C70 /* libLeap.dylib */; };
+ E48D77731695DB2600900C70 /* ofxLeapMotion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E48D77721695DB2600900C70 /* ofxLeapMotion.cpp */; };
+ E48D783D1695F4B800900C70 /* ofxStrip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E48D783B1695F4B800900C70 /* ofxStrip.cpp */; };
+ E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; };
+ E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; };
+ E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; };
+ E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; };
+ E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; };
+ E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; };
+ E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */; };
+ E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E715D3B6510020DFD4 /* QTKit.framework */; };
+ E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7F985F515E0DE99003869B5 /* Accelerate.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = E4B27C1510CBEB8E00536013;
+ remoteInfo = openFrameworks;
+ };
+ E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = E4B27C1410CBEB8E00536013;
+ remoteInfo = openFrameworks;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ E478497916928FC00043D6F9 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 6;
+ files = (
+ E48D77701695DB1B00900C70 /* libLeap.dylib in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ E4C2427710CC5ABF004149E2 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = "<group>"; };
+ E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; };
+ E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
+ E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
+ E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
+ E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
+ E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+ E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
+ E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
+ E48D77501695DA7C00900C70 /* Leap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Leap.h; path = src/ofxLeapMotion/libs/include/Leap.h; sourceTree = SOURCE_ROOT; };
+ E48D77521695DA7C00900C70 /* LeapMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LeapMath.h; path = src/ofxLeapMotion/libs/include/LeapMath.h; sourceTree = SOURCE_ROOT; };
+ E48D77571695DA7C00900C70 /* libLeap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libLeap.dylib; path = src/ofxLeapMotion/libs/lib/osx/libLeap.dylib; sourceTree = SOURCE_ROOT; };
+ E48D77711695DB2600900C70 /* ofxLeapMotion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxLeapMotion.h; sourceTree = "<group>"; };
+ E48D77721695DB2600900C70 /* ofxLeapMotion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxLeapMotion.cpp; sourceTree = "<group>"; };
+ E48D783B1695F4B800900C70 /* ofxStrip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofxStrip.cpp; path = src/ofxStrip/ofxStrip.cpp; sourceTree = SOURCE_ROOT; };
+ E48D783C1695F4B800900C70 /* ofxStrip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofxStrip.h; path = src/ofxStrip/ofxStrip.h; sourceTree = SOURCE_ROOT; };
+ E4B69B5B0A3A1756003C02F2 /* ofxLeapMotionExampleDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ofxLeapMotionExampleDebug.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; };
+ E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; };
+ E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; };
+ E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = "<group>"; };
+ E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+ E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; };
+ E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = "<group>"; };
+ E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = "<absolute>"; };
+ E7E077E715D3B6510020DFD4 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
+ E7F985F515E0DE99003869B5 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = "<absolute>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ E4B69B590A3A1756003C02F2 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */,
+ E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */,
+ E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */,
+ E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */,
+ E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */,
+ E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */,
+ E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */,
+ E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */,
+ E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */,
+ E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */,
+ E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */,
+ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */,
+ E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */,
+ E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */,
+ E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */,
+ E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */,
+ E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */,
+ E48D77601695DA7C00900C70 /* libLeap.dylib in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ BB4B014C10F69532006C3DED /* addons */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = addons;
+ sourceTree = "<group>";
+ };
+ BBAB23C913894ECA00AA2426 /* system frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ E7F985F515E0DE99003869B5 /* Accelerate.framework */,
+ E4C2424410CC5A17004149E2 /* AppKit.framework */,
+ E4C2424510CC5A17004149E2 /* Cocoa.framework */,
+ E4C2424610CC5A17004149E2 /* IOKit.framework */,
+ E45BE9710E8CC7DD009D7055 /* AGL.framework */,
+ E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */,
+ E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */,
+ E45BE9740E8CC7DD009D7055 /* Carbon.framework */,
+ E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */,
+ E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */,
+ E45BE9770E8CC7DD009D7055 /* CoreServices.framework */,
+ E45BE9790E8CC7DD009D7055 /* OpenGL.framework */,
+ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */,
+ E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */,
+ E7E077E715D3B6510020DFD4 /* QTKit.framework */,
+ );
+ name = "system frameworks";
+ sourceTree = "<group>";
+ };
+ BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ BBAB23BE13894E4700AA2426 /* GLUT.framework */,
+ );
+ name = "3rd party frameworks";
+ sourceTree = "<group>";
+ };
+ E4328144138ABC890047C5CB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ E4328148138ABC890047C5CB /* openFrameworksDebug.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ E45BE5980E8CC70C009D7055 /* frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */,
+ BBAB23C913894ECA00AA2426 /* system frameworks */,
+ );
+ name = frameworks;
+ sourceTree = "<group>";
+ };
+ E48D774D1695DA7C00900C70 /* ofxLeapMotion */ = {
+ isa = PBXGroup;
+ children = (
+ E48D774E1695DA7C00900C70 /* libs */,
+ E48D775D1695DA7C00900C70 /* src */,
+ );
+ name = ofxLeapMotion;
+ path = src/ofxLeapMotion;
+ sourceTree = SOURCE_ROOT;
+ };
+ E48D774E1695DA7C00900C70 /* libs */ = {
+ isa = PBXGroup;
+ children = (
+ E48D774F1695DA7C00900C70 /* include */,
+ E48D77551695DA7C00900C70 /* lib */,
+ );
+ name = libs;
+ path = src/ofxLeapMotion/libs;
+ sourceTree = SOURCE_ROOT;
+ };
+ E48D774F1695DA7C00900C70 /* include */ = {
+ isa = PBXGroup;
+ children = (
+ E48D77501695DA7C00900C70 /* Leap.h */,
+ E48D77521695DA7C00900C70 /* LeapMath.h */,
+ );
+ name = include;
+ path = src/ofxLeapMotion/libs/include;
+ sourceTree = SOURCE_ROOT;
+ };
+ E48D77551695DA7C00900C70 /* lib */ = {
+ isa = PBXGroup;
+ children = (
+ E48D77561695DA7C00900C70 /* osx */,
+ );
+ name = lib;
+ path = src/ofxLeapMotion/libs/lib;
+ sourceTree = SOURCE_ROOT;
+ };
+ E48D77561695DA7C00900C70 /* osx */ = {
+ isa = PBXGroup;
+ children = (
+ E48D77571695DA7C00900C70 /* libLeap.dylib */,
+ );
+ name = osx;
+ path = src/ofxLeapMotion/libs/lib/osx;
+ sourceTree = SOURCE_ROOT;
+ };
+ E48D775D1695DA7C00900C70 /* src */ = {
+ isa = PBXGroup;
+ children = (
+ E48D77721695DB2600900C70 /* ofxLeapMotion.cpp */,
+ E48D77711695DB2600900C70 /* ofxLeapMotion.h */,
+ );
+ name = src;
+ path = src/ofxLeapMotion/src;
+ sourceTree = SOURCE_ROOT;
+ };
+ E48D783A1695F4B800900C70 /* ofxStrip */ = {
+ isa = PBXGroup;
+ children = (
+ E48D783B1695F4B800900C70 /* ofxStrip.cpp */,
+ E48D783C1695F4B800900C70 /* ofxStrip.h */,
+ );
+ name = ofxStrip;
+ path = src/ofxStrip;
+ sourceTree = SOURCE_ROOT;
+ };
+ E4B69B4A0A3A1720003C02F2 = {
+ isa = PBXGroup;
+ children = (
+ E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */,
+ E4EB6923138AFD0F00A09F29 /* Project.xcconfig */,
+ E4B69E1C0A3A1BDC003C02F2 /* src */,
+ E4EEC9E9138DF44700A80321 /* openFrameworks */,
+ BB4B014C10F69532006C3DED /* addons */,
+ E45BE5980E8CC70C009D7055 /* frameworks */,
+ E4B69B5B0A3A1756003C02F2 /* ofxLeapMotionExampleDebug.app */,
+ );
+ sourceTree = "<group>";
+ };
+ E4B69E1C0A3A1BDC003C02F2 /* src */ = {
+ isa = PBXGroup;
+ children = (
+ E48D783A1695F4B800900C70 /* ofxStrip */,
+ E48D774D1695DA7C00900C70 /* ofxLeapMotion */,
+ E4B69E1D0A3A1BDC003C02F2 /* main.cpp */,
+ E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */,
+ E4B69E1F0A3A1BDC003C02F2 /* testApp.h */,
+ );
+ path = src;
+ sourceTree = SOURCE_ROOT;
+ };
+ E4EEC9E9138DF44700A80321 /* openFrameworks */ = {
+ isa = PBXGroup;
+ children = (
+ E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */,
+ E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */,
+ );
+ name = openFrameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ E4B69B5A0A3A1756003C02F2 /* ofxLeapMotionExample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "ofxLeapMotionExample" */;
+ buildPhases = (
+ E4B69B580A3A1756003C02F2 /* Sources */,
+ E4B69B590A3A1756003C02F2 /* Frameworks */,
+ E4B6FFFD0C3F9AB9008CF71C /* ShellScript */,
+ E4C2427710CC5ABF004149E2 /* CopyFiles */,
+ E478497916928FC00043D6F9 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ E4EEB9AC138B136A00A80321 /* PBXTargetDependency */,
+ );
+ name = ofxLeapMotionExample;
+ productName = myOFApp;
+ productReference = E4B69B5B0A3A1756003C02F2 /* ofxLeapMotionExampleDebug.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ E4B69B4C0A3A1720003C02F2 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofxLeapMotion" */;
+ compatibilityVersion = "Xcode 2.4";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = E4B69B4A0A3A1720003C02F2;
+ productRefGroup = E4B69B4A0A3A1720003C02F2;
+ projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = E4328144138ABC890047C5CB /* Products */;
+ ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
+ },
+ );
+ projectRoot = "";
+ targets = (
+ E4B69B5A0A3A1756003C02F2 /* ofxLeapMotionExample */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+ E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = openFrameworksDebug.a;
+ remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"; install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ E4B69B580A3A1756003C02F2 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */,
+ E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */,
+ E48D77731695DB2600900C70 /* ofxLeapMotion.cpp in Sources */,
+ E48D783D1695F4B800900C70 /* ofxStrip.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = openFrameworks;
+ targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ E4B69B4E0A3A1720003C02F2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(NATIVE_ARCH)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
+ COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
+ GCC_AUTO_VECTORIZATION = YES;
+ GCC_ENABLE_SSE3_EXTENSIONS = YES;
+ GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
+ GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+ GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
+ GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+ GCC_WARN_UNINITIALIZED_AUTOS = NO;
+ GCC_WARN_UNUSED_VALUE = NO;
+ GCC_WARN_UNUSED_VARIABLE = NO;
+ HEADER_SEARCH_PATHS = (
+ "$(OF_CORE_HEADERS)",
+ src,
+ );
+ OTHER_CPLUSPLUSFLAGS = (
+ "-D__MACOSX_CORE__",
+ "-lpthread",
+ "-mtune=native",
+ );
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ E4B69B4F0A3A1720003C02F2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(NATIVE_ARCH)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
+ COPY_PHASE_STRIP = YES;
+ DEAD_CODE_STRIPPING = YES;
+ GCC_AUTO_VECTORIZATION = YES;
+ GCC_ENABLE_SSE3_EXTENSIONS = YES;
+ GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
+ GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_UNROLL_LOOPS = YES;
+ GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+ GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
+ GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+ GCC_WARN_UNINITIALIZED_AUTOS = NO;
+ GCC_WARN_UNUSED_VALUE = NO;
+ GCC_WARN_UNUSED_VARIABLE = NO;
+ HEADER_SEARCH_PATHS = (
+ "$(OF_CORE_HEADERS)",
+ src,
+ );
+ OTHER_CPLUSPLUSFLAGS = (
+ "-D__MACOSX_CORE__",
+ "-lpthread",
+ "-mtune=native",
+ );
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ E4B69B600A3A1757003C02F2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\"";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = NONE;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ INFOPLIST_FILE = "openFrameworks-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_52)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/src/leap/lib/macosx\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/src/leap/lib/msw\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/Leap_SDK/lib/libc++\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/Leap_SDK/lib\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/src/leap/lib/macosx\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/src/ofxLeapMotion/libs/lib/osx\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7 = "\"$(SRCROOT)/src/ofxLeapMotion/libs/lib/vs2010\"";
+ PREBINDING = NO;
+ PRODUCT_NAME = "$(TARGET_NAME)Debug";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ E4B69B610A3A1757003C02F2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\"";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = NONE;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ INFOPLIST_FILE = "openFrameworks-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_2)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/src/ofxLeapMotion/libs/lib/osx\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/src/ofxLeapMotion/libs/lib/vs2010\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/src/leap/lib/macosx\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/src/leap/lib/msw\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/Leap_SDK/lib/libc++\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/Leap_SDK/lib\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/src/leap/lib/macosx\"";
+ PREBINDING = NO;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofxLeapMotion" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E4B69B4E0A3A1720003C02F2 /* Debug */,
+ E4B69B4F0A3A1720003C02F2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "ofxLeapMotionExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E4B69B600A3A1757003C02F2 /* Debug */,
+ E4B69B610A3A1757003C02F2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */;
+}
20 openFrameworks-Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.openFrameworks</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
16 src/main.cpp
@@ -0,0 +1,16 @@
+#include "ofMain.h"
+#include "testApp.h"
+#include "ofAppGlutWindow.h"
+
+//========================================================================
+int main( ){
+
+ ofAppGlutWindow window;
+ ofSetupOpenGL(&window, 1280, 960, OF_WINDOW); // <-------- setup the GL context
+
+ // this kicks off the running of my app
+ // can be OF_WINDOW or OF_FULLSCREEN
+ // pass in width and height too:
+ ofRunApp( new testApp());
+
+}
1,106 src/ofxLeapMotion/libs/include/Leap.h
@@ -0,0 +1,1106 @@
+/******************************************************************************\
+* Copyright (C) 2012 Leap Motion, Inc. All rights reserved. *
+* NOTICE: This developer release of Leap Motion, Inc. software is confidential *
+* and intended for very limited distribution. Parties using this software must *
+* accept the SDK Agreement prior to obtaining this software and related tools. *
+* This software is subject to copyright. *
+\******************************************************************************/
+
+#if !defined(__Leap_h__)
+#define __Leap_h__
+
+#include "LeapMath.h"
+
+#include <string>
+#include <vector>
+
+// Define integer types for Visual Studio 2005
+#if defined(_MSC_VER) && (_MSC_VER < 1600)
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+#else
+#include <stdint.h>
+#endif
+
+// Define Leap export macros
+#if defined(_WIN32) // Windows
+#if LEAP_API_INTERNAL
+#define LEAP_EXPORT
+#elif LEAP_API_IMPLEMENTATION
+#define LEAP_EXPORT __declspec(dllexport)
+#else
+#define LEAP_EXPORT __declspec(dllimport)
+#endif
+#define LEAP_EXPORT_CLASS
+#define LEAP_EXPORT_PLUGIN __declspec(dllexport)
+#elif defined(__APPLE__) // Mac OS
+#define LEAP_EXPORT __attribute__((visibility("default")))
+#define LEAP_EXPORT_CLASS __attribute__((visibility("default")))
+#define LEAP_EXPORT_PLUGIN __attribute__((visibility("default")))
+#else // GNU/Linux
+#define LEAP_EXPORT
+#define LEAP_EXPORT_CLASS
+#define LEAP_EXPORT_PLUGIN
+#endif
+
+namespace Leap {
+
+// Interface for internal use only
+class LEAP_EXPORT_CLASS Interface {
+ public:
+ struct Implementation {
+ LEAP_EXPORT virtual ~Implementation() {}
+ };
+ protected:
+ LEAP_EXPORT Interface(void* owner);
+ LEAP_EXPORT Interface(Implementation* reference, void* owner);
+ LEAP_EXPORT Interface(const Interface& rhs);
+ LEAP_EXPORT Interface& operator=(const Interface& rhs);
+ LEAP_EXPORT virtual ~Interface();
+ template<typename T> T* get() const { return static_cast<T*>(reference()); }
+ class SharedObject* m_object;
+ private:
+ LEAP_EXPORT Implementation* reference() const;
+};
+
+// Forward declarations for internal use only
+class PointableImplementation;
+class FingerImplementation;
+class ToolImplementation;
+class HandImplementation;
+class FrameImplementation;
+class ControllerImplementation;
+template<typename T> class ListBaseImplementation;
+
+// Forward declarations
+class PointableList;
+class FingerList;
+class ToolList;
+class Hand;
+class Frame;
+class Listener;
+
+/// The Pointable class reports the physical characteristics of a detected finger or tool.
+///
+/// Both fingers and tools are classified as Pointable objects. Use the Pointable::isFinger()
+/// function to determine whether a Pointable object represents a finger. Use the
+/// Pointable::isTool() function to determine whether a Pointable object represents a tool.
+/// The Leap classifies a detected entity as a tool when it is thinner, straighter, and longer
+/// than a typical finger.
+///
+/// Note that Pointable objects can be invalid, which means that they do not contain
+/// valid tracking data and do not correspond to a physical entity. Invalid Pointable
+/// objects can be the result of asking for a Pointable object using an ID from an
+/// earlier frame when no Pointable objects with that ID exist in the current frame.
+/// A Pointable object created from the Pointable constructor is also invalid.
+/// Test for validity with the Pointable::isValid() function.
+class Pointable : public Interface {
+ public:
+#if !defined(SWIG)
+ // For internal use only.
+ Pointable(PointableImplementation*);
+ // For internal use only.
+ Pointable(FingerImplementation*);
+ // For internal use only.
+ Pointable(ToolImplementation*);
+#endif
+
+ /// Constructs a Pointable object.
+ ///
+ /// An uninitialized pointable is considered invalid.
+ /// Get valid Pointable objects from a Frame or a Hand object.
+ LEAP_EXPORT Pointable();
+
+ /// A unique ID assigned to this Pointable object, whose value remains the
+ /// same across consecutive frames while the tracked finger or tool remains
+ /// visible. If tracking is lost (for example, when a finger is occluded by
+ /// another finger or when it is withdrawn from the Leap field of view), the
+ /// Leap may assign a new ID when it detects the entity in a future frame.
+ ///
+ /// Use the ID value with the Frame::pointable() function to find this
+ /// Pointable object in future frames.
+ ///
+ /// @returns The ID assigned to this Pointable object.
+ LEAP_EXPORT int32_t id() const;
+
+ /// The Frame associated with this Pointable object.
+ ///
+ /// @returns The associated Frame object, if available; otherwise,
+ /// an invalid Frame object is returned.
+ LEAP_EXPORT Frame frame() const;
+
+ /// The Hand associated with this finger or tool.
+ ///
+ /// @returns The associated Hand object, if available; otherwise,
+ /// an invalid Hand object is returned.
+ LEAP_EXPORT Hand hand() const;
+
+ /// The tip position in millimeters from the Leap origin.
+ ///
+ /// @returns The Vector containing the coordinates of the tip position.
+ LEAP_EXPORT Vector tipPosition() const;
+
+ /// The rate of change of the tip position in millimeters/second.
+ ///
+ /// @returns The Vector containing the coordinates of the tip velocity.
+ LEAP_EXPORT Vector tipVelocity() const;
+
+ /// The direction in which this finger or tool is pointing.
+ ///
+ /// The direction is expressed as a unit vector pointing in the same
+ /// direction as the tip.
+ ///
+ /// \image html images/Leap_Finger_Model.png
+ ///
+ /// @returns The Vector pointing in the same direction as the tip of this
+ /// Pointable object.
+ LEAP_EXPORT Vector direction() const;
+
+ /// The estimated width of the finger or tool in millimeters.
+ ///
+ /// The reported width is the average width of the visible portion of the
+ /// finger or tool from the hand to the tip. If the width isn't known,
+ /// then a value of 0 is returned.
+ ///
+ /// @returns The estimated width of this Pointable object.
+ LEAP_EXPORT float width() const;
+
+ /// The estimated length of the finger or tool in millimeters.
+ ///
+ /// The reported length is the visible length of the finger or tool from the
+ /// hand to tip. If the length isn't known, then a value of 0 is returned.
+ ///
+ /// @returns The estimated length of this Pointable object.
+ LEAP_EXPORT float length() const;
+
+ /// Whether or not the Pointable is believed to be a finger.
+ /// Fingers are generally shorter, thicker, and less straight than tools.
+ ///
+ /// @returns True, if this Pointable is classified as a finger.
+ LEAP_EXPORT bool isFinger() const;
+
+ /// Whether or not the Pointable is believed to be a tool.
+ /// Tools are generally longer, thinner, and straighter than fingers.
+ ///
+ /// @returns True, if this Pointable is classified as a tool.
+ LEAP_EXPORT bool isTool() const;
+
+ /// Reports whether this is a valid Pointable object.
+ ///
+ /// @returns True, if this Pointable object contains valid tracking data.
+ LEAP_EXPORT bool isValid() const;
+
+ /// Returns an invalid Pointable object.
+ ///
+ /// You can use the instance returned by this function in comparisons testing
+ /// whether a given Pointable instance is valid or invalid. (You can also use the
+ /// Pointable::isValid() function.)
+ ///
+ /// @returns The invalid Pointable instance.
+ LEAP_EXPORT static const Pointable& invalid();
+
+ /// Compare Pointable object equality.
+ /// Two Pointable objects are equal if and only if both Pointable objects represent the
+ /// exact same physical entities in the same frame and both Pointable objects are valid.
+ LEAP_EXPORT bool operator==(const Pointable&) const;
+
+ /// Compare Pointable object inequality.
+ /// Two Pointable objects are equal if and only if both Pointable objects represent the
+ /// exact same physical entities in the same frame and both Pointable objects are valid.
+ LEAP_EXPORT bool operator!=(const Pointable&) const;
+
+ /// Writes a brief, human readable description of the Pointable object to an output stream.
+ LEAP_EXPORT friend std::ostream& operator<<(std::ostream&, const Pointable&);
+
+ /// A string containing a brief, human readable description of the Pointable object.
+ ///
+ /// @returns A description of the Pointable object as a string.
+ LEAP_EXPORT std::string toString() const;
+};
+
+/// The Finger class represents a tracked finger.
+///
+/// Fingers are Pointable objects that the Leap has classified as a finger.
+/// Get valid Finger objects from a Frame or a Hand object.
+///
+/// Note that Finger objects can be invalid, which means that they do not contain
+/// valid tracking data and do not correspond to a physical finger. Invalid Finger
+/// objects can be the result of asking for a Finger object using an ID from an
+/// earlier frame when no Finger objects with that ID exist in the current frame.
+/// A Finger object created from the Finger constructor is also invalid.
+/// Test for validity with the Finger::isValid() function.
+class Finger : public Pointable {
+ public:
+#if !defined(SWIG)
+ // For internal use only.
+ Finger(FingerImplementation*);
+#endif
+
+ /// Constructs a Finger object.
+ ///
+ /// An uninitialized finger is considered invalid.
+ /// Get valid Finger objects from a Frame or a Hand object.
+ LEAP_EXPORT Finger();
+
+ /// If the specified Pointable object represents a finger, creates a copy
+ /// of it as a Finger object; otherwise, creates an invalid Finger object.
+ LEAP_EXPORT Finger(const Pointable&);
+
+ /// Returns an invalid Finger object.
+ ///
+ /// You can use the instance returned by this function in comparisons testing
+ /// whether a given Finger instance is valid or invalid. (You can also use the
+ /// Finger::isValid() function.)
+ ///
+ /// @returns The invalid Finger instance.
+ LEAP_EXPORT static const Finger& invalid();
+
+ /// A string containing a brief, human readable description of the Finger object.
+ ///
+ /// @returns A description of the Finger object as a string.
+ LEAP_EXPORT std::string toString() const;
+};
+
+/// The Tool class represents a tracked tool.
+///
+/// Tools are Pointable objects that the Leap has classified as a tool.
+/// Tools are longer, thinner, and straighter than a typical finger.
+/// Get valid Tool objects from a Frame or a Hand object.
+///
+/// \image html images/Leap_Tool.png
+///
+/// Note that Tool objects can be invalid, which means that they do not contain
+/// valid tracking data and do not correspond to a physical tool. Invalid Tool
+/// objects can be the result of asking for a Tool object using an ID from an
+/// earlier frame when no Tool objects with that ID exist in the current frame.
+/// A Tool object created from the Tool constructor is also invalid.
+/// Test for validity with the Tool::isValid() function.
+class Tool : public Pointable {
+ public:
+#if !defined(SWIG)
+ // For internal use only.
+ Tool(ToolImplementation*);
+#endif
+
+ /// Constructs a Tool object.
+ ///
+ /// An uninitialized tool is considered invalid.
+ /// Get valid Tool objects from a Frame or a Hand object.
+ LEAP_EXPORT Tool();
+
+ /// If the specified Pointable object represents a tool, creates a copy
+ /// of it as a Tool object; otherwise, creates an invalid Tool object.
+ LEAP_EXPORT Tool(const Pointable&);
+
+ /// Returns an invalid Tool object.
+ ///
+ /// You can use the instance returned by this function in comparisons testing
+ /// whether a given Tool instance is valid or invalid. (You can also use the
+ /// Tool::isValid() function.)
+ ///
+ /// @returns The invalid Tool instance.
+ LEAP_EXPORT static const Tool& invalid();
+
+ /// A string containing a brief, human readable description of the Tool object.
+ ///
+ /// @returns A description of the Tool object as a string.
+ LEAP_EXPORT std::string toString() const;
+};
+
+/// The Hand class reports the physical characteristics of a detected hand.
+///
+/// Hand tracking data includes a palm position and velocity; vectors for
+/// the palm normal and direction to the fingers; properties of a sphere fit
+/// to the hand; and lists of the attached fingers and tools.
+///
+/// Note that Hand objects can be invalid, which means that they do not contain
+/// valid tracking data and do not correspond to a physical entity. Invalid Hand
+/// objects can be the result of asking for a Hand object using an ID from an
+/// earlier frame when no Hand objects with that ID exist in the current frame.
+/// A Hand object created from the Hand constructor is also invalid.
+/// Test for validity with the Hand::isValid() function.
+class Hand : public Interface {
+ public:
+#if !defined(SWIG)
+ // For internal use only.
+ Hand(HandImplementation*);
+#endif
+
+ /// Constructs a Hand object.
+ ///
+ /// An uninitialized hand is considered invalid.
+ /// Get valid Hand objects from a Frame object.
+ LEAP_EXPORT Hand();
+
+ /// A unique ID assigned to this Hand object, whose value remains the same
+ /// across consecutive frames while the tracked hand remains visible. If
+ /// tracking is lost (for example, when a hand is occluded by another hand
+ /// or when it is withdrawn from or reaches the edge of the Leap field of view),
+ /// the Leap may assign a new ID when it detects the hand in a future frame.
+ ///
+ /// Use the ID value with the Frame::hand() function to find this Hand object
+ /// in future frames.
+ ///
+ /// @returns The ID of this hand.
+ LEAP_EXPORT int32_t id() const;
+
+ /// The Frame associated with this Hand.
+ ///
+ /// @returns The associated Frame object, if available; otherwise,
+ /// an invalid Frame object is returned.
+ LEAP_EXPORT Frame frame() const;
+
+ /// The list of Pointable objects (fingers and tools) detected in this frame
+ /// that are associated with this hand, given in arbitrary order. The list
+ /// can be empty if no fingers or tools associated with this hand are detected.
+ ///
+ /// Use the Pointable::isFinger() function to determine whether or not an
+ /// item in the list represents a finger. Use the Pointable::isTool() function
+ /// to determine whether or not an item in the list represents a tool.
+ /// You can also get only fingers using the Hand::fingers() function or
+ /// only tools using the Hand::tools() function.
+ ///
+ /// @returns The PointableList containing all Pointable objects associated with this hand.
+ LEAP_EXPORT PointableList pointables() const;
+
+ /// The Pointable object with the specified ID associated with this hand.
+ ///
+ /// Use the Hand::pointable() function to retrieve a Pointable object
+ /// associated with this hand using an ID value obtained from a previous frame.
+ /// This function always returns a Pointable object, but if no finger or tool
+ /// with the specified ID is present, an invalid Pointable object is returned.
+ ///
+ /// Note that ID values persist across frames, but only until tracking of a
+ /// particular object is lost. If tracking of a finger or tool is lost and subsequently
+ /// regained, the new Pointable object representing that finger or tool may have a
+ /// different ID than that representing the finger or tool in an earlier frame.
+ ///
+ /// @param id The ID value of a Pointable object from a previous frame.
+ /// @returns The Pointable object with the matching ID if one exists for this
+ /// hand in this frame; otherwise, an invalid Pointable object is returned.
+ LEAP_EXPORT Pointable pointable(int32_t id) const;
+
+ /// The list of Finger objects detected in this frame that are attached to
+ /// this hand, given in arbitrary order.
+ /// The list can be empty if no fingers attached to this hand are detected.
+ ///
+ /// @returns The FingerList containing all Finger objects attached to this hand.
+ LEAP_EXPORT FingerList fingers() const;
+
+ /// The Finger object with the specified ID attached to this hand.
+ ///
+ /// Use the Hand::finger() function to retrieve a Finger object attached to
+ /// this hand using an ID value obtained from a previous frame.
+ /// This function always returns a Finger object, but if no finger
+ /// with the specified ID is present, an invalid Finger object is returned.
+ ///
+ /// Note that ID values persist across frames, but only until tracking of a
+ /// particular object is lost. If tracking of a finger is lost and subsequently
+ /// regained, the new Finger object representing that finger may have a
+ /// different ID than that representing the finger in an earlier frame.
+ ///
+ /// @param id The ID value of a Finger object from a previous frame.
+ /// @returns The Finger object with the matching ID if one exists for this
+ /// hand in this frame; otherwise, an invalid Finger object is returned.
+ LEAP_EXPORT Finger finger(int32_t id) const;
+
+ /// The list of Tool objects detected in this frame that are held by this
+ /// hand, given in arbitrary order.
+ /// The list can be empty if no tools held by this hand are detected.
+ ///
+ /// @returns The ToolList containing all Tool objects held by this hand.
+ LEAP_EXPORT ToolList tools() const;
+
+ /// The Tool object with the specified ID held by this hand.
+ ///
+ /// Use the Hand::tool() function to retrieve a Tool object held by
+ /// this hand using an ID value obtained from a previous frame.
+ /// This function always returns a Tool object, but if no tool
+ /// with the specified ID is present, an invalid Tool object is returned.
+ ///
+ /// Note that ID values persist across frames, but only until tracking of a
+ /// particular object is lost. If tracking of a tool is lost and subsequently
+ /// regained, the new Tool object representing that tool may have a
+ /// different ID than that representing the tool in an earlier frame.
+ ///
+ /// @param id The ID value of a Tool object from a previous frame.
+ /// @returns The Tool object with the matching ID if one exists for this
+ /// hand in this frame; otherwise, an invalid Tool object is returned.
+ LEAP_EXPORT Tool tool(int32_t id) const;
+
+ /// The center position of the palm in millimeters from the Leap origin.
+ ///
+ /// @returns The Vector representing the coordinates of the palm position.
+ LEAP_EXPORT Vector palmPosition() const;
+
+ /// The rate of change of the palm position in millimeters/second.
+ ///
+ /// @returns The Vector representing the coordinates of the palm velocity.
+ LEAP_EXPORT Vector palmVelocity() const;
+
+ /// The normal vector to the palm. If your hand is flat, this vector will
+ /// point downward, or "out" of the front surface of your palm.
+ ///
+ /// \image html images/Leap_Palm_Vectors.png
+ ///
+ /// The direction is expressed as a unit vector pointing in the same
+ /// direction as the palm normal (that is, a vector orthogonal to the palm).
+ ///
+ /// @returns The Vector normal to the plane formed by the palm.
+ LEAP_EXPORT Vector palmNormal() const;
+
+ /// The direction from the palm position toward the fingers.
+ ///
+ /// The direction is expressed as a unit vector pointing in the same
+ /// direction as the directed line from the palm position to the fingers.
+ ///
+ /// @returns The Vector pointing from the palm position toward the fingers.
+ LEAP_EXPORT Vector direction() const;
+
+ /// The center of a sphere fit to the curvature of this hand.
+ ///
+ /// This sphere is placed roughly as if the hand were holding a ball.
+ ///
+ /// \image html images/Leap_Hand_Ball.png
+ ///
+ /// @returns The Vector representing the center position of the sphere.
+ LEAP_EXPORT Vector sphereCenter() const;
+
+ /// The radius of a sphere fit to the curvature of this hand.
+ ///
+ /// This sphere is placed roughly as if the hand were holding a ball. Thus the
+ /// size of the sphere decreases as the fingers are curled into a fist.
+ /// @returns The radius of the sphere in millimeters.
+ LEAP_EXPORT float sphereRadius() const;
+
+ /// Reports whether this is a valid Hand object.
+ ///
+ /// @returns True, if this Hand object contains valid tracking data.
+ LEAP_EXPORT bool isValid() const;
+
+ /// Returns an invalid Hand object.
+ ///
+ /// You can use the instance returned by this function in comparisons testing
+ /// whether a given Hand instance is valid or invalid. (You can also use the
+ /// Hand::isValid() function.)
+ ///
+ /// @returns The invalid Hand instance.
+ LEAP_EXPORT static const Hand& invalid();
+
+ /// Compare Hand object equality.
+ /// Two Hand objects are equal if and only if both Hand objects represent the
+ /// exact same physical hand in the same frame and both Hand objects are valid.
+ LEAP_EXPORT bool operator==(const Hand&) const;
+
+ /// Compare Hand object inequality.
+ /// Two Hand objects are equal if and only if both Hand objects represent the
+ /// exact same physical hand in the same frame and both Hand objects are valid.
+ LEAP_EXPORT bool operator!=(const Hand&) const;
+
+ /// Writes a brief, human readable description of the Hand object to an output stream.
+ LEAP_EXPORT friend std::ostream& operator<<(std::ostream&, const Hand&);
+
+ /// A string containing a brief, human readable description of the Hand object.
+ ///
+ /// @returns A description of the Hand as a string.
+ LEAP_EXPORT std::string toString() const;
+};
+
+// For internal use only.
+template<typename L, typename T>
+class ConstListIterator {
+ public:
+ ConstListIterator<L,T>(const L& list, int index) : m_list(list), m_index(index) {}
+
+ const T operator*() const { return m_list[m_index]; }
+ const ConstListIterator<L,T>& operator++() { ++m_index; return *this; }
+ bool operator!=(const ConstListIterator<L,T>& rhs) const { return m_index != rhs.m_index; }
+
+ private:
+ const L& m_list;
+ int m_index;
+};
+
+/// The PointableList class represents a list of Pointable objects.
+///
+/// Pointable objects include entities that can be pointed, such as fingers and tools.
+///
+/// Get a PointableList object by calling Frame::pointables().
+class PointableList : public Interface {
+ public:
+ // For internal use only.
+ PointableList(const ListBaseImplementation<Pointable>&);
+
+ /// Constructs an empty list of pointable entities.
+ LEAP_EXPORT PointableList();
+
+ /// Returns the number of pointable entities in this list.
+ /// @returns The number of pointable entities in this list.
+ LEAP_EXPORT int count() const;
+
+ /// Reports whether the list is empty.
+ /// @returns True, if the list has no members.
+ LEAP_EXPORT bool empty() const;
+
+ /// Access a list member by its position in the list.
+ /// @param index The zero-based list position index.
+ /// @returns The Pointable object at the specified index.
+ LEAP_EXPORT Pointable operator[](int index) const;
+
+ /// Appends the members of the specifed PointableList to this PointableList.
+ /// @param other A PointableList object containing Pointable objects
+ /// to append to the end of this PointableList.
+ LEAP_EXPORT PointableList& append(const PointableList& other);
+
+ /// Appends the members of the specifed FingerList to this PointableList.
+ /// @param other A FingerList object containing Finger objects
+ /// to append to the end of this PointableList.
+ LEAP_EXPORT PointableList& append(const FingerList& other);
+
+ /// Appends the members of the specifed ToolList to this PointableList.
+ /// @param other A ToolList object containing Tool objects
+ /// to append to the end of this PointableList.
+ LEAP_EXPORT PointableList& append(const ToolList& other);
+
+ /// A C++ iterator type for PointableList objects.
+ typedef ConstListIterator<PointableList, Pointable> const_iterator;
+
+ /// The C++ iterator set to the beginning of this PointableList.
+ LEAP_EXPORT const_iterator begin() const;
+
+ /// The C++ iterator set to the end of this PointableList.
+ LEAP_EXPORT const_iterator end() const;
+};
+
+/// The FingerList class represents a list of Finger objects.
+///
+/// Get a FingerList object by calling Frame::fingers().
+class FingerList : public Interface {
+ public:
+ // For internal use only.
+ FingerList(const ListBaseImplementation<Finger>&);
+
+ /// Constructs an empty list of fingers.
+ LEAP_EXPORT FingerList();
+
+ /// Returns the number of fingers in this list.
+ /// @returns The number of fingers in this list.
+ LEAP_EXPORT int count() const;
+
+ /// Reports whether the list is empty.
+ /// @returns True, if the list has no members.
+ LEAP_EXPORT bool empty() const;
+
+ /// Access a list member by its position in the list.
+ /// @param index The zero-based list position index.
+ /// @returns The Finger object at the specified index.
+ LEAP_EXPORT Finger operator[](int index) const;
+
+ /// Appends the members of the specifed FingerList to this FingerList.
+ /// @param other A FingerList object containing Finger objects
+ /// to append to the end of this FingerList.
+ LEAP_EXPORT FingerList& append(const FingerList& other);
+
+ /// A C++ iterator type for FingerList objects.
+ typedef ConstListIterator<FingerList, Finger> const_iterator;
+
+ /// The C++ iterator set to the beginning of this FingerList.
+ LEAP_EXPORT const_iterator begin() const;
+
+ /// The C++ iterator set to the end of this FingerList.
+ LEAP_EXPORT const_iterator end() const;
+
+ friend class PointableList;
+};
+
+/// The ToolList class represents a list of Tool objects.
+///
+/// Get a ToolList object by calling Frame::tools().
+class ToolList : public Interface {
+ public:
+ // For internal use only.
+ ToolList(const ListBaseImplementation<Tool>&);
+
+ /// Constructs an empty list of tools.
+ LEAP_EXPORT ToolList();
+
+ /// Returns the number of tools in this list.
+ /// @returns The number of tools in this list.
+ LEAP_EXPORT int count() const;
+
+ /// Reports whether the list is empty.
+ /// @returns True, if the list has no members.
+ LEAP_EXPORT bool empty() const;
+
+ /// Access a list member by its position in the list.
+ /// @param index The zero-based list position index.
+ /// @returns The Tool object at the specified index.
+ LEAP_EXPORT Tool operator[](int index) const;
+
+ /// Appends the members of the specifed ToolList to this ToolList.
+ /// @param other A ToolList object containing Tool objects
+ /// to append to the end of this ToolList.
+ LEAP_EXPORT ToolList& append(const ToolList& other);
+
+ /// A C++ iterator type for ToolList objects.
+ typedef ConstListIterator<ToolList, Tool> const_iterator;
+
+ /// The C++ iterator set to the beginning of this ToolList.
+ LEAP_EXPORT const_iterator begin() const;
+
+ /// The C++ iterator set to the end of this ToolList.
+ LEAP_EXPORT const_iterator end() const;
+
+ friend class PointableList;
+};
+
+/// The HandList class represents a list of Hand objects.
+///
+/// Get a HandList object by calling Frame::hands().
+class HandList : public Interface {
+ public:
+ // For internal use only.
+ HandList(const ListBaseImplementation<Hand>&);
+
+ /// Constructs an empty list of hands.
+ LEAP_EXPORT HandList();
+
+ /// Returns the number of hands in this list.
+ /// @returns The number of hands in this list.
+ LEAP_EXPORT int count() const;
+
+ /// Reports whether the list is empty.
+ /// @returns True, if the list has no members.
+ LEAP_EXPORT bool empty() const;
+
+ /// Access a list member by its position in the list.
+ /// @param index The zero-based list position index.
+ /// @returns The Hand object at the specified index.
+ LEAP_EXPORT Hand operator[](int index) const;
+
+ /// Appends the members of the specifed HandList to this HandList.
+ /// @param other A HandList object containing Hand objects
+ /// to append to the end of this HandList.
+ LEAP_EXPORT HandList& append(const HandList& other);
+
+ /// A C++ iterator type for this HandList objects.
+ typedef ConstListIterator<HandList, Hand> const_iterator;
+
+ /// The C++ iterator set to the beginning of this HandList.
+ LEAP_EXPORT const_iterator begin() const;
+
+ /// The C++ iterator set to the end of this HandList.
+ LEAP_EXPORT const_iterator end() const;
+};
+
+/// The Frame class represents a set of hand and finger tracking data detected
+/// in a single frame.
+///
+/// The Leap detects hands, fingers and tools within the tracking area, reporting
+/// their positions and orientations in frames generated at the Leap frame rate.
+///
+/// Access Frame objects through an instance of a Leap Controller. Implement a
+/// Listener subclass to receive a callback event when a new Frame is available.
+class Frame : public Interface {
+ public:
+#if !defined(SWIG)
+ // For internal use only.
+ Frame(FrameImplementation*);
+#endif
+
+ /// Constructs a Frame object.
+ ///
+ /// Frame instances created with this constructor are invalid.
+ /// Get valid Frame objects by calling the Controller::frame() function.
+ LEAP_EXPORT Frame();
+
+ /// A unique ID for this Frame. Consecutive frames processed by the Leap
+ /// have consecutive increasing values.
+ ///
+ /// @returns The frame ID.
+ LEAP_EXPORT int64_t id() const;
+
+ /// The frame capture time in microseconds elapsed since the Leap started.
+ ///
+ /// @returns The timestamp in microseconds.
+ LEAP_EXPORT int64_t timestamp() const;
+
+ /// The list of Hand objects detected in this frame, given in arbitrary order.
+ /// The list can be empty if no hands are detected.
+ ///
+ /// @returns The HandList containing all Hand objects detected in this frame.
+ LEAP_EXPORT HandList hands() const;
+
+ /// The Hand object with the specified ID in this frame.
+ ///
+ /// Use the Frame::hand() function to retrieve the Hand object from
+ /// this frame using an ID value obtained from a previous frame.
+ /// This function always returns a Hand object, but if no hand
+ /// with the specified ID is present, an invalid Hand object is returned.
+ ///
+ /// Note that ID values persist across frames, but only until tracking of a
+ /// particular object is lost. If tracking of a hand is lost and subsequently
+ /// regained, the new Hand object representing that physical hand may have
+ /// a different ID than that representing the physical hand in an earlier frame.
+ ///
+ /// @param id The ID value of a Hand object from a previous frame.
+ /// @returns The Hand object with the matching ID if one exists in this frame;
+ /// otherwise, an invalid Hand object is returned.
+ LEAP_EXPORT Hand hand(int32_t id) const;
+
+ /// The list of Pointable objects (fingers and tools) detected in this frame,
+ /// given in arbitrary order. The list can be empty if no fingers or tools are detected.
+ ///
+ /// @returns The PointableList containing all Pointable objects detected in this frame.
+ LEAP_EXPORT PointableList pointables() const;
+
+ /// The Pointable object with the specified ID in this frame.
+ ///
+ /// Use the Frame::pointable() function to retrieve the Pointable object from
+ /// this frame using an ID value obtained from a previous frame.
+ /// This function always returns a Pointable object, but if no finger or tool
+ /// with the specified ID is present, an invalid Pointable object is returned.
+ ///
+ /// Note that ID values persist across frames, but only until tracking of a
+ /// particular object is lost. If tracking of a finger or tool is lost and subsequently
+ /// regained, the new Pointable object representing that finger or tool may have
+ /// a different ID than that representing the finger or tool in an earlier frame.
+ ///
+ /// @param id The ID value of a Pointable object from a previous frame.
+ /// @returns The Pointable object with the matching ID if one exists in this frame;
+ /// otherwise, an invalid Pointable object is returned.
+ LEAP_EXPORT Pointable pointable(int32_t id) const;
+
+ /// The list of Finger objects detected in this frame, given in arbitrary order.
+ /// The list can be empty if no fingers are detected.
+ ///
+ /// @returns The FingerList containing all Finger objects detected in this frame.
+ LEAP_EXPORT FingerList fingers() const;
+
+ /// The Finger object with the specified ID in this frame.
+ ///
+ /// Use the Frame::finger() function to retrieve the Finger object from
+ /// this frame using an ID value obtained from a previous frame.
+ /// This function always returns a Finger object, but if no finger
+ /// with the specified ID is present, an invalid Finger object is returned.
+ ///
+ /// Note that ID values persist across frames, but only until tracking of a
+ /// particular object is lost. If tracking of a finger is lost and subsequently
+ /// regained, the new Finger object representing that physical finger may have
+ /// a different ID than that representing the finger in an earlier frame.
+ ///
+ /// @param id The ID value of a Finger object from a previous frame.
+ /// @returns The Finger object with the matching ID if one exists in this frame;
+ /// otherwise, an invalid Finger object is returned.
+ LEAP_EXPORT Finger finger(int32_t id) const;
+
+ /// The list of Tool objects detected in this frame, given in arbitrary order.
+ /// The list can be empty if no tools are detected.
+ ///
+ /// @returns The ToolList containing all Tool objects detected in this frame.
+ LEAP_EXPORT ToolList tools() const;
+
+ /// The Tool object with the specified ID in this frame.
+ ///
+ /// Use the Frame::tool() function to retrieve the Tool object from
+ /// this frame using an ID value obtained from a previous frame.
+ /// This function always returns a Tool object, but if no tool
+ /// with the specified ID is present, an invalid Tool object is returned.
+ ///
+ /// Note that ID values persist across frames, but only until tracking of a
+ /// particular object is lost. If tracking of a tool is lost and subsequently
+ /// regained, the new Tool object representing that tool may have a
+ /// different ID than that representing the tool in an earlier frame.
+ ///
+ /// @param id The ID value of a Tool object from a previous frame.
+ /// @returns The Tool object with the matching ID if one exists in this frame;
+ /// otherwise, an invalid Tool object is returned.
+ LEAP_EXPORT Tool tool(int32_t id) const;
+
+ /// Reports whether this Frame instance is valid.
+ ///
+ /// A valid Frame is one generated by the Leap::Controller object that contains
+ /// tracking data for all detected entities. An invalid Frame contains no
+ /// actual tracking data, but you can call its functions without risk of a
+ /// null pointer exception. The invalid Frame mechanism makes it more
+ /// convenient to track individual data across the frame history. For example,
+ /// you can invoke:
+ ///
+ /// \code{.cpp}
+ /// Finger finger = Controller::frame(n).finger(fingerID);
+ /// \endcode
+ ///
+ /// for an arbitrary Frame history value, "n", without first checking whether
+ /// frame(n) returned a null object. (You should still check that the
+ /// returned Finger instance is valid.)
+ ///
+ /// @returns True, if this is a valid Frame object; false otherwise.
+ LEAP_EXPORT bool isValid() const;
+
+ /// Returns an invalid Frame object.
+ ///
+ /// You can use the instance returned by this function in comparisons testing
+ /// whether a given Frame instance is valid or invalid. (You can also use the
+ /// Frame::isValid() function.)
+ ///
+ /// @returns The invalid Frame instance.
+ LEAP_EXPORT static const Frame& invalid();
+
+ /// Compare Frame object equality.
+ /// Two Frame objects are equal if and only if both Frame objects represent
+ /// the exact same frame of tracking data and both Frame objects are valid.
+ LEAP_EXPORT bool operator==(const Frame&) const;
+
+ /// Compare Frame object inequality.
+ /// Two Frame objects are equal if and only if both Frame objects represent
+ /// the exact same frame of tracking data and both Frame objects are valid.
+ LEAP_EXPORT bool operator!=(const Frame&) const;
+
+ /// Writes a brief, human readable description of the Frame object to an output stream.
+ LEAP_EXPORT friend std::ostream& operator<<(std::ostream&, const Frame&);
+
+ /// A string containing a brief, human readable description of the Frame object.
+ ///
+ /// @returns A description of the Frame as a string.
+ LEAP_EXPORT std::string toString() const;
+};
+
+/// The Config class provides access to Leap system configuration information.
+///
+/// Reserved for future use; the keys necessary to obtain configuration values
+/// are not yet documented.
+class Config : public Interface {
+ public:
+ /// Constructs a Config object.
+ LEAP_EXPORT Config();
+
+ /// Enumerates the possible data types for configuration values.
+ ///
+ /// The Config::type() function returns an item from the ValueType enumeration.
+ enum ValueType {
+ TYPE_UNKNOWN, ///< The data type is unknown.
+ TYPE_BOOLEAN, ///< A boolean value.
+ TYPE_INT32, ///< A 32-bit integer.
+ TYPE_INT64, ///< A 64-bit integer.
+ TYPE_UINT32, ///< A 32-bit unsigned integer.
+ TYPE_UINT64, ///< A 64-bit unsigned integer.
+ TYPE_FLOAT, ///< A floating-point number.
+ TYPE_DOUBLE, ///< A double precision floating-point number.
+ TYPE_STRING ///< A string of characters.
+ };
+
+ /// Reports the natural data type for the value related to the specified key.
+ ///
+ /// @param key The key for the looking up the value in the configuration dictionary.
+ /// @returns The native data type of the value, that is, the type that does not
+ /// require a data conversion.
+ LEAP_EXPORT ValueType type(const std::string& key) const;
+
+ /// Reports whether the value is an array of homogeneous objects. The type
+ /// of the objects in the array is returned using the Config::type() function.
+ LEAP_EXPORT bool isArray(const std::string& key) const;
+
+ /// Gets the boolean representation for the specified key.
+ LEAP_EXPORT bool getBool(const std::string& key) const;
+
+ /// Gets the 32-bit integer representation for the specified key.
+ LEAP_EXPORT int32_t getInt32(const std::string& key) const;
+
+ /// Gets the 64-bit integer representation for the specified key.
+ LEAP_EXPORT int64_t getInt64(const std::string& key) const;
+
+ /// Gets the unsigned 32-bit integer representation for the specified key.
+ LEAP_EXPORT uint32_t getUInt32(const std::string& key) const;
+
+ /// Gets the unsigned 64-bit integer representation for the specified key.
+ LEAP_EXPORT uint64_t getUInt64(const std::string& key) const;
+
+ /// Gets the floating point representation for the specified key.
+ LEAP_EXPORT float getFloat(const std::string& key) const;
+
+ /// Gets the double precision representation for the specified key.
+ LEAP_EXPORT double getDouble(const std::string& key) const;
+
+ /// Gets the string representation for the specified key.
+ LEAP_EXPORT std::string getString(const std::string& key) const;
+
+ /// Gets the boolean array representation for the specified key.
+ LEAP_EXPORT std::vector<bool> getBoolArray(const std::string& key) const;
+
+ /// Gets the 32-bit integer array representation for the specified key.
+ LEAP_EXPORT std::vector<int32_t> getInt32Array(const std::string& key) const;
+
+ /// Gets the 64-bit integer array representation for the specified key.
+ LEAP_EXPORT std::vector<int64_t> getInt64Array(const std::string& key) const;
+
+ /// Gets the unsigned 32-bit integer array representation for the specified key.
+ LEAP_EXPORT std::vector<uint32_t> getUInt32Array(const std::string& key) const;
+
+ /// Gets the unsigned 64-bit integer array representation for the specified key.
+ LEAP_EXPORT std::vector<uint64_t> getUInt64Array(const std::string& key) const;
+
+ /// Gets the floating point array representation for the specified key.
+ LEAP_EXPORT std::vector<float> getFloatArray(const std::string& key) const;
+
+ /// Gets the double precision array representation for the specified key.
+ LEAP_EXPORT std::vector<double> getDoubleArray(const std::string& key) const;
+
+ /// Gets the string array representation for the specified key.
+ LEAP_EXPORT std::vector<std::string> getStringArray(const std::string& key) const;
+};
+
+/// The Controller class is your main interface to the Leap device.
+///
+/// Create an instance of this Controller class to access frames of tracking
+/// data and configuration information. Frame data can be polled at any time
+/// using the Controller::frame() function. Call frame() or frame(0) to get the
+/// most recent frame. Set the history parameter to a positive integer to access
+/// previous frames. A controller stores up to 60 frames in its frame history.
+///
+/// Polling is an appropriate strategy for applications which already have an
+/// intrinsic update loop, such as a game. You can also add an instance of a
+/// subclass of Leap::Listener to the controller to handle events as they occur.
+/// The Leap dispatches events to the listener upon initialization and exiting,
+/// on connection changes, and when a new frame of tracking data is available.
+/// When these events occur, the controller object invokes the appropriate
+/// callback function defined in your subclass of Listener.
+///
+/// To access frames of tracking data as they become available:
+/// 1. Implement a subclass of the Listener class and override the
+/// Listener::onFrame() function.
+/// 2. In your Listener::onFrame() function, call the Controller::frame()
+/// function to access the newest frame of tracking data.
+/// 3. To start receiving frames, create a Controller object and add an instance
+/// of the Listener subclass to the Controller::addListener() function.
+///
+/// When an instance of a Listener subclass is added to a Controller object,
+/// it calls the Listener::onInit() function when the listener is ready for use.
+/// When a connection is established between the controller and the Leap, the
+/// controller calls the Listener::onConnect() function. At this point, your
+/// application will start receiving frames of data. The controller calls the
+/// Listener::onFrame() function each time a new frame is available. If the
+/// controller loses its connection with the Leap software or device for any
+/// reason, it calls the Listener::onDisconnect() function. If the listener is
+/// removed from the controller or the controller is destroyed, it calls the
+/// Listener::onExit() function. At that point, unless the listener is added to
+/// another controller again, it will no longer receive frames of tracking data.
+class Controller : public Interface {
+ public:
+#if !defined(SWIG)
+ // For internal use only.
+ Controller(ControllerImplementation*);
+#endif
+
+ /// Constructs a Controller object.
+ ///
+ /// When creating a Controller object, you may optionally pass in a
+ /// reference to an instance of a subclass of Leap::Listener. Alternatively,
+ /// you may add a listener using the Controller::addListener() function.
+ ///
+ /// @param listener An instance of Leap::Listener implementing the callback
+ /// functions for the Leap events you want to handle in your application.
+ LEAP_EXPORT Controller();
+ LEAP_EXPORT virtual ~Controller();
+ LEAP_EXPORT Controller(Listener& listener);
+
+ /// Adds a listener to this Controller.
+ ///
+ /// The Controller dispatches Leap events to each associated listener. The
+ /// order in which listener callback functions are invoked is arbitrary. If
+ /// you pass a listener to the Controller's constructor function, it is
+ /// automatically added to the list and can be removed with the
+ /// Controller::removeListener() function.
+ ///
+ /// @param listener A subclass of Leap::Listener implementing the callback
+ /// functions for the Leap events you want to handle in your application.
+ /// @returns Whether or not the listener was successfully added to the list
+ /// of listeners.
+ LEAP_EXPORT bool addListener(Listener& listener);
+
+ /// Remove a listener from the list of listeners that will receive Leap
+ /// events. A listener must be removed if its lifetime is shorter than the
+ /// controller to which it is listening.
+ ///
+ /// @param listener The listener to remove.
+ /// @returns Whether or not the listener was successfully removed from the
+ /// list of listeners.
+ LEAP_EXPORT bool removeListener(Listener& listener);
+
+ /// Returns a frame of tracking data from the Leap. Use the optional
+ /// history parameter to specify which frame to retrieve. Call frame() or
+ /// frame(0) to access the most recent frame; call frame(1) to access the
+ /// previous frame, and so on. If you use a history value greater than the
+ /// number of stored frames, then the controller returns an invalid frame.
+ ///
+ /// @param history The age of the frame to return, counting backwards from
+ /// the most recent frame (0) into the past and up to the maximum age (59).
+ /// @returns The specified frame; or, if no history parameter is specified,
+ /// the newest frame. If a frame is not available at the specified history
+ /// position, an invalid Frame is returned.
+ LEAP_EXPORT Frame frame(int history = 0) const;
+
+ /// Returns a Config object, which you can use to query the Leap system for
+ /// configuration information. Reserved for future use.
+ LEAP_EXPORT Config config() const;
+};
+
+/// The Listener class defines a set of callback functions that you can
+/// override in a subclass to respond to events dispatched by the Leap.
+///
+/// To handle Leap events, create an instance of a Listener subclass and assign
+/// it to the Controller instance. The Controller calls the relevant Listener
+/// callback function when an event occurs, passing in a reference to itself.
+/// You do not have to implement callbacks for events you do not want to handle.
+class Listener {
+ public:
+ /// Constructs a Listener object.
+ LEAP_EXPORT Listener() {}
+
+ /// Destructs this Listener object.
+ LEAP_EXPORT virtual ~Listener() {}
+
+ /// Called once, when this Listener object is newly added to a Controller.
+ ///
+ /// @param controller The Controller object invoking this callback function.
+ LEAP_EXPORT virtual void onInit(const Controller&) {}
+
+ /// Called when the Controller object connects to the Leap software, or when
+ /// this Listener object is added to a Controller that is alrady connected.
+ ///
+ /// @param controller The Controller object invoking this callback function.
+ LEAP_EXPORT virtual void onConnect(const Controller&) {}
+
+ /// Called when the Controller object disconnects from the Leap software.
+ /// The controller can disconnect when the Leap device is unplugged, the
+ /// user shuts the Leap software down, or the Leap software encounters an
+ /// unrecoverable error.
+ ///
+ /// @param controller The Controller object invoking this callback function.
+ LEAP_EXPORT virtual void onDisconnect(const Controller&) {}
+
+ /// Called when this Listener object is removed from the Controller object
+ /// or the controller is destroyed.
+ ///
+ /// @param controller The Controller object invoking this callback function.
+ LEAP_EXPORT virtual void onExit(const Controller&) {}
+
+ /// Called when a new frame of hand and finger tracking data is available.
+ /// Access the new frame data using the Controller::frame() function.
+ ///
+ /// Note, the Controller skips any pending onFrame events while your
+ /// onFrame handler executes. If your implementation takes too long to return,
+ /// one or more frames can be skipped. The Controller still inserts the skipped
+ /// frames into the frame history. You can access recent frames by setting
+ /// the history parameter when calling the Controller::frame() function.
+ /// You can determine if any pending onFrame events were skipped by comparing
+ /// the ID of the most recent frame with the ID of the last received frame.
+ ///
+ /// @param controller The Controller object invoking this callback function.
+ LEAP_EXPORT virtual void onFrame(const Controller&) {}
+};
+
+}
+
+#endif // __Leap_h__
643 src/ofxLeapMotion/libs/include/LeapMath.h
@@ -0,0 +1,643 @@
+/******************************************************************************\
+* Copyright (C) 2012 Leap Motion, Inc. All rights reserved. *
+* NOTICE: This developer release of Leap Motion, Inc. software is confidential *
+* and intended for very limited distribution. Parties using this software must *
+* accept the SDK Agreement prior to obtaining this software and related tools. *
+* This software is subject to copyright. *
+\******************************************************************************/
+
+#if !defined(__LeapMath_h__)
+#define __LeapMath_h__
+
+#include <cmath>
+#include <iostream>
+#include <sstream>
+
+namespace Leap {
+
+#ifndef PI
+/// The constant pi as a single precision floating point number.
+static const float PI = 3.1415926536f;
+/// The constant ratio to convert an angle measure from degrees to radians.
+/// Multiply a value in degrees by this constant to convert to radians.
+static const float DEG_TO_RAD = 0.0174532925f;
+/// The constant ratio to convert an angle measure from radians to degrees.
+/// Multiply a value in radians by this constant to convert to degrees.
+static const float RAD_TO_DEG = 57.295779513f;
+#endif
+
+/// The Vector struct represents a three-component mathematical vector or point
+/// such as a direction or position in three-dimensional space.
+///
+/// The Leap software employs a right-handed Cartesian coordinate system.
+/// Values given are in units of real-world millimeters. The origin is centered
+/// at the center of the Leap device. The x- and z-axes lie in the horizontal
+/// plane, with the x-axis running parallel to the long edge of the device.
+/// The y-axis is vertical, with positive values increasing upwards (in contrast
+/// to the downward orientation of most computer graphics coordinate systems).
+/// The z-axis has positive values increasing away from the computer screen.
+///
+/// \image html images/Leap_Axes.png
+struct Vector {
+ /// Creates a new Vector with all components set to zero.
+ Vector() :
+ x(0), y(0), z(0) {}
+
+ /// Creates a new Vector with the specified component values.
+ Vector(float _x, float _y, float _z) :
+ x(_x), y(_y), z(_z) {}
+
+ /// Copies the specified Vector.
+ Vector(const Vector& vector) :
+ x(vector.x), y(vector.y), z(vector.z) {}
+
+ /// The zero vector: (0, 0, 0)
+ static const Vector& zero() {
+ static Vector s_zero(0, 0, 0);
+ return s_zero;
+ }
+
+ /// The x-axis unit vector: (1, 0, 0)
+ static const Vector& xAxis() {
+ static Vector s_xAxis(1, 0, 0);
+ return s_xAxis;
+ }
+ /// The y-axis unit vector: (0, 1, 0)
+ static const Vector& yAxis() {
+ static Vector s_yAxis(0, 1, 0);
+ return s_yAxis;
+ }
+ /// The z-axis unit vector: (0, 0, 1)
+ static const Vector& zAxis() {
+ static Vector s_zAxis(0, 0, 1);
+ return s_zAxis;
+ }
+
+ /// The unit vector pointing left along the negative x-axis: (-1, 0, 0)
+ static const Vector& left() {
+ static Vector s_left(-1, 0, 0);
+ return s_left;
+ }
+ /// The unit vector pointing right along the positive x-axis: (1, 0, 0)
+ static const Vector& right() {
+ return xAxis();
+ }
+ /// The unit vector pointing down along the negative y-axis: (0, -1, 0)
+ static const Vector& down() {
+ static Vector s_down(0, -1, 0);
+ return s_down;
+ }
+ /// The unit vector pointing up along the positive x-axis: (0, 1, 0)
+ static const Vector& up() {
+ return yAxis();
+ }
+ /// The unit vector pointing forward along the negative z-axis: (0, 0, -1)
+ static const Vector& forward() {
+ static Vector s_forward(0, 0, -1);
+ return s_forward;
+ }
+ /// The unit vector pointing backward along the positive z-axis: (0, 0, 1)
+ static const Vector& backward() {
+ return zAxis();
+ }
+
+ /// The magnitude, or length, of this vector.
+ ///
+ /// The magnitude is the L2 norm, or Euclidean distance between the origin and
+ /// the point represented by the (x, y, z) components of this Vector object.
+ ///
+ /// @returns The length of this vector.
+ float magnitude() const {
+ return std::sqrt(x*x + y*y + z*z);
+ }
+
+ /// The square of the magnitude, or length, of this vector.
+ ///
+ /// @returns The square of the length of this vector.
+ float magnitudeSquared() const {
+ return x*x + y*y + z*z;
+ }
+
+ /// The distance between the point represented by this Vector
+ /// object and a point represented by the specified Vector object.
+ ///
+ /// @param other A Vector object.
+ /// @returns The distance from this point to the specified point.
+ float distanceTo(const Vector& other) const {
+ return std::sqrt((x - other.x)*(x - other.x) +
+ (y - other.y)*(y - other.y) +
+ (z - other.z)*(z - other.z));
+ }
+
+ /// The angle between this vector and the specified vector in radians.
+ ///
+ /// The angle is measured in the plane formed by the two vectors. The
+ /// angle returned is always the smaller of the two conjugate angles.
+ /// Thus <tt>A.angleTo(B) == B.angleTo(A)</tt> and is always a positive
+ /// value less than or equal to pi radians (180 degrees).
+ ///
+ /// If either vector has zero length, then this function returns zero.
+ ///
+ /// \image html images/Math_AngleTo.png
+ ///
+ /// @param other A Vector object.
+ /// @returns The angle between this vector and the specified vector in radians.
+ float angleTo(const Vector& other) const {
+ float denom = this->magnitudeSquared() * other.magnitudeSquared();
+ if (denom <= 0.0f) {
+ return 0.0f;
+ }
+ return std::acos(this->dot(other) / std::sqrt(denom));
+ }
+
+ /// The pitch angle in radians.
+ ///
+ /// Pitch is the angle between the negative z-axis and the projection of
+ /// the vector onto the y-z plane. In other words, pitch represents rotation
+ /// around the x-axis.
+ /// If the vector points upward, the returned angle is between 0 and pi radians
+ /// (180 degrees); if it points downward, the angle is between 0 and -pi radians.
+ ///
+ /// \image html images/Math_Pitch_Angle.png
+ ///
+ /// @returns The angle of this vector above or below the horizon (x-z plane).
+ float pitch() const {
+ return std::atan2(y, -z);
+ }
+
+ /// The yaw angle in radians.
+ ///
+ /// Yaw is the angle between the negative z-axis and the projection of
+ /// the vector onto the x-z plane. In other words, pitch represents rotation
+ /// around the y-axis. If the vector points to the right of the negative z-axis,
+ /// then the returned angle is between 0 and pi radians (180 degrees);
+ /// if it points to the left, the angle is between 0 and -pi radians.
+ ///
+ /// \image html images/Math_Yaw_Angle.png
+ ///
+ /// @returns The angle of this vector to the right or left of the negative z-axis.
+ float yaw() const {
+ return std::atan2(x, -z);
+ }
+
+ /// The roll angle in radians.
+ ///
+ /// Roll is the angle between the negative y-axis and the projection of
+ /// the vector onto the x-y plane. In other words, roll represents rotation
+ /// around the z-axis. If the vector points to the left of the negative y-axis,
+ /// then the returned angle is between 0 and pi radians (180 degrees);
+ /// if it points to the right, the angle is between 0 and -pi radians.
+ ///
+ /// \image html images/Math_Roll_Angle.png
+ ///
+ /// Use this function to get roll angle of the plane to which this vector is a
+ /// normal. For example, if this vector represents the normal to the palm,
+ /// then this function returns the tilt or roll of the palm plane compared
+ /// to the horizontal (x-z) plane.
+ ///
+ /// @returns The angle of this vector to the right or left of the y-axis.
+ float roll() const {
+ return std::atan2(x, -y);
+ }
+
+ /// The dot product of this vector with another vector.
+ ///
+ /// The dot product is the magnitude of the projection of this vector
+ /// onto the specified vector.
+ ///
+ /// \image html images/Math_Dot.png
+ ///
+ /// @param other A Vector object.
+ /// @returns The dot product of this vector and the specified vector.
+ float dot(const Vector& other) const {
+ return (x * other.x) + (y * other.y) + (z * other.z);
+ }
+
+ /// The cross product of this vector and the specified vector.
+ ///
+ /// The cross product is a vector orthogonal to both original vectors.
+ /// It has a magnitude equal to the area of a parallelogram having the
+ /// two vectors as sides. The direction of the returned vector is
+ /// determined by the right-hand rule. Thus <tt>A.cross(B) == -B.cross(A).</tt>
+ ///
+ /// \image html images/Math_Cross.png
+ ///
+ /// @param other A Vector object.
+ /// @returns The cross product of this vector and the specified vector.
+ Vector cross(const Vector& other) const {
+ return Vector((y * other.z) - (z * other.y),
+ (z * other.x) - (x * other.z),
+ (x * other.y) - (y * other.x));
+ }
+
+ /// A normalized copy of this vector.
+ ///
+ /// A normalized vector has the same direction as the original vector,
+ /// but with a length of one.
+ ///
+ /// @returns A Vector object with a length of one, pointing in the same
+ /// direction as this Vector object.
+ Vector normalized() const {
+ float denom = this->magnitudeSquared();
+ if (denom <= 0.0f) {
+ return Vector();
+ }
+ denom = 1.0f / std::sqrt(denom);
+ return Vector(x * denom, y * denom, z * denom);
+ }
+
+ /// A copy of this vector pointing in the opposite direction.
+ ///
+ /// @returns A Vector object with all components negated.
+ Vector operator-() const {
+ return Vector(-x, -y, -z);
+ }
+
+ /// Add vectors component-wise.
+ Vector operator+(const Vector& other) const {
+ return Vector(x + other.x, y + other.y, z + other.z);
+ }
+
+ /// Subtract vectors component-wise.
+ Vector operator-(const Vector& other) const {
+ return Vector(x - other.x, y - other.y, z - other.z);
+ }
+
+ /// Multiply vector by a scalar.
+ Vector operator*(float scalar) const {
+ return Vector(x * scalar, y * scalar, z * scalar);
+ }
+
+ /// Divide vector by a scalar.
+ Vector operator/(float scalar) const {
+ return Vector(x / scalar, y / scalar, z / scalar);
+ }
+
+ /// Multiply vector by a scalar on the left-hand side (C++ only).
+#if !defined(SWIG)
+ friend Vector operator*(float scalar, const Vector& vector) {
+ return Vector(vector.x * scalar, vector.y * scalar, vector.z * scalar);
+ }
+#endif
+
+ /// Add vectors component-wise and assign the sum.
+ Vector& operator+=(const Vector& other) {
+ x += other.x;
+ y += other.y;
+ z += other.z;
+ return *this;
+ }
+
+ /// Subtract vectors component-wise and assign the difference.
+ Vector& operator-=(const Vector& other) {
+ x -= other.x;
+ y -= other.y;
+ z -= other.z;
+ return *this;
+ }
+
+ /// Multiply vector by a scalar and assign the product.
+ Vector& operator*=(float scalar) {
+ x *= scalar;
+ y *= scalar;
+ z *= scalar;
+ return *this;
+ }
+
+ /// Divide vector by a scalar and assign the quotient.
+ Vector& operator/=(float scalar) {
+ x /= scalar;
+ y /= scalar;
+ z /= scalar;
+ return *this;
+ }
+
+ /// Returns a string containing this vector in a human readable format: (x, y, z).
+ std::string toString() const {
+ std::stringstream result;
+ result << "(" << x << ", " << y << ", " << z << ")";
+ return result.str();
+ }
+ /// Writes the vector to the output stream using a human readable format: (x, y, z).
+ friend std::ostream& operator<<(std::ostream& out, const Vector& vector) {
+ return out << vector.toString();
+ }
+
+ /// Compare Vector equality component-wise.
+ bool operator==(const Vector& other) const {
+ return x == other.x && y == other.y && z == other.z;
+ }
+ /// Compare Vector inequality component-wise.
+ bool operator!=(const Vector& other) const {
+ return x != other.x || y != other.y || z != other.z;
+ }
+
+ /// Index vector components numerically.
+ /// Index 0 is x, index 1 is y, and index 2 is z.
+ /// @returns The x, y, or z component of this Vector, if the specified index
+ /// value is at least 0 and at most 2; otherwise, returns zero.
+ float operator[](unsigned int index) const {
+ return index < 3 ? (&x)[index] : 0.0f;
+ }
+
+ /// Cast the vector to a float array.
+ const float* toFloatPointer() const {
+ return &x; /// Note: Assumes x, y, z are aligned in memory.
+ }
+
+ /// Convert a Leap::Vector to another 3-component Vector type.
+ ///
+ /// The specified type must define a constructor that takes the x, y, and z
+ /// components as separate parameters.
+ template<typename Vector3Type>
+ const Vector3Type toVector3() const {
+ return Vector3Type(x, y, z);
+ }
+
+ /// Convert a Leap::Vector to another 4-component Vector type.
+ ///
+ /// The specified type must define a constructor that takes the x, y, z, and w
+ /// components as separate parameters. (The homogenous coordinate, w, is set
+ /// to zero by default, but you should typically set it to one for vectors
+ /// representing a position.)
+ template<typename Vector4Type>
+ const Vector4Type toVector4(float w=0.0f) const {
+ return Vector4Type(x, y, z, w);
+ }
+
+ /// The horizontal component.
+ float x;
+ /// The vertical component.
+ float y;
+ /// The depth component.
+ float z;
+};
+
+
+/// The FloatArray struct is used to allow the returning of native float arrays
+/// without requiring dynamic memory allocation. It represents a matrix
+/// with a size up to 4x4.
+struct FloatArray {
+ /// Access the elements of the float array exactly like a native array
+ float& operator[] (unsigned int index) {
+ return m_array[index];
+ }
+
+ /// Use the Float Array anywhere a float pointer can be used
+ operator float* () {
+ return m_array;
+ }
+
+ /// An array containing up to 16 entries of the matrix
+ float m_array[16];
+};
+
+/// The Matrix struct represents a transformation matrix.
+///
+/// To use this struct to transform a Vector, construct a matrix containing the
+/// desired transformation and then use the Matrix::transformPoint() or
+/// Matrix::transformDirection() functions to apply the transform.
+///
+/// Transforms can be combined by multiplying two or more transform matrices using
+/// the * operator.
+struct Matrix
+{
+ /// Constructs an identity transformation matrix.
+ Matrix() :
+ xBasis(1, 0, 0),
+ yBasis(0, 1, 0),
+ zBasis(0, 0, 1),
+ origin(0, 0, 0) {
+ }
+
+ /// Constructs a copy of the specified Matrix object.
+ Matrix(const Matrix& other) :
+ xBasis(other.xBasis),
+ yBasis(other.yBasis),
+ zBasis(other.zBasis),
+ origin(other.origin) {
+ }
+
+ /// Constructs a transformation matrix from the specified basis vectors.
+ ///
+ /// @param _xBasis A Vector specifying rotation and scale factors for the x-axis.
+ /// @param _yBasis A Vector specifying rotation and scale factors for the y-axis.
+ /// @param _zBasis A Vector specifying rotation and scale factors for the z-axis.
+ Matrix(const Vector& _xBasis, const Vector& _yBasis, const Vector& _zBasis) :
+ xBasis(_xBasis),
+ yBasis(_yBasis),
+ zBasis(_zBasis),
+ origin(0, 0, 0) {
+ }
+
+ /// Constructs a transformation matrix from the specified basis and translation vectors.
+ ///
+ /// @param _xBasis A Vector specifying rotation and scale factors for the x-axis.
+ /// @param _yBasis A Vector specifying rotation and scale factors for the y-axis.
+ /// @param _zBasis A Vector specifying rotation and scale factors for the z-axis.
+ /// @param _origin A Vector specifying translation factors on all three axes.
+ Matrix(const Vector& _xBasis, const Vector& _yBasis, const Vector& _zBasis, const Vector& _origin) :
+ xBasis(_xBasis),
+ yBasis(_yBasis),
+ zBasis(_zBasis),
+ origin(_origin) {
+ }
+
+ /// Constructs a transformation matrix specifying a rotation around the specified vector.
+ ///
+ /// @param axis A Vector specifying the axis of rotation.
+ /// @param angleRadians The amount of rotation in radians.
+ Matrix(const Vector& axis, float angleRadians) :
+ origin(0, 0, 0) {
+ setRotation(axis, angleRadians);
+ }
+
+ /// Constructs a transformation matrix specifying a rotation around the specified vector
+ /// and a translation by the specified vector.
+ ///
+ /// @param axis A Vector specifying the axis of rotation.
+ /// @param angleRadians The angle of rotation in radians.
+ /// @param translation A Vector representing the translation part of the transform.
+ Matrix(const Vector& axis, float angleRadians, const Vector& translation)
+ : origin(translation) {
+ setRotation(axis, angleRadians);
+ }
+
+ /// Returns the identity matrix specifying no translation, rotation, and scale.
+ ///
+ /// @returns The identity matrix.
+ static const Matrix& identity() {
+ static Matrix s_identity;
+ return s_identity;
+ }
+
+ /// Sets this transformation matrix to represent a rotation around the specified vector.
+ ///
+ /// This function erases any previous rotation and scale transforms applied
+ /// to this matrix, but does not affect translation.
+ ///
+ /// @param _axis A Vector specifying the axis of rotation.
+ /// @param angleRadians The amount of rotation in radians.
+ void setRotation(const Vector& _axis, float angleRadians) {
+ const Vector axis = _axis.normalized();
+ const float s = std::sin(angleRadians);
+ const float c = std::cos(angleRadians);
+ const float C = (1-c);
+
+ xBasis = Vector(axis[0]*axis[0]*C + c, axis[0]*axis[1]*C - axis[2]*s, axis[0]*axis[2]*C + axis[1]*s);
+ yBasis = Vector(axis[1]*axis[0]*C + axis[2]*s, axis[1]*axis[1]*C + c, axis[1]*axis[2]*C - axis[0]*s);
+ zBasis = Vector(axis[2]*axis[0]*C - axis[1]*s, axis[2]*axis[1]*C + axis[0]*s, axis[2]*axis[2]*C + c);
+ }
+
+ /// Transforms a vector with this matrix by transforming its rotation,
+ /// scale, and translation.
+ ///
+ /// Translation is applied after rotation and scale.
+ ///
+ /// @param in The Vector to transform.
+ /// @returns A new Vector representing the transformed original.
+ Vector transformPoint(const Vector& in) const {
+ return xBasis*in.x + yBasis*in.y + zBasis*in.z + origin;
+ }
+
+ /// Transforms a vector with this matrix by transforming its rotation and
+ /// scale only.
+ ///
+ /// @param in The Vector to transform.
+ /// @returns A new Vector representing the transformed original.
+ Vector transformDirection(const Vector& in) const {
+ return xBasis*in.x + yBasis*in.y + zBasis*in.z;
+ }
+
+ /// Multiply transform matrices.
+ ///
+ /// Combines two transformations into a single equivalent transformation.
+ ///
+ /// @param in A Matrix to multiply on the right hand side.
+ /// @returns A new Matrix representing the transformation equivalent to
+ /// applying the other transformation followed by this transformation.
+ Matrix operator*(const Matrix& other) const {
+ return Matrix(transformDirection(other.xBasis),
+ transformDirection(other.yBasis),
+ transformDirection(other.zBasis),
+ transformPoint(other.origin));
+ }
+
+ /// Multiply transform matrices and assign the product.
+ Matrix& operator*=(const Matrix& other) {
+ return (*this) = (*this) * other;
+ }
+
+ /// Compare Matrix equality component-wise.
+ bool operator==(const Matrix& other) const {
+ return xBasis == other.xBasis &&
+ yBasis == other.yBasis &&
+ zBasis == other.zBasis &&
+ origin == other.origin;
+ }
+ /// Compare Matrix inequality component-wise.
+ bool operator!=(const Matrix& other) const {
+ return xBasis != other.xBasis ||
+ yBasis != other.yBasis ||
+ zBasis != other.zBasis ||
+ origin != other.origin;
+ }
+
+ /// Convert a Leap::Matrix object to another 3x3 matrix type.
+ ///
+ /// The new type must define a constructor function that takes each matrix
+ /// element as a parameter in row-major order.
+ ///
+ /// Translation factors are discarded.
+ template<typename Matrix3x3Type>
+ const Matrix3x3Type toMatrix3x3() const {
+ return Matrix3x3Type(xBasis.x, xBasis.y, xBasis.z,
+ yBasis.x, yBasis.y, yBasis.z,
+ zBasis.x, zBasis.y, zBasis.z);
+ }
+
+ /// Convert a Leap::Matrix object to another 4x4 matrix type.
+ ///
+ /// The new type must define a constructor function that takes each matrix
+ /// element as a parameter in row-major order.
+ template<typename Matrix4x4Type>
+ const Matrix4x4Type toMatrix4x4() const {
+ return Matrix4x4Type(xBasis.x, xBasis.y, xBasis.z, 0.0f,
+ yBasis.x, yBasis.y, yBasis.z, 0.0f,
+ zBasis.x, zBasis.y, zBasis.z, 0.0f,
+ origin.x, origin.y, origin.z, 1.0f);
+ }
+
+ /// Writes the 3x3 Matrix object to a 9 element row-major float or
+ /// double array.
+ ///
+ /// Translation factors are discarded.
+ ///
+ /// Returns a pointer to the same data.
+ template<typename T>
+ T* toArray3x3(T* output) const {
+ output[0] = xBasis.x; output[1] = xBasis.y; output[2] = xBasis.z;
+ output[3] = yBasis.x; output[4] = yBasis.y; output[5] = yBasis.z;
+ output[6] = zBasis.x; output[7] = zBasis.y; output[8] = zBasis.z;
+ return output;
+ }
+
+ /// Convert a 3x3 Matrix object to a 9 element row-major float array.
+ ///
+ /// Translation factors are discarded.
+ ///
+ /// Returns a FloatArray struct to avoid dynamic memory allocation.
+ FloatArray toArray3x3() const {
+ FloatArray output;
+ toArray3x3((float*)output);
+ return output;
+ }
+
+ /// Writes the 4x4 Matrix object to a 16 element row-major float
+ /// or double array.
+ ///
+ /// Returns a pointer to the same data.
+ template<typename T>
+ T* toArray4x4(T* output) const {
+ output[0] = xBasis.x; output[1] = xBasis.y; output[2] = xBasis.z; output[3] = 0.0f;
+ output[4] = yBasis.x; output[5] = yBasis.y; output[6] = yBasis.z; output[7] = 0.0f;
+ output[8] = zBasis.x; output[9] = zBasis.y; output[10] = zBasis.z; output[11] = 0.0f;
+ output[12] = origin.x; output[13] = origin.y; output[14] = origin.z; output[15] = 1.0f;
+ return output;
+ }
+
+ /// Convert a 4x4 Matrix object to a 16 element row-major float array.
+ ///
+ /// Returns a FloatArray struct to avoid dynamic memory allocation.
+ FloatArray toArray4x4() const {
+ FloatArray output;
+ toArray4x4((float*)output);
+ return output;
+ }
+
+ /// Write the matrix to a string in a human readable format.
+ std::string toString() const {
+ std::stringstream result;
+ result << "xBasis:" << xBasis.toString() << " yBasis:" << yBasis.toString()
+ << " zBasis:" << zBasis.toString() << " origin:" << origin.toString();
+ return result.str();
+ }
+
+ /// Write the matrix to an output stream in a human readable format.
+ friend std::ostream& operator<<(std::ostream& out, const Matrix& matrix) {
+ return out << matrix.toString();
+ }
+
+ /// The rotation and scale factors for the x-axis.
+ Vector xBasis;
+ /// The rotation and scale factors for the y-axis.
+ Vector yBasis;
+ /// The rotation and scale factors for the z-axis.
+ Vector zBasis;
+ /// The translation factors for all three axes.
+ Vector origin;
+};
+
+}; // namespace Leap
+
+#endif // __LeapMath_h__
BIN src/ofxLeapMotion/libs/lib/osx/libLeap.dylib
Binary file not shown.
BIN src/ofxLeapMotion/libs/lib/vs2010/Leap.dll
Binary file not shown.
BIN src/ofxLeapMotion/libs/lib/vs2010/Leap.lib
Binary file not shown.
BIN src/ofxLeapMotion/libs/lib/vs2010/Leapd.dll
Binary file not shown.
BIN src/ofxLeapMotion/libs/lib/vs2010/Leapd.lib
Binary file not shown.
11 src/ofxLeapMotion/src/ofxLeapMotion.cpp
@@ -0,0 +1,11 @@
+/*
+ * ofxLeapMotion.cpp
+ * ofxLeapMotion
+ *
+ * Created by theo on 1/3/13.
+ * Copyright 2013 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#include "ofxLeapMotion.h"
+
175 src/ofxLeapMotion/src/ofxLeapMotion.h
@@ -0,0 +1,175 @@
+//ofxLeapMotion - Written by Theo Watson - http://theowatson.com
+//Work in progress lightweight wrapper for Leap Motion SDK
+//Simple interface to start with. Subject to change.
+