Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Samples updated. Map methods refactored.

  • Loading branch information...
commit d524fc7bc2897e030fb017d2e10625c2dbe97adc 1 parent 3b82bec
@BanTheRewind BanTheRewind authored
Showing with 383 additions and 572 deletions.
  1. +0 −3  .gitignore
  2. +1 −1  samples/BasicApp/src/BasicApp.cpp
  3. BIN  samples/CoordMapApp/resources/cinder_app_icon.ico
  4. +0 −174 samples/CoordMapApp/src/CoordMapApp.cpp
  5. +0 −20 samples/CoordMapApp/vc2012/CoordMapApp.sln
  6. +0 −146 samples/CoordMapApp/vc2012/CoordMapApp.vcxproj
  7. +0 −54 samples/CoordMapApp/vc2012/CoordMapApp.vcxproj.filters
  8. BIN  samples/CoordMapApp/vc2012/Resources.rc
  9. +1 −1  samples/ParticleApp/{src → include}/Resources.h
  10. +2 −2 samples/ParticleApp/resources/draw_frag.glsl
  11. +9 −9 samples/ParticleApp/resources/draw_vert.glsl
  12. +14 −14 samples/ParticleApp/resources/gpgpu_frag.glsl
  13. +2 −2 samples/ParticleApp/resources/gpgpu_vert.glsl
  14. +11 −12 samples/ParticleApp/src/ParticleApp.cpp
  15. +10 −2 samples/ParticleApp/vc2012/ParticleApp.sln
  16. +113 −11 samples/ParticleApp/vc2012/ParticleApp.vcxproj
  17. +7 −7 samples/ParticleApp/vc2012/ParticleApp.vcxproj.filters
  18. +3 −10 samples/UserApp/src/UserApp.cpp
  19. +10 −2 samples/UserApp/vc2012/UserApp.sln
  20. +110 −8 samples/UserApp/vc2012/UserApp.vcxproj
  21. +1 −1  samples/UserApp/vc2012/UserApp.vcxproj.filters
  22. +1 −1  src/FaceTracker.cpp
  23. +1 −1  src/FaceTracker.h
  24. +77 −74 src/Kinect.cpp
  25. +10 −17 src/Kinect.h
View
3  .gitignore
@@ -1,7 +1,4 @@
-bin
ipch
-Debug
-Release
*.opensdf
*.sdf
*.suo
View
2  samples/BasicApp/src/BasicApp.cpp
@@ -1,6 +1,6 @@
/*
*
-* Copyright (c) 2013, Wieden+Kennedy
+* Copyright (c) 2014, Ban the Rewind, Wieden+Kennedy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
View
BIN  samples/CoordMapApp/resources/cinder_app_icon.ico
Binary file not shown
View
174 samples/CoordMapApp/src/CoordMapApp.cpp
@@ -1,174 +0,0 @@
-/*
-*
-* Copyright (c) 2013, Ban the Rewind
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or
-* without modification, are permitted provided that the following
-* conditions are met:
-*
-* Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in
-* the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ban the Rewind nor the names of its
-* contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-
-#include <algorithm>
-#include "boost/algorithm/string.hpp"
-#include "cinder/app/AppBasic.h"
-#include "cinder/Camera.h"
-#include "cinder/gl/gl.h"
-#include "cinder/gl/Texture.h"
-#include "cinder/ImageIo.h"
-#include "cinder/params/Params.h"
-#include "cinder/Vector.h"
-#include "cinder/Utilities.h"
-#include "Kinect.h"
-
-/*
-* This application demonstrates coordinate mapping
-* between color and depth images.
-*/
-class CoordMapApp : public ci::app::AppBasic
-{
-public:
- void draw();
- void prepareSettings( ci::app::AppBasic::Settings* settings );
- void setup();
- void shutdown();
- void update();
-private:
- MsKinect::DeviceRef mDevice;
- ci::Surface8u mSurface;
- void onFrame( MsKinect::Frame frame );
-
- float mFrameRate;
- bool mFullScreen;
- ci::params::InterfaceGlRef mParams;
- void screenShot();
-};
-
-using namespace ci;
-using namespace ci::app;
-using namespace std;
-
-void CoordMapApp::draw()
-{
- gl::setViewport( getWindowBounds() );
- gl::clear( Colorf::gray( 0.1f ) );
- gl::setMatricesWindow( getWindowSize(), true );
-
- if ( mDevice->isCapturing() && mSurface ) {
- gl::color( Colorf::white() );
- if ( mSurface ) {
- gl::draw( gl::Texture( mSurface ), mSurface.getBounds(), getWindowBounds() );
- }
- }
-
- mParams->draw();
-}
-
-void CoordMapApp::onFrame( MsKinect::Frame frame )
-{
- mSurface = frame.getColorSurface();
- Channel16u::ConstIter iter = frame.getDepthChannel().getIter();
-
- while ( iter.line() ) {
- while ( iter.pixel() ) {
- Vec2i pos = MsKinect::mapDepthCoordToColor( iter.getPos(), frame.getDepthChannel(), mDevice );
- const uint16_t& v = frame.getDepthChannel().getValue( pos );
- mSurface.setPixel( pos, Color8u::black() );
- }
- }
-}
-
-void CoordMapApp::prepareSettings( Settings *settings )
-{
- settings->setWindowSize( 640, 480 );
- settings->setFrameRate( 60.0f );
-}
-
-void CoordMapApp::screenShot()
-{
- writeImage( getAppPath() / fs::path( "frame" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() );
-}
-
-void CoordMapApp::setup()
-{
- mFrameRate = 0.0f;
- mFullScreen = isFullScreen();
-
- mDevice = MsKinect::Device::create();
- mDevice->connectEventHandler( &CoordMapApp::onFrame, this );
- MsKinect::DeviceOptions options;
- options.enableColor();
- options.enableDepth();
- options.setColorResolution( MsKinect::ImageResolution::NUI_IMAGE_RESOLUTION_640x480 );
- options.setDepthResolution( MsKinect::ImageResolution::NUI_IMAGE_RESOLUTION_640x480 );
- try {
- mDevice->start( options );
- } catch ( MsKinect::Device::ExcDeviceCreate ex ) {
- console() << ex.what() << endl;
- } catch ( MsKinect::Device::ExcDeviceInit ex ) {
- console() << ex.what() << endl;
- } catch ( MsKinect::Device::ExcDeviceInvalid ex ) {
- console() << ex.what() << endl;
- } catch ( MsKinect::Device::ExcGetCoordinateMapper ex ) {
- console() << ex.what() << endl;
- } catch ( MsKinect::Device::ExcOpenStreamColor ex ) {
- console() << ex.what() << endl;
- } catch ( MsKinect::Device::ExcOpenStreamDepth ex ) {
- console() << ex.what() << endl;
- } catch ( MsKinect::Device::ExcStreamStart ex ) {
- console() << ex.what() << endl;
- } catch ( MsKinect::Device::ExcUserTrackingEnable ex ) {
- console() << ex.what() << endl;
- }
-
- mParams = params::InterfaceGl::create( "Parameters", Vec2i( 220, 100 ) );
- mParams->addParam( "App frame rate", &mFrameRate, "", true );
- mParams->addParam( "Full screen", &mFullScreen, "key=f" );
- mParams->addButton( "Screen shot", bind( &CoordMapApp::screenShot, this ), "key=s" );
- mParams->addButton( "Quit", bind( &CoordMapApp::quit, this ), "key=q" );
-}
-
-void CoordMapApp::shutdown()
-{
- mDevice->stop();
-}
-
-void CoordMapApp::update()
-{
- mFrameRate = getAverageFps();
-
- if ( mFullScreen != isFullScreen() ) {
- setFullScreen( mFullScreen );
- }
-
- if ( !mDevice->isCapturing() && getElapsedFrames() % 90 == 0 ) {
- mDevice->start();
- }
-}
-
-CINDER_APP_BASIC( CoordMapApp, RendererGl )
View
20 samples/CoordMapApp/vc2012/CoordMapApp.sln
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CoordMapApp", "CoordMapApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32
- {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32
- {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32
- {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
View
146 samples/CoordMapApp/vc2012/CoordMapApp.vcxproj
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}</ProjectGuid>
- <RootNamespace>CoordMapApp</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110_xp</PlatformToolset>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v110_xp</PlatformToolset>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath)</IncludePath>
- <LibraryPath>$(LibraryPath)</LibraryPath>
- <TargetName>$(ProjectName)_d</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);$(KINECTSDK10_DIR)\inc</IncludePath>
- <LibraryPath>$(LibraryPath)</LibraryPath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\lib;..\..\..\src;$(KINECTSDK10_DIR)\inc;$(KINECT_TOOLKIT_DIR)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalDependencies>cinder-$(PlatformToolset)_d.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget);$(KINECTSDK10_DIR)\lib\$(PlatformTarget);$(KINECT_TOOLKIT_DIR)Lib\$(PlatformTarget);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- <IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
- </Link>
- <PreBuildEvent>
- <Command>xcopy "..\..\..\lib\$(PlatformTarget)\*.dll" "$(ProjectDir)bin\" /Y /C
-xcopy "$(KINECT_TOOLKIT_DIR)Redist\$(PlatformTarget)\*.dll" "$(ProjectDir)bin\" /Y /C</Command>
- </PreBuildEvent>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\lib;..\..\..\src;$(KINECTSDK10_DIR)\inc;$(KINECT_TOOLKIT_DIR)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ProjectReference>
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
- </ProjectReference>
- <Link>
- <AdditionalDependencies>cinder-$(PlatformToolset).lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget);$(KINECTSDK10_DIR)\lib\$(PlatformTarget);$(KINECT_TOOLKIT_DIR)Lib\$(PlatformTarget);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>false</GenerateDebugInformation>
- <GenerateMapFile>true</GenerateMapFile>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>
- </EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PreBuildEvent>
- <Command>xcopy "..\..\..\lib\$(PlatformTarget)\*.dll" "$(ProjectDir)bin\" /Y /C
-xcopy "$(KINECT_TOOLKIT_DIR)Redist\$(PlatformTarget)\*.dll" "$(ProjectDir)bin\" /Y /C</Command>
- </PreBuildEvent>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\..\src\FaceTracker.cpp" />
- <ClCompile Include="..\..\..\src\Kinect.cpp" />
- <ClCompile Include="..\src\CoordMapApp.cpp" />
- </ItemGroup>
- <ItemGroup>
- <Image Include="cinder_app_icon.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="Resources.rc" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\..\lib\KinectCommonBridgeLib.h" />
- <ClInclude Include="..\..\..\src\FaceTracker.h" />
- <ClInclude Include="..\..\..\src\Kinect.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
View
54 samples/CoordMapApp/vc2012/CoordMapApp.vcxproj.filters
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
- </Filter>
- <Filter Include="blocks">
- <UniqueIdentifier>{91831fb1-aa3f-4402-a6d9-0f176988c673}</UniqueIdentifier>
- </Filter>
- <Filter Include="blocks\Cinder-KCB">
- <UniqueIdentifier>{283212cd-4dad-4d11-aea7-e74e45dbf2df}</UniqueIdentifier>
- </Filter>
- <Filter Include="blocks\Cinder-KCB\lib">
- <UniqueIdentifier>{9efc914e-bd85-4865-b4d4-e561e1274ebc}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\src\CoordMapApp.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\Kinect.cpp">
- <Filter>blocks\Cinder-KCB</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\FaceTracker.cpp">
- <Filter>blocks\Cinder-KCB</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <Image Include="cinder_app_icon.ico">
- <Filter>Resource Files</Filter>
- </Image>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="Resources.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\..\src\Kinect.h">
- <Filter>blocks\Cinder-KCB</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\src\FaceTracker.h">
- <Filter>blocks\Cinder-KCB</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\lib\KinectCommonBridgeLib.h">
- <Filter>blocks\Cinder-KCB\lib</Filter>
- </ClInclude>
- </ItemGroup>
-</Project>
View
BIN  samples/CoordMapApp/vc2012/Resources.rc
Binary file not shown
View
2  samples/ParticleApp/src/Resources.h → samples/ParticleApp/include/Resources.h
@@ -2,7 +2,7 @@
#include "cinder/CinderResources.h"
#define RES_GLSL_DRAW_FRAG CINDER_RESOURCE( ../resources/, draw_frag.glsl, 128, GLSL )
-#define RES_GLSL_DRAW_VERT CINDER_RESOURCE( ../resources/, draw_vert.glsl, 129, GLSL )
+#define RES_GLSL_DRAW_VERT CINDER_RESOURCE( ../resources/, draw_vert.glsl, 129, GLSL )
#define RES_GLSL_GPGPU_FRAG CINDER_RESOURCE( ../resources/, gpgpu_frag.glsl, 130, GLSL )
#define RES_GLSL_GPGPU_VERT CINDER_RESOURCE( ../resources/, gpgpu_vert.glsl, 131, GLSL )
View
4 samples/ParticleApp/resources/draw_frag.glsl
@@ -1,6 +1,6 @@
-varying vec4 color;
+varying vec4 vColor;
void main( void )
{
- gl_FragColor = color;
+ gl_FragColor = vColor;
}
View
18 samples/ParticleApp/resources/draw_vert.glsl
@@ -1,22 +1,22 @@
-uniform float depth;
-uniform float time;
-uniform sampler2D positions;
+uniform float uDepth;
+uniform float uTime;
+uniform sampler2D uTexturePosition;
-varying vec4 color;
+varying vec4 vColor;
void main( void )
{
vec2 uv = gl_MultiTexCoord0.st;
vec4 position = gl_Vertex;
- position.z = texture2D( positions, uv ).b;
+ position.z = texture2D( uTexturePosition, uv ).b;
- color = vec4( uv.s * ( 1.0 - position.z ) + 0.5, 0.5 - position.z * 0.5, uv.t * ( position.z * 0.5 ) + 0.1, position.z );
- color.rgb += sin( time * 0.5 ) * 0.2;
- color = clamp( color * 0.5 + 0.5 * color * color * 8.0, 0.0, 1.0 );
+ vColor = vec4( uv.s * ( 1.0 - position.z ) + 0.5, 0.5 - position.z * 0.5, uv.t * ( position.z * 0.5 ) + 0.1, position.z );
+ vColor.rgb += sin( uTime * 0.5 ) * 0.2;
+ vColor = clamp( vColor * 0.5 + 0.5 * vColor * vColor * 8.0, 0.0, 1.0 );
position.x *= -2.0;
- position.z *= depth + sin( time + uv.s * 10.0 ) * ( depth * 0.033 );
+ position.z *= uDepth + sin( uTime + uv.s * 10.0 ) * ( uDepth * 0.033 );
gl_Position = gl_ModelViewProjectionMatrix * position;
}
View
28 samples/ParticleApp/resources/gpgpu_frag.glsl
@@ -1,28 +1,28 @@
-uniform sampler2D kinect;
-uniform sampler2D positions;
-uniform sampler2D velocities;
+uniform sampler2D uTextureKinect;
+uniform sampler2D uTexturePosition;
+uniform sampler2D uTextureVelocity;
-uniform float dampen;
-uniform vec3 center;
-uniform float speed;
+uniform float uDampen;
+uniform vec3 uCenter;
+uniform float uSpeed;
-varying vec2 uv;
+varying vec2 vUv;
void main ( void )
{
- vec3 position = texture2D( positions, uv ).rgb;
- vec3 velocity = texture2D( velocities, uv ).rgb;
+ vec3 position = texture2D( uTexturePosition, vUv ).rgb;
+ vec3 velocity = texture2D( uTextureVelocity, vUv ).rgb;
- vec3 destination = vec3( uv.s, uv.t, 1.0 - texture2D( kinect, uv ).b );
+ vec3 destination = vec3( vUv.s, vUv.t, 1.0 - texture2D( uTextureKinect, vUv ).b );
float depth = destination.z;
- velocity += normalize( destination - position ) * speed * depth;
+ velocity += normalize( destination - position ) * uSpeed * depth;
if ( destination.z != position.z ) {
- position += velocity;
+ position += velocity;
}
- position = ( position - center ) * dampen * 0.5;
- velocity *= dampen;
+ position = ( position - uCenter ) * uDampen * 0.5;
+ velocity *= uDampen;
gl_FragData[ 0 ] = vec4( position, 1.0 );
gl_FragData[ 1 ] = vec4( velocity, 1.0 );
View
4 samples/ParticleApp/resources/gpgpu_vert.glsl
@@ -1,8 +1,8 @@
-varying vec2 uv;
+varying vec2 vUv;
void main ( void )
{
- uv = gl_MultiTexCoord0.st;
+ vUv = gl_MultiTexCoord0.st;
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
View
23 samples/ParticleApp/src/ParticleApp.cpp
@@ -1,6 +1,6 @@
/*
*
-* Copyright (c) 2013, Ban the Rewind
+* Copyright (c) 2014, Ban the Rewind, Wieden+Kennedy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
@@ -113,12 +113,12 @@ void ParticleApp::draw()
mTextureDepth->bind( 2 );
mShaderGpGpu->bind();
- mShaderGpGpu->uniform( "center", mParticleCenter );
- mShaderGpGpu->uniform( "dampen", mParticleDampen );
- mShaderGpGpu->uniform( "kinect", 2 );
- mShaderGpGpu->uniform( "positions", 0 );
- mShaderGpGpu->uniform( "speed", mParticleSpeed );
- mShaderGpGpu->uniform( "velocities", 1 );
+ mShaderGpGpu->uniform( "uCenter", mParticleCenter );
+ mShaderGpGpu->uniform( "uDampen", mParticleDampen );
+ mShaderGpGpu->uniform( "uSpeed", mParticleSpeed );
+ mShaderGpGpu->uniform( "uTextureKinect", 2 );
+ mShaderGpGpu->uniform( "uTexturePosition", 0 );
+ mShaderGpGpu->uniform( "uTextureVelocity", 1 );
gl::drawSolidRect( mFbo[ pong ].getBounds(), false );
@@ -148,9 +148,9 @@ void ParticleApp::draw()
mFbo[ pong ].bindTexture();
mShaderDraw->bind();
- mShaderDraw->uniform( "depth", mPointCloudDepth );
- mShaderDraw->uniform( "positions", 0 );
- mShaderDraw->uniform( "time", (float)getElapsedSeconds() );
+ mShaderDraw->uniform( "uDepth", mPointCloudDepth );
+ mShaderDraw->uniform( "uPositions", 0 );
+ mShaderDraw->uniform( "uTime", (float)getElapsedSeconds() );
gl::draw( mMesh );
@@ -202,7 +202,6 @@ void ParticleApp::onFrame( MsKinect::Frame frame )
void ParticleApp::prepareSettings( Settings* settings )
{
settings->setFrameRate( 60.0f );
- settings->setFullScreen( true );
settings->setWindowSize( 1280, 720 );
}
@@ -240,7 +239,7 @@ void ParticleApp::setup()
////////////////////////////////////////////////////////////////
// Define properties
- mDrawParams = false;
+ mDrawParams = true;
mDrawTextures = false;
mEyePoint = Vec3f( 0.0f, 0.0f, 3000.0f );
mFrameRate = 0.0f;
View
12 samples/ParticleApp/vc2012/ParticleApp.sln
@@ -1,18 +1,26 @@

-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParticleApp", "ParticleApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View
124 samples/ParticleApp/vc2012/ParticleApp.vcxproj
@@ -5,10 +5,18 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}</ProjectGuid>
@@ -23,40 +31,70 @@
<PlatformToolset>v110_xp</PlatformToolset>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110_xp</PlatformToolset>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110_xp</PlatformToolset>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110_xp</PlatformToolset>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<TargetName>$(ProjectName)_d</TargetName>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath)</IncludePath>
+ <LibraryPath>$(LibraryPath)</LibraryPath>
+ <TargetName>$(ProjectName)_d</TargetName>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);$(KINECTSDK10_DIR)\inc</IncludePath>
<LibraryPath>$(KINECTSDK10_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);$(KINECTSDK10_DIR)\inc</IncludePath>
+ <LibraryPath>$(KINECTSDK10_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
@@ -71,8 +109,8 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>cinder_d.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw;..\..\..\lib\x86;$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>cinder-$(PlatformToolset)_d.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -82,11 +120,41 @@
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
- <Command>xcopy "..\..\..\lib\x86\*.dll" "$(ProjectDir)bin\" /Y /C
-xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\Face*.*" "$(OutDir)" /Y /C</Command>
+ </PreBuildEvent>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\include;..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\lib;..\..\..\src;$(KINECTSDK10_DIR)\inc;$(KINECT_TOOLKIT_DIR)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>cinder-$(PlatformToolset)_d.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\amd64;$(KINECT_TOOLKIT_DIR)Lib\amd64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
+ </Link>
+ <PreBuildEvent>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\amd64\Face*.*" "$(OutDir)" /Y /C</Command>
</PreBuildEvent>
<ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\..\include;..\src</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\include;..\..\..\..\..\include</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -103,8 +171,8 @@ xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
<Link>
- <AdditionalDependencies>cinder.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw;..\..\..\lib\x86;$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>cinder-$(PlatformToolset).lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -117,11 +185,45 @@ xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PreBuildEvent>
- <Command>xcopy "..\..\..\lib\x86\*.dll" "$(ProjectDir)bin\" /Y /C
-xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\Face*.*" "$(OutDir)" /Y /C</Command>
+ </PreBuildEvent>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\include;..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\lib;..\..\..\src;$(KINECTSDK10_DIR)\inc;$(KINECT_TOOLKIT_DIR)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ProjectReference>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ </ProjectReference>
+ <Link>
+ <AdditionalDependencies>cinder-$(PlatformToolset).lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\amd64;$(KINECT_TOOLKIT_DIR)Lib\amd64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>
+ </EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <PreBuildEvent>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\amd64\Face*.*" "$(OutDir)" /Y /C</Command>
</PreBuildEvent>
<ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\..\include;..\src</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\include;..\..\..\..\..\include</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
@@ -139,7 +241,7 @@ xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command
<ClInclude Include="..\..\..\lib\KinectCommonBridgeLib.h" />
<ClInclude Include="..\..\..\src\FaceTracker.h" />
<ClInclude Include="..\..\..\src\Kinect.h" />
- <ClInclude Include="..\src\Resources.h" />
+ <ClInclude Include="..\include\Resources.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\resources\draw_frag.glsl" />
View
14 samples/ParticleApp/vc2012/ParticleApp.vcxproj.filters
@@ -12,14 +12,14 @@
<Filter Include="blocks">
<UniqueIdentifier>{91831fb1-aa3f-4402-a6d9-0f176988c673}</UniqueIdentifier>
</Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{704ff26b-d2e5-441e-b3f8-afa30ca9b8ee}</UniqueIdentifier>
- </Filter>
<Filter Include="blocks\Cinder-KCB">
<UniqueIdentifier>{283212cd-4dad-4d11-aea7-e74e45dbf2df}</UniqueIdentifier>
</Filter>
<Filter Include="blocks\Cinder-KCB\lib">
- <UniqueIdentifier>{131e7562-3efa-4e2f-b7fa-0dd2abb89c17}</UniqueIdentifier>
+ <UniqueIdentifier>{9efc914e-bd85-4865-b4d4-e561e1274ebc}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{9c95254d-5e30-4405-b5df-f3a44a046858}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@@ -50,12 +50,12 @@
<ClInclude Include="..\..\..\src\FaceTracker.h">
<Filter>blocks\Cinder-KCB</Filter>
</ClInclude>
- <ClInclude Include="..\src\Resources.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\lib\KinectCommonBridgeLib.h">
<Filter>blocks\Cinder-KCB\lib</Filter>
</ClInclude>
+ <ClInclude Include="..\include\Resources.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\resources\draw_frag.glsl">
View
13 samples/UserApp/src/UserApp.cpp
@@ -1,6 +1,6 @@
/*
*
-* Copyright (c) 2013, Wieden+Kennedy
+* Copyright (c) 2014, Ban the Rewind, Wieden+Kennedy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
@@ -81,14 +81,8 @@ void UserApp::draw()
for ( const auto& joint : skeleton ) {
const MsKinect::Bone& bone = joint.second;
- Vec2i v0 = MsKinect::mapSkeletonCoordToDepth(
- bone.getPosition(),
- mDevice->getDeviceOptions().getDepthResolution()
- );
- Vec2i v1 = MsKinect::mapSkeletonCoordToDepth(
- skeleton.at( bone.getStartJoint() ).getPosition(),
- mDevice->getDeviceOptions().getDepthResolution()
- );
+ Vec2i v0 = mDevice->mapSkeletonCoordToDepth( bone.getPosition() );
+ Vec2i v1 = mDevice->mapSkeletonCoordToDepth( skeleton.at( bone.getStartJoint() ).getPosition() );
gl::drawLine( v0, v1 );
gl::drawSolidCircle( v0, 5.0f, 16 );
}
@@ -123,7 +117,6 @@ void UserApp::keyDown( KeyEvent event )
void UserApp::setup()
{
setFrameRate( 60.0f );
- setFullScreen( true );
glLineWidth( 2.0f );
mDevice = MsKinect::Device::create();
View
12 samples/UserApp/vc2012/UserApp.sln
@@ -1,18 +1,26 @@

-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserApp", "UserApp.vcxproj", "{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.ActiveCfg = Debug|Win32
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|Win32.Build.0 = Debug|Win32
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.ActiveCfg = Debug|x64
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Debug|x64.Build.0 = Debug|x64
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.ActiveCfg = Release|Win32
{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|Win32.Build.0 = Release|Win32
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.ActiveCfg = Release|x64
+ {74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View
118 samples/UserApp/vc2012/UserApp.vcxproj
@@ -5,10 +5,18 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{74202EDD-91D2-4D2A-B0B6-355CEB16E6BE}</ProjectGuid>
@@ -23,40 +31,70 @@
<PlatformToolset>v110_xp</PlatformToolset>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110_xp</PlatformToolset>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110_xp</PlatformToolset>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110_xp</PlatformToolset>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<TargetName>$(ProjectName)_d</TargetName>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath)</IncludePath>
+ <LibraryPath>$(LibraryPath)</LibraryPath>
+ <TargetName>$(ProjectName)_d</TargetName>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);$(KINECTSDK10_DIR)\inc</IncludePath>
<LibraryPath>$(KINECTSDK10_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);$(KINECTSDK10_DIR)\inc</IncludePath>
+ <LibraryPath>$(KINECTSDK10_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
@@ -71,8 +109,8 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>cinder-v110_d.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\x86;..\..\..\lib\x86;$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>cinder-$(PlatformToolset)_d.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -82,8 +120,38 @@
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
- <Command>xcopy "..\..\..\lib\x86\*.dll" "$(ProjectDir)bin\" /Y /C
-xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\Face*.*" "$(OutDir)" /Y /C</Command>
+ </PreBuildEvent>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\lib;..\..\..\src;$(KINECTSDK10_DIR)\inc;$(KINECT_TOOLKIT_DIR)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>cinder-$(PlatformToolset)_d.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\amd64;$(KINECT_TOOLKIT_DIR)Lib\amd64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
+ </Link>
+ <PreBuildEvent>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\amd64\Face*.*" "$(OutDir)" /Y /C</Command>
</PreBuildEvent>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
@@ -103,8 +171,8 @@ xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
<Link>
- <AdditionalDependencies>cinder-v110.lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\x86;..\..\..\lib\x86;$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>cinder-$(PlatformToolset).lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\x86;$(KINECT_TOOLKIT_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -117,8 +185,42 @@ xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PreBuildEvent>
- <Command>xcopy "..\..\..\lib\x86\*.dll" "$(ProjectDir)bin\" /Y /C
-xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\*.dll" "$(ProjectDir)bin\" /Y /C</Command>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\x86\Face*.*" "$(OutDir)" /Y /C</Command>
+ </PreBuildEvent>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..\..\..\include;..\..\..\..\..\boost;..\..\..\lib;..\..\..\src;$(KINECTSDK10_DIR)\inc;$(KINECT_TOOLKIT_DIR)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ProjectReference>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ </ProjectReference>
+ <Link>
+ <AdditionalDependencies>cinder-$(PlatformToolset).lib;Kinect10.lib;KinectCommonBridge.lib;FaceTrackLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\lib;..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\lib\$(PlatformTarget)\lib\$(Configuration)\$(PlatformToolset);$(KINECTSDK10_DIR)\lib\amd64;$(KINECT_TOOLKIT_DIR)Lib\amd64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>
+ </EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <PreBuildEvent>
+ <Command>xcopy "..\..\..\lib\$(PlatformTarget)\dll\$(Configuration)\*.dll" "$(OutDir)" /Y /C
+xcopy "$(KINECT_TOOLKIT_DIR)Redist\amd64\Face*.*" "$(OutDir)" /Y /C</Command>
</PreBuildEvent>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\..\..\include</AdditionalIncludeDirectories>
View
2  samples/UserApp/vc2012/UserApp.vcxproj.filters
@@ -16,7 +16,7 @@
<UniqueIdentifier>{283212cd-4dad-4d11-aea7-e74e45dbf2df}</UniqueIdentifier>
</Filter>
<Filter Include="blocks\Cinder-KCB\lib">
- <UniqueIdentifier>{131e7562-3efa-4e2f-b7fa-0dd2abb89c17}</UniqueIdentifier>
+ <UniqueIdentifier>{9efc914e-bd85-4865-b4d4-e561e1274ebc}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
View
2  src/FaceTracker.cpp
@@ -1,6 +1,6 @@
/*
*
-* Copyright (c) 2013, Ban the Rewind, Wieden+Kennedy
+* Copyright (c) 2014, Ban the Rewind, Wieden+Kennedy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
View
2  src/FaceTracker.h
@@ -1,6 +1,6 @@
/*
*
-* Copyright (c) 2013, Ban the Rewind, Wieden+Kennedy
+* Copyright (c) 2014, Ban the Rewind, Wieden+Kennedy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
View
151 src/Kinect.cpp
@@ -1,6 +1,6 @@
/*
*
-* Copyright (c) 2013, Ban the Rewind
+* Copyright (c) 2014, Ban the Rewind, Wieden+Kennedy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
@@ -341,79 +341,6 @@ Colorf getUserColor( uint32_t id )
}
}
-Vec2i mapColorCoordToDepth( const Vec2i& v, const Channel16u& depth, const DeviceRef& device )
-{
- long x;
- long y;
- if ( depth && device ) {
- NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(
- device->getDeviceOptions().getColorResolution(),
- device->getDeviceOptions().getDepthResolution(),
- 0, v.x, v.y,
- depth.getValue( v ), &x, &y );
- }
- return Vec2i( (int32_t)x, (int32_t)y );
-}
-
-Vec2i mapDepthCoordToColor( const Vec2i& v, const Channel16u& depth, const DeviceRef& device )
-{
- NUI_COLOR_IMAGE_POINT mapped;
- if ( depth && device && device->getCoordinateMapper() ) {
- NUI_DEPTH_IMAGE_POINT p;
- p.x = v.x;
- p.y = v.y;
- p.depth = depth.getValue( v );
- long hr = device->getCoordinateMapper()->MapDepthPointToColorPoint(
- device->getDeviceOptions().getDepthResolution(), &p,
- NUI_IMAGE_TYPE::NUI_IMAGE_TYPE_COLOR_INFRARED,
- device->getDeviceOptions().getColorResolution(), &mapped
- );
- if ( FAILED( hr ) ) {
- device->errorNui( hr );
- }
- }
- return Vec2i( mapped.x, mapped.y );
-}
-
-Vec2i mapSkeletonCoordToColor( const Vec3f& v, const DeviceRef& device )
-{
- NUI_COLOR_IMAGE_POINT mapped;
- if ( device && device->getCoordinateMapper() ) {
- Vector4 p;
- p.x = v.x;
- p.y = v.y;
- p.z = v.z;
- p.w = 0.0f;
- long hr = device->getCoordinateMapper()->MapSkeletonPointToColorPoint(
- &p, NUI_IMAGE_TYPE::NUI_IMAGE_TYPE_COLOR,
- device->getDeviceOptions().getColorResolution(), &mapped
- );
- if ( FAILED( hr ) ) {
- device->errorNui( hr );
- }
- }
- return Vec2i( mapped.x, mapped.y );
-}
-
-Vec2i mapSkeletonCoordToDepth( const Vec3f& v, const DeviceRef& device )
-{
- NUI_DEPTH_IMAGE_POINT mapped;
- if ( device && device->getCoordinateMapper() ) {
- Vector4 p;
- p.x = v.x;
- p.y = v.y;
- p.z = v.z;
- p.w = 0.0f;
- long hr = device->getCoordinateMapper()->MapSkeletonPointToDepthPoint(
- &p, device->getDeviceOptions().getDepthResolution(), &mapped
- );
- if ( FAILED( hr ) ) {
- device->errorNui( hr );
- }
- }
- return Vec2i( mapped.x, mapped.y );
-}
-
uint16_t userIdFromDepthCoord( const Channel16u& depth, const Vec2i& v )
{
return NuiDepthPixelToPlayerIndex( depth.getValue( v ) );
@@ -853,6 +780,82 @@ bool Device::isCapturing() const
return mCapture;
}
+Vec2i Device::mapColorCoordToDepth( const Vec2i& v )
+{
+ long x;
+ long y;
+ if ( mChannelDepth ) {
+ long hr = NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(
+ mDeviceOptions.getColorResolution(),
+ mDeviceOptions.getDepthResolution(),
+ 0, v.x, v.y,
+ mChannelDepth.getValue( v ), &x, &y );
+ if ( FAILED( hr ) ) {
+ errorNui( hr );
+ }
+ }
+ return Vec2i( (int32_t)x, (int32_t)y );
+}
+
+Vec2i Device::mapDepthCoordToColor( const Vec2i& v )
+{
+ NUI_COLOR_IMAGE_POINT mapped;
+ if ( mChannelDepth && mCoordinateMapper ) {
+ NUI_DEPTH_IMAGE_POINT p;
+ p.x = v.x;
+ p.y = v.y;
+ p.depth = mChannelDepth.getValue( v );
+ long hr = mCoordinateMapper->MapDepthPointToColorPoint(
+ mDeviceOptions.getDepthResolution(), &p,
+ NUI_IMAGE_TYPE::NUI_IMAGE_TYPE_COLOR_INFRARED,
+ mDeviceOptions.getColorResolution(), &mapped
+ );
+ if ( FAILED( hr ) ) {
+ errorNui( hr );
+ }
+ }
+ return Vec2i( mapped.x, mapped.y );
+}
+
+Vec2i Device::mapSkeletonCoordToColor( const Vec3f& v )
+{
+ NUI_COLOR_IMAGE_POINT mapped;
+ if ( mCoordinateMapper ) {
+ Vector4 p;
+ p.x = v.x;
+ p.y = v.y;
+ p.z = v.z;
+ p.w = 0.0f;
+ long hr = mCoordinateMapper->MapSkeletonPointToColorPoint(
+ &p, NUI_IMAGE_TYPE::NUI_IMAGE_TYPE_COLOR,
+ mDeviceOptions.getColorResolution(), &mapped
+ );
+ if ( FAILED( hr ) ) {
+ errorNui( hr );
+ }
+ }
+ return Vec2i( mapped.x, mapped.y );
+}
+
+Vec2i Device::mapSkeletonCoordToDepth( const Vec3f& v )
+{
+ NUI_DEPTH_IMAGE_POINT mapped;
+ if ( mCoordinateMapper ) {
+ Vector4 p;
+ p.x = v.x;
+ p.y = v.y;
+ p.z = v.z;
+ p.w = 0.0f;
+ long hr = mCoordinateMapper->MapSkeletonPointToDepthPoint(
+ &p, mDeviceOptions.getDepthResolution(), &mapped
+ );
+ if ( FAILED( hr ) ) {
+ errorNui( hr );
+ }
+ }
+ return Vec2i( mapped.x, mapped.y );
+}
+
void Device::setTilt( int32_t degrees )
{
double elapsedSeconds = getElapsedSeconds();
View
27 src/Kinect.h
@@ -1,6 +1,6 @@
/*
*
-* Copyright (c) 2013, Ban the Rewind
+* Copyright (c) 2014, Ban the Rewind, Wieden+Kennedy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
@@ -151,16 +151,6 @@ float getDepthAtCoord( const ci::Channel16u& depth, const ci::Vec2i& v )
size_t getDeviceCount();
//! Returns use color for user ID \a id.
ci::Colorf getUserColor( uint32_t id );
-//! Returns pixel location of color position in depth image.
-ci::Vec2i mapColorCoordToDepth( const ci::Vec2i& v, const ci::Channel16u& depth,
- const DeviceRef& device );
-//! Returns pixel location of color position in depth image.
-ci::Vec2i mapDepthCoordToColor( const ci::Vec2i& v, const ci::Channel16u& depth,
- const DeviceRef& device );
-//! Returns pixel location of skeleton position in color image. Requires depth resolution.
-ci::Vec2i mapSkeletonCoordToColor( const ci::Vec3f& v, const DeviceRef& device );
-//! Returns pixel location of skeleton position in depth image.
-ci::Vec2i mapSkeletonCoordToDepth( const ci::Vec3f& v, const DeviceRef& device );
//! Returns user ID for pixel at \a coord in \a depth. 0 is no user.
uint16_t userIdFromDepthCoord( const ci::Channel16u& depth, const ci::Vec2i& v );
@@ -347,6 +337,15 @@ class Device
//! Sets device angle to \a degrees. Default is 0.
void setTilt( int32_t degrees = 0 );
+ //! Returns pixel location of color position in depth image.
+ ci::Vec2i mapColorCoordToDepth( const ci::Vec2i& v );
+ //! Returns pixel location of color position in depth image.
+ ci::Vec2i mapDepthCoordToColor( const ci::Vec2i& v );
+ //! Returns pixel location of skeleton position in color image.
+ ci::Vec2i mapSkeletonCoordToColor( const ci::Vec3f& v );
+ //! Returns pixel location of skeleton position in depth image.
+ ci::Vec2i mapSkeletonCoordToDepth( const ci::Vec3f& v );
+
//! Sets frame event handler. Signature is void( Frame ).
template<typename T, typename Y>
inline void connectEventHandler( T eventHandler, Y *obj )
@@ -355,8 +354,6 @@ class Device
}
//! Sets frame event handler. Signature is void( Frame ).
void connectEventHandler( const std::function<void ( Frame )>& eventHandler );
-
- ci::Vec2f test( const std::function<void ()>& eventHandler );
protected:
static const int32_t WAIT_TIME = 100;
@@ -395,10 +392,6 @@ class Device
std::string wcharToString( wchar_t* v );
friend void __stdcall deviceStatus( long hr, const wchar_t* instanceName, const wchar_t* deviceId, void* data );
- friend ci::Vec2i mapDepthCoordToColor( const ci::Vec2i& v, const ci::Channel16u& depth,
- const DeviceRef& device );
- friend ci::Vec2i mapSkeletonCoordToColor( const ci::Vec3f& v, const DeviceRef& device );
- friend ci::Vec2i mapSkeletonCoordToDepth( const ci::Vec3f& v, const DeviceRef& device );
//////////////////////////////////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.