summaryrefslogtreecommitdiffhomepage
path: root/tracker-rs/rs_impl
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-rs/rs_impl')
-rw-r--r--tracker-rs/rs_impl/CMakeLists.txt2
-rw-r--r--tracker-rs/rs_impl/attic/build.bat58
-rw-r--r--tracker-rs/rs_impl/attic/build_common.bat42
-rw-r--r--tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp18
-rw-r--r--tracker-rs/rs_impl/ftnoir_tracker_rs_impl.h15
5 files changed, 70 insertions, 65 deletions
diff --git a/tracker-rs/rs_impl/CMakeLists.txt b/tracker-rs/rs_impl/CMakeLists.txt
index d4bf0925..97c6fd99 100644
--- a/tracker-rs/rs_impl/CMakeLists.txt
+++ b/tracker-rs/rs_impl/CMakeLists.txt
@@ -5,7 +5,7 @@ if(WIN32)
target_link_libraries(opentrack-tracker-rs-impl advapi32)
# for SDK headers
- if(CMAKE_COMPILER_IS_GNUCC)
+ if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-fpermissive -Wno-error -w
#-Wno-missing-field-initializers -Wno-switch -Wno-sign-compare
#-Wno-unknown-pragmas -Wno-attributes
diff --git a/tracker-rs/rs_impl/attic/build.bat b/tracker-rs/rs_impl/attic/build.bat
index 3d5e8bc0..9fa3f859 100644
--- a/tracker-rs/rs_impl/attic/build.bat
+++ b/tracker-rs/rs_impl/attic/build.bat
@@ -1,29 +1,29 @@
-@echo off
-
-setlocal
-
-IF DEFINED VS150COMNTOOLS (
- if exist "%VS150COMNTOOLS%\..\..\VC\vcvarsall.bat" (
- set vs_dir="%VS150COMNTOOLS%\..\..\VC"
- set vs_64=amd64
- ) else (
- rem it installed vcvarsall.bat here for me for some reason -sh 20160827
- set vs_dir="%VS150COMNTOOLS%\..\ide\vc"
- set vs_64=amd64
- )) else (
- set vs_dir="%VS140COMNTOOLS%\..\..\VC"
- set vs_64=amd64
- )
-
-cd /d "%~dp0"
-if %errorlevel% neq 0 exit /b 1
-
-set rs_objs=ftnoir_tracker_rs_impl.obj libpxc.obj
-
-set rs_subdir=ia32&set vs_var=x86
-call ".\build_common.bat" || exit /b 1
-
-set rs_subdir=amd64&set vs_var=%vs_64%
-call ".\build_common.bat" || exit /b 1
-
-exit /b 0
+@echo off
+
+setlocal
+
+IF DEFINED VS150COMNTOOLS (
+ if exist "%VS150COMNTOOLS%\..\..\VC\vcvarsall.bat" (
+ set vs_dir="%VS150COMNTOOLS%\..\..\VC"
+ set vs_64=amd64
+ ) else (
+ rem it installed vcvarsall.bat here for me for some reason -sh 20160827
+ set vs_dir="%VS150COMNTOOLS%\..\ide\vc"
+ set vs_64=amd64
+ )) else (
+ set vs_dir="%VS140COMNTOOLS%\..\..\VC"
+ set vs_64=amd64
+ )
+
+cd /d "%~dp0"
+if %errorlevel% neq 0 exit /b 1
+
+set rs_objs=ftnoir_tracker_rs_impl.obj libpxc.obj
+
+set rs_subdir=ia32&set vs_var=x86
+call ".\build_common.bat" || exit /b 1
+
+set rs_subdir=amd64&set vs_var=%vs_64%
+call ".\build_common.bat" || exit /b 1
+
+exit /b 0
diff --git a/tracker-rs/rs_impl/attic/build_common.bat b/tracker-rs/rs_impl/attic/build_common.bat
index c37e0ae8..87453cba 100644
--- a/tracker-rs/rs_impl/attic/build_common.bat
+++ b/tracker-rs/rs_impl/attic/build_common.bat
@@ -1,21 +1,21 @@
-@echo off
-
-setlocal
-
-cd /d .\bin\%rs_subdir% || exit 1
-
-echo --- %rs_subdir%
-
-set rice_ld=/OPT:REF /OPT:ICF=10 /DEBUG /DYNAMICBASE /NXCOMPAT /LTCG
-set rice_lib=
-set rice_cc=/Ox /arch:SSE2 /EHscr /fp:fast /GS- /GF /GR- /Gy /MT /Y- /Zi /W1 /GL /Zi
-set libs=advapi32.lib
-
-if not exist %vs_dir%\vcvarsall.bat exit /b 1
-call %vs_dir%\vcvarsall %vs_var% || exit /b 1
-if ["%libpath%"] == [""] exit /b 1
-
-cl /c /nologo -DEXPORT_RS_IMPL -DUNICODE -D_UNICODE -MT %rice_cc% /I "%RSSDK_DIR%\opensource\include" ..\..\ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" || exit /b 1
-lib /nologo %rice_lib% %rs_objs% %libs% /OUT:rs-impl.lib || exit /b 1
-
-exit /b 0
+@echo off
+
+setlocal
+
+cd /d .\bin\%rs_subdir% || exit 1
+
+echo --- %rs_subdir%
+
+set rice_ld=/OPT:REF /OPT:ICF=10 /DEBUG /DYNAMICBASE /NXCOMPAT /LTCG
+set rice_lib=
+set rice_cc=/Ox /arch:SSE2 /EHscr /fp:fast /GS- /GF /GR- /Gy /MT /Y- /Zi /W1 /GL /Zi
+set libs=advapi32.lib
+
+if not exist %vs_dir%\vcvarsall.bat exit /b 1
+call %vs_dir%\vcvarsall %vs_var% || exit /b 1
+if ["%libpath%"] == [""] exit /b 1
+
+cl /c /nologo -DEXPORT_RS_IMPL -DUNICODE -D_UNICODE -MT %rice_cc% /I "%RSSDK_DIR%\opensource\include" ..\..\ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" || exit /b 1
+lib /nologo %rice_lib% %rs_objs% %libs% /OUT:rs-impl.lib || exit /b 1
+
+exit /b 0
diff --git a/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp b/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp
index f159d60b..f54531a6 100644
--- a/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp
+++ b/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp
@@ -5,13 +5,25 @@
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "ftnoir_tracker_rs_impl.h"
+
+#ifdef _WIN32
+# include <windows.h>
+#endif
+#include <cstdlib>
+
#include <pxcsensemanager.h>
+#if 0
+#include <RealSense/Face/FaceModule.h>
+#include <RealSense/Face/FaceConfiguration.h>
+using PXCFaceData = Intel::RealSense::Face::FaceData;
+using PXCFaceConfiguration = Intel::RealSense::Face::FaceConfiguration;
+#else
#include <pxcfacemodule.h>
#include <pxcfaceconfiguration.h>
-#include <windows.h>
+#endif
-const size_t kPreviewStreamWidth = 640;
-const size_t kPreviewStreamHeight = 480;
+constexpr size_t kPreviewStreamWidth = 640;
+constexpr size_t kPreviewStreamHeight = 480;
PXCSenseManager* g_senseManager = NULL;
PXCFaceData* g_faceData = NULL;
diff --git a/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.h b/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.h
index a4c03ce8..c71f30fa 100644
--- a/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.h
+++ b/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.h
@@ -6,15 +6,8 @@
*/
#pragma once
-#ifdef EXPORT_RS_IMPL
-#define RSTRACKERIMPL_VISIBILITY __declspec( dllexport )
-#else
-#define RSTRACKERIMPL_VISIBILITY
-#endif
-extern "C" {
- RSTRACKERIMPL_VISIBILITY int rs_tracker_impl_start();
- RSTRACKERIMPL_VISIBILITY int rs_tracker_impl_update_pose(double *pose);
- RSTRACKERIMPL_VISIBILITY int rs_tracker_impl_get_preview(void* data, int width, int height);
- RSTRACKERIMPL_VISIBILITY int rs_tracker_impl_end();
-}
+int rs_tracker_impl_start();
+int rs_tracker_impl_update_pose(double *pose);
+int rs_tracker_impl_get_preview(void* data, int width, int height);
+int rs_tracker_impl_end();