[
  {
    "path": ".gitignore",
    "content": "libs/\ndocs/\n\n*.depend\n*.layout\n*.mode*v3\n*.pbxuser\n*.app*\n*.DS_*\n._*.*\n\n.svn/\nobj/\nbin/\nbuild/\n!data/\nxcuserdata/\n\nipch/\n*.suo\n*.opensdf\n*.vcxproj.user\n*.db\n*.opendb\n\n*.obj\n*.tlog\n*.sdf\n*.pdb\n*.idb\n*.pch\nDebug/\nRelease/\n\n*~.xml\n\n!exampleDepthMeshShader/bin/data/\n"
  },
  {
    "path": "README.md",
    "content": "ofxKinectForWindows2\n====================\n\n![exampleWithGui](https://raw.github.com/elliotwoods/ofxKinectForWindows2/master/screenshots/exampleWithGui.png)\n\nImplementation of Kinect For Windows v2 API using COM (not KinectCommonBridge)\n\n## Important notes\n\nThe current version is designed for the upcoming oF 0.10.0 available from GitHub, and works with Visual Studio 2015 (it is not compatible with non-windows platforms).\n\n- If you are working with an 0.9.x release, please use the [`0.9.0` tag](https://github.com/elliotwoods/ofxKinectForWindows2/tree/0.9.0)\n- If you are working with an 0.8.x release, please use the [`0.8.4` branch](https://github.com/elliotwoods/ofxKinectForWindows2/tree/0.8.4)\n\n## Features\n\nCurrently lets you:\n\n* Grab all the image streams (color, depth, IR, long exposure IR, body index)\n* Generate a 3D ofMesh (point cloud or stitched mesh) with texture coordinates\n* Track bodies (skeleton points, bone maps)\n* Transfer coordinates\n\nCurrently doesn't support:\n\n* Audio\n* Some remapping functions\n\n## License\n\nMIT License\nhttp://en.wikipedia.org/wiki/MIT_License\n\n## Usage\n\nFirst install the [Kinect for Windows SDK 2.0](https://www.microsoft.com/en-gb/download/details.aspx?id=44561) installed __(you will need to restart after installing this before all system paths are correctly set)__.\n\nTry the examples to see if they build and run. Then try with your own project:\n\n1. Make your project with Project Generator, but do __not__ select ofxKinectForWindows2 as an addon at this stage\n2. Open the solution, and add the ofxKinectForWindows2Lib.vcxproj to your solution (right click on the Solution and choose `Add > Existing Project...`)\n3. In `Property Manager` (open it from `View -> Other Windows -> Property Manager`), right click on your project to select `Add Existing Property Sheet...` and select the `ofxKinectForWindows2.props` file.\n4. Go back to `Solution Explorer`, right click on your project (e.g. 'mySketch') and select 'Add Reference...', and add a reference to `ofxKinectForWindows2Lib`.\n\n### Alternative Usage with OF Project Generator \n\nThis method requires the [OF nightly build](http://ci.openframeworks.cc/nightlybuilds.html) of Project Generator.  It will not work with the Project Generator from OF 0.9.8 or earlier.\n\n1. Make your project with Project Generator, **including** the ofxKinectForWindows2 addon, and open in IDE (Visual Studio 2015)\n2. In `Property Manager` (open it from `View -> Other Windows -> Property Manager`), right click on your project to select `Add Existing Property Sheet...` and select the `ofxKinectForWindows2.props` file.\n\n\n## Notes\n\n0. The depth image comes in as 'RAW' mm values (i'm not amplifying the values), so it may appear dark. Look closely :)\n1. This addon does not ship with any libraries, it'll look locally on your system for them\n2. You'll need to get a copy of the Kinect v2 SDK (i'm testing with v1404 April release)\n\n# Troubleshooting\n\n## Can't find `Kinect.h` or `ofxKinectForWindows2.h`\n\nFirst, please check that you have the Kinect SDK installed. The `Kinect.h` file should be here on your drive:\n\n![Kinect SDK includes](https://github.com/elliotwoods/ofxKinectForWindows2/blob/master/screenshots/KinectSDKIncludes.PNG?raw=true)\n\nSecond check that one of the examples shipped with ofxKinectForWindows2 builds and runs.\n\nThird please make sure you're using standard paths, e.g.:\n\n```\naddons/ofxKinectForWindows2\napps/myAppFolder/myApp/myApp.sln\n```\n\n**If you're using your own path structure then ofxKinectForWindows2 may not work.**\n\nCheck that your Solution Explorer has the right settings, e.g.:\n\n![Solution Explorer](https://github.com/elliotwoods/ofxKinectForWindows2/blob/master/screenshots/SolutionExplorer.PNG?raw=true)\n\nCheck that the `.props` file has been added correctly, e.g.:\n\n![Property Manager](https://github.com/elliotwoods/ofxKinectForWindows2/blob/master/screenshots/PropertyManager.PNG?raw=true)\n\n## Make sure the file path to your project isn't too long.\n\nIf you encounter errors like `The specified task executable CL.exe could not be run` (or similarly ambiguous errors) it may be that the path to your project is too long for Visual Studio to compile (e.g. if your `openFrameworks` folder is in a subfolder on your Desktop).  While there are many solutions to making a shorter path, one easy solution is to move your openFrameworks root directory to something like `C:\\of`. [reference](https://github.com/elliotwoods/ofxKinectForWindows2/issues/72).\n\n## Platform\n\nThis addon should work with both x86 and x64 platform settings. However, I'm mostly testing with x64 so I'd suggest you use that if you're having issues. Try changing the platfrom setting near the top of the Visual Studio window if you are having troubles.\n"
  },
  {
    "path": "addon_config.mk",
    "content": "# All variables and this file are optional, if they are not present the PG and the\n# makefiles will try to parse the correct values from the file system.\n#\n# Variables that specify exclusions can use % as a wildcard to specify that anything in\n# that position will match. A partial path can also be specified to, for example, exclude\n# a whole folder from the parsed paths from the file system\n#\n# Variables can be specified using = or +=\n# = will clear the contents of that variable both specified from the file or the ones parsed\n# from the file system\n# += will add the values to the previous ones in the file or the ones parsed from the file \n# system\n# \n# The PG can be used to detect errors in this file, just create a new project with this addon \n# and the PG will write to the console the kind of error and in which line it is\n\nmeta:\n\t# ADDON_NAME = \n\t# ADDON_DESCRIPTION =\n\t# ADDON_AUTHOR =\n\t# ADDON_TAGS =\n\t# ADDON_URL =\n\ncommon:\n\t# dependencies with other addons, a list of them separated by spaces \n\t# or use += in several lines\n\t# ADDON_DEPENDENCIES =\n\t\n\t# include search paths, this will be usually parsed from the file system\n\t# but if the addon or addon libraries need special search paths they can be\n\t# specified here separated by spaces or one per line using +=\n\t\n\t# any special flag that should be passed to the compiler when using this\n\t# addon\n\t# ADDON_CFLAGS =\n\t\n\t# any special flag that should be passed to the linker when using this\n\t# addon, also used for system libraries with -lname\n\t# ADDON_LDFLAGS = \n\t\n\t# linux only, any library that should be included in the project using\n\t# pkg-config\n\t# ADDON_PKG_CONFIG_LIBRARIES =\n\t\n\t# osx/iOS only, any framework that should be included in the project\n\t# ADDON_FRAMEWORKS =\n\t\n\t# source files, these will be usually parsed from the file system looking\n\t# in the src folders in libs and the root of the addon. if your addon needs\n\t# to include files in different places or a different set of files per platform\n\t# they can be specified here\n\t# ADDON_SOURCES =\n\t\n\t# some addons need resources to be copied to the bin/data folder of the project\n\t# specify here any files that need to be copied, you can use wildcards like * and ?\n\t# ADDON_DATA = \n\t\n\t# when parsing the file system looking for libraries exclude this for all or\n\t# a specific platform\n\t# ADDON_LIBS_EXCLUDE =\n\nvs:\n\n\tADDON_INCLUDES += $(KINECTSDK20_DIR)inc\n\tADDON_LIBS += $(KINECTSDK20_DIR)Lib\\$(PlatformTarget)\\Kinect20.lib\n\t\nlinux64:\n\t# binary libraries, these will be usually parsed from the file system but some \n\t# libraries need to passed to the linker in a specific order/\n\t# \n\t# For example in the ofxOpenCV addon we do something like this:\n\t#\n\t# ADDON_LIBS =\n\t# ADDON_LIBS += libs/opencv/lib/linuxarmv6l/libopencv_legacy.a\n\t# ADDON_LIBS += libs/opencv/lib/linuxarmv6l/libopencv_calib3d.a\n\t# ...\nlinux:\nwin_cb:\nlinuxarmv6l:\nlinuxarmv7l:\nandroid/armeabi:\t\nandroid/armeabi-v7a:\t\n"
  },
  {
    "path": "example/addons.make",
    "content": ""
  },
  {
    "path": "example/example.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"example\", \"example.vcxproj\", \"{7FD42DF7-442E-479A-BA76-D0022F99702A}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"openframeworksLib\", \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\", \"{5837595D-ACA9-485C-8E76-729040CE4B0B}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxKinectForWindows2Lib\", \"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\", \"{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "example/example.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>example</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <MinimalRebuild>true</MinimalRebuild>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"src\\main.cpp\" />\r\n    <ClCompile Include=\"src\\ofApp.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"src\\ofApp.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\">\r\n      <Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\">\r\n      <Project>{f6008d6a-6d39-4b68-840e-e7ac8ed855da}</Project>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ResourceCompile Include=\"icon.rc\">\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n    </ResourceCompile>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n</Project>"
  },
  {
    "path": "example/example.vcxproj.filters",
    "content": "<?xml version=\"1.0\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\t<ItemGroup>\n\t\t<ClCompile Include=\"src\\ofApp.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"src\\main.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<Filter Include=\"src\">\n\t\t\t<UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>\n\t\t</Filter>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ClInclude Include=\"src\\ofApp.h\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClInclude>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ResourceCompile Include=\"icon.rc\" />\n\t</ItemGroup>\n</Project>\n"
  },
  {
    "path": "example/icon.rc",
    "content": "// Icon Resource Definition\n#define MAIN_ICON                       102\n\n#if defined(_DEBUG)\nMAIN_ICON               ICON                    \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\icon_debug.ico\"\n#else\nMAIN_ICON               ICON                    \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\icon.ico\"\n#endif\n"
  },
  {
    "path": "example/src/main.cpp",
    "content": "#include \"ofApp.h\"\r\n\r\n//========================================================================\r\nint main( ){\r\n\tofSetupOpenGL(1024,768,OF_WINDOW);\t\t\t// <-------- setup the GL context\r\n\r\n\t// this kicks off the running of my app\r\n\t// can be OF_WINDOW or OF_FULLSCREEN\r\n\t// pass in width and height too:\r\n\tofRunApp(new ofApp());\r\n\r\n}\r\n"
  },
  {
    "path": "example/src/ofApp.cpp",
    "content": "#include \"ofApp.h\"\n\nint previewWidth = 640;\nint previewHeight = 480;\n\n//--------------------------------------------------------------\nvoid ofApp::setup(){\n\tkinect.open();\n\tkinect.initDepthSource();\n\tkinect.initColorSource();\n\tkinect.initInfraredSource();\n\tkinect.initBodySource();\n\tkinect.initBodyIndexSource();\n\n\tofSetWindowShape(previewWidth * 2, previewHeight * 2);\n}\n\n//--------------------------------------------------------------\nvoid ofApp::update(){\n\tkinect.update();\n\n\t//--\n\t//Getting joint positions (skeleton tracking)\n\t//--\n\t//\n\t{\n\t\tauto bodies = kinect.getBodySource()->getBodies();\n\t\tfor (auto body : bodies) {\n\t\t\tfor (auto joint : body.joints) {\n\t\t\t\t//now do something with the joints\n\t\t\t}\n\t\t}\n\t}\n\t//\n\t//--\n\n\n\n\t//--\n\t//Getting bones (connected joints)\n\t//--\n\t//\n\t{\n\t\t// Note that for this we need a reference of which joints are connected to each other.\n\t\t// We call this the 'boneAtlas', and you can ask for a reference to this atlas whenever you like\n\t\tauto bodies = kinect.getBodySource()->getBodies();\n\t\tauto boneAtlas = ofxKinectForWindows2::Data::Body::getBonesAtlas();\n\n\t\tfor (auto body : bodies) {\n\t\t\tfor (auto bone : boneAtlas) {\n\t\t\t\tauto firstJointInBone = body.joints[bone.first];\n\t\t\t\tauto secondJointInBone = body.joints[bone.second];\n\n\t\t\t\t//now do something with the joints\n\t\t\t}\n\t\t}\n\t}\n\t//\n\t//--\n}\n\n//--------------------------------------------------------------\nvoid ofApp::draw(){\n\tkinect.getDepthSource()->draw(0, 0, previewWidth, previewHeight);  // note that the depth texture is RAW so may appear dark\n\t\n\t// Color is at 1920x1080 instead of 512x424 so we should fix aspect ratio\n\tfloat colorHeight = previewWidth * (kinect.getColorSource()->getHeight() / kinect.getColorSource()->getWidth());\n\tfloat colorTop = (previewHeight - colorHeight) / 2.0;\n\n\tkinect.getColorSource()->draw(previewWidth, 0 + colorTop, previewWidth, colorHeight);\n\tkinect.getBodySource()->drawProjected(previewWidth, 0 + colorTop, previewWidth, colorHeight);\n\t\n\tkinect.getInfraredSource()->draw(0, previewHeight, previewWidth, previewHeight);\n\t\n\tkinect.getBodyIndexSource()->draw(previewWidth, previewHeight, previewWidth, previewHeight);\n\tkinect.getBodySource()->drawProjected(previewWidth, previewHeight, previewWidth, previewHeight, ofxKFW2::ProjectionCoordinates::DepthCamera);\n}\n\n//--------------------------------------------------------------\nvoid ofApp::keyPressed(int key){\n\t\r\n}\n\n//--------------------------------------------------------------\nvoid ofApp::keyReleased(int key){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseMoved(int x, int y){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseDragged(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mousePressed(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseReleased(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::windowResized(int w, int h){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::gotMessage(ofMessage msg){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::dragEvent(ofDragInfo dragInfo){ \n\n}\n"
  },
  {
    "path": "example/src/ofApp.h",
    "content": "#pragma once\r\n\r\n#include \"ofxKinectForWindows2.h\"\r\n#include \"ofMain.h\"\r\n\r\nclass ofApp : public ofBaseApp{\r\n\r\n\tpublic:\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\r\n\r\n\t\tofxKFW2::Device kinect;\r\n};\r\n"
  },
  {
    "path": "exampleBodyIndexColor/addons.make",
    "content": ""
  },
  {
    "path": "exampleBodyIndexColor/exampleBodyIndexColor.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.23107.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"exampleBodyIndexColor\", \"exampleBodyIndexColor.vcxproj\", \"{7FD42DF7-442E-479A-BA76-D0022F99702A}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"openframeworksLib\", \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\", \"{5837595D-ACA9-485C-8E76-729040CE4B0B}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxKinectForWindows2Lib\", \"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\", \"{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "exampleBodyIndexColor/exampleBodyIndexColor.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>\n    <Keyword>Win32Proj</Keyword>\n    <RootNamespace>exampleBodyIndexColor</RootNamespace>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <TargetName>$(ProjectName)_debug</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <TargetName>$(ProjectName)_debug</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\n    </ClCompile>\n    <Link>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateDebugInformation>false</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateDebugInformation>false</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"src\\main.cpp\" />\n    <ClCompile Include=\"src\\ofApp.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"src\\ofApp.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"$(OF_ROOT)\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\">\n      <Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\">\n      <Project>{f6008d6a-6d39-4b68-840e-e7ac8ed855da}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"icon.rc\">\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalIncludeDirectories>$(OF_ROOT)\\libs\\openFrameworksCompiled\\project\\vs</AdditionalIncludeDirectories>\n    </ResourceCompile>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ProjectExtensions>\n    <VisualStudio>\n      <UserProperties RESOURCE_FILE=\"icon.rc\" />\n    </VisualStudio>\n  </ProjectExtensions>\n</Project>"
  },
  {
    "path": "exampleBodyIndexColor/exampleBodyIndexColor.vcxproj.filters",
    "content": "<?xml version=\"1.0\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\t<ItemGroup>\n\t\t<ClCompile Include=\"src\\ofApp.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"src\\main.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<Filter Include=\"src\">\n\t\t\t<UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>\n\t\t</Filter>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ClInclude Include=\"src\\ofApp.h\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClInclude>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ResourceCompile Include=\"icon.rc\" />\n\t</ItemGroup>\n</Project>\n"
  },
  {
    "path": "exampleBodyIndexColor/icon.rc",
    "content": "// Icon Resource Definition\n#define MAIN_ICON                       102\n\n#if defined(_DEBUG)\nMAIN_ICON               ICON                    \"icon_debug.ico\"\n#else\nMAIN_ICON               ICON                    \"icon.ico\"\n#endif\n"
  },
  {
    "path": "exampleBodyIndexColor/src/main.cpp",
    "content": "#include \"ofApp.h\"\n\n//========================================================================\nint main( ){\n\tofSetupOpenGL(1024,768,OF_WINDOW);\t\t\t// <-------- setup the GL context\n\n\t// this kicks off the running of my app\n\t// can be OF_WINDOW or OF_FULLSCREEN\n\t// pass in width and height too:\n\tofRunApp(new ofApp());\n\n}\n"
  },
  {
    "path": "exampleBodyIndexColor/src/ofApp.cpp",
    "content": "// This example shows how to work with the BodyIndex image in order to create\n// a green screen effect. Note that this isn't super fast, but is helpful\n// in understanding how the different image types & coordinate spaces work\n// together. If you need performance, you will probably want to do this with shaders!\n\n#include \"ofApp.h\"\n\n#define DEPTH_WIDTH 512\n#define DEPTH_HEIGHT 424\n#define DEPTH_SIZE DEPTH_WIDTH * DEPTH_HEIGHT\n\n#define COLOR_WIDTH 1920\n#define COLOR_HEIGHT 1080\n\n//--------------------------------------------------------------\nvoid ofApp::setup() {\n\tofSetWindowShape(DEPTH_WIDTH * 2, DEPTH_HEIGHT);\n\n\tkinect.open();\n\tkinect.initDepthSource();\n\tkinect.initColorSource();\n\tkinect.initInfraredSource();\n\tkinect.initBodySource();\n\tkinect.initBodyIndexSource();\n\n\tif (kinect.getSensor()->get_CoordinateMapper(&coordinateMapper) < 0) {\n\t\tofLogError() << \"Could not acquire CoordinateMapper!\";\n\t}\n\n\tnumBodiesTracked = 0;\n\tbHaveAllStreams = false;\n\n\tbodyIndexImg.allocate(DEPTH_WIDTH, DEPTH_HEIGHT, OF_IMAGE_COLOR);\n\tforegroundImg.allocate(DEPTH_WIDTH, DEPTH_HEIGHT, OF_IMAGE_COLOR);\n\n\tcolorCoords.resize(DEPTH_WIDTH * DEPTH_HEIGHT);\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::update() {\n\tkinect.update();\n\n\t// Get pixel data\n\tauto& depthPix = kinect.getDepthSource()->getPixels();\n\tauto& bodyIndexPix = kinect.getBodyIndexSource()->getPixels();\n\tauto& colorPix = kinect.getColorSource()->getPixels();\n\n\t// Make sure there's some data here, otherwise the cam probably isn't ready yet\n\tif (!depthPix.size() || !bodyIndexPix.size() || !colorPix.size()) {\n\t\tbHaveAllStreams = false;\n\t\treturn;\n\t} else {\n\t\tbHaveAllStreams = true;\n\t}\n\n\n\t// Count number of tracked bodies\n\tnumBodiesTracked = 0;\n\tauto& bodies = kinect.getBodySource()->getBodies();\n\tfor (auto& body : bodies) {\n\t\tif (body.tracked) {\n\t\t\tnumBodiesTracked++;\n\t\t}\n\t}\n\n\t// Do the depth space -> color space mapping\n\t// More info here:\n\t// https://msdn.microsoft.com/en-us/library/windowspreview.kinect.coordinatemapper.mapdepthframetocolorspace.aspx\n\t// https://msdn.microsoft.com/en-us/library/dn785530.aspx\n\tcoordinateMapper->MapDepthFrameToColorSpace(DEPTH_SIZE, (UINT16*) depthPix.getPixels(), DEPTH_SIZE, (ColorSpacePoint*) colorCoords.data());\n\n\t// Loop through the depth image\n\tfor (int y = 0; y < DEPTH_HEIGHT; y++) {\n\t\tfor (int x = 0; x < DEPTH_WIDTH; x++) {\n\t\t\tint index = (y * DEPTH_WIDTH) + x;\n\t\t\tbodyIndexImg.setColor(x, y, ofColor::white);\n\t\t\tforegroundImg.setColor(x, y, ofColor::white);\n\n\t\t\t// This is the check to see if a given pixel is inside a tracked  body or part of the background.\n\t\t\t// If it's part of a body, the value will be that body's id (0-5), or will > 5 if it's\n\t\t\t// part of the background\n\t\t\t// More info here:\n\t\t\t// https://msdn.microsoft.com/en-us/library/windowspreview.kinect.bodyindexframe.aspx\n\t\t\tfloat val = bodyIndexPix[index];\n\t\t\tif (val >= bodies.size()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Give each tracked body a color value so we can tell\n\t\t\t// them apart on screen\n\t\t\tofColor c = ofColor::fromHsb(val * 255 / bodies.size(), 200, 255);\n\t\t\tbodyIndexImg.setColor(x, y, c);\n\n\t\t\t// For a given (x,y) in the depth image, lets look up where that point would be\n\t\t\t// in the color image\n\t\t\tofVec2f mappedCoord = colorCoords[index];\n\n\t\t\t// Mapped x/y coordinates in the color can come out as floats since it's not a 1:1 mapping\n\t\t\t// between depth <-> color spaces i.e. a pixel at (100, 100) in the depth image could map\n\t\t\t// to (405.84637, 238.13828) in color space\n\t\t\t// So round the x/y values down to ints so that we can look up the nearest pixel\n\t\t\tmappedCoord.x = floor(mappedCoord.x);\n\t\t\tmappedCoord.y = floor(mappedCoord.y);\n\n\t\t\t// Make sure it's within some sane bounds, and skip it otherwise\n\t\t\tif (mappedCoord.x < 0 || mappedCoord.y < 0 || mappedCoord.x >= COLOR_WIDTH || mappedCoord.y >= COLOR_HEIGHT) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Finally, pull the color from the color image based on its coords in\n\t\t\t// the depth image\n\t\t\tforegroundImg.setColor(x, y, colorPix.getColor(mappedCoord.x, mappedCoord.y));\n\t\t}\n\t}\n\n\t// Update the images since we manipulated the pixels manually. This uploads to the\n\t// pixel data to the texture on the GPU so it can get drawn to screen\n\tbodyIndexImg.update();\n\tforegroundImg.update();\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::draw() {\n\tbodyIndexImg.draw(0, 0);\n\tforegroundImg.draw(DEPTH_WIDTH, 0);\n\n\tstringstream ss;\n\tss << \"fps : \" << ofGetFrameRate() << endl;\n\tss << \"Tracked bodies: \" << numBodiesTracked;\n\tif (!bHaveAllStreams) ss << endl << \"Not all streams detected!\";\n\tofDrawBitmapStringHighlight(ss.str(), 20, 20);\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::keyPressed(int key){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::keyReleased(int key){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseMoved(int x, int y ){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseDragged(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mousePressed(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseReleased(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseEntered(int x, int y){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseExited(int x, int y){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::windowResized(int w, int h){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::gotMessage(ofMessage msg){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::dragEvent(ofDragInfo dragInfo){ \n\n}\n"
  },
  {
    "path": "exampleBodyIndexColor/src/ofApp.h",
    "content": "#pragma once\n\n#include \"ofxKinectForWindows2.h\"\n#include \"ofMain.h\"\n\nclass ofApp : public ofBaseApp{\n\n\tpublic:\n\t\tvoid setup();\n\t\tvoid update();\n\t\tvoid draw();\n\n\t\tvoid keyPressed(int key);\n\t\tvoid keyReleased(int key);\n\t\tvoid mouseMoved(int x, int y );\n\t\tvoid mouseDragged(int x, int y, int button);\n\t\tvoid mousePressed(int x, int y, int button);\n\t\tvoid mouseReleased(int x, int y, int button);\n\t\tvoid mouseEntered(int x, int y);\n\t\tvoid mouseExited(int x, int y);\n\t\tvoid windowResized(int w, int h);\n\t\tvoid dragEvent(ofDragInfo dragInfo);\n\t\tvoid gotMessage(ofMessage msg);\n\n\t\tofxKFW2::Device kinect;\n\t\tICoordinateMapper* coordinateMapper;\n\n\t\tofImage bodyIndexImg, foregroundImg;\n\t\tvector<ofVec2f> colorCoords;\n\t\tint numBodiesTracked;\n\t\tbool bHaveAllStreams;\n\t\t\n};\n"
  },
  {
    "path": "exampleBodyIndexShader/addons.make",
    "content": ""
  },
  {
    "path": "exampleBodyIndexShader/example-bodyIndex.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"openframeworksLib\", \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\", \"{5837595D-ACA9-485C-8E76-729040CE4B0B}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxKinectForWindows2Lib\", \"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\", \"{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"example-bodyIndex\", \"example-bodyIndex.vcxproj\", \"{7FD42DF7-442E-479A-BA76-D0022F99702A}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "exampleBodyIndexShader/example-bodyIndex.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>\n    <Keyword>Win32Proj</Keyword>\n    <RootNamespace>example</RootNamespace>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <TargetName>$(ProjectName)_debug</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <TargetName>$(ProjectName)_debug</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <MinimalRebuild>true</MinimalRebuild>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateDebugInformation>false</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateDebugInformation>false</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"src\\main.cpp\" />\n    <ClCompile Include=\"src\\ofApp.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"src\\ofApp.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\">\n      <Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\">\n      <Project>{f6008d6a-6d39-4b68-840e-e7ac8ed855da}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"icon.rc\">\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\n    </ResourceCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"bin\\data\\shaders\\bodyIndex.frag\" />\n    <None Include=\"bin\\data\\shaders\\bodyIndex.vert\" />\n    <None Include=\"bin\\data\\shaders_gl3\\bodyIndex.frag\" />\n    <None Include=\"bin\\data\\shaders_gl3\\bodyIndex.vert\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n</Project>"
  },
  {
    "path": "exampleBodyIndexShader/example-bodyIndex.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <ClCompile Include=\"src\\ofApp.cpp\">\n      <Filter>src</Filter>\n    </ClCompile>\n    <ClCompile Include=\"src\\main.cpp\">\n      <Filter>src</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <Filter Include=\"src\">\n      <UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"shaders\">\n      <UniqueIdentifier>{8112424a-9e0b-4e75-931f-a6d5cdf47e1f}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"shaders_gl3\">\n      <UniqueIdentifier>{2875c5c0-c98f-40e0-bd5a-23769bd78f9a}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"src\\ofApp.h\">\n      <Filter>src</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"icon.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"bin\\data\\shaders\\bodyIndex.vert\">\n      <Filter>shaders</Filter>\n    </None>\n    <None Include=\"bin\\data\\shaders\\bodyIndex.frag\">\n      <Filter>shaders</Filter>\n    </None>\n    <None Include=\"bin\\data\\shaders_gl3\\bodyIndex.frag\">\n      <Filter>shaders_gl3</Filter>\n    </None>\n    <None Include=\"bin\\data\\shaders_gl3\\bodyIndex.vert\">\n      <Filter>shaders_gl3</Filter>\n    </None>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "exampleBodyIndexShader/icon.rc",
    "content": "// Icon Resource Definition\n#define MAIN_ICON                       102\n\n#if defined(_DEBUG)\nMAIN_ICON               ICON                    \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\icon_debug.ico\"\n#else\nMAIN_ICON               ICON                    \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\icon.ico\"\n#endif\n"
  },
  {
    "path": "exampleBodyIndexShader/src/main.cpp",
    "content": "#include \"ofApp.h\"\n\n//--------------------------------------------------------------\nint main(){\n#ifdef USE_PROGRAMMABLE_PIPELINE\n\tofGLWindowSettings settings;\n\tsettings.setGLVersion(4,3);\n\tsettings.width = 1024;\n\tsettings.height = 768;\n\tofCreateWindow(settings);\n#else\n\tofSetupOpenGL(1024, 768, OF_WINDOW);\n#endif\n\n\tofRunApp(new ofApp());\n}\n"
  },
  {
    "path": "exampleBodyIndexShader/src/ofApp.cpp",
    "content": "#include \"ofApp.h\"\n\n//--------------------------------------------------------------\nvoid ofApp::setup(){\n\tkinect.open();\n\tkinect.initDepthSource();\n\tkinect.initColorSource();\n\tkinect.initBodySource();\n\tkinect.initBodyIndexSource();\n\n\tbStitchFaces = false;\n\tbDrawBodies = true;\n\n\tif (ofIsGLProgrammableRenderer()) {\n\t\tshader.load(\"shaders_gl3/bodyIndex\");\n\t}\n\telse {\n\t\tshader.load(\"shaders/bodyIndex\");\n\t}\n}\n\n//--------------------------------------------------------------\nvoid ofApp::update(){\n\tkinect.update();\n}\n\n//--------------------------------------------------------------\nvoid ofApp::draw(){\n\tcam.begin();\n\tofPushMatrix();\n\tofScale(100, 100, 100);\n\n\tshader.begin();\n\tshader.setUniform1i(\"uWidth\", kinect.getBodyIndexSource()->getWidth());\n\tif (ofIsGLProgrammableRenderer()) {\n\t\tshader.setUniformTexture(\"uBodyIndexTex\", kinect.getBodyIndexSource()->getTexture(), 1);\n\t\tshader.setUniformTexture(\"uColorTex\", kinect.getColorSource()->getTexture(), 2);\n\t}\n\telse {\n\t\t// TEMP: Until OF master fixes texture binding for old pipeline.\n\t\tshader.setUniform1i(\"uBodyIndexTex\", 1);\n\t\tkinect.getBodyIndexSource()->getTexture().bind(1);\n\t\tshader.setUniform1i(\"uColorTex\", 2);\n\t\tkinect.getColorSource()->getTexture().bind(2);\n\t}\n\t\n\tofSetColor(255);\n\tofMesh mesh = kinect.getDepthSource()->getMesh(bStitchFaces, ofxKFW2::Source::Depth::PointCloudOptions::ColorCamera);\n\tmesh.draw();\n\n\tif (!ofIsGLProgrammableRenderer()) {\n\t\t// TEMP: Until OF master fixes texture binding for old pipeline.\n\t\tkinect.getColorSource()->getTexture().unbind(2);\n\t\tkinect.getBodyIndexSource()->getTexture().unbind(1);\n\t}\n\tshader.end();\n\n\tif (bDrawBodies) {\n\t\tkinect.getBodySource()->drawWorld();\n\t}\n\n\tofPopMatrix();\n\tcam.end();\n\n\tofSetColor(0);\n\tstringstream ss;\n\tss << ofToString(ofGetFrameRate(), 2) << \" FPS\" << endl;\n\tss << \"Stitch [F]aces: \" << (bStitchFaces? \"ON\":\"OFF\") << endl;\n\tss << \"Draw [B]odies: \" << (bDrawBodies? \"ON\":\"OFF\") << endl;\n\tofDrawBitmapString(ss.str(), 10, 20);\n}\n\n//--------------------------------------------------------------\nvoid ofApp::keyPressed(int key){\n\tswitch (key) {\n\tcase 'b':\n\t\tbDrawBodies ^= 1;\n\t\tbreak;\n\tcase 'f':\n\t\tbStitchFaces ^= 1;\n\t\tbreak;\n\t}\n}\n\n//--------------------------------------------------------------\nvoid ofApp::keyReleased(int key){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseMoved(int x, int y){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseDragged(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mousePressed(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseReleased(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::windowResized(int w, int h){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::gotMessage(ofMessage msg){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::dragEvent(ofDragInfo dragInfo){ \n\n}\n"
  },
  {
    "path": "exampleBodyIndexShader/src/ofApp.h",
    "content": "#pragma once\n\n#define USE_PROGRAMMABLE_PIPELINE 1\n\n#include \"ofxKinectForWindows2.h\"\n#include \"ofMain.h\"\n\nclass ofApp : public ofBaseApp{\n\n\tpublic:\n\t\tvoid setup();\n\t\tvoid update();\n\t\tvoid draw();\n\n\t\tvoid keyPressed(int key);\n\t\tvoid keyReleased(int key);\n\t\tvoid mouseMoved(int x, int y );\n\t\tvoid mouseDragged(int x, int y, int button);\n\t\tvoid mousePressed(int x, int y, int button);\n\t\tvoid mouseReleased(int x, int y, int button);\n\t\tvoid windowResized(int w, int h);\n\t\tvoid dragEvent(ofDragInfo dragInfo);\n\t\tvoid gotMessage(ofMessage msg);\n\n\t\tofxKFW2::Device kinect;\n\n\t\tofEasyCam cam;\n\t\tofShader shader;\n\n\t\tbool bStitchFaces;\n\t\tbool bDrawBodies;\n};\n"
  },
  {
    "path": "exampleDepthMeshShader/README.md",
    "content": "ofxKinectForWindows2 (exampleDepthMeshShader)\n====================\n\n![exampleDepthMeshShader](screenshots/exampleDepthMeshShader.png)\n\nThe author of this example and the accompanying shaders are made by Lesley van Hoek\\\nhttps://github.com/lshoek\n\n## Description\n\nThis example showcases how to build a mesh from the depth source using shaders. It is able to realize a full-resolution, textured and filtered depth mesh in a steady +/- 1ms on a GTX 1050. This is significantly faster than the `Depth::getDepthMesh()` call, which can quickly become a big bottleneck depending on your application. So this is great if you're looking to get around this!\n\n## How does it work?\n\nThe vertices, indices and texture coordinates of the (VBO) mesh are generated on the GPU using compute shaders. First, a depth texture is acquired from the Kinect using the `ofxKinectForWindows2` API. This is then sent to a shader program that transforms each pixel to camera space and writes them to a vertex buffer. This is fast because this data resides on the GPU, so it does not have to be copied to/from the CPU. Another shader program filters the mesh by manipulating the mesh indices in the index buffer. The color frame texture coordinates are also queried from `ofxKinectForWindows2` and sent directly to the texture coordinate buffer of the mesh.\n\n## Notes\n\nIf you have any questions or issues running this you're welcome to report them here or to me.\n\n## License\n\nMIT License\nhttp://en.wikipedia.org/wiki/MIT_License\n"
  },
  {
    "path": "exampleDepthMeshShader/addons.make",
    "content": ""
  },
  {
    "path": "exampleDepthMeshShader/exampleDepthMeshShader.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.30114.105\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"exampleDepthMeshShader\", \"exampleDepthMeshShader.vcxproj\", \"{7FD42DF7-442E-479A-BA76-D0022F99702A}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"openframeworksLib\", \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\", \"{5837595D-ACA9-485C-8E76-729040CE4B0B}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxKinectForWindows2Lib\", \"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\", \"{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {4C20F4FB-30B0-45D7-B223-78E22E27E7FC}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "exampleDepthMeshShader/exampleDepthMeshShader.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>\n    <Keyword>Win32Proj</Keyword>\n    <RootNamespace>exampleDepthMeshShader</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <TargetName>$(ProjectName)_debug</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <TargetName>$(ProjectName)_debug</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>bin\\</OutDir>\n    <IntDir>obj\\$(Configuration)\\</IntDir>\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\n    </ClCompile>\n    <Link>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateDebugInformation>false</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <WarningLevel>Level3</WarningLevel>\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateDebugInformation>false</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n    </Link>\n    <PostBuildEvent />\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"src\\main.cpp\" />\n    <ClCompile Include=\"src\\ofApp.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"src\\MeshUtils.h\" />\n    <ClInclude Include=\"src\\ofApp.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"$(OF_ROOT)\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\">\n      <Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\">\n      <Project>{f6008d6a-6d39-4b68-840e-e7ac8ed855da}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"icon.rc\">\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalIncludeDirectories>$(OF_ROOT)\\libs\\openFrameworksCompiled\\project\\vs</AdditionalIncludeDirectories>\n    </ResourceCompile>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ProjectExtensions>\n    <VisualStudio>\n      <UserProperties RESOURCE_FILE=\"icon.rc\" />\n    </VisualStudio>\n  </ProjectExtensions>\n</Project>"
  },
  {
    "path": "exampleDepthMeshShader/exampleDepthMeshShader.vcxproj.filters",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <ClCompile Include=\"src\\ofApp.cpp\">\n      <Filter>src</Filter>\n    </ClCompile>\n    <ClCompile Include=\"src\\main.cpp\">\n      <Filter>src</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <Filter Include=\"src\">\n      <UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"addons\">\n      <UniqueIdentifier>{184c96a8-f47b-482b-a0f2-764d8d7e6429}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"src\\ofApp.h\">\n      <Filter>src</Filter>\n    </ClInclude>\n    <ClInclude Include=\"src\\MeshUtils.h\">\n      <Filter>src</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"icon.rc\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "exampleDepthMeshShader/icon.rc",
    "content": "// Icon Resource Definition\n#define MAIN_ICON                       102\n\n#if defined(_DEBUG)\nMAIN_ICON               ICON                    \"icon_debug.ico\"\n#else\nMAIN_ICON               ICON                    \"icon.ico\"\n#endif\n"
  },
  {
    "path": "exampleDepthMeshShader/src/MeshUtils.h",
    "content": "#include \"ofMesh.h\"\n\n// uses normalized texcoords\nstatic ofMesh gridMesh(int w, int h, float scale)\n{\n\tofMesh mesh;\n\tmesh.setMode(OF_PRIMITIVE_TRIANGLES);\n\n\tfor (int y = 0; y < h; y++) {\n\t\tfor (int x = 0; x < w; x++) {\n\t\t\tfloat x_mesh = x * scale;\n\t\t\tfloat y_mesh = y * scale;\n\n\t\t\tmesh.addVertex(glm::vec3(x_mesh, y_mesh, 0));\n\t\t\tmesh.addTexCoord(glm::vec2((float)x / (float)w, (float)y / (float)h));\n\t\t}\n\t}\n\n\tfor (int y = 0; y < h - 1; y++) {\n\t\tfor (int x = 0; x < w - 1; x++) {\n\t\t\tmesh.addIndex(x + y * w);\t\t\t\t// a\n\t\t\tmesh.addIndex((x + 1) + (y + 1) * w);\t// c\n\t\t\tmesh.addIndex(x + (y + 1) * w);\t\t\t// d\n\n\t\t\tmesh.addIndex(x + y * w);\t\t\t\t// a\n\t\t\tmesh.addIndex((x + 1) + y * w);\t\t\t// b\n\t\t\tmesh.addIndex((x + 1) + (y + 1) * w);\t// c\n\t\t}\n\t}\n\treturn mesh;\n}\n"
  },
  {
    "path": "exampleDepthMeshShader/src/main.cpp",
    "content": "#include \"ofApp.h\"\n\n//========================================================================\nint main()\n{\n\tofGLFWWindowSettings settings;\n\tsettings.setGLVersion(4, 5);\n\tsettings.setSize(1024, 768);\n\n\tofCreateWindow(settings);\n\tofRunApp(new ofApp());\n}\n"
  },
  {
    "path": "exampleDepthMeshShader/src/ofApp.cpp",
    "content": "/*\n\tAuthor: Lesley van Hoek\n\thttps://github.com/lshoek\n*/\n\n#include \"ofApp.h\"\n#include \"MeshUtils.h\"\n\nvoid ofApp::setup()\n{\n\tofSetVerticalSync(true);\n\tofLogToConsole();\n\n\tofBackground(0x222222);\n\tofSetHexColor(0xffffff);\n\tofFill();\n\n\tkinect.open();\n\tbIsKinectOpen = kinect.isOpen();\n\tofLog() << (bIsKinectOpen ? \"Kinect found!\" : \"Kinect not found!\");\n\n\tif (bIsKinectOpen) {\n\t\tkinect.initColorSource();\n\t\tkinect.initDepthSource();\n\t\tkinect.getSensor()->get_CoordinateMapper(&coordMapper);\n\t}\n\telse {\n\t\tOF_EXIT_APP(0);\n\t}\n\n\t// pointcloud options\n\tpointCloudOpts.textureCoordinates = ofxKFW2::Source::Depth::PointCloudOptions::TextureCoordinates::ColorCamera;\n\tpointCloudOpts.facesMaxLength = 0.0003f;\n\tpointCloudOpts.stitchFaces = true;\n\tpointCloudOpts.steps = 1;\n\n\t// init cam\n\tcam.setNearClip(0.0001f);\n\tcam.setFarClip(10.0f);\n\tcam.setPosition(0, 0, -.01f);\n\tcam.lookAt(glm::vec3(0));\n\tcam.setUpAxis(glm::vec3(0, 1, 0));\n\tcam.setAutoDistance(false);\n\n\tmeshShader.setupShaderFromFile(GL_COMPUTE_SHADER, \"shaders/mesh.glsl\");\n\tmeshShader.linkProgram();\n\n\tindexShader.setupShaderFromFile(GL_COMPUTE_SHADER, \"shaders/indices.glsl\");\n\tindexShader.linkProgram();\n}\n\nvoid ofApp::update()\n{\n\tkinect.update();\n\tif (kinect.isFrameNew()) {\n\n\t\tauto depthSrc = kinect.getDepthSource();\n\t\tauto colorSrc = kinect.getColorSource();\n\n\t\t// update textures\n\t\tcolorTexture = colorSrc->getTexture();\n\t\tdepthTexture = depthSrc->getTexture();\n\n\t\tconst int width = depthSrc->getWidth();\n\t\tconst int height = depthSrc->getHeight();\n\t\tauto frameSize = width * height;\n\t\t\n\t\tconst int w = depthSrc->getWidth() / pointCloudOpts.steps;\n\t\tconst int h = depthSrc->getHeight() / pointCloudOpts.steps;\n\t\tmeshWidth = w;\n\t\tmeshHeight = h;\n\n\t\t// do all this once\n\t\tif (!bMeshDataInitialized) {\n\n\t\t\t// get depth-to-camera transform table\n\t\t\tdepthSrc->getDepthToWorldTable(depthToCameraSpaceTable);\n\n\t\t\t// start with a base grid\n\t\t\tdepthVboMesh = gridMesh(w, h, 1.0f);\n\n\t\t\t// allocate buffers\n\t\t\tdepthToCameraSpaceBuffer.allocate();\n\t\t\tdepthToCameraSpaceBuffer.setData(frameSize * sizeof(glm::vec2), depthToCameraSpaceTable.getData(), GL_STATIC_READ);\n\n\t\t\tvertexBuffer.allocate(w * h * sizeof(glm::vec4), GL_DYNAMIC_DRAW);\n\t\t\tindexBuffer.allocate(w * h * 6 * sizeof(int), GL_DYNAMIC_DRAW);\n\n\t\t\t// set buffers to vbo mesh (vec4 vertices)\n\t\t\tdepthVboMesh.getVbo().setVertexBuffer(vertexBuffer, 4, 0);\n\t\t\tdepthVboMesh.getVbo().setIndexBuffer(indexBuffer);\n\n\t\t\t// bind buffers (binding 2 is for depth tex)\n\t\t\tdepthToCameraSpaceBuffer.bindBase(GL_SHADER_STORAGE_BUFFER, 0);\n\t\t\tdepthVboMesh.getVbo().getVertexBuffer().bindBase(GL_SHADER_STORAGE_BUFFER, 1);\n\t\t\tdepthVboMesh.getVbo().getIndexBuffer().bindBase(GL_SHADER_STORAGE_BUFFER, 3);\n\n\t\t\tofLog() << \n\t\t\t\t\"\\nverts: \" << depthVboMesh.getNumVertices() << \n\t\t\t\t\"\\nindices:\" << depthVboMesh.getNumIndices();\n\n\t\t\tbMeshDataInitialized = true;\n\t\t}\n\n\t\t// start timing here\n\t\tuint64_t start;\n\t\tstart = ofGetElapsedTimeMillis();\n\n\t\t// update color-in-depth table\n\t\tdepthSrc->getColorInDepthFrameMapping(colorToDepthSpaceTable);\n\t\tdepthVboMesh.getVbo().updateTexCoordData((glm::vec2*) &colorToDepthSpaceTable[0], w * h);\n\n\t\t// update points\n\t\tdepthTexture.bindAsImage(2, GL_READ_ONLY);\n\n\t\tmeshShader.begin();\n\t\tmeshShader.setUniform1i(\"steps\", pointCloudOpts.steps);\n\t\tmeshShader.setUniform2f(\"size\", glm::vec2(w, h));\n\t\tmeshShader.setUniform2f(\"size_full\", glm::vec2(width, height));\n\t\tmeshShader.dispatchCompute(w/32, h/32, 1);\n\t\tmeshShader.end();\n\n\t\tdepthTexture.unbind();\n\n\t\t// update indices\n\t\tindexShader.begin();\n\t\tindexShader.setUniform1f(\"faces_maxlen\", pointCloudOpts.facesMaxLength);\n\t\tindexShader.setUniform2f(\"size\", glm::vec2(w, h));\n\t\tindexShader.dispatchCompute(w/32, h/32, 1);\n\t\tindexShader.end();\n\n\t\t// end timer\n\t\tgpuMeshUpdateTimer = ofGetElapsedTimeMillis() - start;\n\n\t\t// Compare other approaches\n\t\tif (bCompareMeshUpdates) {\n\t\t\tstart = ofGetElapsedTimeMillis();\n\t\t\tdepthMesh = kinect.getDepthSource()->getMesh(pointCloudOpts);\n\t\t\tcpuMeshUpdateTimer = ofGetElapsedTimeMillis() - start;\n\t\t}\n\t}\n}\n\nvoid ofApp::draw()\n{\n\tofSetHexColor(0xffffff);\n\n\tglEnable(GL_DEPTH_TEST);\n\tglEnable(GL_CULL_FACE);\n\tglCullFace(GL_BACK);\n\tglPrimitiveRestartIndex(0xffffffff);\n\n\tcam.begin();\n\tofPushMatrix();\n\n\t// with texture\n\tif (bFull) {\n\t\tbool bTex = colorTexture.isAllocated();\n\t\tif (bTex) {\n\t\t\tcolorTexture.setTextureWrap(GL_CLAMP_TO_BORDER, GL_CLAMP_TO_BORDER);\n\t\t\tcolorTexture.bind();\n\t\t}\n\t\tdepthVboMesh.draw();\n\n\t\tif (bTex) {\n\t\t\tcolorTexture.unbind();\n\t\t}\n\t}\n\t// wireframe and points\n\tif (bWireFrame) {\n\t\tdepthVboMesh.draw(ofPolyRenderMode::OF_MESH_WIREFRAME);\n\t}\n\tif (bPoints) {\n\t\tdepthVboMesh.draw(ofPolyRenderMode::OF_MESH_POINTS);\n\t}\n\tofPopMatrix();\n\tcam.end();\n\n\tglDisable(GL_CULL_FACE);\n\tglDisable(GL_DEPTH_TEST);\n\n\tofSetColor(ofColor::fromHex(0x222222), 0x88);;\n\tofDrawRectangle(0, 0, 512, 128);\n\n\tofSetHexColor(0x00ffff);\n\tofDrawBitmapString(\"[f] full mesh, [w] wireframe, [p] points, [t] time cpu mesh\", margin, margin);\n\tofDrawBitmapString(\"cam: \" + ofToString(cam.getPosition()), margin, margin * 2);\n\tofDrawBitmapString(\"fps: \" + ofToString(ofGetFrameRate()), margin, margin * 3);\n\tofDrawBitmapString(\"gpu: \" + ofToString(gpuMeshUpdateTimer) + \"ms\", margin, margin * 4);\n\n\tif (bCompareMeshUpdates) {\n\t\tofDrawBitmapString(\"cpu: \" + ofToString(cpuMeshUpdateTimer) + \"ms\", margin, margin * 5);\n\t}\n}\n\nvoid ofApp::keyPressed(int key)\n{\n\tif (key == 'f') {\n\t\tbFull = !bFull;\n\t}\n\tif (key == 'w') {\n\t\tbWireFrame = !bWireFrame;\n\t}\n\tif (key == 'p') {\n\t\tbPoints = !bPoints;\n\t}\n\tif (key == 't') {\n\t\tbCompareMeshUpdates = !bCompareMeshUpdates;\n\t}\n}\n\n//--------------------------------------------------------------\nvoid ofApp::keyReleased(int key){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseMoved(int x, int y ){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseDragged(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mousePressed(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseReleased(int x, int y, int button){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseEntered(int x, int y){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::mouseExited(int x, int y){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::windowResized(int w, int h){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::gotMessage(ofMessage msg){\n\n}\n\n//--------------------------------------------------------------\nvoid ofApp::dragEvent(ofDragInfo dragInfo){ \n\n}\n"
  },
  {
    "path": "exampleDepthMeshShader/src/ofApp.h",
    "content": "/*\n\tAuthor: Lesley van Hoek\n\thttps://github.com/lshoek\n*/\n\n#pragma once\n\n#include \"ofxKinectForWindows2.h\"\n#include \"ofMain.h\"\n\nclass ofApp : public ofBaseApp\n{\n\tpublic:\n\t\tvoid setup();\n\t\tvoid update();\n\t\tvoid draw();\n\n\t\tvoid keyPressed(int key);\n\t\tvoid keyReleased(int key);\n\t\tvoid mouseMoved(int x, int y );\n\t\tvoid mouseDragged(int x, int y, int button);\n\t\tvoid mousePressed(int x, int y, int button);\n\t\tvoid mouseReleased(int x, int y, int button);\n\t\tvoid mouseEntered(int x, int y);\n\t\tvoid mouseExited(int x, int y);\n\t\tvoid windowResized(int w, int h);\n\t\tvoid dragEvent(ofDragInfo dragInfo);\n\t\tvoid gotMessage(ofMessage msg);\n\t\n\t\tofxKFW2::Device kinect;\n\n\t\tofxKFW2::Source::Depth::PointCloudOptions pointCloudOpts;\n\t\tICoordinateMapper* coordMapper;\n\n\t\tofFloatPixels depthToCameraSpaceTable;\n\t\tofFloatPixels colorToDepthSpaceTable;\n\n\t\tofTexture colorTexture;\n\t\tofTexture depthTexture;\n\n\t\tofShader meshShader;\n\t\tofShader indexShader;\n\n\t\tofBufferObject depthToCameraSpaceBuffer;\n\t\tofBufferObject vertexBuffer;\n\t\tofBufferObject indexBuffer;\n\n\t\tofVboMesh depthVboMesh;\n\t\tofMesh depthMesh;\n\n\t\tofEasyCam cam;\n\n\t\tuint64_t gpuMeshUpdateTimer;\n\t\tuint64_t cpuMeshUpdateTimer;\n\n\t\tint meshWidth;\n\t\tint meshHeight;\n\n\t\t// config\n\t\tbool bFull = true;\n\t\tbool bWireFrame = false;\n\t\tbool bPoints = false;\n\t\tbool bCompareMeshUpdates = false;\n\n\t\t// app\n\t\tbool bIsKinectOpen = false;\n\t\tbool bMeshDataInitialized = false;\n\n\t\tconst int margin = 20;\n};\n"
  },
  {
    "path": "exampleDepthToCameraTable/addons.make",
    "content": ""
  },
  {
    "path": "exampleDepthToCameraTable/exampleDepthToCameraTable.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 14\r\nVisualStudioVersion = 14.0.24720.0\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"exampleDepthToCameraTable\", \"exampleDepthToCameraTable.vcxproj\", \"{7FD42DF7-442E-479A-BA76-D0022F99702A}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"openframeworksLib\", \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\", \"{5837595D-ACA9-485C-8E76-729040CE4B0B}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxKinectForWindows2Lib\", \"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\", \"{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxCvGuiLib\", \"..\\..\\ofxCvGui\\ofxCvGuiLib\\ofxCvGuiLib.vcxproj\", \"{6F0DDB4F-4014-4433-919B-9D956C034BAD}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|x64.Build.0 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "exampleDepthToCameraTable/exampleDepthToCameraTable.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>exampleDepthToCameraTable</RootNamespace>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n    <PostBuildEvent />\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n    <PostBuildEvent />\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n    <PostBuildEvent />\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n    <PostBuildEvent />\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"src\\main.cpp\" />\r\n    <ClCompile Include=\"src\\ofApp.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"src\\ofApp.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"$(OF_ROOT)\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\">\r\n      <Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\..\\ofxCvGui\\ofxCvGuiLib\\ofxCvGuiLib.vcxproj\">\r\n      <Project>{6f0ddb4f-4014-4433-919b-9d956c034bad}</Project>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\">\r\n      <Project>{f6008d6a-6d39-4b68-840e-e7ac8ed855da}</Project>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ResourceCompile Include=\"icon.rc\">\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n      <AdditionalIncludeDirectories>$(OF_ROOT)\\libs\\openFrameworksCompiled\\project\\vs</AdditionalIncludeDirectories>\r\n    </ResourceCompile>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ProjectExtensions>\r\n    <VisualStudio>\r\n      <UserProperties RESOURCE_FILE=\"icon.rc\" />\r\n    </VisualStudio>\r\n  </ProjectExtensions>\r\n</Project>"
  },
  {
    "path": "exampleDepthToCameraTable/exampleDepthToCameraTable.vcxproj.filters",
    "content": "<?xml version=\"1.0\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\t<ItemGroup>\n\t\t<ClCompile Include=\"src\\ofApp.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"src\\main.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<Filter Include=\"src\">\n\t\t\t<UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>\n\t\t</Filter>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ClInclude Include=\"src\\ofApp.h\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClInclude>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ResourceCompile Include=\"icon.rc\" />\n\t</ItemGroup>\n</Project>\n"
  },
  {
    "path": "exampleDepthToCameraTable/icon.rc",
    "content": "// Icon Resource Definition\r\n#define MAIN_ICON                       102\r\n\r\n#if defined(_DEBUG)\r\nMAIN_ICON               ICON                    \"icon_debug.ico\"\r\n#else\r\nMAIN_ICON               ICON                    \"icon.ico\"\r\n#endif\r\n"
  },
  {
    "path": "exampleDepthToCameraTable/src/main.cpp",
    "content": "#include \"ofApp.h\"\r\n\r\n//========================================================================\r\nint main( ){\r\n\tofSetupOpenGL(1920,1080,OF_WINDOW);\t\t\t// <-------- setup the GL context\r\n\r\n\t// this kicks off the running of my app\r\n\t// can be OF_WINDOW or OF_FULLSCREEN\r\n\t// pass in width and height too:\r\n\tofRunApp(new ofApp());\r\n\r\n}\r\n"
  },
  {
    "path": "exampleDepthToCameraTable/src/ofApp.cpp",
    "content": "#include \"ofApp.h\"\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::setup(){\r\n\t//suggest running this in Release only (very slow in Debug)\r\n\r\n\tkinect.open();\r\n\tkinect.initColorSource();\r\n\tkinect.initDepthSource();\r\n\r\n\tgui.init();\r\n\tauto mainStrip = gui.addStrip();\r\n\tmainStrip->setDirection(ofxCvGui::Panels::Groups::Strip::Direction::Vertical);\r\n\tmainStrip->setCellSizes({ 33, 66 });\r\n\t\r\n\tauto widgets = ofxCvGui::Panels::makeWidgets();\r\n\t{\r\n\t\twidgets->addFps();\r\n\t\twidgets->addToggle(drawNativeWorld);\r\n\t\twidgets->addToggle(drawCalculatedWorld);\r\n\t}\r\n\r\n\tauto leftStrip = ofxCvGui::Panels::Groups::makeStrip();\r\n\tmainStrip->add(leftStrip);\r\n\t{\r\n\t\tleftStrip->add(widgets);\r\n\t\tleftStrip->add(ofxCvGui::Panels::makeBaseDraws(*kinect.getColorSource(), \"Color\"));\r\n\t\tleftStrip->add(ofxCvGui::Panels::makeBaseDraws(*kinect.getDepthSource(), \"Depth\"));\r\n\t\tleftStrip->add(ofxCvGui::Panels::makeBaseDraws(depthToWorldPreview, \"Depth to World table\"));\r\n\t}\r\n\r\n\tauto world = ofxCvGui::Panels::makeWorld();\r\n\tmainStrip->add(world);\r\n\tworld->onDrawWorld += [this](ofCamera &) {\r\n\t\tif (this->drawNativeWorld) {\r\n\t\t\tofPushStyle();\r\n\t\t\t{\r\n\t\t\t\tofSetColor(ofColor::white);\r\n\t\t\t\tthis->nativeWorld.drawVertices();\r\n\t\t\t}\r\n\t\t\tofPopStyle();\r\n\t\t}\r\n\t\tif (this->drawCalculatedWorld) {\r\n\t\t\tofPushStyle();\r\n\t\t\t{\r\n\t\t\t\tofSetColor(ofColor::red);\r\n\t\t\t\tthis->calculatedWorld.drawVertices();\r\n\t\t\t}\r\n\t\t\tofPopStyle();\r\n\t\t}\r\n\t};\r\n\tworld->getCamera().setPosition(-1, +1, -2);\r\n\tworld->getCamera().lookAt(ofVec3f(0, 0, 3));\r\n\tworld->getCamera().setCursorDrawEnabled(true);\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::update(){\r\n\tkinect.update();\r\n\tif (kinect.isFrameNew()) {\r\n\t\tauto depth = kinect.getDepthSource();\r\n\r\n\t\t//this next part only needs to happen once\r\n\t\t{\r\n\t\t\t//load the depth to world table\r\n\t\t\tdepth->getDepthToWorldTable(depthToWorldTable);\r\n\r\n\t\t\t//load it into our preview\r\n\t\t\tdepthToWorldPreview.loadData(depthToWorldTable);\r\n\t\t}\r\n\r\n\t\t//get the usual mesh\r\n\t\tnativeWorld = depth->getMesh();\r\n\t\t\r\n\t\t//build a mesh using the depthToWorldTable\r\n\t\t{\r\n\t\t\tauto size = depth->getWidth() * depth->getHeight();\r\n\t\t\t\r\n\t\t\tauto depthPixel = depth->getPixels().getData();\r\n\t\t\tauto depthToWorldRay = (ofVec2f*)depthToWorldTable.getData();\r\n\r\n\t\t\tthis->calculatedWorld.clear();\r\n\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\tauto z = (float)*depthPixel / 1000.0f;\r\n\r\n\t\t\t\tofVec3f vertex{\r\n\t\t\t\t\tdepthToWorldRay->x * z,\r\n\t\t\t\t\tdepthToWorldRay->y * z,\r\n\t\t\t\t\tz\r\n\t\t\t\t};\r\n\t\t\t\tcalculatedWorld.addVertex(vertex);\r\n\r\n\t\t\t\tdepthPixel++;\r\n\t\t\t\tdepthToWorldRay++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::draw(){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::keyPressed(int key){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::keyReleased(int key){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseMoved(int x, int y ){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseDragged(int x, int y, int button){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mousePressed(int x, int y, int button){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseReleased(int x, int y, int button){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseEntered(int x, int y){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseExited(int x, int y){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::windowResized(int w, int h){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::gotMessage(ofMessage msg){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::dragEvent(ofDragInfo dragInfo){ \r\n\r\n}\r\n"
  },
  {
    "path": "exampleDepthToCameraTable/src/ofApp.h",
    "content": "#pragma once\r\n\r\n#include \"ofxKinectForWindows2.h\"\r\n#include \"ofxCvGui.h\"\r\n#include \"ofMain.h\"\r\n\r\nclass ofApp : public ofBaseApp{\r\n\r\n\tpublic:\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid mouseEntered(int x, int y);\r\n\t\tvoid mouseExited(int x, int y);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\r\n\t\r\n\t\tofxKinectForWindows2::Device kinect;\r\n\t\tofxCvGui::Builder gui;\r\n\t\tofFloatPixels depthToWorldTable;\r\n\t\tofTexture depthToWorldPreview;\r\n\r\n\t\tofMesh nativeWorld;\r\n\t\tofMesh calculatedWorld;\r\n\r\n\t\tofParameter<bool> drawNativeWorld{ \"Draw native world\", false };\r\n\t\tofParameter<bool> drawCalculatedWorld{ \"Draw calculated world\", true };\r\n};\r\n"
  },
  {
    "path": "exampleWithGui/addons.make",
    "content": ""
  },
  {
    "path": "exampleWithGui/example.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 14\r\nVisualStudioVersion = 14.0.23107.0\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"example\", \"example.vcxproj\", \"{7FD42DF7-442E-479A-BA76-D0022F99702A}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"openframeworksLib\", \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\", \"{5837595D-ACA9-485C-8E76-729040CE4B0B}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxCvGuiLib\", \"..\\..\\..\\addons\\ofxCvGui\\ofxCvGuiLib\\ofxCvGuiLib.vcxproj\", \"{6F0DDB4F-4014-4433-919B-9D956C034BAD}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"ofxKinectForWindows2Lib\", \"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\", \"{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|Win32.ActiveCfg = Debug|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|Win32.Build.0 = Debug|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|Win32.ActiveCfg = Release|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|Win32.Build.0 = Release|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{6F0DDB4F-4014-4433-919B-9D956C034BAD}.Release|x64.Build.0 = Release|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "exampleWithGui/example.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>example</RootNamespace>\r\n    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v140</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxKinectForWindows2\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxKinectForWindows2\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxKinectForWindows2\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxKinectForWindows2\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\..\\addons\\ofxCvGui\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <OutDir>$(SolutionDir)bin\\</OutDir>\r\n    <IntDir>$(Platform)\\$(Configuration)\\</IntDir>\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <OutDir>$(SolutionDir)bin\\</OutDir>\r\n    <IntDir>$(Platform)\\$(Configuration)\\</IntDir>\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <MinimalRebuild>true</MinimalRebuild>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"src\\main.cpp\" />\r\n    <ClCompile Include=\"src\\ofApp.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"src\\ofApp.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\">\r\n      <Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\..\\..\\addons\\ofxCvGui\\ofxCvGuiLib\\ofxCvGuiLib.vcxproj\">\r\n      <Project>{6f0ddb4f-4014-4433-919b-9d956c034bad}</Project>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\">\r\n      <Project>{f6008d6a-6d39-4b68-840e-e7ac8ed855da}</Project>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ResourceCompile Include=\"icon.rc\">\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n    </ResourceCompile>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n</Project>"
  },
  {
    "path": "exampleWithGui/example.vcxproj.filters",
    "content": "<?xml version=\"1.0\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\t<ItemGroup>\n\t\t<ClCompile Include=\"src\\ofApp.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t\t<ClCompile Include=\"src\\main.cpp\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClCompile>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<Filter Include=\"src\">\n\t\t\t<UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>\n\t\t</Filter>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ClInclude Include=\"src\\ofApp.h\">\n\t\t\t<Filter>src</Filter>\n\t\t</ClInclude>\n\t</ItemGroup>\n\t<ItemGroup>\n\t\t<ResourceCompile Include=\"icon.rc\" />\n\t</ItemGroup>\n</Project>\n"
  },
  {
    "path": "exampleWithGui/icon.rc",
    "content": "// Icon Resource Definition\n#define MAIN_ICON                       102\n\n#if defined(_DEBUG)\nMAIN_ICON               ICON                    \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\icon_debug.ico\"\n#else\nMAIN_ICON               ICON                    \"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\icon.ico\"\n#endif\n"
  },
  {
    "path": "exampleWithGui/src/main.cpp",
    "content": "#include \"ofApp.h\"\r\n\r\n//========================================================================\r\nint main( ){\r\n\tofGLFWWindowSettings windowSettings;\r\n\twindowSettings.setGLVersion(3, 2);\r\n\twindowSettings.width = 1920;\r\n\twindowSettings.height = 1080;\r\n\tauto window = ofCreateWindow(windowSettings);\r\n\r\n\tofRunApp(new ofApp());\r\n\r\n}\r\n"
  },
  {
    "path": "exampleWithGui/src/ofApp.cpp",
    "content": "#include \"ofApp.h\"\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::setup(){\r\n\tkinect.open();\r\n\tkinect.initDepthSource();\r\n\tkinect.initColorSource();\r\n\tkinect.initInfraredSource();\r\n\tkinect.initBodyIndexSource();\r\n\tkinect.initBodySource();\r\n\r\n\tgui.init();\r\n\r\n\t//setup a gui panel for the widgets at top-left\r\n\tauto widgets = gui.addWidgets();\r\n\twidgets->addTitle(\"ofxKinectForWindows2\");\r\n\twidgets->addFps();\r\n\twidgets->addMemoryUsage();\r\n\r\n\t//setup a gui panel for the 3D view\r\n\tauto worldView = gui.addWorld(\"World\");\r\n\tworldView->onDrawWorld += [this](ofCamera &) {\r\n\t\tthis->kinect.drawWorld();\r\n\t};\r\n\r\n\t//setup a gui panel for every kinect source\r\n\tauto sources = kinect.getSources();\r\n\tfor(auto source : sources) {\r\n\t\tauto sourceWithTexture = dynamic_pointer_cast<ofBaseHasTexture>(source);\r\n\t\tif (sourceWithTexture) {\r\n\t\t\tauto panel = gui.add(sourceWithTexture->getTexture(), source->getTypeName());\r\n\r\n\t\t\t//if it's the colour panel, let's do something special by writing some info on top\r\n\t\t\tauto colorSource = dynamic_pointer_cast<ofxKFW2::Source::Color>(source);\r\n\t\t\tif (colorSource) {\r\n\t\t\t\tpanel->onDraw += [colorSource] (ofxCvGui::DrawArguments &) {\r\n\t\t\t\t\tstringstream message;\r\n\t\t\t\t\tmessage << \"Exposure : \" << colorSource->getExposure() << \"us\" << endl;\r\n\t\t\t\t\tmessage << \"FrameInterval : \" << colorSource->getFrameInterval() << \"us\" << endl;\r\n\t\t\t\t\tmessage << \"Gain : \" << colorSource->getGain() << endl;\r\n\t\t\t\t\tmessage << \"Gamma : \" << colorSource->getGamma() << endl;\r\n\t\t\t\t\tofxCvGui::Utils::drawText(message.str(), 20, 60);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\t//if it's the depth panel, set some scaling\r\n\t\t\tauto depthSource = dynamic_pointer_cast<ofxKFW2::Source::Depth>(source);\r\n\t\t\tif (depthSource) {\r\n\t\t\t\tauto style = make_shared<ofxCvGui::Panels::Texture::Style>();\r\n\t\t\t\tstyle->rangeMaximum = 0.25f;\r\n\t\t\t\tpanel->setStyle(style);\r\n\t\t\t}\r\n\r\n\t\t\t//if it's the body index panel, let's draw the joints on top\r\n\t\t\tauto bodyIndexSource = dynamic_pointer_cast<ofxKFW2::Source::BodyIndex>(source);\r\n\t\t\tif(bodyIndexSource) {\r\n\t\t\t\tpanel->onDrawImage += [this](ofxCvGui::DrawImageArguments & args) {\r\n\t\t\t\t\tauto bodySource = this->kinect.getBodySource();\r\n\t\t\t\t\tconst auto & bodies = bodySource->getBodies();\r\n\r\n\t\t\t\t\tofPushStyle();\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tofColor color(200, 100, 100);\r\n\t\t\t\t\t\tint index = 0;\r\n\t\t\t\t\t\tfor (const auto & body : bodies) {\r\n\t\t\t\t\t\t\tcolor.setHueAngle((index * 50) % 360);\r\n\t\t\t\t\t\t\tofSetColor(color);\r\n\t\t\t\t\t\t\tfor (const auto & joint : body.joints) {\r\n\t\t\t\t\t\t\t\tofDrawCircle(joint.second.getPositionInDepthMap(), 5);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tofPopStyle();\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//add an 'isFrameNew' widget to the panel\r\n\t\twidgets->addIndicatorBool(source->getTypeName() + \" frame new\", [source]() {\r\n\t\t\treturn source->isFrameNew();\r\n\t\t});\r\n\t}\r\n\r\n\t//if we press the 'c' key on the World panel, then toggle the camera's cursor. This works best when you fullscreen that panel\r\n\tworldView->onKeyboard += [this, worldView] (ofxCvGui::KeyboardArguments & args) {\r\n\t\tif (args.action == ofxCvGui::KeyboardArguments::Action::Pressed && args.key =='c') {\r\n\t\t\tworldView->getCamera().toggleCursorDrawEnabled();\r\n\t\t}\r\n\t};\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::update(){\r\n\tkinect.update();\r\n\tmesh = kinect.getDepthSource()->getMesh(true, ofxKinectForWindows2::Source::Depth::PointCloudOptions::TextureCoordinates::ColorCamera);\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::draw(){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::keyPressed(int key){\r\n\t\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::keyReleased(int key){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseMoved(int x, int y){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseDragged(int x, int y, int button){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mousePressed(int x, int y, int button){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::mouseReleased(int x, int y, int button){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::windowResized(int w, int h){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::gotMessage(ofMessage msg){\r\n\r\n}\r\n\r\n//--------------------------------------------------------------\r\nvoid ofApp::dragEvent(ofDragInfo dragInfo){ \r\n\r\n}\r\n"
  },
  {
    "path": "exampleWithGui/src/ofApp.h",
    "content": "#pragma once\r\n\r\n#include \"ofxKinectForWindows2.h\"\r\n#include \"ofxCvGui.h\"\r\n#include \"ofMain.h\"\r\n\r\nclass ofApp : public ofBaseApp{\r\n\r\n\tpublic:\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\r\n\r\n\t\tofxKFW2::Device kinect;\r\n\t\tofxCvGui::Builder gui;\r\n\t\tofMesh mesh;\r\n};\r\n"
  },
  {
    "path": "exampleWithGui/~AutoRecover.example.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>example</RootNamespace>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v110</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <PlatformToolset>v120</PlatformToolset>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui2\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui2\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease64.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui2\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n    <Import Project=\"..\\..\\ofxCvGui2\\ofxCvGuiLib\\ofxCvGui.props\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug64.props\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <TargetName>$(ProjectName)_debug</TargetName>\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <GenerateManifest>true</GenerateManifest>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <OutDir>bin\\</OutDir>\r\n    <IntDir>obj\\$(Configuration)\\</IntDir>\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <MinimalRebuild>true</MinimalRebuild>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <Optimization>Disabled</Optimization>\r\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WholeProgramOptimization>false</WholeProgramOptimization>\r\n      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <AdditionalIncludeDirectories>..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <CompileAs>CompileAsCpp</CompileAs>\r\n    </ClCompile>\r\n    <Link>\r\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r\n      <GenerateDebugInformation>false</GenerateDebugInformation>\r\n      <SubSystem>Console</SubSystem>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"src\\main.cpp\" />\r\n    <ClCompile Include=\"src\\ofApp.cpp\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"src\\ofApp.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openframeworksLib.vcxproj\">\r\n      <Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\..\\ofxCvGui2\\ofxCvGuiLib\\ofxCvGuiLib.vcxproj\">\r\n      <Project>{6f0ddb4f-4014-4433-919b-9d956c034bad}</Project>\r\n    </ProjectReference>\r\n    <ProjectReference Include=\"..\\ofxKinectForWindows2Lib\\ofxKinectForWindows2Lib.vcxproj\">\r\n      <Project>{f6008d6a-6d39-4b68-840e-e7ac8ed855da}</Project>\r\n    </ProjectReference>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ResourceCompile Include=\"icon.rc\">\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n      <AdditionalOptions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>\r\n    </ResourceCompile>\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n</Project>"
  },
  {
    "path": "ofxKinectForWindows2.props",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ImportGroup Label=\"PropertySheets\" />\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup />\r\n  <ItemDefinitionGroup>\r\n    <ClCompile>\r\n      <AdditionalIncludeDirectories>$(KINECTSDK20_DIR)\\inc;..\\..\\..\\addons\\ofxKinectForWindows2\\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <ObjectFileName>$(IntDir)\\%(Directory)\\</ObjectFileName>\r\n    </ClCompile>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup />\r\n</Project>"
  },
  {
    "path": "ofxKinectForWindows2Lib/ofxKinectForWindows2Lib.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}</ProjectGuid>\r\n    <RootNamespace>ofxKinectForWindows2Lib</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>StaticLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <CharacterSet>MultiByte</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>StaticLibrary</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <CharacterSet>MultiByte</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>StaticLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>MultiByte</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>StaticLibrary</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>MultiByte</CharacterSet>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksDebug.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n  </ImportGroup>\r\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n    <Import Project=\"..\\..\\..\\libs\\openFrameworksCompiled\\project\\vs\\openFrameworksRelease.props\" />\r\n    <Import Project=\"..\\ofxKinectForWindows2.props\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <TargetName>$(ProjectName)d</TargetName>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <SDLCheck>true</SDLCheck>\r\n      <MinimalRebuild>false</MinimalRebuild>\r\n      <!-- ObjectFileName>$(IntDir)\\%(Directory)\\</ObjectFileName -->\r\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n    <Lib>\r\n      <AdditionalDependencies>kinect20.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(KINECTSDK20_DIR)Lib\\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Lib>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <SDLCheck>true</SDLCheck>\r\n      <MinimalRebuild>false</MinimalRebuild>\r\n      <!-- ObjectFileName>$(IntDir)\\%(Directory)\\</ObjectFileName -->\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n    <Lib>\r\n      <AdditionalDependencies>kinect20.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(KINECTSDK20_DIR)Lib\\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Lib>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <!-- ObjectFileName>$(IntDir)\\%(Directory)\\</ObjectFileName -->\r\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n    </Link>\r\n    <Lib>\r\n      <AdditionalDependencies>kinect20.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(KINECTSDK20_DIR)Lib\\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Lib>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <!-- ObjectFileName>$(IntDir)\\%(Directory)\\</ObjectFileName -->\r\n    </ClCompile>\r\n    <Link>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n    </Link>\r\n    <Lib>\r\n      <AdditionalDependencies>kinect20.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n      <AdditionalLibraryDirectories>$(KINECTSDK20_DIR)Lib\\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r\n    </Lib>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Data\\Body.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Data\\Joint.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Device.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Base.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\BaseImage.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Body.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\BodyIndex.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Color.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Depth.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Infrared.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\LongExposureInfrared.h\" />\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Utils.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Data\\Body.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Data\\Joint.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Device.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Body.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\BodyIndex.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Color.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Depth.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\BaseImage.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Infrared.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\LongExposureInfraRed.cpp\" />\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Utils.cpp\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "ofxKinectForWindows2Lib/ofxKinectForWindows2Lib.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"src\">\r\n      <UniqueIdentifier>{6233ced8-5481-4a0d-a271-976452c0370e}</UniqueIdentifier>\r\n    </Filter>\r\n    <Filter Include=\"src\\ofxKinectForWindows2\">\r\n      <UniqueIdentifier>{86806939-f359-440c-b989-432997725320}</UniqueIdentifier>\r\n    </Filter>\r\n    <Filter Include=\"src\\ofxKinectForWindows2\\Source\">\r\n      <UniqueIdentifier>{ef038ac8-52e4-450d-b04c-489f6aba359a}</UniqueIdentifier>\r\n    </Filter>\r\n    <Filter Include=\"src\\ofxKinectForWindows2\\Data\">\r\n      <UniqueIdentifier>{eeab42d3-af56-4576-8e45-79e3ea5610f5}</UniqueIdentifier>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2.h\">\r\n      <Filter>src</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Device.h\">\r\n      <Filter>src\\ofxKinectForWindows2</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Utils.h\">\r\n      <Filter>src\\ofxKinectForWindows2</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Depth.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Base.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\BaseImage.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Infrared.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\LongExposureInfrared.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\BodyIndex.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Color.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Source\\Body.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Data\\Body.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Data</Filter>\r\n    </ClInclude>\r\n    <ClInclude Include=\"..\\src\\ofxKinectForWindows2\\Data\\Joint.h\">\r\n      <Filter>src\\ofxKinectForWindows2\\Data</Filter>\r\n    </ClInclude>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Device.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Utils.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Depth.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\BaseImage.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Infrared.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\LongExposureInfraRed.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\BodyIndex.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Color.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Source\\Body.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Source</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Data\\Body.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Data</Filter>\r\n    </ClCompile>\r\n    <ClCompile Include=\"..\\src\\ofxKinectForWindows2\\Data\\Joint.cpp\">\r\n      <Filter>src\\ofxKinectForWindows2\\Data</Filter>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "src/ofxKinectForWindows2/Data/Body.cpp",
    "content": "#include \"Body.h\"\r\n\r\n#include \"ofGraphics.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Data {\r\n\t\t//----------\r\n\t\tstd::vector<std::pair<JointType, JointType> > * Body::bonesAtlas = 0;\r\n\t\t\r\n\t\t//----------\r\n\t\tBody::Body() {\r\n\t\t\tthis->bodyId = -1;\r\n\t\t\tthis->trackingId = -1;\r\n\t\t\tthis->tracked = false;\r\n\t\t\tthis->leftHandState = HandState::HandState_Unknown;\r\n\t\t\tthis->rightHandState = HandState::HandState_Unknown;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::drawWorld() const {\r\n\t\t\tif (!this->tracked) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst auto & boneAtlas = this->getBonesAtlas();\r\n\t\t\tfor(auto & bone : boneAtlas) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconst auto & firstJoint = this->joints.at(bone.first);\r\n\t\t\t\t\tconst auto & secondJoint = this->joints.at(bone.second);\r\n\t\t\t\t\tif (firstJoint.getTrackingState() != TrackingState::TrackingState_NotTracked && secondJoint.getTrackingState() != TrackingState::TrackingState_NotTracked) {\r\n\t\t\t\t\t\tofDrawLine(firstJoint.getPosition(), secondJoint.getPosition());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (...)\t{\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::clear() {\r\n\t\t\tjoints.clear();\r\n\t\t\tleftHandState = HandState_Unknown;\r\n\t\t\trightHandState = HandState_Unknown;\r\n\t\t\ttracked = false;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tBody Body::operator*(const ofMatrix4x4 & transform) const {\r\n\t\t\tauto copy = *this;\r\n\t\t\tfor (auto & joint : copy.joints) {\r\n\t\t\t\tjoint.second = joint.second * transform;\r\n\t\t\t}\r\n\t\t\treturn copy;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tconst std::vector<std::pair<JointType, JointType> > & Body::getBonesAtlas() {\r\n\t\t\t//if pointer isn't valid, let's initialise the atlas\r\n\t\t\tif (!bonesAtlas) {\r\n\t\t\t\tinitBonesAtlas();\r\n\t\t\t}\r\n\t\t\treturn * Body::bonesAtlas;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::initBonesAtlas() {\r\n\t\t\tBody::bonesAtlas = new std::vector<std::pair<JointType, JointType> >();\r\n\r\n#define BONEDEF_ADD(J1, J2) Body::bonesAtlas->push_back( std::make_pair<JointType, JointType>(JointType_ ## J1, JointType_ ## J2) )\r\n\t\t\t// Torso\r\n\t\t\tBONEDEF_ADD\t(Head,\t\t\tNeck);\r\n\t\t\tBONEDEF_ADD\t(Neck,\t\t\tSpineShoulder);\r\n\t\t\tBONEDEF_ADD\t(SpineShoulder,\tSpineMid);\r\n\t\t\tBONEDEF_ADD\t(SpineMid,\t\tSpineBase);\r\n\t\t\tBONEDEF_ADD\t(SpineShoulder,\tShoulderRight);\r\n\t\t\tBONEDEF_ADD\t(SpineShoulder,\tShoulderLeft);\r\n\t\t\tBONEDEF_ADD\t(SpineBase,\t\tHipRight);\r\n\t\t\tBONEDEF_ADD\t(SpineBase,\t\tHipLeft);\r\n\r\n\t\t\t// Right Arm\r\n\t\t\tBONEDEF_ADD\t(ShoulderRight,\tElbowRight);\r\n\t\t\tBONEDEF_ADD\t(ElbowRight,\tWristRight);\r\n\t\t\tBONEDEF_ADD\t(WristRight,\tHandRight);\r\n\t\t\tBONEDEF_ADD\t(HandRight,\t\tHandTipRight);\r\n\t\t\tBONEDEF_ADD\t(WristRight,\tThumbRight);\r\n\r\n\t\t\t// Left Arm\r\n\t\t\tBONEDEF_ADD\t(ShoulderLeft,\tElbowLeft);\r\n\t\t\tBONEDEF_ADD\t(ElbowLeft,\t\tWristLeft);\r\n\t\t\tBONEDEF_ADD\t(WristLeft,\t\tHandLeft);\r\n\t\t\tBONEDEF_ADD\t(HandLeft,\t\tHandTipLeft);\r\n\t\t\tBONEDEF_ADD\t(WristLeft,\t\tThumbLeft);\r\n\r\n\t\t\t// Right Leg\r\n\t\t\tBONEDEF_ADD\t(HipRight,\t\tKneeRight);\r\n\t\t\tBONEDEF_ADD\t(KneeRight,\t\tAnkleRight);\r\n\t\t\tBONEDEF_ADD\t(AnkleRight,\tFootRight);\r\n\r\n\t\t\t// Left Leg\r\n\t\t\tBONEDEF_ADD\t(HipLeft,\tKneeLeft);\r\n\t\t\tBONEDEF_ADD\t(KneeLeft,\tAnkleLeft);\r\n\t\t\tBONEDEF_ADD\t(AnkleLeft,\tFootLeft);\r\n#undef BONEDEF_ADD\r\n\t\t}\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Data/Body.h",
    "content": "#pragma once\r\n\r\n#include \"Joint.h\"\r\n\r\n#include <map>\r\n#include <Kinect.h>\r\n#include <vector>\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Data {\r\n\t\tclass Body {\r\n\t\tpublic:\r\n\t\t\tBody();\r\n\t\t\tuint8_t bodyId;\r\n\t\t\tuint64_t trackingId;\r\n\t\t\tbool tracked;\r\n\t\t\tHandState leftHandState;\r\n\t\t\tHandState rightHandState;\r\n\t\t\tstd::map<JointType, Joint> joints;\r\n\t\t\tstd::map<Activity, DetectionResult> activity;\r\n\r\n\t\t\tvoid drawWorld() const;\r\n\t\t\tvoid clear();\r\n\r\n\t\t\tBody operator*(const ofMatrix4x4 &) const;\r\n\t\t\tstatic const std::vector<std::pair<JointType, JointType> > & getBonesAtlas();\r\n\t\tprotected:\r\n\t\t\tstatic void initBonesAtlas();\r\n\t\t\tstatic std::vector<std::pair<JointType, JointType> > * bonesAtlas;\r\n\t\t};\r\n\t}\r\n}\r\n"
  },
  {
    "path": "src/ofxKinectForWindows2/Data/Joint.cpp",
    "content": "#include \"Joint.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Data {\r\n\t\t//----------\r\n\t\tJoint::Joint(const _Joint& joint, const _JointOrientation& jointOrientation, ICoordinateMapper * coordinateMapper) {\r\n\t\t\tthis->set(joint, jointOrientation, coordinateMapper);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tJoint::Joint(const _Joint& joint, const _JointOrientation& jointOrientation, const ofVec2f & jointInDepthSpace) {\r\n\t\t\tthis->set(joint, jointOrientation, jointInDepthSpace);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Joint::set(const _Joint& joint, const _JointOrientation& jointOrientation, ICoordinateMapper * coordinateMapper) {\r\n\t\t\tDepthSpacePoint depthSpacePoint;\r\n\t\t\tcoordinateMapper->MapCameraPointsToDepthSpace(1, &joint.Position, 1, &depthSpacePoint);\r\n\t\t\tofVec2f positionInDepthMap(depthSpacePoint.X, depthSpacePoint.Y);\r\n\t\t\t\r\n\t\t\tthis->set(joint, jointOrientation, positionInDepthMap);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Joint::set(const _Joint& joint, const _JointOrientation& jointOrientation, const ofVec2f & positionInDepthMap) {\r\n\t\t\tthis->joint = joint;\r\n\t\t\tthis->positionInWorld.set(joint.Position.X, joint.Position.Y, joint.Position.Z);\r\n\t\t\tthis->positionInDepthMap = positionInDepthMap;\r\n\r\n\t\t\tthis->type = joint.JointType;\r\n\t\t\tthis->trackingState = joint.TrackingState;\r\n\r\n\t\t\tthis->jointOrientation = jointOrientation;\r\n\t\t\tthis->orientation.set(jointOrientation.Orientation.x, jointOrientation.Orientation.y, jointOrientation.Orientation.z, jointOrientation.Orientation.w);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tJointType Joint::getType() const {\r\n\t\t\treturn type;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofVec3f Joint::getPositionInWorld() const {\r\n\t\t\treturn positionInWorld;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofVec2f Joint::getPositionInDepthMap() const {\r\n\t\t\treturn this->positionInDepthMap;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofVec2f Joint::getProjected(ICoordinateMapper * coordinateMapper, ProjectionCoordinates proj) const {\r\n\t\t\tswitch (proj) {\r\n\t\t\tcase ColorCamera: {\r\n\t\t\t\tColorSpacePoint projected = { 0 };\r\n\t\t\t\tcoordinateMapper->MapCameraPointToColorSpace(joint.Position, &projected);\r\n\t\t\t\treturn ofVec2f(projected.X, projected.Y);\r\n\t\t\t}\r\n\t\t\tcase DepthCamera: {\r\n\t\t\t\tDepthSpacePoint projected = { 0 };\r\n\t\t\t\tcoordinateMapper->MapCameraPointToDepthSpace(joint.Position, &projected);\r\n\t\t\t\treturn ofVec2f(projected.X, projected.Y);\r\n\t\t\t}\r\n\t\t\tdefault:\r\n\t\t\t\treturn ofVec2f();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofQuaternion Joint::getOrientation() const {\r\n\t\t\treturn orientation;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tTrackingState Joint::getTrackingState() const {\r\n\t\t\treturn trackingState;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\t_Joint Joint::getRawJoint() const {\r\n\t\t\treturn this->joint;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\t_JointOrientation Joint::getRawJointOrientation() const {\r\n\t\t\treturn this->jointOrientation;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tJoint Joint::operator*(const ofMatrix4x4 & transform) const {\r\n\t\t\tauto copy = *this;\r\n\t\t\tcopy.positionInWorld = copy.positionInWorld * transform;\r\n\r\n\t\t\tofQuaternion rotationTransform;\r\n\t\t\trotationTransform.set(transform);\r\n\t\t\tcopy.orientation = copy.orientation * rotationTransform;\r\n\r\n\t\t\treturn copy;\r\n\t\t}\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Data/Joint.h",
    "content": "#pragma once\r\n#define _HAS_STD_BYTE 0\r\n\r\n#include \"ofVectorMath.h\"\r\n\r\n// If your compiler is complaining that it can't find Kinect.h, then please make sure:\r\n//\t1) You have installed the Kinect SDK (e.g. v2.0_1409 is the latest version as of October 2015)\r\n//\t2) You have rebooted since installing the SDK. Some environment variables (e.g. the Kinect SDK folder) are only set after restarting.\r\n#include <Kinect.h>\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tenum ProjectionCoordinates {\r\n\t\tDepthCamera,\r\n\t\tColorCamera\r\n\t};\r\n\r\n\tnamespace Data {\r\n\t\tclass Joint\r\n\t\t{\r\n\t\tpublic:\r\n\t\t\tJoint(){}\r\n\t\t\tJoint(const _Joint& joint, const _JointOrientation& jointOrientation, ICoordinateMapper *);\r\n\t\t\tJoint(const _Joint& joint, const _JointOrientation& jointOrientation, const ofVec2f & positionInDepthMap);\r\n\t\t\tvoid set(const _Joint& joint, const _JointOrientation& jointOrientation, ICoordinateMapper *);\r\n\t\t\tvoid set(const _Joint& joint, const _JointOrientation& jointOrientation, const ofVec2f & positionInDepthMap);\r\n\t\t\tJointType getType() const;\r\n\t\t\tofVec3f getPositionInWorld() const;\r\n\t\t\tofVec2f getPositionInDepthMap() const;\r\n\t\t\tofVec3f getPosition() const {\r\n\t\t\t\treturn this->getPositionInWorld();\r\n\t\t\t}\r\n\t\t\tofVec2f getProjected(ICoordinateMapper * coordinateMapper, ProjectionCoordinates proj = ColorCamera) const;\r\n\t\t\tofQuaternion getOrientation() const;\r\n\t\t\tTrackingState getTrackingState() const;\r\n\r\n\t\t\t_Joint getRawJoint() const;\r\n\t\t\t_JointOrientation getRawJointOrientation() const;\r\n\r\n\t\t\tJoint operator*(const ofMatrix4x4 &) const;\r\n\r\n\t\tprotected:\r\n\t\t\tofVec3f positionInWorld;\r\n\t\t\tofVec2f positionInDepthMap;\r\n\t\t\tofQuaternion orientation;\r\n\t\t\tJointType type;\r\n\t\t\tTrackingState trackingState;\r\n\r\n\t\t\t_Joint joint;\r\n\t\t\t_JointOrientation jointOrientation;\r\n\t\t};\r\n\t}\r\n}\r\n"
  },
  {
    "path": "src/ofxKinectForWindows2/Device.cpp",
    "content": "#include \"Device.h\"\r\n\r\n#include \"of3dUtils.h\"\r\n#include \"ofConstants.h\"\r\n#include \"ofGraphics.h\"\r\n#if OF_VERSION_MAJOR > 0 || OF_VERSION_MINOR >= 10\r\n#include \"ofAppGLFWWindow.h\"\r\n#endif\r\n\r\n#define CHECK_OPEN if(!this->sensor) { OFXKINECTFORWINDOWS2_ERROR << \"Failed : Sensor is not open\"; }\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\t//----------\r\n\tDevice::Device() {\r\n\t\tthis->sensor = nullptr;\r\n\t\tthis->reader = nullptr;\r\n\t\tthis->isFrameNewFlag = false;\r\n\t}\r\n\r\n\t//----------\r\n\tDevice::~Device() {\r\n\t\tthis->close();\r\n\t}\r\n\r\n\t//----------\r\n\tvoid Device::open() {\r\n\t\ttry {\r\n\t\t\tif (FAILED(GetDefaultKinectSensor(&this->sensor))) {\r\n\t\t\t\tthrow(Exception(\"Failed to find sensor\"));\r\n\t\t\t}\r\n\r\n\t\t\tif (FAILED(this->sensor->Open())) {\r\n\t\t\t\tthrow(Exception(\"Failed to open sensor\"));\r\n\t\t\t}\r\n\t\t} catch (std::exception & e) {\r\n\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\tthis->sensor = nullptr;\r\n\t\t}\r\n\t}\r\n\r\n\t//----------\r\n\tvoid Device::close() {\r\n\t\tSafeRelease(this->reader);\r\n\r\n\t\tif (!this->sensor) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//release all sources.\r\n\t\tthis->sources.clear();\r\n\r\n\t\tthis->sensor->Close();\r\n\t\tSafeRelease(this->sensor);\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::isOpen() const {\r\n\t\tif (!this->sensor) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tBOOLEAN result;\r\n\t\tif (!FAILED(this->sensor->get_IsOpen(&result))) {\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tOFXKINECTFORWINDOWS2_ERROR << \"Failed to check if sensor is open\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//----------\r\n\tvoid Device::initMultiSource(std::initializer_list<FrameSourceTypes> frameSourceTypes) {\r\n\t\tCHECK_OPEN;\r\n\r\n\t\tif (!this->reader) {\r\n\t\t\tDWORD enabledFrameSourceTypes = 0;\r\n\t\t\tfor (auto frameSourceType : frameSourceTypes) {\r\n\t\t\t\tenabledFrameSourceTypes |= frameSourceType;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (!FAILED(this->sensor->OpenMultiSourceFrameReader(enabledFrameSourceTypes, &reader))) {\r\n\t\t\t\t\tif (enabledFrameSourceTypes & FrameSourceTypes_Color) {\r\n\t\t\t\t\t\tthis->initSource<Source::Color>(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (enabledFrameSourceTypes & FrameSourceTypes_Infrared) {\r\n\t\t\t\t\t\tthis->initSource<Source::Infrared>(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (enabledFrameSourceTypes & FrameSourceTypes_LongExposureInfrared) {\r\n\t\t\t\t\t\tthis->initSource<Source::LongExposureInfrared>(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (enabledFrameSourceTypes & FrameSourceTypes_Depth) {\r\n\t\t\t\t\t\tthis->initSource<Source::Depth>(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (enabledFrameSourceTypes & FrameSourceTypes_BodyIndex) {\r\n\t\t\t\t\t\tthis->initSource<Source::BodyIndex>(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (enabledFrameSourceTypes & FrameSourceTypes_Body) {\r\n\t\t\t\t\t\tthis->initSource<Source::Body>(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//----------\r\n\ttemplate<typename SourceType>\r\n\tstd::shared_ptr<SourceType> Device::initSource(bool initReader) {\r\n\t\tCHECK_OPEN;\r\n\r\n\t\t//first check if it already exists\r\n\t\t{\r\n\t\t\tauto source = this->getSource<SourceType>();\r\n\t\t\tif (source) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_WARNING << \"Source of type \" << typeid(SourceType).name() << \" already initialised.\";\r\n\t\t\t\treturn source;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//if not then open it\r\n\t\ttry {\r\n\t\t\tauto source = MAKE(SourceType);\r\n\t\t\tsource->init(this->sensor, initReader);\r\n\t\t\tthis->sources.push_back(source);\r\n\t\t\treturn source;\r\n\t\t} catch (std::exception & e) {\r\n\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\treturn std::shared_ptr<SourceType>();\r\n\t\t}\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::Depth> Device::initDepthSource() {\r\n\t\treturn this->initSource<Source::Depth>(true);\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::Color> Device::initColorSource() {\r\n\t\treturn this->initSource<Source::Color>(true);\r\n\t}\r\n\t\r\n\t//----------\r\n\tstd::shared_ptr<Source::Infrared> Device::initInfraredSource() {\r\n\t\treturn this->initSource<Source::Infrared>(true);\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::LongExposureInfrared> Device::initLongExposureInfraredSource() {\r\n\t\treturn this->initSource<Source::LongExposureInfrared>(true);\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::BodyIndex> Device::initBodyIndexSource() {\r\n\t\treturn this->initSource<Source::BodyIndex>(true);\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::Body> Device::initBodySource() {\r\n\t\treturn this->initSource<Source::Body>(true);\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::releaseMultiSource() {\r\n\t\t// look for sources initialized with MultiSource (those without their own reader)\r\n\t\t// and erase them. They are consecutive in the vector\r\n\t\tauto first = this->sources.begin();\r\n\t\twhile (first != this->sources.end() && (*first)->hasReader())\r\n\t\t\tfirst++;\r\n\r\n\t\tif (first == this->sources.end()) {\r\n\t\t\tOFXKINECTFORWINDOWS2_WARNING << \"No sources initialized with MultiSource.\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tauto last = first;\r\n\t\twhile (last != this->sources.end() && !(*last)->hasReader())\r\n\t\t\tlast++;\r\n\r\n\t\tthis->sources.erase(first, last);\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t//----------\r\n\ttemplate<typename SourceType>\r\n\tbool Device::releaseSource() {\r\n\t\tCHECK_OPEN;\r\n\r\n\t\t//check if it already exists\r\n\t\tauto source = this->getSource<SourceType>();\r\n\t\tif (source && source->hasReader()) {\r\n\t\t\tthis->sources.erase(std::remove(this->sources.begin(), this->sources.end(), source), this->sources.end());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t//does not exist\r\n\t\tOFXKINECTFORWINDOWS2_WARNING << \"Source of type \" << typeid(SourceType).name() << \" not initialised, or in a MultiSource.\";\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::releaseDepthSource() {\r\n\t\treturn this->releaseSource<Source::Depth>();\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::releaseColorSource() {\r\n\t\treturn this->releaseSource<Source::Color>();\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::releaseInfraredSource() {\r\n\t\treturn this->releaseSource<Source::Infrared>();\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::releaseLongExposureInfraredSource() {\r\n\t\treturn this->releaseSource<Source::LongExposureInfrared>();\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::releaseBodyIndexSource() {\r\n\t\treturn this->releaseSource<Source::BodyIndex>();\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::releaseBodySource() {\r\n\t\treturn this->releaseSource<Source::Body>();\r\n\t}\r\n\r\n\t//----------\r\n\tvoid Device::update() {\r\n\t\tthis->isFrameNewFlag = false;\r\n\t\tIMultiSourceFrame * frame = NULL;\r\n\t\tif (this->reader) {\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(this->reader->AcquireLatestFrame(&frame))) {\r\n\t\t\t\t\tSafeRelease(frame);\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (auto source : this->sources) {\r\n\t\t\tif (frame && !source->hasReader())\r\n\t\t\t\tsource->update(frame);\r\n\t\t\telse\r\n\t\t\t\tsource->update();\r\n\t\t\tthis->isFrameNewFlag |= source->isFrameNew();\r\n\t\t}\r\n\t\tSafeRelease(frame);\r\n\t}\r\n\r\n\t//----------\r\n\tbool Device::isFrameNew() const {\r\n\t\treturn this->isFrameNewFlag;\r\n\t}\r\n\r\n\t//----------\r\n\tconst std::vector<std::shared_ptr<Source::Base>> & Device::getSources() const {\r\n\t\treturn this->sources;\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::Depth> Device::getDepthSource() const {\r\n\t\treturn this->getSource<Source::Depth>();\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::Color> Device::getColorSource() const {\r\n\t\treturn this->getSource<Source::Color>();\r\n\t}\r\n\t\r\n\t//----------\r\n\tstd::shared_ptr<Source::Infrared> Device::getInfraredSource() const {\r\n\t\treturn this->getSource<Source::Infrared>();\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::LongExposureInfrared> Device::getLongExposureInfraredSource() const {\r\n\t\treturn this->getSource<Source::LongExposureInfrared>();\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::BodyIndex> Device::getBodyIndexSource() const {\r\n\t\treturn this->getSource<Source::BodyIndex>();\r\n\t}\r\n\r\n\t//----------\r\n\tstd::shared_ptr<Source::Body> Device::getBodySource() const {\r\n\t\treturn this->getSource<Source::Body>();\r\n\t}\r\n\r\n\t//----------\r\n\tIKinectSensor * Device::getSensor() {\r\n\t\treturn this->sensor;\r\n\t}\r\n\r\n\t//----------\r\n\tvoid Device::drawWorld() {\r\n\t\tauto colorSource = this->getColorSource();\r\n\t\tauto depthSource = this->getDepthSource();\r\n\t\tauto bodySource = this->getBodySource();\r\n\r\n\t\tif (!depthSource) {\r\n\t\t\tofLogError(\"ofxKinectForWindows2::Device::drawPrettyMesh\") << \"No depth source initialised\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//point cloud\r\n\t\t{\r\n\t\t\t//setup some point cloud properties for kicks\r\n\t\t\tbool usePointSize = true;\r\n\r\n#if OF_VERSION_MAJOR > 0 || OF_VERSION_MINOR >= 10\r\n\t\t\tauto mainWindow = std::static_pointer_cast<ofAppGLFWWindow>(ofGetCurrentWindow());\r\n\t\t\tusePointSize = mainWindow ? mainWindow->getSettings().glVersionMajor <= 2 : false;\r\n#endif\r\n\r\n\t\t\tusePointSize = false;\r\n\r\n\t\t\tif (usePointSize) {\r\n\t\t\t\tglPushAttrib(GL_POINT_BIT);\r\n\t\t\t\tglPointSize(5.0f);\r\n\t\t\t\tglEnable(GL_POINT_SMOOTH);\r\n\t\t\t}\r\n\r\n\t\t\tofPushStyle();\r\n\r\n\t\t\tbool useColor = colorSource.get();\r\n\t\t\tif (useColor) {\r\n\t\t\t\tuseColor &= colorSource->getTexture().isAllocated();\r\n\t\t\t}\r\n\r\n\t\t\tif (useColor) {\r\n\t\t\t\t//bind kinect color camera texture and draw mesh from depth (which has texture coordinates)\r\n\t\t\t\tcolorSource->getTexture().bind();\r\n\t\t\t}\r\n\r\n\t\t\tauto opts = Source::Depth::PointCloudOptions(true, Source::Depth::PointCloudOptions::TextureCoordinates::ColorCamera);\r\n\t\t\tauto mesh = depthSource->getMesh(opts);\r\n\r\n\t\t\t//draw point cloud\r\n\t\t\tmesh.drawVertices();\r\n\r\n\t\t\t//draw triangles\r\n\t\t\tofSetColor(255, 150);\r\n\t\t\tmesh.drawWireframe();\r\n\r\n\t\t\t//draw fills faded\r\n\t\t\tofSetColor(255, 50);\r\n\t\t\tmesh.drawFaces();\r\n\r\n\t\t\tif (useColor) {\r\n\t\t\t\t//unbind colour camera\r\n\t\t\t\tcolorSource->getTexture().unbind();\r\n\t\t\t}\r\n\r\n\t\t\tofPopStyle();\r\n\r\n\t\t\t//clear the point cloud drawing attributes\r\n\t\t\tif (usePointSize) {\r\n\t\t\t\tglPopAttrib();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//bodies and floor\r\n\t\tif (bodySource) {\r\n\t\t\tbodySource->drawWorld();\r\n\r\n\t\t\tofPushMatrix();\r\n\t\t\tofRotateDeg(90, 0, 0, 1);\r\n\t\t\tofMultMatrix(bodySource->getFloorTransform());\r\n\t\t\tofDrawGridPlane(5.0f);\r\n\t\t\tofPopMatrix();\r\n\t\t}\r\n\r\n\t\t//draw the view cones of depth and colour cameras\r\n\t\tofPushStyle();\r\n\t\tofNoFill();\r\n\t\tofSetLineWidth(2.0f);\r\n\t\tofSetColor(100, 200, 100);\r\n\t\tdepthSource->drawFrustum();\r\n\t\tif (colorSource) {\r\n\t\t\tofSetColor(200, 100, 100);\r\n\t\t\tcolorSource->drawFrustum();\r\n\t\t}\r\n\t\tofPopStyle();\r\n\t}\r\n\r\n\t//----------\r\n\tvoid Device::setUseTextures(bool useTexture) {\r\n\t\tauto sources = this->getSources();\r\n\t\tfor (auto source : sources) {\r\n\t\t\tauto imageSource = std::dynamic_pointer_cast<ofBaseHasTexture>(source);\r\n\t\t\tif (imageSource) {\r\n\t\t\t\timageSource->setUseTexture(useTexture);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Device.h",
    "content": "#pragma once\r\n\r\n#include \"Utils.h\"\r\n#include \"Source/Depth.h\"\r\n#include \"Source/Color.h\"\r\n#include \"Source/Infrared.h\"\r\n#include \"Source/LongExposureInfrared.h\"\r\n#include \"Source/BodyIndex.h\"\r\n#include \"Source/Body.h\"\r\n\r\n#include <memory>\r\n#include <vector>\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tclass Device {\r\n\tpublic:\r\n\t\tDevice();\r\n\t\tvirtual ~Device();\r\n\t\t\r\n\t\tvoid open();\r\n\t\tvoid close();\r\n\t\tbool isOpen() const;\r\n\r\n\t\tvoid initMultiSource(std::initializer_list<FrameSourceTypes> frameSourceTypes);\r\n\r\n\t\tstd::shared_ptr<Source::Depth> initDepthSource();\r\n\t\tstd::shared_ptr<Source::Color> initColorSource();\r\n\t\tstd::shared_ptr<Source::Infrared> initInfraredSource();\r\n\t\tstd::shared_ptr<Source::LongExposureInfrared> initLongExposureInfraredSource();\r\n\t\tstd::shared_ptr<Source::BodyIndex> initBodyIndexSource();\r\n\t\tstd::shared_ptr<Source::Body> initBodySource();\r\n\r\n\t\tbool releaseMultiSource();\r\n\r\n\t\tbool releaseDepthSource();\r\n\t\tbool releaseColorSource();\r\n\t\tbool releaseInfraredSource();\r\n\t\tbool releaseLongExposureInfraredSource();\r\n\t\tbool releaseBodyIndexSource();\r\n\t\tbool releaseBodySource();\r\n\r\n\t\tvoid update();\r\n\t\tbool isFrameNew() const;\r\n\r\n\t\ttemplate<typename SourceType>\r\n\t\tbool hasSource() const {\r\n\t\t\tif (this->getSource<SourceType>()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttemplate<typename SourceType>\r\n\t\tstd::shared_ptr<SourceType> getSource() const {\r\n\t\t\tfor(auto source : this->sources) {\r\n\t\t\t\tauto castSource = std::dynamic_pointer_cast<SourceType>(source);\r\n\t\t\t\tif (castSource) {\r\n\t\t\t\t\treturn castSource;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn std::shared_ptr<SourceType>();\r\n\t\t}\r\n\r\n\t\tconst std::vector<std::shared_ptr<Source::Base>> & getSources() const;\r\n\r\n\t\tstd::shared_ptr<Source::Depth> getDepthSource() const;\r\n\t\tstd::shared_ptr<Source::Color> getColorSource() const;\r\n\t\tstd::shared_ptr<Source::Infrared> getInfraredSource() const;\r\n\t\tstd::shared_ptr<Source::LongExposureInfrared> getLongExposureInfraredSource() const;\r\n\t\tstd::shared_ptr<Source::BodyIndex> getBodyIndexSource() const;\r\n\t\tstd::shared_ptr<Source::Body> getBodySource() const;\r\n\r\n\t\tIKinectSensor * getSensor();\r\n\r\n\t\tvoid drawWorld();\r\n\t\tvoid setUseTextures(bool);\r\n\tprotected: \r\n\t\ttemplate<typename SourceType>\r\n\t\tstd::shared_ptr<SourceType> initSource(bool initReader);\r\n\r\n\t\ttemplate<typename SourceType>\r\n\t\tbool releaseSource();\r\n\r\n\t\tIKinectSensor * sensor;\r\n\t\tIMultiSourceFrameReader * reader;\r\n\r\n\t\tstd::vector<std::shared_ptr<Source::Base>> sources;\r\n\t\tbool isFrameNewFlag;\r\n\t};\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Base.h",
    "content": "#pragma once\r\n\r\n#include <string>\r\n#include <Kinect.h>\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\tclass Base {\r\n\t\tpublic:\r\n\t\t\tvirtual std::string getTypeName() const = 0;\r\n\t\t\tvirtual void init(IKinectSensor *, bool) = 0;\r\n\t\t\tvirtual void update() = 0;\r\n\t\t\tvirtual void update(IMultiSourceFrame *) = 0;\r\n\t\t\tvirtual bool isFrameNew() const = 0;\r\n\t\t\tvirtual bool hasReader() const = 0;\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/BaseImage.cpp",
    "content": "#include \"BaseImage.h\"\r\n\r\n#include \"ofGraphics.h\"\r\n#include \"ofMesh.h\"\r\n\r\n#define CHECK_OPEN if(!this->reader) { OFXKINECTFORWINDOWS2_ERROR << \"Failed : Reader is not open\"; }\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\r\n#pragma mark BaseFrame\r\n\t\t//----------\r\n\t\ttemplate <typename ReaderType, typename FrameType>\r\n\t\tBaseFrame<typename ReaderType, typename FrameType>::BaseFrame() {\r\n\t\t\tthis->reader = NULL;\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate <typename ReaderType, typename FrameType>\r\n\t\tBaseFrame<typename ReaderType, typename FrameType>::~BaseFrame() {\r\n\t\t\tSafeRelease(this->reader);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate <typename ReaderType, typename FrameType>\r\n\t\tvoid BaseFrame <typename ReaderType, typename FrameType>::init(IKinectSensor * sensor, bool reader) {\r\n\t\t\tif (reader)\r\n\t\t\t\tinitReader(sensor);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate <typename ReaderType, typename FrameType>\r\n\t\t\tbool BaseFrame <typename ReaderType, typename FrameType>::isFrameNew() const {\r\n\t\t\treturn this->isFrameNewFlag;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate <typename ReaderType, typename FrameType>\r\n\t\tbool BaseFrame <typename ReaderType, typename FrameType>::hasReader() const {\r\n\t\t\tif (this->reader)\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate <typename ReaderType, typename FrameType>\r\n\t\tvoid BaseFrame<typename ReaderType, typename FrameType>::update() {\r\n\t\t\tCHECK_OPEN\r\n\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t\tFrameType * frame = NULL;\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(this->reader->AcquireLatestFrame(&frame))) {\r\n\t\t\t\t\tSafeRelease(frame);\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tupdate(frame);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(frame);\r\n\t\t}\r\n\r\n#pragma mark BaseImage\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tofMesh BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::frustumMesh;\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tBaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::BaseImage() {\r\n\t\t\tthis->useTexture = true;\r\n\t\t\tthis->diagonalFieldOfView = 0.0f;\r\n\t\t\tthis->horizontalFieldOfView = 0.0f;\r\n\t\t\tthis->verticalFieldOfView = 0.0f;\r\n\t\t\tthis->lastFrameTime = 0;\r\n\r\n\t\t\tif (this->frustumMesh.getVertices().empty()) {\r\n\t\t\t\tthis->frustumMesh.addVertex(ofVec3f(0.0f, 0.0f, 0.0f));\r\n\t\t\t\tthis->frustumMesh.addVertex(ofVec3f(-1.0f, -1.0f, 1.0f));\r\n\t\t\t\tthis->frustumMesh.addVertex(ofVec3f(-1.0f, +1.0f, 1.0f));\r\n\t\t\t\tthis->frustumMesh.addVertex(ofVec3f(+1.0f, +1.0f, 1.0f));\r\n\t\t\t\tthis->frustumMesh.addVertex(ofVec3f(+1.0f, -1.0f, 1.0f));\r\n\t\t\t\tconst ofIndexType indices[6] = {0, 1, 2, 3, 4, 1};\r\n\t\t\t\tthis->frustumMesh.addIndices(indices, 6);\r\n\t\t\t\tthis->frustumMesh.setMode(ofPrimitiveMode::OF_PRIMITIVE_TRIANGLE_FAN);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tofTexture & BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getTexture() {\r\n\t\t\treturn this->texture;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tconst ofTexture & BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getTexture() const {\r\n\t\t\treturn this->texture;\r\n\t\t}\r\n\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tvoid BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::setUseTexture(bool useTexture) {\r\n\t\t\tthis->useTexture = useTexture;\r\n\t\t\tif (!useTexture) {\r\n\t\t\t\tthis->texture.clear();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tofPixels_<PixelType> & BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getPixels() {\r\n\t\t\treturn this->pixels;\r\n\t\t}\r\n\r\n\t\t\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tconst ofPixels_<PixelType> & BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getPixels() const {\r\n\t\t\treturn this->pixels;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tvoid BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::draw(float x, float y) const {\r\n\t\t\tthis->texture.draw(x, y);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tvoid BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::draw(float x, float y, float width, float height) const {\r\n\t\t\tthis->texture.draw(x, y, width, height);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\t\tfloat BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getWidth() const {\r\n\t\t\t\treturn this->pixels.getWidth();\r\n\t\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\t\tfloat BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getHeight() const {\r\n\t\t\t\treturn this->pixels.getHeight();\r\n\t\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tfloat BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getDiagonalFieldOfView() const {\r\n\t\t\treturn this->diagonalFieldOfView;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tfloat BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getHorizontalFieldOfView() const {\r\n\t\t\treturn this->horizontalFieldOfView;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tfloat BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::getVerticalFieldOfView() const {\r\n\t\t\treturn this->verticalFieldOfView;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tvoid BaseImage OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::drawFrustum() const {\r\n\t\t\tofPushMatrix();\r\n\t\t\tofScale(tan(DEG_TO_RAD * this->getHorizontalFieldOfView() / 2.0f), tan(DEG_TO_RAD * this->getVerticalFieldOfView() / 2.0f), 1.0f);\r\n\t\t\tif (ofGetStyle().bFill) {\r\n\t\t\t\tthis->frustumMesh.drawFaces();\r\n\t\t\t} else {\r\n\t\t\t\tthis->frustumMesh.drawWireframe();\r\n\t\t\t}\r\n\t\t\tofPopMatrix();\r\n\t\t}\r\n\r\n#pragma mark BaseImageSimple\r\n\t\t//----------\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tvoid BaseImageSimple OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM::update(FrameType * frame) {\r\n\t\t\tthis->isFrameNewFlag = true;\r\n\t\t\tIFrameDescription * frameDescription = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tINT64 relativeTime = 0;\r\n\t\t\t\tif (FAILED(frame->get_RelativeTime(&relativeTime))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get relative time\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (relativeTime > this->lastFrameTime) {\r\n\t\t\t\t\trelativeTime = this->lastFrameTime;\r\n\t\t\t\t} \r\n\t\t\t\telse {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//allocate pixels and texture if we need to\r\n\t\t\t\tif (FAILED(frame->get_FrameDescription(&frameDescription))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get frame description\");\r\n\t\t\t\t}\r\n\t\t\t\tint width, height;\r\n\t\t\t\tif (FAILED(frameDescription->get_Width(&width)) || FAILED(frameDescription->get_Height(&height))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get width and height of frame\");\r\n\t\t\t\t}\r\n\t\t\t\tif (width != this->pixels.getWidth() || height != this->texture.getHeight()) {\r\n\t\t\t\t\tthis->pixels.allocate(width, height, OF_IMAGE_GRAYSCALE);\r\n\t\t\t\t\tthis->texture.allocate(this->pixels);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//update local assets\r\n\t\t\t\tif (FAILED(frame->CopyFrameDataToArray(width * height, this->pixels.getData()))) {\r\n\t\t\t\t\tthrow Exception(\"Couldn't pull pixel buffer \");\r\n\t\t\t\t}\r\n\t\t\t\tif (this->useTexture) {\r\n\t\t\t\t\tthis->texture.loadData(this->pixels);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//update field of view\r\n\t\t\t\tif (FAILED(frameDescription->get_HorizontalFieldOfView(&this->horizontalFieldOfView))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get horizonal field of view\");\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(frameDescription->get_VerticalFieldOfView(&this->verticalFieldOfView))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get vertical field of view\");\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(frameDescription->get_DiagonalFieldOfView(&this->diagonalFieldOfView))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get diagonal field of view\");\r\n\t\t\t\t}\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(frameDescription);\r\n\t\t}\r\n\r\n\t\t//---------\r\n\t\ttemplate class BaseImageSimple<unsigned short, IDepthFrameReader, IDepthFrame>;\r\n\t\ttemplate class BaseImageSimple<unsigned short, IInfraredFrameReader, IInfraredFrame>;\r\n\t\ttemplate class BaseImageSimple<unsigned short, ILongExposureInfraredFrameReader, ILongExposureInfraredFrame>;\r\n\t\ttemplate class BaseImageSimple<unsigned char, IBodyIndexFrameReader, IBodyIndexFrame>;\r\n\t\ttemplate class BaseImage<unsigned short, IDepthFrameReader, IDepthFrame>;\r\n\t\ttemplate class BaseImage<unsigned short, IInfraredFrameReader, IInfraredFrame>;\r\n\t\ttemplate class BaseImage<unsigned short, ILongExposureInfraredFrameReader, ILongExposureInfraredFrame>;\r\n\t\ttemplate class BaseImage<unsigned char, IBodyIndexFrameReader, IBodyIndexFrame>;\r\n\t\ttemplate class BaseImage<unsigned char, IColorFrameReader, IColorFrame>;\r\n\t\ttemplate class BaseFrame<IBodyFrameReader, IBodyFrame>;\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/BaseImage.h",
    "content": "#pragma once\r\n\r\n#include \"../Utils.h\"\r\n\r\n#include \"ofBaseTypes.h\"\r\n#include \"ofTexture.h\"\r\n#include \"ofPixels.h\"\r\n\r\n#include \"Base.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n#define OFXKFW2_BaseImageSimple_TEMPLATE_ARGS <typename PixelType, typename ReaderType, typename FrameType>\r\n#define OFXKFW2_BaseImageSimple_TEMPLATE_ARGS_TRIM <typename PixelType, typename ReaderType, typename FrameType>\r\n\r\n\t\ttemplate <typename ReaderType, typename FrameType>\r\n\t\tclass BaseFrame : public Base {\r\n\t\tpublic:\r\n\t\t\tBaseFrame();\r\n\t\t\t~BaseFrame();\r\n\r\n\t\t\tvirtual void update(FrameType *) = 0;\r\n\t\t\t\r\n\t\t\tvoid init(IKinectSensor *, bool) override;\r\n\t\t\tvoid update() override;\r\n\t\t\tbool isFrameNew() const override;\r\n\t\t\tbool hasReader() const override;\r\n\t\tprotected:\r\n\t\t\tvirtual void initReader(IKinectSensor *) = 0;\r\n\r\n\t\t\tReaderType * reader;\r\n\t\t\tbool  isFrameNewFlag;\r\n\t\t};\r\n\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tclass BaseImage : public BaseFrame<ReaderType, FrameType>, public ofBaseHasTexture, public ofBaseHasPixels_<PixelType>, public ofBaseDraws {\r\n\t\tpublic:\r\n\t\t\tBaseImage();\r\n\r\n\t\t\t//ofBaseHasTexture\r\n\t\t\tofTexture & getTexture() override;\r\n\t\t\tconst ofTexture & getTexture() const override;\r\n\t\t\tvoid setUseTexture(bool) override;\r\n\t\t\tbool isUsingTexture() const override { return useTexture; }\r\n\r\n\t\t\t//ofBaseHasPixels\r\n\t\t\tofPixels_<PixelType> & getPixels() override;\r\n\t\t\tconst ofPixels_<PixelType> & getPixels() const override;\r\n\r\n\t\t\t//ofBaseDraws\r\n\t\t\tvoid draw(float, float) const override;\r\n\t\t\tvoid draw(float, float, float, float) const override;\r\n\t\t\tfloat getWidth() const override;\r\n\t\t\tfloat getHeight() const override;\r\n\t\t\t\r\n\t\t\tfloat getDiagonalFieldOfView() const;\r\n\t\t\tfloat getHorizontalFieldOfView() const;\r\n\t\t\tfloat getVerticalFieldOfView() const;\r\n\r\n\t\t\tvoid drawFrustum() const;\r\n\t\tprotected:\r\n\t\t\tstatic ofMesh frustumMesh;\r\n\r\n\t\t\tbool useTexture;\r\n\t\t\tofTexture texture;\r\n\t\t\tofPixels_<PixelType> pixels;\r\n\r\n\t\t\tfloat diagonalFieldOfView;\r\n\t\t\tfloat horizontalFieldOfView;\r\n\t\t\tfloat verticalFieldOfView;\r\n\t\t\tlong  lastFrameTime;\r\n\t\t};\r\n\r\n\t\ttemplate OFXKFW2_BaseImageSimple_TEMPLATE_ARGS\r\n\t\tclass BaseImageSimple : public BaseImage<PixelType, ReaderType, FrameType> {\r\n\t\tpublic:\r\n\t\t\tvoid update(FrameType *) override;\r\n\t\t};\r\n\t};\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Body.cpp",
    "content": "#include \"Body.h\"\r\n\r\n#include \"ofGraphics.h\"\r\n#include \"ofNode.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\t//----------\r\n\t\tstd::string Body::getTypeName() const {\r\n\t\t\treturn \"Body\";\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tconst std::vector<Data::Body> & Body::getBodies() const {\r\n\t\t\treturn bodies;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofMatrix4x4 Body::getFloorTransform() {\r\n\t\t\tofNode helper;\r\n\t\t\thelper.lookAt(ofVec3f(floorClipPlane.x, floorClipPlane.z, -floorClipPlane.y));\r\n\t\t\thelper.boom(-floorClipPlane.w);\r\n\t\t\tofMatrix4x4 transform = glm::inverse(helper.getGlobalTransformMatrix());\r\n\t\t\treturn transform;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::initReader(IKinectSensor * sensor) {\r\n\t\t\tthis->reader = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tIBodyFrameSource * source = NULL;\r\n\r\n\t\t\t\tif (FAILED(sensor->get_BodyFrameSource(&source))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise BodyFrame source\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (FAILED(source->OpenReader(&this->reader))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise BodyFrame reader\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSafeRelease(source);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::init(IKinectSensor * sensor, bool reader) {\r\n\t\t\ttry {\r\n\t\t\t\tBaseFrame::init(sensor, reader);\r\n\r\n\t\t\t\tif (FAILED(sensor->get_CoordinateMapper(&this->coordinateMapper))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to acquire coordinate mapper\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbodies.resize(BODY_COUNT);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::update(IMultiSourceFrame * multiFrame) {\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t\tIBodyFrame * frame = NULL;\r\n\t\t\tIBodyFrameReference * reference;\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(multiFrame->get_BodyFrameReference(&reference))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(reference->AcquireFrame(&frame))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tupdate(frame);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(reference);\r\n\t\t\tSafeRelease(frame);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::update(IBodyFrame * frame) {\r\n\t\t\tthis->isFrameNewFlag = true;\r\n\t\t\tIFrameDescription * frameDescription = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tINT64 nTime = 0;\r\n\t\t\t\tif (FAILED(frame->get_RelativeTime(&nTime))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get relative time\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (FAILED(frame->get_FloorClipPlane(&floorClipPlane))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to get floor clip plane\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tIBody* ppBodies[BODY_COUNT] = {0};\r\n\t\t\t\tif (FAILED(frame->GetAndRefreshBodyData(_countof(ppBodies), ppBodies))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to refresh body data\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (int i = 0; i < BODY_COUNT; ++i) {\r\n\t\t\t\t\tauto & body = bodies[i];\r\n\t\t\t\t\tbody.clear();\r\n\r\n\t\t\t\t\tIBody* pBody = ppBodies[i];\r\n\t\t\t\t\tif (pBody)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tBOOLEAN bTracked = false;\r\n\t\t\t\t\t\tif (FAILED(pBody->get_IsTracked(&bTracked))) {\r\n\t\t\t\t\t\t\tthrow Exception(\"Failed to get tracking status\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbody.tracked = bTracked;\r\n\t\t\t\t\t\tbody.bodyId = i;\r\n\r\n\t\t\t\t\t\tif (bTracked)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// retrieve tracking id\r\n\r\n\t\t\t\t\t\t\tUINT64 trackingId = -1;\r\n\r\n\t\t\t\t\t\t\tif (FAILED(pBody->get_TrackingId(&trackingId))) {\r\n\t\t\t\t\t\t\t\tthrow Exception(\"Failed to get tracking id\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbody.trackingId = trackingId;\r\n\r\n\t\t\t\t\t\t\t// retrieve joint position & orientation\r\n\r\n\t\t\t\t\t\t\t_Joint joints[JointType_Count];\r\n\t\t\t\t\t\t\t_JointOrientation jointsOrient[JointType_Count];\r\n\r\n\t\t\t\t\t\t\tif (FAILED(pBody->GetJoints(JointType_Count, joints))){\r\n\t\t\t\t\t\t\t\tthrow Exception(\"Failed to get joints\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (FAILED(pBody->GetJointOrientations(JointType_Count, jointsOrient))){\r\n\t\t\t\t\t\t\t\tthrow Exception(\"Failed to get joints orientation\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tfor (int j = 0; j < JointType_Count; ++j) {\r\n\t\t\t\t\t\t\t\tbody.joints[joints[j].JointType] = Data::Joint(joints[j], jointsOrient[j], this->getCoordinateMapper());\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// retrieve hand states\r\n\r\n\t\t\t\t\t\t\tHandState leftHandState = HandState_Unknown;\r\n\t\t\t\t\t\t\tHandState rightHandState = HandState_Unknown;\r\n\r\n\t\t\t\t\t\t\tif (FAILED(pBody->get_HandLeftState(&leftHandState))){\r\n\t\t\t\t\t\t\t\tthrow Exception(\"Failed to get left hand state\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (FAILED(pBody->get_HandRightState(&rightHandState))){\r\n\t\t\t\t\t\t\t\tthrow Exception(\"Failed to get right hand state\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbody.leftHandState = leftHandState;\r\n\t\t\t\t\t\t\tbody.rightHandState = rightHandState;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (int i = 0; i < _countof(ppBodies); ++i)\r\n\t\t\t\t{\r\n\t\t\t\t\tSafeRelease(ppBodies[i]);\r\n\t\t\t\t}\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(frameDescription);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tstd::map<JointType, ofVec2f> Body::getProjectedJoints(int bodyIdx, ProjectionCoordinates proj) {\r\n\t\t\tstd::map<JointType, ofVec2f> result;\r\n\r\n\t\t\tconst auto & body = bodies[bodyIdx];\r\n\t\t\tif (!body.tracked) return result;\r\n\r\n\t\t\tfor (auto & joint : body.joints) {\r\n\t\t\t\tofVec2f & position = result[joint.second.getType()] = ofVec2f();\r\n\r\n\t\t\t\tTrackingState state = joint.second.getTrackingState();\r\n\t\t\t\tif (state == TrackingState_NotTracked) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tposition.set(joint.second.getProjected(coordinateMapper, proj));\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::drawProjected(int x, int y, int width, int height, ProjectionCoordinates proj) {\r\n\t\t\tofPushStyle();\r\n\t\t\tint w, h;\r\n\t\t\tswitch (proj) {\r\n\t\t\tcase ColorCamera: w = 1920; h = 1080; break;\r\n\t\t\tcase DepthCamera: w = 512; h = 424; break;\r\n\t\t\t}\r\n\r\n\t\t\tconst auto & bonesAtlas = Data::Body::getBonesAtlas();\r\n\r\n\t\t\tfor (auto & body : bodies) {\r\n\t\t\t\tif (!body.tracked) continue;\r\n\r\n\t\t\t\tstd::map<JointType, ofVec2f> jntsProj;\r\n\r\n\t\t\t\tfor (auto & j : body.joints) {\r\n\t\t\t\t\tofVec2f & p = jntsProj[j.second.getType()] = ofVec2f();\r\n\r\n\t\t\t\t\tTrackingState state = j.second.getTrackingState();\r\n\t\t\t\t\tif (state == TrackingState_NotTracked) continue;\r\n\r\n\t\t\t\t\tp.set(j.second.getProjected(coordinateMapper, proj));\r\n\t\t\t\t\tp.x = x + p.x / w * width;\r\n\t\t\t\t\tp.y = y + p.y / h * height;\r\n\r\n\t\t\t\t\tint radius = (state == TrackingState_Inferred) ? 2 : 8;\r\n\t\t\t\t\tofSetColor(0, 255, 0);\r\n\t\t\t\t\tofDrawCircle(p.x, p.y, radius);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (auto & bone : bonesAtlas) {\r\n\t\t\t\t\tdrawProjectedBone(body.joints, jntsProj, bone.first, bone.second);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdrawProjectedHand(body.leftHandState, jntsProj[JointType_HandLeft]);\r\n\t\t\t\tdrawProjectedHand(body.rightHandState, jntsProj[JointType_HandRight]);\r\n\t\t\t}\r\n\r\n\t\t\tofPopStyle();\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::drawWorld() {\r\n\t\t\tauto bodies = this->getBodies();\r\n\t\t\tint bodyIndex = 0;\r\n\t\t\tfor (auto & body : bodies) {\r\n\t\t\t\t//draw black lines\r\n\t\t\t\tofPushStyle();\r\n\t\t\t\tofSetLineWidth(10.0f);\r\n\t\t\t\tofSetColor(0);\r\n\t\t\t\tbody.drawWorld();\r\n\r\n\t\t\t\t//draw coloured lines\r\n\t\t\t\tofSetLineWidth(8.0f);\r\n\t\t\t\tofColor col(200, 100, 100);\r\n\t\t\t\tcol.setHue(255.0f / this->getBodies().size() * bodyIndex);\r\n\t\t\t\tofSetColor(col);\r\n\t\t\t\tbody.drawWorld();\r\n\r\n\t\t\t\tofPopStyle();\r\n\r\n\t\t\t\tbodyIndex++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tICoordinateMapper * Body::getCoordinateMapper() {\r\n\t\t\treturn this->coordinateMapper;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::drawProjectedBone(std::map<JointType, Data::Joint> & pJoints, std::map<JointType, ofVec2f> & pJointPoints, JointType joint0, JointType joint1){\r\n\t\t\tTrackingState ts1 = pJoints[joint0].getTrackingState();\r\n\t\t\tTrackingState ts2 = pJoints[joint1].getTrackingState();\r\n\t\t\tif (ts1 == TrackingState_NotTracked || ts2 == TrackingState_NotTracked) return;\r\n\t\t\tif (ts1 == TrackingState_Inferred && ts2 == TrackingState_Inferred) return;\r\n\r\n\t\t\tint thickness = 5;\r\n\t\t\tofSetColor(0, 255, 0);\r\n\t\t\tif (ts1 == TrackingState_Inferred || ts2 == TrackingState_Inferred) {\r\n\t\t\t\tthickness = 2;\r\n\t\t\t\tofSetColor(0, 128, 0);\r\n\t\t\t}\r\n\t\t\tofSetLineWidth(thickness);\r\n\t\t\tofDrawLine(pJointPoints[joint0], pJointPoints[joint1]);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Body::drawProjectedHand(HandState handState, ofVec2f & handPos){\r\n\t\t\tofColor color;\r\n\t\t\tswitch (handState)\r\n\t\t\t{\r\n\t\t\tcase HandState_Unknown: case HandState_NotTracked:\r\n\t\t\t\treturn;\r\n\t\t\tcase HandState_Open:\r\n\t\t\t\tcolor = ofColor(0, 255, 0, 80);\r\n\t\t\t\tbreak;\r\n\t\t\tcase HandState_Closed :\r\n\t\t\t\tcolor = ofColor(255, 255, 0, 80);\r\n\t\t\t\tbreak;\r\n\t\t\tcase HandState_Lasso:\r\n\t\t\t\tcolor = ofColor(0, 255, 255, 80);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tofEnableAlphaBlending();\r\n\t\t\tofSetColor(color);\r\n\t\t\tofDrawCircle(handPos, 50);\r\n\t\t\tofDisableAlphaBlending();\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Body.h",
    "content": "#pragma once\n\n#include \"ofVectorMath.h\"\n\n#include \"BaseImage.h\"\n#include \"../Utils.h\"\n\n#include \"../Data/Body.h\"\n#include \"../Data/Joint.h\"\n\nnamespace ofxKinectForWindows2 {\n\tnamespace Source {\n\t\t// -------\n\t\tclass Body : public BaseFrame<IBodyFrameReader, IBodyFrame> {\n\t\tpublic:\n\t\t\tstd::string getTypeName() const override;\n\t\t\tvoid init(IKinectSensor *, bool) override;\n\n\t\t\tvoid update(IBodyFrame *) override;\n\t\t\tvoid update(IMultiSourceFrame *) override;\n\n\t\t\tvoid drawProjected(int x, int y, int width, int height, ProjectionCoordinates proj = ColorCamera);\n\t\t\tvoid drawWorld();\n\n\t\t\tICoordinateMapper * getCoordinateMapper();\n\n\t\t\tconst std::vector<Data::Body> & getBodies() const;\n\t\t\tstd::map<JointType, ofVec2f> getProjectedJoints(int bodyIdx, ProjectionCoordinates proj = ColorCamera);\n\n\t\t\tconst Vector4 getFloorClipPlane() {\n\t\t\t\treturn floorClipPlane;\n\t\t\t}\n\n\t\t\tofMatrix4x4 getFloorTransform();\n\n\t\t\tstatic void drawProjectedBone(std::map<JointType, Data::Joint> & pJoints, std::map<JointType, ofVec2f> & pJointPoints, JointType joint0, JointType joint1);\n\t\t\tstatic void drawProjectedHand(HandState handState, ofVec2f & handPos);\n\t\tprotected:\n\t\t\tvoid initReader(IKinectSensor *) override;\n\n\t\t\tICoordinateMapper * coordinateMapper;\n\n\t\t\tVector4 floorClipPlane;\n\n\t\t\tstd::vector<Data::Body> bodies;\n\t\t};\n\t}\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/BodyIndex.cpp",
    "content": "#include \"BodyIndex.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\t//----------\r\n\t\tstd::string BodyIndex::getTypeName() const {\r\n\t\t\treturn \"BodyIndex\";\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid BodyIndex::initReader(IKinectSensor * sensor) {\r\n\t\t\tthis->reader = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tIBodyIndexFrameSource * source = NULL;\r\n\r\n\t\t\t\tif (FAILED(sensor->get_BodyIndexFrameSource(&source))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise BodyIndex source\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (FAILED(source->OpenReader(&this->reader))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise BodyIndex reader\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSafeRelease(source);\r\n\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid BodyIndex::update(IMultiSourceFrame * multiFrame) {\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t\tIBodyIndexFrame * frame = NULL;\r\n\t\t\tIBodyIndexFrameReference * reference;\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(multiFrame->get_BodyIndexFrameReference(&reference))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(reference->AcquireFrame(&frame))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tBaseImageSimple::update(frame);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(reference);\r\n\t\t\tSafeRelease(frame);\r\n\t\t}\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/BodyIndex.h",
    "content": "#pragma once\r\n\r\n#include \"BaseImage.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\tclass BodyIndex : public BaseImageSimple<unsigned char, IBodyIndexFrameReader, IBodyIndexFrame> {\r\n\t\tpublic:\r\n\t\t\tstd::string getTypeName() const override;\r\n\t\t\tvoid update(IMultiSourceFrame *) override;\r\n\t\tprotected:\r\n\t\t\tvoid initReader(IKinectSensor *) override;\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Color.cpp",
    "content": "#include \"Color.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\t//----------\r\n\t\tColor::Color() {\r\n\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tstd::string Color::getTypeName() const {\r\n\t\t\treturn \"Color\";\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Color::initReader(IKinectSensor * sensor) {\r\n\t\t\tthis->reader = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tIColorFrameSource * source = NULL;\r\n\r\n\t\t\t\tif (FAILED(sensor->get_ColorFrameSource(&source))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise Color source\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (FAILED(source->OpenReader(&this->reader))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise Color reader\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSafeRelease(source);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Color::update(IColorFrame * frame) {\r\n\t\t\tthis->isFrameNewFlag = true;\r\n\t\t\tIFrameDescription * frameDescription = NULL;\r\n\t\t\ttry {\r\n\t\t\t\t//allocate pixels and texture if we need to\r\n\t\t\t\tif (FAILED(frame->get_FrameDescription(&frameDescription))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get frame description\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint width, height;\r\n\t\t\t\tif (FAILED(frameDescription->get_Width(&width)) || FAILED(frameDescription->get_Height(&height))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get width and height of frame\");\r\n\t\t\t\t}\r\n\t\t\t\tif (width != this->pixels.getWidth() || height != this->texture.getHeight()) {\r\n\t\t\t\t\tthis->pixels.allocate(width, height, OF_IMAGE_COLOR_ALPHA);\r\n\t\t\t\t\tthis->texture.allocate(this->pixels);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//update local rgba image\r\n\t\t\t\tif (this->rgbaPixelsEnabled) {\r\n\t\t\t\t\tif (FAILED(frame->CopyConvertedFrameDataToArray(this->pixels.size(), this->pixels.getData(), ColorImageFormat_Rgba))) {\r\n\t\t\t\t\t\tthrow Exception(\"Couldn't pull pixel buffer to converted rgba pixels\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this->useTexture) {\r\n\t\t\t\t\t\tthis->texture.loadData(this->pixels);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//update yuv\r\n\t\t\t\tif (this->yuvPixelsEnabled) {\r\n\t\t\t\t\tif (width != this->yuvPixels.getWidth() || height != this->yuvPixels.getHeight()) {\r\n\t\t\t\t\t\tthis->yuvPixels.allocate(width, height, OF_PIXELS_YUY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (FAILED(frame->CopyRawFrameDataToArray(this->yuvPixels.size(), this->yuvPixels.getData()))) {\r\n\t\t\t\t\t\tthrow Exception(\"Couldn't pull raw YUV pixel buffer\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//update field of view\r\n\t\t\t\tif (FAILED(frameDescription->get_HorizontalFieldOfView(&this->horizontalFieldOfView))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get horizontal field of view\");\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(frameDescription->get_VerticalFieldOfView(&this->verticalFieldOfView))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get vertical field of view\");\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(frameDescription->get_DiagonalFieldOfView(&this->diagonalFieldOfView))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get diagonal field of view\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tIColorCameraSettings * cameraSettings;\r\n\t\t\t\tif (FAILED(frame->get_ColorCameraSettings(&cameraSettings))) {\r\n\t\t\t\t\tthrow Exception(\"Failed to get color camera settings\");\r\n\t\t\t\t}\r\n\t\t\t\tcameraSettings->get_ExposureTime(&this->exposure);\r\n\t\t\t\tcameraSettings->get_FrameInterval(&this->frameInterval);\r\n\t\t\t\tcameraSettings->get_Gain(&this->gain);\r\n\t\t\t\tcameraSettings->get_Gamma(&this->gamma);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(frameDescription);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Color::update(IMultiSourceFrame * multiFrame) {\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t\tIColorFrame * frame = NULL;\r\n\t\t\tIColorFrameReference * reference;\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(multiFrame->get_ColorFrameReference(&reference))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(reference->AcquireFrame(&frame))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tupdate(frame);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(reference);\r\n\t\t\tSafeRelease(frame);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tlong int Color::getExposure() const {\r\n\t\t\treturn this->exposure;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tlong int Color::getFrameInterval() const {\r\n\t\t\treturn this->frameInterval;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tfloat Color::getGain() const {\r\n\t\t\treturn this->gain;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tfloat Color::getGamma() const {\r\n\t\t\treturn this->gamma;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Color::setRgbaPixelsEnabled(bool rgbPixelsEnabled) {\r\n\t\t\tthis->rgbaPixelsEnabled = rgbPixelsEnabled;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tbool Color::getRgbaPixelsEnabled() const {\r\n\t\t\treturn this->rgbaPixelsEnabled;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Color::setYuvPixelsEnabled(bool yuvPixelsEnabled) {\r\n\t\t\tthis->yuvPixelsEnabled = yuvPixelsEnabled;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tbool Color::getYuvPixelsEnabled() const {\r\n\t\t\treturn this->yuvPixelsEnabled;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tconst ofPixels & Color::getYuvPixels() const {\r\n\t\t\treturn this->yuvPixels;\r\n\t\t}\r\n}\r\n}\r\n"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Color.h",
    "content": "#pragma once\r\n\r\n#include \"BaseImage.h\"\r\n#include \"../Utils.h\"\r\n\r\n#include \"ofBaseTypes.h\"\r\n#include \"ofPixels.h\"\r\n#include \"ofTexture.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\tclass Color : public BaseImage<unsigned char, IColorFrameReader, IColorFrame> {\r\n\t\tpublic:\r\n\t\t\tColor();\r\n\t\t\tstd::string getTypeName() const override;\r\n\r\n\t\t\tvoid update(IColorFrame *) override;\r\n\t\t\tvoid update(IMultiSourceFrame *) override;\r\n\t\t\tlong int getExposure() const;\r\n\t\t\tlong int getFrameInterval() const;\r\n\t\t\tfloat getGain() const;\r\n\t\t\tfloat getGamma() const;\r\n\r\n\t\t\tvoid setRgbaPixelsEnabled(bool rgbaPixelsEnabled);\r\n\t\t\tbool getRgbaPixelsEnabled() const;\r\n\r\n\t\t\tvoid setYuvPixelsEnabled(bool yuvPixelsEnabled);\r\n\t\t\tbool getYuvPixelsEnabled() const;\r\n\t\t\tconst ofPixels & getYuvPixels() const;\r\n\t\tprotected:\r\n\t\t\tvoid initReader(IKinectSensor *) override;\r\n\r\n\t\t\tTIMESPAN exposure = 0;\r\n\t\t\tTIMESPAN frameInterval = 0;\r\n\t\t\tfloat gain = 0;\r\n\t\t\tfloat gamma = 0;\r\n\r\n\t\t\tbool rgbaPixelsEnabled = true;\r\n\t\t\tbool yuvPixelsEnabled = false;\r\n\t\t\tofPixels yuvPixels;\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Depth.cpp",
    "content": "#include \"Depth.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\t//----------\r\n\t\tDepth::PointCloudOptions::PointCloudOptions() {\r\n\t\t\tthis->stitchFaces = true;\r\n\t\t\tthis->textureCoordinates = TextureCoordinates::None;\r\n\t\t\tthis->steps = 1;\r\n\t\t\tthis->facesMaxLength = 0.3f;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tDepth::PointCloudOptions::PointCloudOptions(bool stitchFaces, TextureCoordinates textureCoordinates) {\r\n\t\t\tthis->stitchFaces = stitchFaces;\r\n\t\t\tthis->textureCoordinates = textureCoordinates;\r\n\t\t\tthis->steps = 1;\r\n\t\t\tthis->facesMaxLength = 0.3f;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tstd::string Depth::getTypeName() const {\r\n\t\t\treturn \"Depth\";\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::initReader(IKinectSensor * sensor) {\r\n\t\t\tthis->reader = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tIDepthFrameSource * source = NULL;\r\n\r\n\t\t\t\tif (FAILED(sensor->get_DepthFrameSource(&source))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise Depth source\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (FAILED(source->OpenReader(&this->reader))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise Depth reader\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSafeRelease(source);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::init(IKinectSensor * sensor, bool reader) {\r\n\t\t\ttry {\r\n\t\t\t\tBaseFrame::init(sensor, reader);\r\n\r\n\t\t\t\tif (FAILED(sensor->get_CoordinateMapper(&this->coordinateMapper))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to acquire coordinate mapper\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Try and get color frame size from frame description.\r\n\t\t\t\t// Quietly ignore any possible error, but correctly release any\r\n\t\t\t\t// resource already acquired. In this case default values are kept\r\n\t\t\t\tIColorFrameSource * source = NULL;\r\n\t\t\t\tif (SUCCEEDED(sensor->get_ColorFrameSource(&source))) {\r\n\t\t\t\t\tIFrameDescription * frameDescription = NULL;\r\n\t\t\t\t\tif (SUCCEEDED(source->get_FrameDescription(&frameDescription))) {\r\n\t\t\t\t\t\tif (SUCCEEDED(frameDescription->get_Width(&this->colorFrameWidth)) &&\r\n\t\t\t\t\t\t\tSUCCEEDED(frameDescription->get_Height(&this->colorFrameHeight))) {\r\n\t\t\t\t\t\t\tthis->colorFrameSize = this->colorFrameWidth * this->colorFrameHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tOFXKINECTFORWINDOWS2_WARNING << \"Failed to get color frame size during depth frame init\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSafeRelease(frameDescription);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSafeRelease(source);\r\n\t\t\t\t}\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::update(IMultiSourceFrame * multiFrame) {\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t\tIDepthFrame * frame = NULL;\r\n\t\t\tIDepthFrameReference * reference;\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(multiFrame->get_DepthFrameReference(&reference))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(reference->AcquireFrame(&frame))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tBaseImageSimple::update(frame);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(reference);\r\n\t\t\tSafeRelease(frame);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofMesh Depth::getMesh(const PointCloudOptions &opts) {\r\n\t\t\tconst int width = this->getWidth();\r\n\t\t\tconst int height = this->getHeight();\r\n\t\t\tconst auto frameSize = width * height;\r\n\r\n\t\t\tofMesh mesh;\r\n\t\t\tmesh.setMode(opts.stitchFaces ? ofPrimitiveMode::OF_PRIMITIVE_TRIANGLES : ofPrimitiveMode::OF_PRIMITIVE_POINTS);\r\n\t\t\tmesh.getVertices().resize(frameSize);\r\n\t\t\tauto vertices = mesh.getVerticesPointer();\r\n\t\t\t\r\n\t\t\tthis->coordinateMapper->MapDepthFrameToCameraSpace(frameSize, this->pixels.getData(), frameSize, (CameraSpacePoint*) mesh.getVerticesPointer());\r\n\r\n\t\t\tif (opts.stitchFaces) {\r\n\t\t\t\tint steps = opts.steps;\r\n\t\t\t\tfor(int i=0; i<width-steps; i+=steps) {\r\n\t\t\t\t\tfor(int j=0; j<height-steps; j+=steps) {\r\n\t\t\t\t\t\tauto topLeft = width * j + i;\r\n\t\t\t\t\t\tauto topRight = topLeft + steps;\r\n\t\t\t\t\t\tauto bottomLeft = topLeft + width * steps;\r\n\t\t\t\t\t\tauto bottomRight = bottomLeft + steps;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tconst ofVec3f & vTL = vertices[topLeft];\r\n\t\t\t\t\t\tconst ofVec3f & vTR = vertices[topRight];\r\n\t\t\t\t\t\tconst ofVec3f & vBL = vertices[bottomLeft];\r\n\t\t\t\t\t\tconst ofVec3f & vBR = vertices[bottomRight];\r\n\r\n\t\t\t\t\t\t//upper left triangle\r\n\t\t\t\t\t\tif (vTL.z > 0 && vTR.z > 0 && vBL.z > 0\r\n\t\t\t\t\t\t\t&& abs(vTL.z - vBR.z) < opts.facesMaxLength\r\n\t\t\t\t\t\t\t&& abs(vTL.z - vBL.z) < opts.facesMaxLength) {\r\n\t\t\t\t\t\t\tconst ofIndexType indices[3] = {topLeft, bottomRight, bottomLeft};\r\n\t\t\t\t\t\t\tmesh.addIndices(indices, 3);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//bottom right triangle\r\n\t\t\t\t\t\tif (vBR.z > 0 && vTR.z > 0 && vBL.z > 0\r\n\t\t\t\t\t\t\t&& abs(vBR.z - vTL.z) < opts.facesMaxLength\r\n\t\t\t\t\t\t\t&& abs(vBR.z - vTR.z) < opts.facesMaxLength) {\r\n\t\t\t\t\t\t\tconst ofIndexType indices[3] = {topLeft, topRight, bottomRight};\r\n\t\t\t\t\t\t\tmesh.addIndices(indices, 3);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tswitch(opts.textureCoordinates) {\r\n\t\t\tcase PointCloudOptions::TextureCoordinates::ColorCamera:\r\n\t\t\t\t{\r\n\t\t\t\t\tmesh.getTexCoords().resize(frameSize);\r\n\t\t\t\t\tthis->coordinateMapper->MapDepthFrameToColorSpace(frameSize, this->pixels.getData(), frameSize, (ColorSpacePoint*) mesh.getTexCoordsPointer());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase PointCloudOptions::TextureCoordinates::DepthCamera:\r\n\t\t\t\t{\r\n\t\t\t\t\tmesh.getTexCoords().resize(frameSize);\r\n\t\t\t\t\tauto texCoords = mesh.getTexCoordsPointer();\r\n\t\t\t\t\tfor(int i=0; i<frameSize; i++) {\r\n\t\t\t\t\t\ttexCoords[i] = ofVec2f(i % width, i / width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase PointCloudOptions::TextureCoordinates::None:\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn mesh;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofMesh Depth::getMesh(bool stitchFaces, PointCloudOptions::TextureCoordinates textureCoordinates) {\r\n\t\t\treturn this->getMesh(PointCloudOptions(stitchFaces, textureCoordinates));\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tofVbo Depth::getVbo(const PointCloudOptions & pointCloudOptions) {\r\n\t\t\t//this function should be a more optimised version of getMesh(). But we keep this here for compatability right now.\r\n\t\t\tauto mesh = this->getMesh(pointCloudOptions);\r\n\t\t\tofVbo vbo;\r\n\t\t\tvbo.setIndexData(mesh.getIndexPointer(), mesh.getNumIndices(), GL_STATIC_DRAW);\r\n\t\t\tvbo.setVertexData(mesh.getVerticesPointer(), mesh.getNumVertices(), GL_STATIC_DRAW);\r\n\t\t\tvbo.setVertexData(mesh.getTexCoordsPointer(), mesh.getNumTexCoords(), GL_STATIC_DRAW);\r\n\t\t\treturn vbo;\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::getWorldInColorFrame(ofFloatPixels & world) const {\r\n\t\t\tworld.allocate(this->colorFrameWidth, this->colorFrameHeight, ofPixelFormat::OF_PIXELS_RGB);\r\n\t\t\tthis->coordinateMapper->MapColorFrameToCameraSpace(\r\n\t\t\t\tthis->pixels.size(), this->pixels.getData(),\r\n\t\t\t\tthis->colorFrameSize, reinterpret_cast<CameraSpacePoint*>(world.getData()));\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::getWorldInDepthFrame(ofFloatPixels & world) const {\r\n\t\t\tworld.allocate(this->getWidth(), this->getHeight(), ofPixelFormat::OF_PIXELS_RGB);\r\n\t\t\tthis->coordinateMapper->MapDepthFrameToCameraSpace(\r\n\t\t\t\tthis->pixels.size(), this->pixels.getData(),\r\n\t\t\t\tthis->pixels.size(), reinterpret_cast<CameraSpacePoint*>(world.getData()));\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::getColorInDepthFrameMapping(ofFloatPixels & colorInDepthFrameMapping) const {\r\n\t\t\tcolorInDepthFrameMapping.allocate(this->getWidth(), this->getHeight(), OF_PIXELS_RG);\r\n\t\t\tthis->coordinateMapper->MapDepthFrameToColorSpace(\r\n\t\t\t\tthis->pixels.size(), this->pixels.getData(),\r\n\t\t\t\tthis->pixels.size(), reinterpret_cast<ColorSpacePoint*>(colorInDepthFrameMapping.getData()));\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::getDepthInColorFrameMapping(ofFloatPixels & depthInColorFrameMapping) const {\r\n\t\t\tdepthInColorFrameMapping.allocate(this->colorFrameWidth, this->colorFrameHeight, OF_PIXELS_RG);\r\n\t\t\tthis->coordinateMapper->MapColorFrameToDepthSpace(\r\n\t\t\t\tthis->pixels.size(), this->pixels.getData(),\r\n\t\t\t\tthis->colorFrameSize, reinterpret_cast<DepthSpacePoint*>(depthInColorFrameMapping.getData()));\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Depth::getDepthToWorldTable(ofFloatPixels & world) const {\r\n\t\t\tUINT32 tableEntryCount;\r\n\t\t\tPointF * tableEntries;\r\n\t\t\tif (FAILED(this->coordinateMapper->GetDepthFrameToCameraSpaceTable(&tableEntryCount, &tableEntries))) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << \"GetDepthFrameToCameraSpaceTable failed\";\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (tableEntryCount != this->getWidth() * this->getHeight()) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << \"wrong tableEntryCount\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tworld.setFromPixels((float*) tableEntries, this->getWidth(), this->getHeight(), 2);\r\n\t\t\t}\r\n\t\t\t// The table of camera space points must be released with a call to CoTaskMemFree\r\n\t\t\tCoTaskMemFree(tableEntries);\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tICoordinateMapper * Depth::getCoordinateMapper() const {\r\n\t\t\treturn this->coordinateMapper;\r\n\t\t}\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Depth.h",
    "content": "#pragma once\r\n\r\n#include \"ofMesh.h\"\r\n#include \"ofPixels.h\"\r\n#include \"ofVbo.h\"\r\n\r\n#include \"BaseImage.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\tclass Depth : public BaseImageSimple<unsigned short, IDepthFrameReader, IDepthFrame> {\r\n\t\tpublic:\r\n\t\t\tstruct PointCloudOptions {\r\n\t\t\t\tenum TextureCoordinates {\r\n\t\t\t\t\tNone,\r\n\t\t\t\t\tDepthCamera,\r\n\t\t\t\t\tColorCamera\r\n\t\t\t\t};\r\n\r\n\t\t\t\tPointCloudOptions();\r\n\t\t\t\tPointCloudOptions(bool stitchFaces, TextureCoordinates textureCoordinates);\r\n\r\n\t\t\t\tint steps;\r\n\t\t\t\tbool stitchFaces;\r\n\t\t\t\tfloat facesMaxLength;\r\n\t\t\t\tTextureCoordinates textureCoordinates;\r\n\t\t\t};\r\n\r\n\t\t\tstd::string getTypeName() const override;\r\n\t\t\tvoid init(IKinectSensor *, bool) override;\r\n\r\n\t\t\tvoid update(IMultiSourceFrame *) override;\r\n\r\n\t\t\tofMesh getMesh(const PointCloudOptions & pointCloudOptions = PointCloudOptions());\r\n\t\t\tofMesh getMesh(bool stitchFaces, PointCloudOptions::TextureCoordinates textureCoordinates);\r\n\t\t\tofVbo getVbo(const PointCloudOptions & pointCloudOptions = PointCloudOptions());\r\n\r\n\t\t\tvoid getWorldInColorFrame(ofFloatPixels & world) const;\r\n\t\t\tvoid getWorldInDepthFrame(ofFloatPixels & world) const;\r\n\t\t\tvoid getColorInDepthFrameMapping(ofFloatPixels & colorInDepthFrameMapping) const;\r\n\t\t\tvoid getDepthInColorFrameMapping(ofFloatPixels & depthInColorFrameMapping) const;\r\n\t\t\tvoid getDepthToWorldTable(ofFloatPixels & world) const;\r\n\r\n\t\t\tICoordinateMapper * getCoordinateMapper() const;\r\n\t\tprotected:\r\n\t\t\tvoid initReader(IKinectSensor *) override;\r\n\r\n\t\t\tICoordinateMapper * coordinateMapper;\r\n\r\n\t\t\tint colorFrameWidth = 1920;\r\n\t\t\tint colorFrameHeight = 1080;\r\n\t\t\tint colorFrameSize = colorFrameWidth * colorFrameHeight;\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Infrared.cpp",
    "content": "#include \"Infrared.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\t//----------\r\n\t\tstd::string Infrared::getTypeName() const {\r\n\t\t\treturn \"Infrared\";\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Infrared::initReader(IKinectSensor * sensor) {\r\n\t\t\tthis->reader = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tIInfraredFrameSource * source = NULL;\r\n\r\n\t\t\t\tif (FAILED(sensor->get_InfraredFrameSource(&source))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise Infrared source\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (FAILED(source->OpenReader(&this->reader))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise Infrared reader\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSafeRelease(source);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid Infrared::update(IMultiSourceFrame * multiFrame) {\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t\tIInfraredFrame * frame = NULL;\r\n\t\t\tIInfraredFrameReference * reference;\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(multiFrame->get_InfraredFrameReference(&reference))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(reference->AcquireFrame(&frame))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tBaseImageSimple::update(frame);\r\n\t\t\t} catch (std::exception & e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(reference);\r\n\t\t\tSafeRelease(frame);\r\n\t\t}\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/Infrared.h",
    "content": "#pragma once\r\n\r\n#include \"BaseImage.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\tclass Infrared : public BaseImageSimple<unsigned short, IInfraredFrameReader, IInfraredFrame> {\r\n\t\tpublic:\r\n\t\t\tstd::string getTypeName() const override;\r\n\r\n\t\t\tvoid update(IMultiSourceFrame *) override;\r\n\t\tprotected:\r\n\t\t\tvoid initReader(IKinectSensor *) override;\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/LongExposureInfraRed.cpp",
    "content": "#include \"LongExposureInfrared.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\t//----------\r\n\t\tstd::string LongExposureInfrared::getTypeName() const {\r\n\t\t\treturn \"LongExposureInfrared\";\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid LongExposureInfrared::initReader(IKinectSensor* sensor) {\r\n\t\t\tthis->reader = NULL;\r\n\t\t\ttry {\r\n\t\t\t\tILongExposureInfraredFrameSource* source = NULL;\r\n\r\n\t\t\t\tif (FAILED(sensor->get_LongExposureInfraredFrameSource(&source))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise LongExposureInfrared source\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (FAILED(source->OpenReader(&this->reader))) {\r\n\t\t\t\t\tthrow(Exception(\"Failed to initialise LongExposureInfrared reader\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSafeRelease(source);\r\n\t\t\t}\r\n\t\t\tcatch (std::exception& e) {\r\n\t\t\t\tSafeRelease(this->reader);\r\n\t\t\t\tthrow (e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------\r\n\t\tvoid LongExposureInfrared::update(IMultiSourceFrame* multiFrame) {\r\n\t\t\tthis->isFrameNewFlag = false;\r\n\t\t\tILongExposureInfraredFrame* frame = NULL;\r\n\t\t\tILongExposureInfraredFrameReference* reference;\r\n\t\t\ttry {\r\n\t\t\t\t//acquire frame\r\n\t\t\t\tif (FAILED(multiFrame->get_LongExposureInfraredFrameReference(&reference))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tif (FAILED(reference->AcquireFrame(&frame))) {\r\n\t\t\t\t\treturn; // we often throw here when no new frame is available\r\n\t\t\t\t}\r\n\t\t\t\tBaseImageSimple::update(frame);\r\n\t\t\t}\r\n\t\t\tcatch (std::exception& e) {\r\n\t\t\t\tOFXKINECTFORWINDOWS2_ERROR << e.what();\r\n\t\t\t}\r\n\t\t\tSafeRelease(reference);\r\n\t\t\tSafeRelease(frame);\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "src/ofxKinectForWindows2/Source/LongExposureInfrared.h",
    "content": "#pragma once\r\n\r\n#include \"BaseImage.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tnamespace Source {\r\n\t\tclass LongExposureInfrared : public BaseImageSimple<unsigned short, ILongExposureInfraredFrameReader, ILongExposureInfraredFrame> {\r\n\t\tpublic:\r\n\t\t\tstd::string getTypeName() const override;\r\n\r\n\t\t\tvoid update(IMultiSourceFrame *) override;\r\n\t\tprotected:\r\n\t\t\tvoid initReader(IKinectSensor *) override;\r\n\t\t};\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Utils.cpp",
    "content": "#include \"Utils.h\"\r\n\r\nusing namespace std;\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\t//----------\r\n\tException::Exception(const std::string & message) {\r\n\t\tthis->message = message;\r\n\t}\r\n\r\n\t//----------\r\n\tconst char * Exception::what() const {\r\n\t\treturn this->message.c_str();\r\n\t}\r\n\r\n\t//----------\r\n#define TO_STRING_CASE(TYPE, VALUE) \\\r\ncase TYPE ## :: ## TYPE ## _ ## VALUE ## : { \\\r\n\treturn #VALUE; \\\r\n}\r\n\r\n\tstring toString(const JointType & jointType) {\r\n\t\tswitch (jointType) {\r\n\t\t\tTO_STRING_CASE(JointType, SpineBase)\r\n\t\t\tTO_STRING_CASE(JointType, SpineMid)\r\n\t\t\tTO_STRING_CASE(JointType, Neck)\r\n\t\t\tTO_STRING_CASE(JointType, Head)\r\n\t\t\tTO_STRING_CASE(JointType, ShoulderLeft)\r\n\t\t\tTO_STRING_CASE(JointType, ElbowLeft)\r\n\t\t\tTO_STRING_CASE(JointType, WristLeft)\r\n\t\t\tTO_STRING_CASE(JointType, HandLeft)\r\n\t\t\tTO_STRING_CASE(JointType, ShoulderRight)\r\n\t\t\tTO_STRING_CASE(JointType, ElbowRight)\r\n\t\t\tTO_STRING_CASE(JointType, WristRight)\r\n\t\t\tTO_STRING_CASE(JointType, HandRight)\r\n\t\t\tTO_STRING_CASE(JointType, HipLeft)\r\n\t\t\tTO_STRING_CASE(JointType, KneeLeft)\r\n\t\t\tTO_STRING_CASE(JointType, AnkleLeft)\r\n\t\t\tTO_STRING_CASE(JointType, FootLeft)\r\n\t\t\tTO_STRING_CASE(JointType, HipRight)\r\n\t\t\tTO_STRING_CASE(JointType, KneeRight)\r\n\t\t\tTO_STRING_CASE(JointType, AnkleRight)\r\n\t\t\tTO_STRING_CASE(JointType, FootRight)\r\n\t\t\tTO_STRING_CASE(JointType, SpineShoulder)\r\n\t\t\tTO_STRING_CASE(JointType, HandTipLeft)\r\n\t\t\tTO_STRING_CASE(JointType, ThumbLeft)\r\n\t\t\tTO_STRING_CASE(JointType, HandTipRight)\r\n\t\t\tTO_STRING_CASE(JointType, ThumbRight)\r\n\t\tdefault:\r\n\t\t\treturn \"Unknown\";\r\n\t\t}\r\n\t}\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2/Utils.h",
    "content": "#pragma once\r\n\r\n// Fix for C++17\r\n#define _HAS_STD_BYTE 0\r\n\r\n#ifndef __func__\r\n#define __func__ __FUNCTION__\r\n#endif\r\n\r\n#include \"ofLog.h\"\r\n#define OFXKINECTFORWINDOWS2_WARNING ofLogWarning(std::string(__func__))\r\n#define OFXKINECTFORWINDOWS2_ERROR ofLogError(std::string(__func__))\r\n#define OFXKINECTFORWINDOWS2_FATAL ofLogFatalError(std::string(__func__))\r\n\r\n#define MAKE(T, ...) std::shared_ptr<T>(new T(__VA_ARGS__))\r\n\r\n#include <string>\r\n#include \"ofxKinectForWindows2/Data/Joint.h\"\r\n\r\nnamespace ofxKinectForWindows2 {\r\n\tclass Exception : public std::exception {\r\n\tpublic:\r\n\t\tException(const std::string &);\r\n\t\tconst char * what() const override;\r\n\tprotected:\r\n\t\tstd::string message;\r\n\t};\r\n\r\n\t// Safe release for COM interfaces\r\n\ttemplate<class Interface>\r\n\tinline void SafeRelease(Interface *& pInterfaceToRelease)\r\n\t{\r\n\t\tif (pInterfaceToRelease != NULL)\r\n\t\t{\r\n\t\t\tpInterfaceToRelease->Release();\r\n\t\t\tpInterfaceToRelease = NULL;\r\n\t\t}\r\n\t}\r\n\r\n\tstd::string toString(const JointType &);\r\n}"
  },
  {
    "path": "src/ofxKinectForWindows2.h",
    "content": "#pragma once\r\n\r\n#include \"ofxKinectForWindows2/Device.h\"\r\n\r\n#define ofxKFW2 ofxKinectForWindows2"
  }
]