├── cinderblock.png ├── lib ├── msw │ ├── x64 │ │ ├── Leap.dll │ │ └── Leap.lib │ └── x86 │ │ ├── Leap.dll │ │ └── Leap.lib └── macosx │ └── libLeap.dylib ├── samples ├── UiApp │ ├── resources │ │ ├── grab.png │ │ ├── hand.png │ │ ├── touch.png │ │ ├── track.png │ │ ├── slider.png │ │ ├── button_off.png │ │ └── button_on.png │ ├── vc2013 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── UiApp.sln │ │ └── UiApp.vcxproj.filters │ ├── vc2015 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── UiApp.sln │ │ └── UiApp.vcxproj.filters │ ├── xcode │ │ ├── CinderApp.icns │ │ ├── UiApp_Prefix.pch │ │ ├── UiApp.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ └── Info.plist │ ├── include │ │ └── Resources.h │ └── src │ │ └── UiApp.cpp ├── ImageApp │ ├── vc2013 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── ImageApp.sln │ │ └── ImageApp.vcxproj.filters │ ├── vc2015 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── ImageApp.sln │ │ └── ImageApp.vcxproj.filters │ ├── xcode │ │ ├── CinderApp.icns │ │ ├── ImageApp_Prefix.pch │ │ ├── ImageApp.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ └── Info.plist │ └── src │ │ └── ImageApp.cpp ├── LeapApp │ ├── vc2013 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── LeapApp.sln │ │ ├── LeapApp.vcxproj.filters │ │ └── LeapApp.vcxproj │ ├── vc2015 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── LeapApp.sln │ │ ├── LeapApp.vcxproj.filters │ │ └── LeapApp.vcxproj │ ├── xcode │ │ ├── CinderApp.icns │ │ ├── LeapApp_Prefix.pch │ │ ├── LeapApp.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ └── Info.plist │ └── src │ │ └── LeapApp.cpp ├── GestureApp │ ├── vc2013 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── GestureApp.sln │ │ ├── GestureApp.vcxproj.filters │ │ └── GestureApp.vcxproj │ ├── vc2015 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── GestureApp.sln │ │ └── GestureApp.vcxproj.filters │ └── xcode │ │ ├── CinderApp.icns │ │ ├── GestureApp_Prefix.pch │ │ ├── GestureApp.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── Info.plist ├── MotionApp │ ├── vc2013 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── MotionApp.sln │ │ ├── MotionApp.vcxproj.filters │ │ └── MotionApp.vcxproj │ ├── vc2015 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── MotionApp.sln │ │ └── MotionApp.vcxproj.filters │ ├── xcode │ │ ├── CinderApp.icns │ │ ├── MotionApp_Prefix.pch │ │ ├── MotionApp.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ └── Info.plist │ └── src │ │ └── MotionApp.cpp ├── TracerApp │ ├── vc2013 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── TracerApp.sln │ │ └── TracerApp.vcxproj.filters │ ├── vc2015 │ │ ├── Resources.rc │ │ ├── cinder_app_icon.ico │ │ ├── TracerApp.sln │ │ └── TracerApp.vcxproj.filters │ ├── xcode │ │ ├── CinderApp.icns │ │ ├── TracerApp_Prefix.pch │ │ ├── TracerApp.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ └── Info.plist │ ├── include │ │ ├── Resources.h │ │ └── Ribbon.h │ ├── resources │ │ ├── pass_through.vert │ │ └── blur.frag │ └── src │ │ ├── Ribbon.cpp │ │ └── TracerApp.cpp └── SkeletalApp │ ├── vc2013 │ ├── Resources.rc │ ├── cinder_app_icon.ico │ ├── SkeletalApp.sln │ ├── SkeletalApp.vcxproj.filters │ └── SkeletalApp.vcxproj │ ├── vc2015 │ ├── Resources.rc │ ├── cinder_app_icon.ico │ ├── SkeletalApp.sln │ └── SkeletalApp.vcxproj.filters │ ├── xcode │ ├── CinderApp.icns │ ├── SkeletalApp_Prefix.pch │ ├── SkeletalApp.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── Info.plist │ └── src │ └── SkeletalApp.cpp ├── .gitignore ├── README ├── templates └── Basic GL │ ├── template.xml │ └── src │ └── _TBOX_PREFIX_App.cpp ├── cinderblock.xml └── src ├── Cinder-LeapMotion.h └── Cinder-LeapMotion.cpp /cinderblock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/cinderblock.png -------------------------------------------------------------------------------- /lib/msw/x64/Leap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/lib/msw/x64/Leap.dll -------------------------------------------------------------------------------- /lib/msw/x64/Leap.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/lib/msw/x64/Leap.lib -------------------------------------------------------------------------------- /lib/msw/x86/Leap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/lib/msw/x86/Leap.dll -------------------------------------------------------------------------------- /lib/msw/x86/Leap.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/lib/msw/x86/Leap.lib -------------------------------------------------------------------------------- /lib/macosx/libLeap.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/lib/macosx/libLeap.dylib -------------------------------------------------------------------------------- /samples/UiApp/resources/grab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/resources/grab.png -------------------------------------------------------------------------------- /samples/UiApp/resources/hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/resources/hand.png -------------------------------------------------------------------------------- /samples/UiApp/resources/touch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/resources/touch.png -------------------------------------------------------------------------------- /samples/UiApp/resources/track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/resources/track.png -------------------------------------------------------------------------------- /samples/UiApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/vc2013/Resources.rc -------------------------------------------------------------------------------- /samples/UiApp/vc2015/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/vc2015/Resources.rc -------------------------------------------------------------------------------- /samples/ImageApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/ImageApp/vc2013/Resources.rc -------------------------------------------------------------------------------- /samples/ImageApp/vc2015/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/ImageApp/vc2015/Resources.rc -------------------------------------------------------------------------------- /samples/LeapApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/LeapApp/vc2013/Resources.rc -------------------------------------------------------------------------------- /samples/LeapApp/vc2015/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/LeapApp/vc2015/Resources.rc -------------------------------------------------------------------------------- /samples/LeapApp/xcode/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/LeapApp/xcode/CinderApp.icns -------------------------------------------------------------------------------- /samples/UiApp/resources/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/resources/slider.png -------------------------------------------------------------------------------- /samples/UiApp/xcode/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/xcode/CinderApp.icns -------------------------------------------------------------------------------- /samples/GestureApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/GestureApp/vc2013/Resources.rc -------------------------------------------------------------------------------- /samples/GestureApp/vc2015/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/GestureApp/vc2015/Resources.rc -------------------------------------------------------------------------------- /samples/ImageApp/xcode/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/ImageApp/xcode/CinderApp.icns -------------------------------------------------------------------------------- /samples/MotionApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/MotionApp/vc2013/Resources.rc -------------------------------------------------------------------------------- /samples/MotionApp/vc2015/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/MotionApp/vc2015/Resources.rc -------------------------------------------------------------------------------- /samples/MotionApp/xcode/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/MotionApp/xcode/CinderApp.icns -------------------------------------------------------------------------------- /samples/TracerApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/TracerApp/vc2013/Resources.rc -------------------------------------------------------------------------------- /samples/TracerApp/vc2015/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/TracerApp/vc2015/Resources.rc -------------------------------------------------------------------------------- /samples/TracerApp/xcode/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/TracerApp/xcode/CinderApp.icns -------------------------------------------------------------------------------- /samples/UiApp/resources/button_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/resources/button_off.png -------------------------------------------------------------------------------- /samples/UiApp/resources/button_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/resources/button_on.png -------------------------------------------------------------------------------- /samples/GestureApp/xcode/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/GestureApp/xcode/CinderApp.icns -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/SkeletalApp/vc2013/Resources.rc -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2015/Resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/SkeletalApp/vc2015/Resources.rc -------------------------------------------------------------------------------- /samples/SkeletalApp/xcode/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/SkeletalApp/xcode/CinderApp.icns -------------------------------------------------------------------------------- /samples/UiApp/vc2013/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/vc2013/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/UiApp/vc2015/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/UiApp/vc2015/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/ImageApp/vc2013/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/ImageApp/vc2013/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/ImageApp/vc2015/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/ImageApp/vc2015/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/LeapApp/vc2013/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/LeapApp/vc2013/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/LeapApp/vc2015/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/LeapApp/vc2015/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/GestureApp/vc2013/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/GestureApp/vc2013/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/GestureApp/vc2015/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/GestureApp/vc2015/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/MotionApp/vc2013/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/MotionApp/vc2013/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/MotionApp/vc2015/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/MotionApp/vc2015/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2013/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/SkeletalApp/vc2013/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2015/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/SkeletalApp/vc2015/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/TracerApp/vc2013/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/TracerApp/vc2013/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/TracerApp/vc2015/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-LeapMotion/HEAD/samples/TracerApp/vc2015/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/UiApp/xcode/UiApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/ImageApp/xcode/ImageApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/LeapApp/xcode/LeapApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/GestureApp/xcode/GestureApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/MotionApp/xcode/MotionApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/SkeletalApp/xcode/SkeletalApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/TracerApp/xcode/TracerApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/UiApp/xcode/UiApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/ImageApp/xcode/ImageApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/LeapApp/xcode/LeapApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/GestureApp/xcode/GestureApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/MotionApp/xcode/MotionApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/TracerApp/xcode/TracerApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/SkeletalApp/xcode/SkeletalApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.xcuserdatad 3 | *.xccheckout 4 | xcshareddata 5 | xcuserdata 6 | bin 7 | build 8 | DerivedData 9 | ipch 10 | Debug 11 | Release 12 | .vs 13 | *.opensdf 14 | *.sdf 15 | *.suo 16 | *.user 17 | *.exe 18 | *.map 19 | *.pdb 20 | *.ilk 21 | Thumbs.db 22 | .vs -------------------------------------------------------------------------------- /samples/TracerApp/include/Resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "cinder/CinderResources.h" 3 | 4 | #define RES_GLSL_BLUR_FRAG CINDER_RESOURCE( ../resources/, blur.frag, 128, GLSL ) 5 | #define RES_GLSL_PASS_THROUGH_VERT CINDER_RESOURCE( ../resources/, pass_through.vert, 129, GLSL ) 6 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This block wraps the Leap Motion SDK. 2 | 3 | ----------------------------------------- 4 | 5 | Version 2.3.1+31549 6 | 7 | ----------------------------------------- 8 | 9 | http://www.bantherewind.com 10 | http://www.libcinder.org 11 | 12 | bantherewind@gmail.com 13 | -------------------------------------------------------------------------------- /samples/TracerApp/resources/pass_through.vert: -------------------------------------------------------------------------------- 1 | uniform mat4 ciModelViewProjection; 2 | 3 | in vec4 ciPosition; 4 | in vec2 ciTexCoord0; 5 | 6 | out vec2 vTexCoord0; 7 | 8 | void main( void ) 9 | { 10 | vTexCoord0 = ciTexCoord0; 11 | gl_Position = ciModelViewProjection * ciPosition; 12 | } 13 | -------------------------------------------------------------------------------- /templates/Basic GL/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /samples/UiApp/include/Resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "cinder/CinderResources.h" 3 | 4 | #define RES_TEX_BUTTON_OFF CINDER_RESOURCE( ../resources/, button_off.png, 128, PNG ) 5 | #define RES_TEX_BUTTON_ON CINDER_RESOURCE( ../resources/, button_on.png, 129, PNG ) 6 | #define RES_TEX_GRAB CINDER_RESOURCE( ../resources/, grab.png, 130, PNG ) 7 | #define RES_TEX_HAND CINDER_RESOURCE( ../resources/, hand.png, 131, PNG ) 8 | #define RES_TEX_SLIDER CINDER_RESOURCE( ../resources/, slider.png, 132, PNG ) 9 | #define RES_TEX_TOUCH CINDER_RESOURCE( ../resources/, touch.png, 133, PNG ) 10 | #define RES_TEX_TRACK CINDER_RESOURCE( ../resources/, track.png, 134, PNG ) 11 | -------------------------------------------------------------------------------- /samples/TracerApp/resources/blur.frag: -------------------------------------------------------------------------------- 1 | uniform vec2 uSize; 2 | uniform sampler2D uSampler; 3 | 4 | in vec2 vTexCoord0; 5 | 6 | out vec4 oColor; 7 | 8 | void main( void ) 9 | { 10 | oColor = vec4( 0.0 ); 11 | oColor += texture( uSampler, vTexCoord0 - 4.0 * uSize ) * 0.05; 12 | oColor += texture( uSampler, vTexCoord0 - 3.0 * uSize ) * 0.09; 13 | oColor += texture( uSampler, vTexCoord0 - 2.0 * uSize ) * 0.12; 14 | oColor += texture( uSampler, vTexCoord0 - 1.0 * uSize ) * 0.15; 15 | oColor += texture( uSampler, vTexCoord0 ) * 0.16; 16 | oColor += texture( uSampler, vTexCoord0 + 1.0 * uSize ) * 0.15; 17 | oColor += texture( uSampler, vTexCoord0 + 2.0 * uSize ) * 0.12; 18 | oColor += texture( uSampler, vTexCoord0 + 3.0 * uSize ) * 0.09; 19 | oColor += texture( uSampler, vTexCoord0 + 4.0 * uSize ) * 0.05; 20 | } 21 | -------------------------------------------------------------------------------- /samples/UiApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | com.bantherewind.LeapApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/ImageApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | com.bantherewind.LeapApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/LeapApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | com.bantherewind.LeapApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/MotionApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | com.bantherewind.MotionApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/SkeletalApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | com.bantherewind.LeapApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/TracerApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | com.bantherewind.LeapApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/GestureApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | com.bantherewind.MotionApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /cinderblock.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | src/Cinder-LeapMotion.cpp 15 |
src/Cinder-LeapMotion.h
16 |
src/Leap.h
17 |
src/LeapMath.h
18 | src 19 | 20 | lib/macosx/libLeap.dylib 21 | lib/macosx/libLeap.dylib 22 | 23 | 24 | 25 | lib/msw/$(PlatformTarget)/Leap.dll 26 | lib/msw/$(PlatformTarget)/Leap.lib 27 | 28 | 29 | lib/msw/$(PlatformTarget)/Leap.dll 30 | lib/msw/$(PlatformTarget)/Leap.lib 31 | 32 | 33 |
34 | 35 |
36 | -------------------------------------------------------------------------------- /samples/UiApp/vc2013/UiApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UiApp", "UiApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/UiApp/vc2015/UiApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UiApp", "UiApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/LeapApp/vc2013/LeapApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LeapApp", "LeapApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/LeapApp/vc2015/LeapApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LeapApp", "LeapApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/ImageApp/vc2013/ImageApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageApp", "ImageApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/ImageApp/vc2015/ImageApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageApp", "ImageApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/MotionApp/vc2013/MotionApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MotionApp", "MotionApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/MotionApp/vc2015/MotionApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MotionApp", "MotionApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/TracerApp/vc2013/TracerApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TracerApp", "TracerApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/TracerApp/vc2015/TracerApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TracerApp", "TracerApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/GestureApp/vc2013/GestureApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GestureApp", "GestureApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/GestureApp/vc2015/GestureApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GestureApp", "GestureApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2013/SkeletalApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkeletalApp", "SkeletalApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2015/SkeletalApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkeletalApp", "SkeletalApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32 18 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64 19 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64 20 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32 21 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32 22 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64 23 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/LeapApp/vc2013/LeapApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/LeapApp/vc2015/LeapApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/ImageApp/vc2013/ImageApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/ImageApp/vc2015/ImageApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/MotionApp/vc2013/MotionApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/MotionApp/vc2015/MotionApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/GestureApp/vc2013/GestureApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/GestureApp/vc2015/GestureApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2013/SkeletalApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2015/SkeletalApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 17 | 18 | 19 | 20 | 21 | Source Files 22 | 23 | 24 | blocks\Cinder-LeapMotion 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | 33 | 34 | Resource Files 35 | 36 | 37 | 38 | 39 | blocks\Cinder-LeapMotion 40 | 41 | 42 | blocks\Cinder-LeapMotion 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/TracerApp/include/Ribbon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #pragma once 38 | 39 | #include "cinder/Color.h" 40 | #include "cinder/Vector.h" 41 | #include 42 | #include 43 | 44 | typedef std::map RibbonMap; 45 | 46 | class Ribbon 47 | { 48 | public: 49 | Ribbon( int32_t id = 0, const ci::Colorf& color = ci::Colorf::white() ); 50 | ~Ribbon(); 51 | 52 | void addPoint( const ci::vec3& position, float width = 1.0f ); 53 | void draw() const; 54 | void update(); 55 | 56 | const ci::Colorf& getColor() const; 57 | int32_t getId() const; 58 | private: 59 | struct Point 60 | { 61 | Point( const ci::vec3& position = ci::vec3( 0.0f ), float width = 1.0f ); 62 | float mAlpha; 63 | ci::vec3 mPosition; 64 | float mWidth; 65 | }; 66 | 67 | ci::Colorf mColor; 68 | int32_t mId; 69 | std::vector mPoints; 70 | std::vector mPositions; 71 | }; 72 | -------------------------------------------------------------------------------- /samples/TracerApp/vc2013/TracerApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {db5b0def-827b-4809-a474-719156d9c1d7} 17 | 18 | 19 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | blocks\Cinder-LeapMotion 31 | 32 | 33 | 34 | 35 | Resource Files 36 | 37 | 38 | 39 | 40 | Resource Files 41 | 42 | 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | blocks\Cinder-LeapMotion 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | blocks\Cinder-LeapMotion 58 | 59 | 60 | 61 | 62 | Resource Files 63 | 64 | 65 | Resource Files 66 | 67 | 68 | -------------------------------------------------------------------------------- /samples/TracerApp/vc2015/TracerApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {db5b0def-827b-4809-a474-719156d9c1d7} 17 | 18 | 19 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | blocks\Cinder-LeapMotion 31 | 32 | 33 | 34 | 35 | Resource Files 36 | 37 | 38 | 39 | 40 | Resource Files 41 | 42 | 43 | 44 | 45 | blocks\Cinder-LeapMotion 46 | 47 | 48 | blocks\Cinder-LeapMotion 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | blocks\Cinder-LeapMotion 58 | 59 | 60 | 61 | 62 | Resource Files 63 | 64 | 65 | Resource Files 66 | 67 | 68 | -------------------------------------------------------------------------------- /samples/UiApp/vc2013/UiApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {db5b0def-827b-4809-a474-719156d9c1d7} 17 | 18 | 19 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | blocks\Cinder-LeapMotion 28 | 29 | 30 | 31 | 32 | Resource Files 33 | 34 | 35 | Resource Files 36 | 37 | 38 | Resource Files 39 | 40 | 41 | Resource Files 42 | 43 | 44 | Resource Files 45 | 46 | 47 | Resource Files 48 | 49 | 50 | Resource Files 51 | 52 | 53 | Resource Files 54 | 55 | 56 | 57 | 58 | Resource Files 59 | 60 | 61 | 62 | 63 | blocks\Cinder-LeapMotion 64 | 65 | 66 | blocks\Cinder-LeapMotion 67 | 68 | 69 | Header Files 70 | 71 | 72 | blocks\Cinder-LeapMotion 73 | 74 | 75 | -------------------------------------------------------------------------------- /samples/UiApp/vc2015/UiApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {45d24446-3e56-4215-a1fa-96eb967451d4} 14 | 15 | 16 | {db5b0def-827b-4809-a474-719156d9c1d7} 17 | 18 | 19 | {b4c6b03c-4f71-4a06-a861-abda64840ef2} 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | blocks\Cinder-LeapMotion 28 | 29 | 30 | 31 | 32 | Resource Files 33 | 34 | 35 | Resource Files 36 | 37 | 38 | Resource Files 39 | 40 | 41 | Resource Files 42 | 43 | 44 | Resource Files 45 | 46 | 47 | Resource Files 48 | 49 | 50 | Resource Files 51 | 52 | 53 | Resource Files 54 | 55 | 56 | 57 | 58 | Resource Files 59 | 60 | 61 | 62 | 63 | blocks\Cinder-LeapMotion 64 | 65 | 66 | blocks\Cinder-LeapMotion 67 | 68 | 69 | Header Files 70 | 71 | 72 | blocks\Cinder-LeapMotion 73 | 74 | 75 | -------------------------------------------------------------------------------- /templates/Basic GL/src/_TBOX_PREFIX_App.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2015, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "cinder/app/App.h" 38 | #include "cinder/app/RendererGl.h" 39 | #include "cinder/Camera.h" 40 | #include "cinder/gl/gl.h" 41 | 42 | #include "Cinder-LeapMotion.h" 43 | 44 | class _TBOX_PREFIX_App : public ci::app::App 45 | { 46 | public: 47 | void draw() override; 48 | void setup() override; 49 | private: 50 | Leap::Frame mFrame; 51 | LeapMotion::DeviceRef mLeap; 52 | 53 | ci::CameraPersp mCamera; 54 | }; 55 | 56 | using namespace ci; 57 | using namespace ci::app; 58 | using namespace std; 59 | 60 | void _TBOX_PREFIX_App::draw() 61 | { 62 | gl::viewport( getWindowSize() ); 63 | gl::clear( Colorf::black() ); 64 | gl::setMatrices( mCamera ); 65 | 66 | const Leap::HandList& hands = mFrame.hands(); 67 | for ( const Leap::Hand& hand : hands ) { 68 | for ( const Leap::Pointable& pointable : hand.pointables() ) { 69 | vec3 dir = LeapMotion::toVec3( pointable.direction() ); 70 | float length = pointable.length(); 71 | vec3 tipPos = LeapMotion::toVec3( pointable.tipPosition() ); 72 | vec3 basePos = tipPos + dir * length; 73 | 74 | gl::drawColorCube( tipPos, vec3( 20.0f, 20.0f, 20.0f ) ); 75 | gl::color( ColorAf::gray( 0.8f ) ); 76 | gl::drawLine( basePos, tipPos ); 77 | } 78 | } 79 | } 80 | 81 | void _TBOX_PREFIX_App::setup() 82 | { 83 | gl::enableDepthRead(); 84 | gl::enableDepthWrite(); 85 | 86 | mCamera = CameraPersp( getWindowWidth(), getWindowHeight(), 60.0f, 0.01f, 1000.0f ); 87 | mCamera.lookAt( vec3( 0.0f, 125.0f, 500.0f ), vec3( 0.0f, 250.0f, 0.0f ) ); 88 | 89 | mLeap = LeapMotion::Device::create(); 90 | mLeap->connectEventHandler( [ & ]( Leap::Frame frame ) 91 | { 92 | mFrame = frame; 93 | } ); 94 | } 95 | 96 | CINDER_APP( _TBOX_PREFIX_App, RendererGl ) 97 | -------------------------------------------------------------------------------- /samples/TracerApp/src/Ribbon.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "Ribbon.h" 38 | 39 | #include "cinder/app/App.h" 40 | #include "cinder/gl/gl.h" 41 | #include "cinder/Utilities.h" 42 | 43 | using namespace ci; 44 | using namespace ci::app; 45 | using namespace std; 46 | 47 | Ribbon::Point::Point( const vec3& position, float width ) 48 | { 49 | mAlpha = 1.0f; 50 | mPosition = position; 51 | mWidth = width; 52 | } 53 | 54 | Ribbon::Ribbon( int32_t id, const Colorf& color ) 55 | { 56 | mColor = color; 57 | mId = id; 58 | } 59 | 60 | Ribbon::~Ribbon() 61 | { 62 | mPoints.clear(); 63 | } 64 | 65 | void Ribbon::addPoint( const vec3& position, float width ) 66 | { 67 | vec3 p( position ); 68 | if ( !mPoints.empty() ) { 69 | p = glm::mix( mPoints.back().mPosition, position, vec3( 0.15f ) ); 70 | } 71 | 72 | Point point( p, width ); 73 | mPoints.push_back( point ); 74 | } 75 | 76 | const Colorf& Ribbon::getColor() const 77 | { 78 | return mColor; 79 | } 80 | 81 | int32_t Ribbon::getId() const 82 | { 83 | return mId; 84 | } 85 | 86 | void Ribbon::draw() const 87 | { 88 | size_t count = mPoints.size(); 89 | if ( count < 2 ) { 90 | return; 91 | } 92 | 93 | gl::begin( GL_TRIANGLES ); 94 | for ( size_t i = 0; i < count - 2; ++i ) { 95 | uint32_t index = i * 2; 96 | 97 | vec3 pos0 = mPositions.at( index + 0 ); 98 | vec3 pos1 = mPositions.at( index + 1 ); 99 | vec3 pos2 = mPositions.at( index + 2 ); 100 | vec3 pos3 = mPositions.at( index + 3 ); 101 | 102 | ColorAf color( mColor, mPoints.at( i ).mAlpha ); 103 | gl::color( color ); 104 | 105 | gl::vertex( pos0 ); 106 | gl::vertex( pos2 ); 107 | gl::vertex( pos1 ); 108 | gl::vertex( pos1 ); 109 | gl::vertex( pos2 ); 110 | gl::vertex( pos3 ); 111 | } 112 | gl::end(); 113 | } 114 | 115 | void Ribbon::update() 116 | { 117 | float e = getElapsedSeconds() * 40.0f; 118 | float i = 0.0f; 119 | for ( vector::iterator iter = mPoints.begin(); iter != mPoints.end(); i += 1.0f ) { 120 | iter->mAlpha -= 0.01f; 121 | iter->mWidth -= 0.125f; 122 | float t = powf( i, 2.0f ) + e; 123 | iter->mPosition.x += cosf( t ) * 0.3f; 124 | iter->mPosition.y += sinf( t ) * 0.5f; 125 | 126 | if ( iter->mAlpha <= 0.0f || iter->mWidth <= 0.0f ) { 127 | iter = mPoints.erase( iter ); 128 | } else { 129 | ++iter; 130 | } 131 | } 132 | 133 | mPositions.clear(); 134 | size_t count = mPoints.size(); 135 | if ( count >= 2 ) { 136 | for ( size_t i = 0; i < count - 1; ++i ) { 137 | const Point& a = mPoints.at( i ); 138 | const Point& b = mPoints.at( i + 1 ); 139 | 140 | vec3 pos0 = a.mPosition; 141 | vec3 pos1 = b.mPosition; 142 | vec3 dir0 = pos0 - pos1; 143 | dir0.z = 0.0f; 144 | vec3 dir1 = glm::cross( dir0, vec3( 0.0f, 0.0f, 1.0f ) ); 145 | vec3 dir2 = glm::cross( dir0, dir1 ); 146 | dir1 = glm::normalize( glm::cross( dir0, dir2 ) ); 147 | vec3 offset = dir1 * a.mWidth; 148 | 149 | mPositions.push_back( pos0 - offset ); 150 | mPositions.push_back( pos0 + offset ); 151 | } 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /samples/ImageApp/src/ImageApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "cinder/app/App.h" 38 | #include "cinder/Camera.h" 39 | #include "cinder/params/Params.h" 40 | #include "Cinder-LeapMotion.h" 41 | 42 | class ImageApp : public ci::app::App 43 | { 44 | public: 45 | ImageApp(); 46 | 47 | void draw() override; 48 | void update() override; 49 | private: 50 | LeapMotion::DeviceRef mDevice; 51 | Leap::Frame mFrame; 52 | 53 | float mFrameRate; 54 | bool mFullScreen; 55 | ci::params::InterfaceGlRef mParams; 56 | void screenShot(); 57 | }; 58 | 59 | #include "cinder/app/RendererGl.h" 60 | #include "cinder/gl/gl.h" 61 | #include "cinder/ImageIo.h" 62 | #include "cinder/Utilities.h" 63 | 64 | using namespace ci; 65 | using namespace ci::app; 66 | using namespace LeapMotion; 67 | using namespace std; 68 | 69 | ImageApp::ImageApp() 70 | { 71 | mFrameRate = 0.0f; 72 | mFullScreen = false; 73 | 74 | mDevice = Device::create(); 75 | mDevice->getController()->setPolicyFlags( Leap::Controller::POLICY_IMAGES ); 76 | mDevice->connectEventHandler( [ &]( Leap::Frame frame ) 77 | { 78 | mFrame = frame; 79 | } ); 80 | 81 | mParams = params::InterfaceGl::create( "Params", ivec2( 200, 105 ) ); 82 | mParams->addParam( "Frame rate", &mFrameRate, "", true ); 83 | mParams->addParam( "Full screen", &mFullScreen ).key( "f" ); 84 | mParams->addButton( "Screen shot", [ & ]() { screenShot(); }, "key=space" ); 85 | mParams->addButton( "Quit", [ & ]() { quit(); }, "key=q" ); 86 | 87 | gl::color( ColorAf::white() ); 88 | gl::enableVerticalSync(); 89 | } 90 | 91 | void ImageApp::draw() 92 | { 93 | const gl::ScopedViewport scopedViewport( ivec2( 0 ), getWindowSize() ); 94 | const gl::ScopedMatrices scopedMatrices; 95 | gl::clear( Colorf::white() ); 96 | gl::setMatricesWindow( getWindowSize() ); 97 | 98 | const Leap::ImageList& images = mFrame.images(); 99 | int32_t count = images.count(); 100 | if ( count > 0 ) { 101 | Rectf bounds = Rectf( getWindowBounds() ) / (float)count; 102 | float x = 0.0f; 103 | const float y = getWindowCenter().y - bounds.getHeight() * 0.5f; 104 | int32_t i = 0; 105 | for ( Leap::ImageList::const_iterator iter = images.begin(); iter != images.end(); ++iter, ++i ) { 106 | const Leap::Image& img = *iter; 107 | Channel8uRef channel = LeapMotion::toChannel8u( img ); 108 | if ( channel ) { 109 | const gl::ScopedModelMatrix scopedModelMatrix; 110 | gl::translate( x, y ); 111 | const gl::Texture2dRef tex = gl::Texture::create( *channel ); 112 | gl::draw( tex, tex->getBounds(), bounds ); 113 | } 114 | x += bounds.getWidth(); 115 | } 116 | } 117 | 118 | mParams->draw(); 119 | } 120 | 121 | void ImageApp::screenShot() 122 | { 123 | writeImage( getAppPath() / fs::path( "frame" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() ); 124 | } 125 | 126 | void ImageApp::update() 127 | { 128 | mFrameRate = getAverageFps(); 129 | 130 | if ( mFullScreen != isFullScreen() ) { 131 | setFullScreen( mFullScreen ); 132 | } 133 | } 134 | 135 | RendererGl::Options gOptions; 136 | CINDER_APP( ImageApp, RendererGl( gOptions.msaa( 16 ) ), []( App::Settings* settings ) 137 | { 138 | settings->setWindowSize( 1024, 768 ); 139 | settings->disableFrameRate(); 140 | } ) 141 | -------------------------------------------------------------------------------- /src/Cinder-LeapMotion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #pragma once 38 | 39 | #include "Leap.h" 40 | #include "cinder/Channel.h" 41 | #include "cinder/Matrix.h" 42 | #include "cinder/Vector.h" 43 | #include 44 | #include 45 | 46 | namespace LeapMotion { 47 | 48 | /*! Converts a native Leap image into a Cinder channel. 49 | Set \a copyData to true makes channel own data (slower). */ 50 | ci::Channel8uRef toChannel8u( const Leap::Image& img, bool copyData = false ); 51 | //! Converts a native Leap 3x3 matrix into a Cinder one. 52 | ci::mat3 toMat3( const Leap::Matrix& m ); 53 | //! Converts a native Leap 4x4 matrix into a Cinder one. 54 | ci::mat4 toMat4( const Leap::Matrix& m ); 55 | //! Converts a Cinder 3x3 matrix into a native Leap one. 56 | Leap::Matrix toLeapMatrix( const ci::mat3& m ); 57 | //! Converts a Cinder 4x4 matrix into a native Leap one. 58 | Leap::Matrix toLeapMatrix( const ci::mat4 m ); 59 | //! Converts a Cinder vector into a native Leap one. 60 | Leap::Vector toLeapVector( const ci::vec3& v ); 61 | //! Converts a native Leap vector into a Cinder one. 62 | ci::vec3 toVec3( const Leap::Vector& v ); 63 | 64 | ////////////////////////////////////////////////////////////////////////////////////////////// 65 | 66 | //! Receives and manages Leap controller data. 67 | class Listener : public Leap::Listener 68 | { 69 | protected: 70 | Listener(); 71 | 72 | virtual void onConnect( const Leap::Controller& controller ); 73 | virtual void onDisconnect( const Leap::Controller& controller ); 74 | virtual void onExit( const Leap::Controller& controller ); 75 | virtual void onFrame( const Leap::Controller& controller ); 76 | virtual void onFocusGained( const Leap::Controller& controller ); 77 | virtual void onFocusLost( const Leap::Controller& controller ); 78 | virtual void onInit( const Leap::Controller& controller ); 79 | 80 | volatile bool mConnected; 81 | volatile bool mExited; 82 | volatile bool mFocused; 83 | volatile bool mInitialized; 84 | std::mutex* mMutex; 85 | volatile bool mNewFrame; 86 | 87 | Leap::Frame mFrame; 88 | 89 | friend class Device; 90 | }; 91 | 92 | ////////////////////////////////////////////////////////////////////////////////////////////// 93 | 94 | typedef std::shared_ptr DeviceRef; 95 | 96 | //! A class representing and managing a Leap device, controller and listener. 97 | class Device 98 | { 99 | public: 100 | //! Creates and returns device instance. 101 | static DeviceRef create(); 102 | ~Device(); 103 | 104 | //! Returns LEAP controller associated with this device's listener. 105 | Leap::Controller* getController() const; 106 | 107 | //! Returns true if app is focused for this device. 108 | virtual bool hasFocus() const; 109 | //! Returns true if the device has exited. 110 | virtual bool hasExited() const; 111 | //! Returns true if the device is connected. 112 | virtual bool isConnected() const; 113 | //! Returns true if LEAP application is initialized. 114 | virtual bool isInitialized() const; 115 | 116 | /*! Sets frame event handler. \a eventHandler has the signature \a void(Frame). 117 | \a obj is the instance receiving the event. */ 118 | template 119 | inline void connectEventHandler( T eventHandler, Y *obj ) 120 | { 121 | connectEventHandler( std::bind( eventHandler, obj, std::placeholders::_1 ) ); 122 | } 123 | 124 | //! Sets frame event callback to \a eventHandler. 125 | void connectEventHandler( const std::function& eventHandler ); 126 | void disconnectEventHandler(); 127 | protected: 128 | Device(); 129 | 130 | std::function mEventHandler; 131 | 132 | virtual void update(); 133 | 134 | Leap::Controller* mController; 135 | Leap::Device mDevice; 136 | Listener mListener; 137 | std::mutex mMutex; 138 | }; 139 | 140 | } 141 | -------------------------------------------------------------------------------- /samples/SkeletalApp/src/SkeletalApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "cinder/app/App.h" 38 | #include "cinder/Camera.h" 39 | #include "cinder/params/Params.h" 40 | #include "Cinder-LeapMotion.h" 41 | 42 | class SkeletalApp : public ci::app::App 43 | { 44 | public: 45 | void draw() override; 46 | void setup() override; 47 | void update() override; 48 | private: 49 | LeapMotion::DeviceRef mDevice; 50 | Leap::Frame mFrame; 51 | 52 | ci::CameraPersp mCamera; 53 | 54 | float mFrameRate; 55 | bool mFullScreen; 56 | ci::params::InterfaceGlRef mParams; 57 | void screenShot(); 58 | }; 59 | 60 | #include "cinder/app/RendererGl.h" 61 | #include "cinder/gl/gl.h" 62 | #include "cinder/ImageIo.h" 63 | #include "cinder/Utilities.h" 64 | 65 | using namespace ci; 66 | using namespace ci::app; 67 | using namespace LeapMotion; 68 | using namespace std; 69 | 70 | void SkeletalApp::draw() 71 | { 72 | gl::viewport( getWindowSize() ); 73 | gl::clear( Colorf::white() ); 74 | gl::setMatrices( mCamera ); 75 | 76 | gl::enableAlphaBlending(); 77 | gl::enableDepthRead(); 78 | gl::enableDepthWrite(); 79 | gl::color( ColorAf::black() ); 80 | 81 | const Leap::HandList& hands = mFrame.hands(); 82 | for ( Leap::HandList::const_iterator handIter = hands.begin(); handIter != hands.end(); ++handIter ) { 83 | const Leap::Hand& hand = *handIter; 84 | const Leap::Arm& arm = hand.arm(); 85 | 86 | vec3 palm = LeapMotion::toVec3( hand.palmPosition() ); 87 | vec3 elbow = LeapMotion::toVec3( arm.elbowPosition() ); 88 | vec3 rotation = vec3( hand.direction().pitch(), hand.direction().yaw(), hand.palmNormal().roll() ); 89 | vec3 wrist = LeapMotion::toVec3( arm.wristPosition() ); 90 | 91 | gl::drawLine( elbow, wrist ); 92 | 93 | vector knuckles; 94 | const Leap::FingerList fingers = hand.fingers(); 95 | for ( Leap::FingerList::const_iterator fingerIter = fingers.begin(); fingerIter != fingers.end(); ++fingerIter ) { 96 | const Leap::Finger& finger = *fingerIter; 97 | 98 | for ( int32_t i = 0; i < 4; ++i ) { 99 | const Leap::Bone& bone = finger.bone( (Leap::Bone::Type)i ); 100 | vec3 center = LeapMotion::toVec3( bone.center() ); 101 | vec3 direction = LeapMotion::toVec3( bone.direction() ); 102 | vec3 start = center - direction * bone.length() * 0.5f; 103 | vec3 end = center + direction * bone.length() * 0.5f; 104 | 105 | if ( i == 0 ) { 106 | knuckles.push_back( start ); 107 | gl::drawLine( wrist, start ); 108 | } else { 109 | gl::drawLine( start, end ); 110 | } 111 | } 112 | } 113 | 114 | if ( knuckles.size() > 1 ) { 115 | for ( size_t i = 1; i < knuckles.size(); ++i ) { 116 | const vec3& v0 = knuckles.at( i - 1 ); 117 | const vec3& v1 = knuckles.at( i ); 118 | gl::drawLine( v0, v1 ); 119 | } 120 | gl::drawLine( elbow, knuckles.at( 0 ) ); 121 | } 122 | 123 | } 124 | 125 | mParams->draw(); 126 | } 127 | 128 | void SkeletalApp::screenShot() 129 | { 130 | writeImage( getAppPath() / fs::path( "frame" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() ); 131 | } 132 | 133 | void SkeletalApp::setup() 134 | { 135 | mCamera = CameraPersp( getWindowWidth(), getWindowHeight(), 60.0f, 1.0f, 5000.0f ); 136 | mCamera.lookAt( vec3( 0.0f, 300.0f, 300.0f ), vec3( 0.0f, 250.0f, 0.0f ) ); 137 | 138 | mDevice = Device::create(); 139 | mDevice->connectEventHandler( [ & ]( Leap::Frame frame ) 140 | { 141 | mFrame = frame; 142 | } ); 143 | 144 | mFrameRate = 0.0f; 145 | mFullScreen = false; 146 | mParams = params::InterfaceGl::create( "Params", ivec2( 200, 105 ) ); 147 | mParams->addParam( "Frame rate", &mFrameRate, "", true ); 148 | mParams->addParam( "Full screen", &mFullScreen ).key( "f" ); 149 | mParams->addButton( "Screen shot", [ & ]() { screenShot(); }, "key=space" ); 150 | mParams->addButton( "Quit", [ & ]() { quit(); }, "key=q" ); 151 | 152 | gl::enable( GL_LINE_SMOOTH ); 153 | glHint( GL_LINE_SMOOTH_HINT, GL_NICEST ); 154 | gl::enable( GL_POLYGON_SMOOTH ); 155 | glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST ); 156 | gl::enableVerticalSync(); 157 | } 158 | 159 | void SkeletalApp::update() 160 | { 161 | mFrameRate = getAverageFps(); 162 | 163 | if ( mFullScreen != isFullScreen() ) { 164 | setFullScreen( mFullScreen ); 165 | } 166 | } 167 | 168 | RendererGl::Options gOptions; 169 | CINDER_APP( SkeletalApp, RendererGl( gOptions.msaa( 16 ) ), []( App::Settings* settings ) 170 | { 171 | settings->setWindowSize( 1024, 768 ); 172 | settings->disableFrameRate(); 173 | } ) 174 | -------------------------------------------------------------------------------- /src/Cinder-LeapMotion.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "Cinder-LeapMotion.h" 38 | 39 | #include "cinder/app/App.h" 40 | 41 | using namespace ci; 42 | using namespace ci::app; 43 | using namespace std; 44 | 45 | namespace LeapMotion { 46 | 47 | Channel8uRef toChannel8u( const Leap::Image& img, bool copyData ) 48 | { 49 | int32_t h = img.height(); 50 | int32_t w = img.width(); 51 | Channel8uRef channel; 52 | if ( copyData ) { 53 | channel = Channel8u::create( w, h ); 54 | char_traits::copy( channel->getData(), img.data(), w * h * sizeof( uint8_t ) ); 55 | } else { 56 | channel = Channel8u::create( w, h, w * sizeof( uint8_t ), sizeof( uint8_t ), (uint8_t*)img.data() ); 57 | } 58 | return channel; 59 | } 60 | 61 | mat3 toMat3( const Leap::Matrix& m ) 62 | { 63 | mat3 mat; 64 | Leap::FloatArray a = m.toArray3x3(); 65 | for ( size_t x = 0; x < 3; ++x ) { 66 | for ( size_t y = 0; y < 3; ++y ) { 67 | mat[ x ][ y ] = a[ y * 3 + x ]; 68 | } 69 | } 70 | return mat; 71 | } 72 | 73 | Leap::Matrix toLeapMatrix( const mat3& m ) 74 | { 75 | Leap::Matrix matrix; 76 | matrix.xBasis = Leap::Vector( m[ 0 ][ 0 ], m[ 0 ][ 1 ], m[ 0 ][ 2 ] ); 77 | matrix.yBasis = Leap::Vector( m[ 1 ][ 0 ], m[ 1 ][ 1 ], m[ 1 ][ 2 ] ); 78 | matrix.zBasis = Leap::Vector( m[ 2 ][ 0 ], m[ 2 ][ 1 ], m[ 2 ][ 2 ] ); 79 | return matrix; 80 | } 81 | 82 | mat4 toMat4( const Leap::Matrix& m ) 83 | { 84 | mat4 mat; 85 | Leap::FloatArray a = m.toArray4x4(); 86 | for ( size_t x = 0; x < 4; ++x ) { 87 | for ( size_t y = 0; y < 4; ++y ) { 88 | mat[ x ][ y ] = a[ y * 4 + x ]; 89 | } 90 | } 91 | return mat; 92 | } 93 | 94 | Leap::Matrix toLeapMatrix( const mat4 m ) 95 | { 96 | Leap::Matrix matrix; 97 | matrix.xBasis = Leap::Vector( m[ 0 ][ 0 ], m[ 0 ][ 1 ], m[ 0 ][ 2 ] ); 98 | matrix.yBasis = Leap::Vector( m[ 1 ][ 0 ], m[ 1 ][ 1 ], m[ 1 ][ 2 ] ); 99 | matrix.zBasis = Leap::Vector( m[ 2 ][ 0 ], m[ 2 ][ 1 ], m[ 2 ][ 2 ] ); 100 | matrix.origin = Leap::Vector( m[ 3 ][ 0 ], m[ 3 ][ 1 ], m[ 3 ][ 2 ] ); 101 | return matrix; 102 | } 103 | 104 | vec3 toVec3( const Leap::Vector& v ) 105 | { 106 | return vec3( v.x, v.y, v.z ); 107 | } 108 | 109 | Leap::Vector toLeapVector( const vec3& v ) 110 | { 111 | return Leap::Vector( v.x, v.y, v.z ); 112 | } 113 | 114 | ////////////////////////////////////////////////////////////////////////////////////////////// 115 | 116 | Listener::Listener() 117 | { 118 | mConnected = false; 119 | mExited = false; 120 | mFocused = false; 121 | mInitialized = false; 122 | mNewFrame = false; 123 | } 124 | 125 | void Listener::onConnect( const Leap::Controller& controller ) 126 | { 127 | lock_guard lock( *mMutex ); 128 | mConnected = true; 129 | } 130 | 131 | void Listener::onDisconnect( const Leap::Controller& controller ) 132 | { 133 | lock_guard lock( *mMutex ); 134 | mConnected = false; 135 | } 136 | 137 | void Listener::onExit( const Leap::Controller& controller ) 138 | { 139 | lock_guard lock( *mMutex ); 140 | mExited = true; 141 | } 142 | 143 | void Listener::onFocusGained( const Leap::Controller& controller ) 144 | { 145 | lock_guard lock( *mMutex ); 146 | mFocused = true; 147 | } 148 | 149 | void Listener::onFocusLost( const Leap::Controller& controller ) 150 | { 151 | lock_guard lock( *mMutex ); 152 | mFocused = false; 153 | } 154 | 155 | void Listener::onFrame( const Leap::Controller& controller ) 156 | { 157 | lock_guard lock( *mMutex ); 158 | if ( !mNewFrame ) { 159 | mFrame = controller.frame(); 160 | mNewFrame = true; 161 | } 162 | } 163 | 164 | void Listener::onInit( const Leap::Controller& controller ) 165 | { 166 | lock_guard lock( *mMutex ); 167 | mInitialized = true; 168 | } 169 | 170 | ////////////////////////////////////////////////////////////////////////////////////////////// 171 | 172 | DeviceRef Device::create() 173 | { 174 | return DeviceRef( new Device() ); 175 | } 176 | 177 | Device::Device() 178 | { 179 | mListener.mMutex = &mMutex; 180 | mController = new Leap::Controller( mListener ); 181 | 182 | App::get()->getSignalUpdate().connect( bind( &Device::update, this ) ); 183 | } 184 | 185 | Device::~Device() 186 | { 187 | disconnectEventHandler(); 188 | mController->removeListener( mListener ); 189 | } 190 | 191 | Leap::Controller* Device::getController() const 192 | { 193 | return mController; 194 | } 195 | 196 | bool Device::hasExited() const 197 | { 198 | return mListener.mExited; 199 | } 200 | 201 | bool Device::hasFocus() const 202 | { 203 | return mListener.mFocused; 204 | } 205 | 206 | bool Device::isConnected() const 207 | { 208 | return mListener.mConnected; 209 | } 210 | 211 | bool Device::isInitialized() const 212 | { 213 | return mListener.mInitialized; 214 | } 215 | 216 | void Device::connectEventHandler( const function& eventHandler ) 217 | { 218 | mEventHandler = eventHandler; 219 | } 220 | 221 | void Device::disconnectEventHandler() 222 | { 223 | mEventHandler = nullptr; 224 | } 225 | 226 | void Device::update() 227 | { 228 | lock_guard lock( mMutex ); 229 | if ( mListener.mConnected && mListener.mInitialized && mListener.mNewFrame ) { 230 | mEventHandler( mListener.mFrame ); 231 | mListener.mNewFrame = false; 232 | } 233 | } 234 | 235 | } 236 | -------------------------------------------------------------------------------- /samples/MotionApp/src/MotionApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "cinder/app/App.h" 38 | #include "cinder/Camera.h" 39 | #include "cinder/params/Params.h" 40 | #include "Cinder-LeapMotion.h" 41 | 42 | class MotionApp : public ci::app::App 43 | { 44 | public: 45 | MotionApp(); 46 | 47 | void draw() override; 48 | void update() override; 49 | private: 50 | enum 51 | { 52 | FREE, ROTATE, SCALE, TRANSLATE 53 | } typedef Motion; 54 | bool mConstrainMotion; 55 | 56 | Leap::Frame mFrame; 57 | LeapMotion::DeviceRef mDevice; 58 | void onFrame( Leap::Frame frame ); 59 | 60 | float mRotAngle; 61 | ci::vec3 mRotAxis; 62 | float mScale; 63 | ci::mat4 mTransform; 64 | ci::vec3 mTranslate; 65 | 66 | ci::CameraPersp mCamera; 67 | 68 | float mFrameRate; 69 | bool mFullScreen; 70 | ci::params::InterfaceGlRef mParams; 71 | void screenShot(); 72 | }; 73 | 74 | #include "cinder/app/RendererGl.h" 75 | #include "cinder/gl/gl.h" 76 | #include "cinder/ImageIo.h" 77 | #include "cinder/Utilities.h" 78 | 79 | using namespace ci; 80 | using namespace ci::app; 81 | using namespace LeapMotion; 82 | using namespace std; 83 | 84 | static const float kRestitution = 0.021f; 85 | static const float kRotSpeed = 0.33f; 86 | static const float kTranslateSpeed = 0.0033f; 87 | 88 | MotionApp::MotionApp() 89 | { 90 | mCamera = CameraPersp( getWindowWidth(), getWindowHeight(), 45.0f, 0.01f, 10.0f ); 91 | mCamera.lookAt( vec3( 0.0f, 0.0f, 3.0f ), vec3( 0.0f ) ); 92 | 93 | mConstrainMotion = false; 94 | 95 | mRotAngle = 0.0f; 96 | mRotAxis = vec3( 0.0f ); 97 | mScale = 1.0f; 98 | mTranslate = vec3( 0.0f ); 99 | 100 | mDevice = Device::create(); 101 | mDevice->connectEventHandler( &MotionApp::onFrame, this ); 102 | 103 | mFrameRate = 0.0f; 104 | mFullScreen = false; 105 | mParams = params::InterfaceGl::create( "Params", ivec2( 200, 120 ) ); 106 | mParams->addParam( "Frame rate", &mFrameRate, "", true ); 107 | mParams->addParam( "Constrain motion", &mConstrainMotion ).key( "m" ); 108 | mParams->addParam( "Full screen", &mFullScreen ).key( "f" ); 109 | mParams->addButton( "Screen shot", [ & ]() { screenShot(); }, "key=space" ); 110 | mParams->addButton( "Quit", [ & ]() { quit(); }, "key=q" ); 111 | 112 | gl::enable( GL_POLYGON_SMOOTH ); 113 | glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST ); 114 | gl::enableVerticalSync(); 115 | gl::enableAlphaBlending(); 116 | gl::enableDepthRead(); 117 | gl::enableDepthWrite(); 118 | } 119 | 120 | void MotionApp::draw() 121 | { 122 | gl::viewport( getWindowSize() ); 123 | gl::clear( Colorf::white() ); 124 | gl::setMatrices( mCamera ); 125 | 126 | { 127 | const gl::ScopedMatrices scopedMatrices; 128 | gl::multModelMatrix( mTransform ); 129 | gl::drawColorCube( vec3( 0.0f ), vec3( 1.0f ) ); 130 | } 131 | 132 | mParams->draw(); 133 | } 134 | 135 | void MotionApp::onFrame( Leap::Frame frame ) 136 | { 137 | const Leap::HandList& hands = frame.hands(); 138 | for ( Leap::HandList::const_iterator handIter = hands.begin(); handIter != hands.end(); ++handIter ) { 139 | const Leap::Hand& hand = *handIter; 140 | 141 | Motion motion = FREE; 142 | 143 | // When constraining to a motion, this routine sorts the probabilities 144 | // for each motion and uses the highest value to select a type of motion 145 | if ( mConstrainMotion ) { 146 | map motions; 147 | vector values; 148 | motions[ hand.rotationProbability( mFrame ) ] = ROTATE; 149 | motions[ hand.scaleProbability( mFrame ) ] = SCALE; 150 | motions[ hand.translationProbability( mFrame ) ] = TRANSLATE; 151 | for ( map::const_iterator iter = motions.begin(); iter != motions.end(); ++iter ) { 152 | values.push_back( iter->first ); 153 | } 154 | sort( values.begin(), values.end(), []( float a, float b ) 155 | { 156 | return a > b; 157 | }); 158 | motion = motions[ values.at( 0 ) ]; 159 | } 160 | 161 | if ( motion == FREE || motion == ROTATE ) { 162 | mRotAngle += hand.rotationAngle( mFrame ) * kRotSpeed; 163 | mRotAxis += LeapMotion::toVec3( hand.rotationAxis( mFrame ) ) * -1.0f; // Mirror 164 | } 165 | if ( motion == FREE || motion == SCALE ) { 166 | mScale *= hand.scaleFactor( mFrame ); 167 | } 168 | if ( motion == FREE || motion == TRANSLATE ) { 169 | mTranslate += LeapMotion::toVec3( hand.translation( mFrame ) ) * kTranslateSpeed; 170 | } 171 | } 172 | mFrame = frame; 173 | } 174 | 175 | void MotionApp::screenShot() 176 | { 177 | writeImage( getAppPath() / fs::path( "frame" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() ); 178 | } 179 | 180 | void MotionApp::update() 181 | { 182 | mFrameRate = getAverageFps(); 183 | 184 | if ( mFullScreen != isFullScreen() ) { 185 | setFullScreen( mFullScreen ); 186 | } 187 | 188 | // Smooth animation 189 | mRotAngle = lerp( mRotAngle, 0.0f, kRestitution ); 190 | mRotAxis = lerp( mRotAxis, vec3( 0.0f), kRestitution ); 191 | mScale = lerp( mScale, 1.0f, kRestitution ); 192 | mTranslate = lerp( mTranslate, vec3( 0.0f), kRestitution ); 193 | 194 | // Update cube transform 195 | mTransform = mat4( 1.0f ); 196 | mTransform = glm::translate( mTransform, mTranslate ); 197 | mTransform = glm::rotate( mTransform, mRotAngle, mRotAxis ); 198 | mTransform = glm::translate( mTransform, mTranslate * -1.0f ); 199 | mTransform = glm::translate( mTransform, mTranslate ); 200 | mTransform = glm::scale( mTransform, vec3( mScale ) ); 201 | } 202 | 203 | RendererGl::Options gOptions; 204 | CINDER_APP( MotionApp, RendererGl( gOptions.msaa( 16 ) ), []( App::Settings* settings ) 205 | { 206 | settings->setWindowSize( 1024, 768 ); 207 | settings->disableFrameRate(); 208 | } ) 209 | -------------------------------------------------------------------------------- /samples/LeapApp/src/LeapApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "cinder/app/App.h" 38 | #include "cinder/Camera.h" 39 | #include "cinder/params/Params.h" 40 | #include "Cinder-LeapMotion.h" 41 | 42 | class LeapApp : public ci::app::App 43 | { 44 | public: 45 | LeapApp(); 46 | 47 | void draw() override; 48 | void update() override; 49 | private: 50 | LeapMotion::DeviceRef mDevice; 51 | Leap::Frame mFrame; 52 | void onFrame( Leap::Frame frame ); 53 | 54 | ci::CameraPersp mCamera; 55 | 56 | float mFrameRate; 57 | bool mFullScreen; 58 | ci::params::InterfaceGlRef mParams; 59 | void screenShot(); 60 | }; 61 | 62 | #include "cinder/app/RendererGl.h" 63 | #include "cinder/gl/gl.h" 64 | #include "cinder/ImageIo.h" 65 | #include "cinder/Utilities.h" 66 | 67 | using namespace ci; 68 | using namespace ci::app; 69 | using namespace LeapMotion; 70 | using namespace std; 71 | 72 | LeapApp::LeapApp() 73 | { 74 | mFrameRate = 0.0f; 75 | mFullScreen = false; 76 | 77 | mCamera = CameraPersp( getWindowWidth(), getWindowHeight(), 60.0f, 1.0f, 1000.0f ); 78 | mCamera.lookAt( vec3( 0.0f, 250.0f, 500.0f ), vec3( 0.0f, 250.0f, 0.0f ) ); 79 | 80 | mDevice = Device::create(); 81 | mDevice->connectEventHandler( &LeapApp::onFrame, this ); 82 | 83 | mParams = params::InterfaceGl::create( "Params", ivec2( 200, 105 ) ); 84 | mParams->addParam( "Frame rate", &mFrameRate, "", true ); 85 | mParams->addParam( "Full screen", &mFullScreen ).key( "f" ); 86 | mParams->addButton( "Screen shot", bind( &LeapApp::screenShot, this ), "key=space" ); 87 | mParams->addButton( "Quit", bind( &LeapApp::quit, this ), "key=q" ); 88 | 89 | gl::enable( GL_LINE_SMOOTH ); 90 | glHint( GL_LINE_SMOOTH_HINT, GL_NICEST ); 91 | gl::enable( GL_POLYGON_SMOOTH ); 92 | glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST ); 93 | gl::enableVerticalSync(); 94 | } 95 | 96 | void LeapApp::draw() 97 | { 98 | const gl::ScopedViewport scopedViewport( ivec2( 0 ), getWindowSize() ); 99 | const gl::ScopedMatrices scopedMatrices; 100 | const gl::ScopedBlendAlpha scopedBlendAlpha; 101 | gl::clear( Colorf::white() ); 102 | gl::setMatrices( mCamera ); 103 | 104 | gl::enableDepthRead(); 105 | gl::enableDepthWrite(); 106 | 107 | float headLength = 6.0f; 108 | float headRadius = 3.0f; 109 | const Leap::HandList& hands = mFrame.hands(); 110 | for ( Leap::HandList::const_iterator handIter = hands.begin(); handIter != hands.end(); ++handIter ) { 111 | const Leap::Hand& hand = *handIter; 112 | 113 | // Get hand data 114 | const vec3 handDir = LeapMotion::toVec3( hand.direction() ); 115 | const vec3 palmNorm = LeapMotion::toVec3( hand.palmNormal() ); 116 | const vec3 palmPos = LeapMotion::toVec3( hand.palmPosition() ); 117 | const vec3 palmVel = LeapMotion::toVec3( hand.palmVelocity() ); 118 | const vec3 sphereCenter = LeapMotion::toVec3( hand.sphereCenter() ); 119 | const float sphereRadius = hand.sphereRadius(); 120 | 121 | // Hand sphere 122 | { 123 | const gl::ScopedColor scopedColor( ColorAf( Colorf::gray( 0.9f ), 0.5f ) ); 124 | gl::enableWireframe(); 125 | gl::drawSphere( sphereCenter, sphereRadius, 16 ); 126 | gl::disableWireframe(); 127 | } 128 | 129 | // Hand plane 130 | { 131 | const gl::ScopedColor scopedColor( ColorAf( 0.75f, 0.0f, 0.75f, 0.25f ) ); 132 | const gl::ScopedModelMatrix scopedModelMatrix; 133 | gl::translate( palmPos ); 134 | gl::rotate( quat( palmPos, handDir ) ); 135 | for ( float i = 0.25f; i <= 1.0f; i += 0.25f ) { 136 | gl::drawStrokedCircle( vec2( 0.0f ), sphereRadius * i, 16 ); 137 | } 138 | } 139 | 140 | // Hand direction 141 | { 142 | const gl::ScopedColor scopedColor( ColorAf( 1.0f, 0.0f, 1.0f, 0.5f ) ); 143 | gl::drawVector( palmPos, palmPos + handDir * 30.0f, headLength, headRadius ); 144 | } 145 | 146 | // Hand normal 147 | { 148 | const gl::ScopedColor scopedColor( ColorAf( 0.0f, 0.0f, 1.0f, 0.5f ) ); 149 | gl::drawVector( palmPos, palmPos + palmNorm * 30.0f, headLength, headRadius ); 150 | } 151 | 152 | // Hand velocity 153 | { 154 | const gl::ScopedColor scopedColor( ColorAf( 0.0f, 1.0f, 0.0f, 0.5f ) ); 155 | gl::drawVector( palmPos, palmPos + palmVel * 0.05f, headLength, headRadius ); 156 | } 157 | 158 | // Fingers 159 | const Leap::PointableList& pointables = hand.pointables(); 160 | for ( Leap::PointableList::const_iterator pointIter = pointables.begin(); pointIter != pointables.end(); ++pointIter ) { 161 | const Leap::Pointable& pointable = *pointIter; 162 | 163 | // Get pointable data 164 | const vec3 dir = LeapMotion::toVec3( pointable.direction() ); 165 | const bool isTool = pointable.isTool(); 166 | const float length = pointable.length(); 167 | const vec3 tipPos = LeapMotion::toVec3( pointable.tipPosition() ); 168 | const vec3 tipVel = LeapMotion::toVec3( pointable.tipVelocity() ); 169 | const float width = pointable.width(); 170 | const vec3 basePos = tipPos + dir * -length; 171 | 172 | // Draw line representing pointable's length 173 | { 174 | const gl::ScopedColor scopedColor( ColorAf::gray( 0.3f ) ); 175 | gl::drawLine( basePos, tipPos ); 176 | } 177 | 178 | // Tip position 179 | { 180 | const gl::ScopedColor scopedColor( isTool ? Colorf( 1.0f, 0.0f, 0.0f ) : Colorf::black() ); 181 | const gl::ScopedModelMatrix scopedModelMatrix; 182 | gl::translate( tipPos ); 183 | gl::drawStrokedCircle( vec2( 0.0f ), width, 16 ); 184 | } 185 | 186 | // Finger velocity 187 | { 188 | const gl::ScopedColor scopedColor( ColorAf( 0.0f, 1.0f, 0.0f, 0.5f ) ); 189 | gl::drawVector( tipPos, tipPos + tipVel * 0.05f, headLength, headRadius ); 190 | } 191 | } 192 | } 193 | 194 | mParams->draw(); 195 | } 196 | 197 | void LeapApp::onFrame( Leap::Frame frame ) 198 | { 199 | mFrame = frame; 200 | } 201 | 202 | void LeapApp::screenShot() 203 | { 204 | writeImage( getAppPath() / fs::path( "frame" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() ); 205 | } 206 | 207 | void LeapApp::update() 208 | { 209 | mFrameRate = getAverageFps(); 210 | 211 | if ( mFullScreen != isFullScreen() ) { 212 | setFullScreen( mFullScreen ); 213 | } 214 | } 215 | 216 | RendererGl::Options gOptions; 217 | CINDER_APP( LeapApp, RendererGl( gOptions.msaa( 16 ) ), []( App::Settings* settings ) 218 | { 219 | settings->setWindowSize( 1024, 768 ); 220 | settings->disableFrameRate(); 221 | } ) 222 | -------------------------------------------------------------------------------- /samples/TracerApp/src/TracerApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "cinder/app/App.h" 38 | #include "cinder/Camera.h" 39 | #include "cinder/gl/gl.h" 40 | #include "cinder/params/Params.h" 41 | #include "Cinder-LeapMotion.h" 42 | #include "Ribbon.h" 43 | 44 | class TracerApp : public ci::app::App 45 | { 46 | public: 47 | TracerApp(); 48 | 49 | void draw() override; 50 | void resize() override; 51 | void update() override; 52 | private: 53 | RibbonMap mRibbons; 54 | 55 | Leap::Frame mFrame; 56 | LeapMotion::DeviceRef mDevice; 57 | 58 | ci::gl::BatchRef mBatchBlur; 59 | ci::gl::FboRef mFbo[ 3 ]; 60 | 61 | ci::CameraPersp mCamera; 62 | 63 | float mFrameRate; 64 | bool mFullScreen; 65 | ci::params::InterfaceGlRef mParams; 66 | void screenShot(); 67 | }; 68 | 69 | #include "cinder/app/RendererGl.h" 70 | #include "cinder/gl/Context.h" 71 | #include "cinder/ImageIo.h" 72 | #include "cinder/Log.h" 73 | #include "cinder/Rand.h" 74 | #include "cinder/Utilities.h" 75 | #include "Resources.h" 76 | 77 | using namespace ci; 78 | using namespace ci::app; 79 | using namespace LeapMotion; 80 | using namespace std; 81 | TracerApp::TracerApp() 82 | { 83 | mFrameRate = 0.0f; 84 | mFullScreen = isFullScreen(); 85 | 86 | mCamera = CameraPersp( getWindowWidth(), getWindowHeight(), 60.0f, 0.01f, 1000.0f ); 87 | mCamera.lookAt( vec3( 0.0f, 93.75f, 250.0f ), vec3( 0.0f, 250.0f, 0.0f ) ); 88 | 89 | mDevice = Device::create(); 90 | mDevice->connectEventHandler( [ & ]( Leap::Frame frame ) 91 | { 92 | mFrame = frame; 93 | } ); 94 | 95 | gl::GlslProgRef glsl; 96 | try { 97 | glsl = gl::GlslProg::create( gl::GlslProg::Format() 98 | .vertex( loadResource( RES_GLSL_PASS_THROUGH_VERT ) ) 99 | .fragment( loadResource( RES_GLSL_BLUR_FRAG ) ) 100 | .version( 330 ) ); 101 | } catch ( gl::GlslProgCompileExc ex ) { 102 | CI_LOG_V( "Unable to compile blur X shader: \n" << string( ex.what() ) ); 103 | quit(); 104 | return; 105 | } 106 | 107 | glsl->uniform( "uSampler", 0 ); 108 | mBatchBlur = gl::Batch::create( geom::Rect() 109 | .texCoords( vec2( 0.0f ), vec2( 1.0f, 0.0f ), vec2( 1.0f ), vec2( 0.0f, 1.0f ) ), 110 | glsl ); 111 | 112 | resize(); 113 | 114 | mParams = params::InterfaceGl::create( "Params", ivec2( 200, 105 ) ); 115 | mParams->addParam( "Frame rate", &mFrameRate, "", true ); 116 | mParams->addParam( "Full screen", &mFullScreen ).key( "f" ); 117 | mParams->addButton( "Screen shot", [ & ]() { screenShot(); }, "key=space" ); 118 | mParams->addButton( "Quit", [ & ]() { quit(); }, "key=q" ); 119 | 120 | gl::enableVerticalSync(); 121 | } 122 | 123 | void TracerApp::draw() 124 | { 125 | const gl::ScopedViewport scopedViewport( ivec2( 0 ), getWindowSize() ); 126 | gl::enableDepthRead(); 127 | gl::enableDepthWrite(); 128 | 129 | // Add to accumulation buffer 130 | { 131 | gl::ScopedFramebuffer scopedFramebuffer( mFbo[ 0 ] ); 132 | 133 | // Dim last frame 134 | { 135 | const gl::ScopedMatrices scopedMatrices; 136 | const gl::ScopedBlendAlpha scopedBlendAlpha; 137 | const gl::ScopedColor scopedColor( ColorAf( Colorf::black(), 0.075f ) ); 138 | gl::setMatricesWindow( getWindowSize() ); 139 | gl::drawSolidRect( Rectf( mFbo[ 0 ]->getBounds() ) ); 140 | } 141 | 142 | // Draw finger tips into the accumulation buffer 143 | { 144 | const gl::ScopedMatrices scopedMatrices; 145 | const gl::ScopedBlendAdditive scopedBlendAdditive; 146 | gl::setMatrices( mCamera ); 147 | for ( RibbonMap::const_iterator iter = mRibbons.begin(); iter != mRibbons.end(); ++iter ) { 148 | iter->second.draw(); 149 | } 150 | } 151 | } 152 | 153 | const gl::ScopedMatrices scopedMatrices; 154 | gl::setMatricesWindow( getWindowSize() ); 155 | gl::disableDepthRead(); 156 | gl::disableDepthWrite(); 157 | 158 | // Blur the accumulation buffer 159 | vec2 pixel = ( vec2( 1.0f ) / vec2( mFbo[ 0 ]->getSize() ) ) * 3.0f; 160 | for ( size_t i = 0; i < 2; ++i ) { 161 | gl::ScopedFramebuffer scopedFramebuffer( mFbo[ i + 1 ] ); 162 | gl::clear(); 163 | const gl::ScopedModelMatrix scopedModelMatrix; 164 | gl::ScopedTextureBind scopedTextureBind( mFbo[ i ]->getColorTexture() ); 165 | mBatchBlur->getGlslProg()->uniform( "uSize", pixel * ( i == 0 ? vec2( 1.0f, 0.0f ) : vec2( 0.0f, 1.0f ) ) ); 166 | gl::translate( getWindowCenter() ); 167 | gl::scale( getWindowSize() ); 168 | mBatchBlur->draw(); 169 | } 170 | 171 | // Draw blurred image 172 | gl::clear(); 173 | { 174 | const gl::ScopedColor scopedColor( ColorAf::white() ); 175 | gl::draw( mFbo[ 0 ]->getColorTexture(), getWindowBounds() ); 176 | } 177 | { 178 | const gl::ScopedColor scopedColor( ColorAf( Colorf::white(), 0.8f ) ); 179 | gl::draw( mFbo[ 2 ]->getColorTexture(), getWindowBounds() ); 180 | } 181 | 182 | mParams->draw(); 183 | } 184 | 185 | void TracerApp::screenShot() 186 | { 187 | writeImage( getAppPath() / fs::path( "frame" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() ); 188 | } 189 | 190 | void TracerApp::resize() 191 | { 192 | for ( size_t i = 0; i < 3; ++i ) { 193 | gl::Fbo::Format format; 194 | format.colorTexture( 195 | #if defined( GL_RGBA32F ) 196 | gl::Texture2d::Format().internalFormat( GL_RGBA32F ) 197 | #elif defined( GL_RGBA32F_ARB ) 198 | gl::Texture2d::Format().internalFormat( GL_RGBA32F_ARB ) 199 | #endif 200 | ).disableDepth(); 201 | mFbo[ i ] = gl::Fbo::create( getWindowWidth(), getWindowHeight(), format ); 202 | gl::ScopedFramebuffer scopedFramebuffer( mFbo[ i ] ); 203 | gl::viewport( mFbo[ i ]->getSize() ); 204 | gl::clear(); 205 | } 206 | } 207 | 208 | void TracerApp::update() 209 | { 210 | mFrameRate = getAverageFps(); 211 | 212 | if ( mFullScreen != isFullScreen() ) { 213 | setFullScreen( mFullScreen ); 214 | mFullScreen = isFullScreen(); 215 | } 216 | 217 | // Process hand data 218 | const Leap::HandList& hands = mFrame.hands(); 219 | for ( Leap::HandList::const_iterator handIter = hands.begin(); handIter != hands.end(); ++handIter ) { 220 | const Leap::Hand& hand = *handIter; 221 | 222 | const Leap::FingerList& fingers = hand.fingers(); 223 | for ( Leap::FingerList::const_iterator iter = fingers.begin(); iter != fingers.end(); ++iter ) { 224 | const Leap::Finger& finger = *iter; 225 | if ( finger.isExtended() ) { 226 | int32_t id = finger.id(); 227 | if ( mRibbons.find( id ) == mRibbons.end() ) { 228 | vec3 v = randVec3(); 229 | v.x = math::abs( v.x ); 230 | v.y = math::abs( v.y ); 231 | v.z = math::abs( v.z ); 232 | Colorf color( ColorModel::CM_RGB, v ); 233 | Ribbon ribbon( id, color ); 234 | mRibbons[ id ] = ribbon; 235 | } 236 | float width = math::abs( finger.tipVelocity().y ) * 0.00075f; 237 | width = math::max( width, 2.0f ); 238 | mRibbons.at( id ).addPoint( LeapMotion::toVec3( finger.tipPosition() ), width ); 239 | } 240 | } 241 | } 242 | 243 | // Update ribbons 244 | for ( RibbonMap::iterator iter = mRibbons.begin(); iter != mRibbons.end(); ++iter ) { 245 | iter->second.update(); 246 | } 247 | } 248 | 249 | RendererGl::Options gOptions; 250 | CINDER_APP( TracerApp, RendererGl( gOptions.coreProfile( true ).version( 3, 3 ).msaa( 16 ) ), []( App::Settings* settings ) 251 | { 252 | settings->setWindowSize( 1024, 768 ); 253 | settings->disableFrameRate(); 254 | } ) 255 | -------------------------------------------------------------------------------- /samples/UiApp/src/UiApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2016, Ban the Rewind 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or 7 | * without modification, are permitted provided that the following 8 | * conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of the Ban the Rewind nor the names of its 18 | * contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written 20 | * permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | */ 36 | 37 | #include "cinder/app/App.h" 38 | #include "cinder/gl/gl.h" 39 | #include "cinder/params/Params.h" 40 | #include "Cinder-LeapMotion.h" 41 | 42 | class UiApp : public ci::app::App 43 | { 44 | public: 45 | UiApp(); 46 | 47 | void draw() override; 48 | void resize() override; 49 | void update() override; 50 | private: 51 | Leap::Frame mFrame; 52 | LeapMotion::DeviceRef mDevice; 53 | ci::vec2 warpPointable( const Leap::Pointable& p ); 54 | ci::vec2 warpVector( const Leap::Vector& v ); 55 | 56 | enum 57 | { 58 | GRAB, HAND, TOUCH, NONE 59 | } typedef CursorType; 60 | ci::vec2 mCursorPosition; 61 | ci::vec2 mCursorPositionTarget; 62 | CursorType mCursorType; 63 | ci::vec2 mFingerTipPosition; 64 | ci::gl::TextureRef mTexture[ 3 ]; 65 | 66 | // UI 67 | ci::gl::TextureRef mButton[ 2 ]; 68 | ci::vec2 mButtonPosition[ 3 ]; 69 | bool mButtonState[ 3 ]; 70 | ci::gl::TextureRef mSlider; 71 | ci::vec2 mSliderPosition; 72 | ci::gl::TextureRef mTrack; 73 | ci::vec2 mTrackPosition; 74 | 75 | // Params 76 | float mFrameRate; 77 | bool mFullScreen; 78 | ci::params::InterfaceGlRef mParams; 79 | 80 | // Save screen shot 81 | void screenShot(); 82 | }; 83 | 84 | #include "cinder/app/RendererGl.h" 85 | #include "cinder/ImageIo.h" 86 | #include "cinder/Utilities.h" 87 | #include "Resources.h" 88 | 89 | using namespace ci; 90 | using namespace ci::app; 91 | using namespace LeapMotion; 92 | using namespace std; 93 | 94 | UiApp::UiApp() 95 | { 96 | mDevice = Device::create(); 97 | mDevice->connectEventHandler( [ & ]( Leap::Frame frame ) 98 | { 99 | mFrame = frame; 100 | } ); 101 | 102 | for ( size_t i = 0; i < 3; ++i ) { 103 | switch ( (CursorType)i ) { 104 | case CursorType::GRAB: 105 | mTexture[ i ] = gl::Texture::create( loadImage( loadResource( RES_TEX_GRAB ) ) ); 106 | break; 107 | case CursorType::HAND: 108 | mTexture[ i ] = gl::Texture::create( loadImage( loadResource( RES_TEX_HAND ) ) ); 109 | break; 110 | case CursorType::TOUCH: 111 | mTexture[ i ] = gl::Texture::create( loadImage( loadResource( RES_TEX_TOUCH ) ) ); 112 | break; 113 | case NONE: 114 | break; 115 | } 116 | mTexture[ i ]->setMagFilter( GL_NEAREST ); 117 | mTexture[ i ]->setMinFilter( GL_NEAREST ); 118 | } 119 | 120 | mCursorType = CursorType::NONE; 121 | mCursorPosition = vec2( 0.0f ); 122 | mCursorPositionTarget = vec2( 0.0f ); 123 | mFingerTipPosition = ivec2( 0 ); 124 | 125 | mButton[ 0 ] = gl::Texture::create( loadImage( loadResource( RES_TEX_BUTTON_OFF ) ) ); 126 | mButton[ 1 ] = gl::Texture::create( loadImage( loadResource( RES_TEX_BUTTON_ON ) ) ); 127 | mSlider = gl::Texture::create( loadImage( loadResource( RES_TEX_SLIDER ) ) ); 128 | mTrack = gl::Texture::create( loadImage( loadResource( RES_TEX_TRACK ) ) ); 129 | 130 | mButton[ 0 ]->setMagFilter( GL_NEAREST ); 131 | mButton[ 0 ]->setMinFilter( GL_NEAREST ); 132 | mButton[ 1 ]->setMagFilter( GL_NEAREST ); 133 | mButton[ 1 ]->setMinFilter( GL_NEAREST ); 134 | mSlider->setMagFilter( GL_NEAREST ); 135 | mSlider->setMinFilter( GL_NEAREST ); 136 | mTrack->setMagFilter( GL_NEAREST ); 137 | mTrack->setMinFilter( GL_NEAREST ); 138 | 139 | mFrameRate = 0.0f; 140 | mFullScreen = false; 141 | mParams = params::InterfaceGl::create( "Params", ivec2( 200, 105 ) ); 142 | mParams->addParam( "Frame rate", &mFrameRate, "", true ); 143 | mParams->addParam( "Full screen", &mFullScreen ).key( "f" ); 144 | mParams->addButton( "Screen shot", [ & ]() { screenShot(); }, "key=space" ); 145 | mParams->addButton( "Quit", [ & ]() { quit(); }, "key=q" ); 146 | 147 | resize(); 148 | } 149 | 150 | void UiApp::draw() 151 | { 152 | gl::viewport( getWindowSize() ); 153 | gl::clear( Colorf::white() ); 154 | gl::setMatricesWindow( getWindowSize() ); 155 | gl::color( ColorAf::white() ); 156 | 157 | gl::enableAlphaBlending(); 158 | gl::disableDepthRead(); 159 | gl::disableDepthWrite(); 160 | 161 | gl::pushMatrices(); 162 | 163 | for ( size_t i = 0; i < 3; ++i ) { 164 | bool pressed = mButtonState[ i ]; 165 | gl::pushMatrices(); 166 | gl::translate( mButtonPosition[ i ] ); 167 | gl::draw( mButton[ pressed ? 1 : 0 ] ); 168 | gl::popMatrices(); 169 | } 170 | 171 | // Draw slider 172 | gl::pushMatrices(); 173 | gl::translate( mTrackPosition ); 174 | gl::draw( mTrack ); 175 | gl::popMatrices(); 176 | gl::pushMatrices(); 177 | gl::translate( mSliderPosition ); 178 | gl::draw( mSlider ); 179 | gl::popMatrices(); 180 | 181 | // Draw cursor 182 | if ( mCursorType != CursorType::NONE ) { 183 | gl::color( ColorAf::white() ); 184 | gl::pushMatrices(); 185 | gl::translate( mCursorPosition ); 186 | gl::draw( mTexture[ (size_t)mCursorType ] ); 187 | gl::popMatrices(); 188 | } 189 | 190 | gl::popMatrices(); 191 | 192 | // Draw finger position for pressing buttons 193 | if ( mCursorType == CursorType::TOUCH ) { 194 | gl::color( ColorAf( 1.0f, 0.7f, 0.0f ) ); 195 | gl::drawSolidCircle( mFingerTipPosition, 20.0f ); 196 | gl::drawStrokedCircle( mFingerTipPosition, 40.0f ); 197 | } 198 | 199 | mParams->draw(); 200 | } 201 | 202 | // Take screen shot 203 | void UiApp::screenShot() 204 | { 205 | writeImage( getAppPath() / fs::path( "frame" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() ); 206 | } 207 | 208 | void UiApp::resize() 209 | { 210 | float h = (float)getWindowHeight() * 0.333f; 211 | float w = (float)getWindowWidth() * 0.25f; 212 | vec2 position( w, h ); 213 | position -= vec2( mButton[ 0 ]->getSize() ) * 0.5f; 214 | for ( size_t i = 0; i < 3; ++i, position.x += w ) { 215 | mButtonPosition[ i ] = position; 216 | mButtonState[ i ] = false; 217 | } 218 | 219 | position = vec2( w * 2.0f, h * 2.0f ); 220 | mTrackPosition = position - vec2( mTrack->getSize() ) * 0.5f; 221 | mSliderPosition = mTrackPosition; 222 | mSliderPosition.y -= 45.0f; 223 | } 224 | 225 | void UiApp::update() 226 | { 227 | mFrameRate = getAverageFps(); 228 | 229 | if ( mFullScreen != isFullScreen() ) { 230 | setFullScreen( mFullScreen ); 231 | } 232 | 233 | // Interact with first hand only 234 | const Leap::HandList& hands = mFrame.hands(); 235 | if ( hands.isEmpty() ) { 236 | mCursorType = CursorType::NONE; 237 | } else { 238 | const Leap::Hand& hand = *hands.begin(); 239 | 240 | // Update cursor position 241 | mCursorPositionTarget = warpVector( hand.stabilizedPalmPosition() ); 242 | if ( mCursorType == CursorType::NONE ) { 243 | mCursorPosition = mCursorPositionTarget; 244 | } 245 | 246 | // Choose cursor type based on number of extended fingers 247 | switch ( hand.fingers().extended().count() ) { 248 | case 0: 249 | mCursorType = CursorType::GRAB; 250 | 251 | // Slider 252 | if ( mCursorPosition.y > getWindowCenter().y ) { 253 | float x1 = mTrackPosition.x; 254 | float x2 = mTrackPosition.x + (float)( mTrack->getWidth() - mSlider->getWidth() ); 255 | mSliderPosition.x = math::clamp( mCursorPosition.x, x1, x2 ); 256 | } 257 | break; 258 | case 1: 259 | mCursorType = CursorType::TOUCH; 260 | 261 | // Buttons 262 | mFingerTipPosition = warpPointable( *hand.fingers().begin() ); 263 | for ( size_t i = 0; i < 3; ++i ) { 264 | mButtonState[ i ] = false; 265 | if ( mButton[ 0 ]->getBounds().contains( mFingerTipPosition - mButtonPosition[ i ] ) ) { 266 | mButtonState[ i ] = true; 267 | } 268 | } 269 | break; 270 | default: 271 | mCursorType = CursorType::HAND; 272 | break; 273 | } 274 | } 275 | 276 | // Smooth cursor animation 277 | mCursorPosition = lerp( mCursorPosition, mCursorPositionTarget, 0.21f ); 278 | } 279 | 280 | vec2 UiApp::warpPointable( const Leap::Pointable& p ) 281 | { 282 | vec3 result( 0.0f ); 283 | if ( mDevice ) { 284 | const Leap::Screen& screen = mDevice->getController()->locatedScreens().closestScreenHit( p ); 285 | 286 | result = LeapMotion::toVec3( screen.intersect( p, true, 1.0f ) ); 287 | } 288 | result *= vec3( vec2( getWindowSize() ), 0.0f ); 289 | result.y = (float)getWindowHeight() - result.y; 290 | return vec2( result.x, result.y ); 291 | } 292 | 293 | vec2 UiApp::warpVector( const Leap::Vector& v ) 294 | { 295 | vec3 result( 0.0f ); 296 | if ( mDevice ) { 297 | const Leap::Screen& screen = mDevice->getController()->locatedScreens().closestScreen( v ); 298 | 299 | result = LeapMotion::toVec3( screen.project( v, true ) ); 300 | } 301 | result *= vec3( getWindowSize(), 0.0f ); 302 | result.y = (float)getWindowHeight() - result.y; 303 | return vec2( result.x, result.y ); 304 | } 305 | 306 | RendererGl::Options gOptions; 307 | CINDER_APP( UiApp, RendererGl( gOptions.msaa( 16 ) ), []( App::Settings* settings ) 308 | { 309 | settings->setWindowSize( 1024, 768 ); 310 | settings->disableFrameRate(); 311 | } ) 312 | 313 | -------------------------------------------------------------------------------- /samples/MotionApp/vc2013/MotionApp.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE} 38 | MotionApp 39 | Win32Proj 40 | 41 | 42 | 43 | Application 44 | Unicode 45 | true 46 | v120 47 | 48 | 49 | Application 50 | Unicode 51 | true 52 | v120 53 | 54 | 55 | Application 56 | Unicode 57 | v120 58 | 59 | 60 | Application 61 | Unicode 62 | v120 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | <_ProjectFileVersion>10.0.30319.1 82 | $(SolutionDir)bin\ 83 | $(Platform)\$(Configuration)\ 84 | true 85 | true 86 | $(SolutionDir)bin\ 87 | $(Platform)\$(Configuration)\ 88 | false 89 | false 90 | 91 | 92 | $(ProjectName)_d 93 | 94 | 95 | $(ProjectName)_d 96 | $(SolutionDir)bin\ 97 | 98 | 99 | $(SolutionDir)bin\ 100 | 101 | 102 | 103 | Disabled 104 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 105 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 106 | true 107 | EnableFastChecks 108 | MultiThreadedDebug 109 | 110 | 111 | Level3 112 | EditAndContinue 113 | 114 | 115 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 116 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 117 | true 118 | Windows 119 | false 120 | 121 | 122 | MachineX86 123 | LIBCMT 124 | 125 | 126 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 127 | 128 | 129 | ..\..\..\..\..\include 130 | 131 | 132 | 133 | 134 | Disabled 135 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 136 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 137 | EnableFastChecks 138 | MultiThreadedDebug 139 | 140 | 141 | Level3 142 | ProgramDatabase 143 | 144 | 145 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 146 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 147 | true 148 | Windows 149 | false 150 | 151 | 152 | LIBCMT 153 | 154 | 155 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 156 | 157 | 158 | ..\..\..\..\..\include 159 | 160 | 161 | 162 | 163 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 164 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 165 | MultiThreaded 166 | 167 | 168 | Level3 169 | ProgramDatabase 170 | 171 | 172 | true 173 | 174 | 175 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 176 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 177 | false 178 | true 179 | Windows 180 | true 181 | 182 | 183 | false 184 | 185 | 186 | MachineX86 187 | 188 | 189 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 190 | 191 | 192 | ..\..\..\..\..\include 193 | 194 | 195 | 196 | 197 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 198 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 199 | MultiThreaded 200 | 201 | 202 | Level3 203 | ProgramDatabase 204 | 205 | 206 | true 207 | 208 | 209 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 210 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 211 | false 212 | true 213 | Windows 214 | true 215 | 216 | 217 | false 218 | 219 | 220 | 221 | 222 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 223 | 224 | 225 | ..\..\..\..\..\include 226 | 227 | 228 | 229 | 230 | 231 | -------------------------------------------------------------------------------- /samples/GestureApp/vc2013/GestureApp.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE} 38 | GestureApp 39 | Win32Proj 40 | 41 | 42 | 43 | Application 44 | Unicode 45 | true 46 | v120 47 | 48 | 49 | Application 50 | Unicode 51 | true 52 | v120 53 | 54 | 55 | Application 56 | Unicode 57 | v120 58 | 59 | 60 | Application 61 | Unicode 62 | v120 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | <_ProjectFileVersion>10.0.30319.1 82 | $(SolutionDir)bin\ 83 | $(Platform)\$(Configuration)\ 84 | true 85 | true 86 | $(SolutionDir)bin\ 87 | $(Platform)\$(Configuration)\ 88 | false 89 | false 90 | 91 | 92 | $(ProjectName)_d 93 | 94 | 95 | $(ProjectName)_d 96 | $(SolutionDir)bin\ 97 | 98 | 99 | $(SolutionDir)bin\ 100 | 101 | 102 | 103 | Disabled 104 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 105 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 106 | true 107 | EnableFastChecks 108 | MultiThreadedDebug 109 | 110 | 111 | Level3 112 | EditAndContinue 113 | 114 | 115 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 116 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 117 | true 118 | Windows 119 | false 120 | 121 | 122 | MachineX86 123 | LIBCMT 124 | 125 | 126 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 127 | 128 | 129 | ..\..\..\..\..\include 130 | 131 | 132 | 133 | 134 | Disabled 135 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 136 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 137 | EnableFastChecks 138 | MultiThreadedDebug 139 | 140 | 141 | Level3 142 | ProgramDatabase 143 | 144 | 145 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 146 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 147 | true 148 | Windows 149 | false 150 | 151 | 152 | LIBCMT 153 | 154 | 155 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 156 | 157 | 158 | ..\..\..\..\..\include 159 | 160 | 161 | 162 | 163 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 164 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 165 | MultiThreaded 166 | 167 | 168 | Level3 169 | ProgramDatabase 170 | 171 | 172 | true 173 | 174 | 175 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 176 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 177 | false 178 | true 179 | Windows 180 | true 181 | 182 | 183 | false 184 | 185 | 186 | MachineX86 187 | 188 | 189 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 190 | 191 | 192 | ..\..\..\..\..\include 193 | 194 | 195 | 196 | 197 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 198 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 199 | MultiThreaded 200 | 201 | 202 | Level3 203 | ProgramDatabase 204 | 205 | 206 | true 207 | 208 | 209 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 210 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 211 | false 212 | true 213 | Windows 214 | true 215 | 216 | 217 | false 218 | 219 | 220 | 221 | 222 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 223 | 224 | 225 | ..\..\..\..\..\include 226 | 227 | 228 | 229 | 230 | 231 | -------------------------------------------------------------------------------- /samples/SkeletalApp/vc2013/SkeletalApp.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE} 38 | SkeletalApp 39 | Win32Proj 40 | 41 | 42 | 43 | Application 44 | Unicode 45 | true 46 | v120 47 | 48 | 49 | Application 50 | Unicode 51 | true 52 | v120 53 | 54 | 55 | Application 56 | Unicode 57 | v120 58 | 59 | 60 | Application 61 | Unicode 62 | v120 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | <_ProjectFileVersion>10.0.30319.1 82 | $(SolutionDir)bin\ 83 | $(Platform)\$(Configuration)\ 84 | true 85 | true 86 | $(SolutionDir)bin\ 87 | $(Platform)\$(Configuration)\ 88 | false 89 | false 90 | 91 | 92 | $(ProjectName)_d 93 | 94 | 95 | $(ProjectName)_d 96 | $(SolutionDir)bin\ 97 | 98 | 99 | $(SolutionDir)bin\ 100 | 101 | 102 | 103 | Disabled 104 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 105 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 106 | true 107 | EnableFastChecks 108 | MultiThreadedDebug 109 | 110 | 111 | Level3 112 | EditAndContinue 113 | 114 | 115 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 116 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 117 | true 118 | Windows 119 | false 120 | 121 | 122 | MachineX86 123 | LIBCMT 124 | 125 | 126 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 127 | 128 | 129 | ..\..\..\..\..\include 130 | 131 | 132 | 133 | 134 | Disabled 135 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 136 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 137 | EnableFastChecks 138 | MultiThreadedDebug 139 | 140 | 141 | Level3 142 | ProgramDatabase 143 | 144 | 145 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 146 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 147 | true 148 | Windows 149 | false 150 | 151 | 152 | LIBCMT 153 | 154 | 155 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 156 | 157 | 158 | ..\..\..\..\..\include 159 | 160 | 161 | 162 | 163 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 164 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 165 | MultiThreaded 166 | 167 | 168 | Level3 169 | ProgramDatabase 170 | 171 | 172 | true 173 | 174 | 175 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 176 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 177 | false 178 | true 179 | Windows 180 | true 181 | 182 | 183 | false 184 | 185 | 186 | MachineX86 187 | 188 | 189 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 190 | 191 | 192 | ..\..\..\..\..\include 193 | 194 | 195 | 196 | 197 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 198 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 199 | MultiThreaded 200 | 201 | 202 | Level3 203 | ProgramDatabase 204 | 205 | 206 | true 207 | 208 | 209 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 210 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 211 | false 212 | true 213 | Windows 214 | true 215 | 216 | 217 | false 218 | 219 | 220 | 221 | 222 | xcopy "..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(ProjectDir)bin\" /Y /C 223 | 224 | 225 | ..\..\..\..\..\include 226 | 227 | 228 | 229 | 230 | 231 | -------------------------------------------------------------------------------- /samples/LeapApp/vc2013/LeapApp.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE} 38 | LeapApp 39 | Win32Proj 40 | 41 | 42 | 43 | Application 44 | Unicode 45 | true 46 | v120 47 | 48 | 49 | Application 50 | Unicode 51 | true 52 | v120 53 | 54 | 55 | Application 56 | Unicode 57 | v120 58 | 59 | 60 | Application 61 | Unicode 62 | v120 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | <_ProjectFileVersion>10.0.30319.1 82 | $(SolutionDir)bin\ 83 | $(Platform)\$(Configuration)\ 84 | true 85 | true 86 | $(SolutionDir)bin\ 87 | $(Platform)\$(Configuration)\ 88 | false 89 | false 90 | 91 | 92 | $(ProjectName)_d 93 | 94 | 95 | $(ProjectName)_d 96 | $(SolutionDir)bin\ 97 | 98 | 99 | $(SolutionDir)bin\ 100 | 101 | 102 | 103 | Disabled 104 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 105 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 106 | true 107 | EnableFastChecks 108 | MultiThreadedDebug 109 | 110 | 111 | Level3 112 | EditAndContinue 113 | 114 | 115 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 116 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 117 | true 118 | Windows 119 | false 120 | 121 | 122 | MachineX86 123 | LIBCMT 124 | 125 | 126 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 127 | 128 | 129 | ..\..\..\..\..\include 130 | 131 | 132 | 133 | 134 | Disabled 135 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 136 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 137 | EnableFastChecks 138 | MultiThreadedDebug 139 | 140 | 141 | Level3 142 | ProgramDatabase 143 | 144 | 145 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 146 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 147 | true 148 | Windows 149 | false 150 | 151 | 152 | LIBCMT 153 | 154 | 155 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 156 | 157 | 158 | ..\..\..\..\..\include 159 | 160 | 161 | 162 | 163 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 164 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 165 | MultiThreaded 166 | 167 | 168 | Level3 169 | ProgramDatabase 170 | 171 | 172 | true 173 | 174 | 175 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 176 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 177 | false 178 | true 179 | Windows 180 | true 181 | 182 | 183 | false 184 | 185 | 186 | MachineX86 187 | 188 | 189 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 190 | 191 | 192 | ..\..\..\..\..\include 193 | 194 | 195 | 196 | 197 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 198 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 199 | MultiThreaded 200 | 201 | 202 | Level3 203 | ProgramDatabase 204 | 205 | 206 | true 207 | 208 | 209 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 210 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 211 | false 212 | true 213 | Windows 214 | true 215 | 216 | 217 | false 218 | 219 | 220 | 221 | 222 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 223 | 224 | 225 | ..\..\..\..\..\include 226 | 227 | 228 | 229 | 230 | 231 | -------------------------------------------------------------------------------- /samples/LeapApp/vc2015/LeapApp.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE} 38 | LeapApp 39 | Win32Proj 40 | 41 | 42 | 43 | Application 44 | Unicode 45 | true 46 | v140 47 | 48 | 49 | Application 50 | Unicode 51 | true 52 | v140 53 | 54 | 55 | Application 56 | Unicode 57 | v140 58 | 59 | 60 | Application 61 | Unicode 62 | v140 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | <_ProjectFileVersion>10.0.30319.1 82 | $(SolutionDir)bin\ 83 | $(Platform)\$(Configuration)\ 84 | true 85 | true 86 | $(SolutionDir)bin\ 87 | $(Platform)\$(Configuration)\ 88 | false 89 | false 90 | 91 | 92 | $(ProjectName)_d 93 | 94 | 95 | $(ProjectName)_d 96 | $(SolutionDir)bin\ 97 | 98 | 99 | $(SolutionDir)bin\ 100 | 101 | 102 | 103 | Disabled 104 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 105 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 106 | true 107 | EnableFastChecks 108 | MultiThreadedDebug 109 | 110 | 111 | Level3 112 | EditAndContinue 113 | 114 | 115 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 116 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 117 | true 118 | Windows 119 | false 120 | 121 | 122 | MachineX86 123 | LIBCMT 124 | 125 | 126 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 127 | 128 | 129 | ..\..\..\..\..\include 130 | 131 | 132 | 133 | 134 | Disabled 135 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 136 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 137 | EnableFastChecks 138 | MultiThreadedDebug 139 | 140 | 141 | Level3 142 | ProgramDatabase 143 | 144 | 145 | Leap.lib;cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) 146 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 147 | true 148 | Windows 149 | false 150 | 151 | 152 | LIBCMT 153 | 154 | 155 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 156 | 157 | 158 | ..\..\..\..\..\include 159 | 160 | 161 | 162 | 163 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 164 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 165 | MultiThreaded 166 | 167 | 168 | Level3 169 | ProgramDatabase 170 | 171 | 172 | true 173 | 174 | 175 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 176 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 177 | false 178 | true 179 | Windows 180 | true 181 | 182 | 183 | false 184 | 185 | 186 | MachineX86 187 | 188 | 189 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 190 | 191 | 192 | ..\..\..\..\..\include 193 | 194 | 195 | 196 | 197 | ..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\src;%(AdditionalIncludeDirectories) 198 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 199 | MultiThreaded 200 | 201 | 202 | Level3 203 | ProgramDatabase 204 | 205 | 206 | true 207 | 208 | 209 | Leap.lib;cinder-$(PlatformToolset).lib;%(AdditionalDependencies) 210 | ..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\msw\$(PlatformTarget);%(AdditionalLibraryDirectories) 211 | false 212 | true 213 | Windows 214 | true 215 | 216 | 217 | false 218 | 219 | 220 | 221 | 222 | xcopy "$(SolutionDir)..\..\..\lib\msw\$(PlatformTarget)\Leap.dll" "$(SolutionDir)bin\" /Y /C 223 | 224 | 225 | ..\..\..\..\..\include 226 | 227 | 228 | 229 | 230 | 231 | --------------------------------------------------------------------------------