├── Platform ├── Win32 │ ├── Build │ │ ├── Res │ │ │ ├── mainicon.ico │ │ │ └── Resource-DDK.h │ │ └── Engine.sln │ └── CreateRedist │ │ ├── EE_NI │ │ ├── setup.exe │ │ ├── Resources │ │ │ ├── Header.bmp │ │ │ └── mainicon.ico │ │ ├── checkVersion.vbs │ │ ├── Lang │ │ │ └── en-us │ │ │ │ └── Loc_en-us.wxl │ │ ├── EE_NI.sln │ │ └── Includes │ │ │ └── EENIVariables.wxi │ │ └── Engine_Config.xml ├── Android │ └── jni │ │ ├── Android.mk │ │ ├── Application.mk │ │ ├── XnCore │ │ └── Android.mk │ │ ├── XnDDK │ │ └── Android.mk │ │ ├── XnDeviceFile │ │ └── Android.mk │ │ ├── XnDeviceSensorV2 │ │ └── Android.mk │ │ └── XnFormats │ │ └── Android.mk └── Linux │ ├── Build │ ├── XnCore │ │ └── Makefile │ ├── Common │ │ ├── Platform.x64 │ │ ├── Platform.Mips │ │ ├── Platform.AArch64 │ │ ├── Platform.Powerpc │ │ ├── Platform.Riscv64 │ │ ├── Platform.LoongArch64 │ │ ├── Platform.Arm │ │ ├── Platform.x86 │ │ ├── CommonTargets.mak │ │ ├── CommonCSMakefile │ │ ├── CommonDefs.mak │ │ └── CommonJavaMakefile │ ├── XnDDK │ │ └── Makefile │ ├── Utils │ │ ├── XnSensorServer │ │ │ └── Makefile │ │ └── EngineUtilMakefile │ ├── XnDeviceFile │ │ └── Makefile │ ├── XnDeviceSensorV2 │ │ └── Makefile │ ├── XnFormats │ │ └── Makefile │ ├── EngineLibMakefile │ └── Makefile │ └── Install │ └── 55-primesense-usb.rules ├── Source ├── External │ └── LibJPEG │ │ ├── jconfig.h │ │ ├── jversion.h │ │ ├── jconfig.ps3 │ │ ├── jconfig.lnx86 │ │ ├── jconfig.vc │ │ ├── jchuff.h │ │ └── jcinit.c ├── XnDDK │ ├── XnDeviceBaseProxy.cpp │ ├── XnDDKStatus.cpp │ ├── XnDeviceFunctionsTypedefs.h │ ├── XnStreamDataSetInternal.h │ ├── XnIRStream.cpp │ ├── XnImageStream.cpp │ ├── XnIRStream.h │ ├── XnImageStream.h │ ├── XnActualPropertyFactory.h │ ├── XnSimpleBufferPool.h │ ├── XnCodecFactory.h │ ├── XnStreamReaderStreamHolder.h │ ├── XnIntPropertySynchronizer.h │ ├── XnStreamWriterStream.cpp │ ├── XnActualRealProperty.cpp │ ├── XnActualIntProperty.cpp │ ├── XnActualStringProperty.cpp │ ├── XnDeviceModuleHolder.h │ ├── XnStreamWriterStream.h │ └── XnPropertySetInternal.h ├── XnDeviceSensorV2 │ ├── XnFirmwareInfo.cpp │ ├── XnSensorServerRunner.h │ ├── XnStreamProcessor.cpp │ ├── XnSensorOpenNiteImpl.cpp │ ├── XnJpegImageProcessor.h │ ├── Bayer.h │ ├── XnDataProcessorHolder.h │ ├── XnFirmwareCommands.h │ ├── Uncomp.h │ ├── XnFirmwareCommands.cpp │ ├── XnUncompressedDepthProcessor.h │ ├── XnUncompressedYUVImageProcessor.h │ ├── XnSensorFirmware.h │ ├── IXnSensorStream.h │ ├── XnJpegImageProcessor.cpp │ └── XnCmosInfo.h ├── XnCore │ ├── XnCoreStatus.cpp │ ├── XnVersion.cpp │ └── XnBuffer.cpp ├── XnFormats │ ├── XnFormatsStatus.cpp │ └── XnCodec.h └── XnDeviceFile │ ├── XnFileOpenNiteImpl.cpp │ ├── XnFileWriterStream.h │ └── XnExportedFileDevice.h └── Include ├── XnEE ├── XnEEMath.h ├── XnEEGeometry.h ├── XnEEObjects.h ├── XnEEFramework.h ├── XnEECore.h ├── XnEEAlgorithms.h ├── XnV3DGeometry.h ├── XnVStream.h ├── XnVCenterOfMass.h ├── XnVPointContainer.h ├── XnVBodyPart.h ├── XnVClosestPointFinder.h ├── XnVHead.h ├── XnVTorso.h ├── XnVEventHandlers.h ├── XnVLabelPruner.h ├── XnVObject.h └── XnVHand.h ├── XnEE.h ├── XnIOStream.h ├── XnIOFileStream.h └── XnIONetworkStream.h /Platform/Win32/Build/Res/mainicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PointCloudLibrary/Sensor/HEAD/Platform/Win32/Build/Res/mainicon.ico -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/EE_NI/setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PointCloudLibrary/Sensor/HEAD/Platform/Win32/CreateRedist/EE_NI/setup.exe -------------------------------------------------------------------------------- /Platform/Android/jni/Android.mk: -------------------------------------------------------------------------------- 1 | # OpenNI Android makefile. 2 | # 3 | 4 | include $(call all-subdir-makefiles) 5 | 6 | $(call import-module,OpenNI) 7 | -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/EE_NI/Resources/Header.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PointCloudLibrary/Sensor/HEAD/Platform/Win32/CreateRedist/EE_NI/Resources/Header.bmp -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/EE_NI/Resources/mainicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PointCloudLibrary/Sensor/HEAD/Platform/Win32/CreateRedist/EE_NI/Resources/mainicon.ico -------------------------------------------------------------------------------- /Platform/Linux/Build/XnCore/Makefile: -------------------------------------------------------------------------------- 1 | SRC_FILES = \ 2 | ../../../../Source/XnCore/*.cpp 3 | 4 | LIB_NAME = XnCore 5 | USED_LIBS = OpenNI 6 | DEFINES = XN_CORE_EXPORTS 7 | 8 | include ../EngineLibMakefile 9 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.x64: -------------------------------------------------------------------------------- 1 | # take this file's dir 2 | COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST))) 3 | 4 | # everything is the same as in x86 5 | include $(COMMON_MAK_DIR)Platform.x86 6 | -------------------------------------------------------------------------------- /Platform/Linux/Build/XnDDK/Makefile: -------------------------------------------------------------------------------- 1 | SRC_FILES = ../../../../Source/XnDDK/*.cpp 2 | 3 | LIB_NAME = XnDDK 4 | USED_LIBS = XnCore XnFormats OpenNI 5 | DEFINES = XN_DDK_EXPORTS 6 | 7 | include ../EngineLibMakefile 8 | 9 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Utils/XnSensorServer/Makefile: -------------------------------------------------------------------------------- 1 | SRC_FILES = ../../../../../Source/Utils/XnSensorServer/*.cpp 2 | 3 | EXE_NAME = XnSensorServer 4 | USED_LIBS = OpenNI XnCore XnFormats XnDDK XnDeviceSensorV2 5 | 6 | include ../EngineUtilMakefile 7 | 8 | -------------------------------------------------------------------------------- /Platform/Linux/Build/XnDeviceFile/Makefile: -------------------------------------------------------------------------------- 1 | SRC_FILES = ../../../../Source/XnDeviceFile/*.cpp 2 | 3 | LIB_NAME = XnDeviceFile 4 | USED_LIBS = XnCore XnFormats XnDDK OpenNI 5 | DEFINES = XN_DEVICE_EXPORTS 6 | 7 | include ../EngineLibMakefile 8 | 9 | -------------------------------------------------------------------------------- /Platform/Linux/Build/XnDeviceSensorV2/Makefile: -------------------------------------------------------------------------------- 1 | SRC_FILES = \ 2 | ../../../../Source/XnDeviceSensorV2/*.cpp 3 | 4 | LIB_NAME = XnDeviceSensorV2 5 | USED_LIBS = XnCore XnFormats XnDDK OpenNI 6 | DEFINES = XN_DEVICE_EXPORTS 7 | 8 | include ../EngineLibMakefile 9 | 10 | -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/Engine_Config.xml: -------------------------------------------------------------------------------- 1 | 2 | EngineWin32 3 | WIN32 4 | 5.1.0 5 | ..\..\..\ 6 | \Platform\Win32\Build\EngineWin32.sln 7 | \Platform\Win32\Redist\Samples\Build\All_2008.sln 8 | 9 | -------------------------------------------------------------------------------- /Source/External/LibJPEG/jconfig.h: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 // Microsoft Visual Studio 2 | #include "jconfig.vc" 3 | #include 4 | #elif SN_TARGET_PS3 5 | #include "jconfig.ps3" 6 | #include 7 | #elif ((linux) || (__APPLE__)) 8 | #include "jconfig.lnx86" 9 | #include 10 | #else 11 | #error "LibJPEG: Unsupported Platform!" 12 | #endif 13 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.Mips: -------------------------------------------------------------------------------- 1 | ifeq "$(CFG)" "Release" 2 | 3 | # Optimization level, minus currently buggy optimizing methods (which break bit-exact) 4 | CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing 5 | 6 | # More optimization flags 7 | CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant 8 | 9 | endif 10 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.AArch64: -------------------------------------------------------------------------------- 1 | ifeq "$(CFG)" "Release" 2 | 3 | # Optimization level, minus currently buggy optimizing methods (which break bit-exact) 4 | CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing 5 | 6 | # More optimization flags 7 | CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant 8 | 9 | endif 10 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.Powerpc: -------------------------------------------------------------------------------- 1 | ifeq "$(CFG)" "Release" 2 | 3 | # Optimization level, minus currently buggy optimizing methods (which break bit-exact) 4 | CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing 5 | 6 | # More optimization flags 7 | CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant 8 | 9 | endif 10 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.Riscv64: -------------------------------------------------------------------------------- 1 | export GLUT_SUPPORTED=1 2 | 3 | ifeq "$(CFG)" "Release" 4 | 5 | # Optimization level, minus currently buggy optimizing methods (which break bit-exact) 6 | CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing 7 | 8 | # More optimization flags 9 | CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant 10 | 11 | endif 12 | 13 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.LoongArch64: -------------------------------------------------------------------------------- 1 | export GLUT_SUPPORTED=1 2 | 3 | ifeq "$(CFG)" "Release" 4 | 5 | # Optimization level, minus currently buggy optimizing methods (which break bit-exact) 6 | CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing 7 | 8 | # More optimization flags 9 | CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant 10 | 11 | endif 12 | 13 | -------------------------------------------------------------------------------- /Platform/Linux/Build/XnFormats/Makefile: -------------------------------------------------------------------------------- 1 | SRC_FILES = \ 2 | ../../../../Source/XnFormats/*.cpp 3 | 4 | LIB_NAME = XnFormats 5 | USED_LIBS = XnCore OpenNI 6 | DEFINES = XN_FORMATS_EXPORTS 7 | 8 | ifeq ($(shell ld -ljpeg -o /dev/null 1>&2 2> /dev/null; echo $$?), 0) 9 | USED_LIBS += jpeg 10 | else 11 | INC_DIRS += ../../../../Source/External/LibJPEG 12 | SRC_FILES += ../../../../Source/External/LibJPEG/*.c 13 | endif 14 | 15 | include ../EngineLibMakefile 16 | -------------------------------------------------------------------------------- /Source/External/LibJPEG/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.Arm: -------------------------------------------------------------------------------- 1 | ifeq "$(CFG)" "Release" 2 | 3 | # Hardware specifying flags 4 | CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon #-mcpu=cortex-a8 5 | 6 | # Optimization level, minus currently buggy optimizing methods (which break bit-exact) 7 | CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing 8 | 9 | # More optimization flags 10 | CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant 11 | 12 | endif 13 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/Platform.x86: -------------------------------------------------------------------------------- 1 | # some defaults 2 | export GLUT_SUPPORTED=1 3 | 4 | ifndef SSE_GENERATION 5 | SSE_GENERATION = 0 6 | endif 7 | 8 | ifeq ("$(OSTYPE)","Darwin") 9 | # Making the binary a universal one (x86 + x64) 10 | CFLAGS += -arch i386 -arch x86_64 11 | LDFLAGS += -arch i386 -arch x86_64 12 | endif 13 | 14 | ifeq ($(SSE_GENERATION), 2) 15 | CFLAGS += -msse2 16 | else 17 | ifeq ($(SSE_GENERATION), 3) 18 | CFLAGS += -msse3 19 | ifeq ($(SSSE3_ENABLED), 1) 20 | CFLAGS += -mssse3 21 | endif 22 | endif 23 | endif 24 | -------------------------------------------------------------------------------- /Platform/Linux/Install/55-primesense-usb.rules: -------------------------------------------------------------------------------- 1 | # make primesense device mount with writing permissions (default is read only for unknown devices) 2 | SYSFS{idProduct}=="0200",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" 3 | SYSFS{idProduct}=="0300",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" 4 | SYSFS{idProduct}=="0400",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" 5 | SYSFS{idProduct}=="0500",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" 6 | SYSFS{idProduct}=="0600",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" 7 | SYSFS{idProduct}=="0601",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" 8 | 9 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/CommonTargets.mak: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Targets 3 | ############################################################################# 4 | .PHONY: all clean clean-$(OUTPUT_FILE) 5 | 6 | # define the target 'all' (it is first, and so, default) 7 | all: $(OUTPUT_FILE) 8 | 9 | # Intermediate directory 10 | $(INT_DIR): 11 | mkdir -p $(INT_DIR) 12 | 13 | # Output directory 14 | $(OUT_DIR): 15 | mkdir -p $(OUT_DIR) 16 | 17 | # Final output file 18 | $(OUTPUT_FILE): $(SRC_FILES_LIST) | $(OUT_DIR) 19 | 20 | clean-$(OUTPUT_FILE): 21 | rm -rf $(OUTPUT_FILE) 22 | 23 | clean: clean-$(OUTPUT_FILE) -------------------------------------------------------------------------------- /Platform/Android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := gnustl_static 2 | 3 | # Android >= v2.3 4 | APP_PLATFORM := android-9 5 | 6 | # Build ARMv7-A machine code. 7 | APP_ABI := armeabi-v7a 8 | APP_CFLAGS := -O3 -ftree-vectorize -ffast-math -funroll-loops 9 | 10 | APP_CFLAGS += -fPIC 11 | 12 | ifeq ($(APP_ABI),armeabi-v7a) 13 | APP_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mtune=cortex-a9 -mfp=vfpv3-d16 -mfpu=vfp 14 | 15 | # optionally add NEON to compilation flags. 16 | # to activate, run: "ndk-build USE_NEON=1" 17 | ifdef USE_NEON 18 | $(call __ndk_info,Building everything with NEON support!) 19 | APP_CFLAGS += -mfpu=neon -DHAVE_NEON=1 -flax-vector-conversions 20 | endif 21 | endif 22 | 23 | APP_CPPFLAGS += -frtti 24 | 25 | #$(call __ndk_info,APP_CFLAGS=$(APP_CFLAGS)) 26 | #$(call __ndk_info,APP_CPPFLAGS=$(APP_CPPFLAGS)) 27 | 28 | #-fsingle-precision-constant 29 | -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/EE_NI/checkVersion.vbs: -------------------------------------------------------------------------------- 1 | Function CheckVersionNI() 2 | set WSHShell = CreateObject("WScript.Shell") 3 | arrMinVersion = Split("1.2.0.4", ".") 4 | currOpenNiVer = Session.Property("OPENNIVERSION") 5 | 6 | if currOpenNiVer = "" Then 7 | WSHShell.PopUp("Please install OpenNI version 1.2.0.4 or higher!") 8 | CheckVersionNI = 3 9 | Exit Function 10 | End If 11 | arrCurrOpenNiVer = Split(currOpenNiVer, ".") 12 | 13 | For index = 0 to 4 14 | if CInt(arrMinVersion(index)) > CInt(arrCurrOpenNiVer(index)) Then 15 | WSHShell.PopUp("Please install OpenNI version 1.2.0.4 and higher!") 16 | CheckVersionNI = 3 17 | Exit Function 18 | ElseIf CInt(arrMinVersion(index)) < CInt(arrCurrOpenNiVer(index)) Then 19 | CheckVersionNI = 0 20 | Exit Function 21 | End If 22 | Next 23 | CheckVerionNI = 0 24 | End Function -------------------------------------------------------------------------------- /Platform/Android/jni/XnCore/Android.mk: -------------------------------------------------------------------------------- 1 | # XnCore Android makefile. 2 | # libXnCore.so 3 | # 4 | 5 | LOCAL_PATH:= $(call my-dir) 6 | include $(CLEAR_VARS) 7 | 8 | # set path to source 9 | MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnCore/ 10 | 11 | # list all source files 12 | MY_SRC_FILES := \ 13 | $(MY_PREFIX)*.cpp 14 | 15 | # expand the wildcards 16 | MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES)) 17 | 18 | # make those paths relative to here 19 | LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%) 20 | 21 | LOCAL_C_INCLUDES := \ 22 | $(LOCAL_PATH)/../../../../Include/ \ 23 | $(LOCAL_PATH)/../../../../Source/ \ 24 | 25 | LOCAL_CFLAGS:= -fvisibility=hidden -DXN_CORE_EXPORTS 26 | 27 | LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker 28 | 29 | LOCAL_SHARED_LIBRARIES := OpenNI libusb 30 | 31 | LOCAL_PREBUILT_LIBS := libc 32 | 33 | LOCAL_MODULE := XnCore 34 | 35 | include $(BUILD_SHARED_LIBRARY) 36 | -------------------------------------------------------------------------------- /Platform/Android/jni/XnDDK/Android.mk: -------------------------------------------------------------------------------- 1 | # XnDDK Android makefile. 2 | # libXnDDK.so 3 | # 4 | 5 | LOCAL_PATH:= $(call my-dir) 6 | include $(CLEAR_VARS) 7 | 8 | # set path to source 9 | MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnDDK/ 10 | 11 | # list all source files 12 | MY_SRC_FILES := \ 13 | $(MY_PREFIX)*.cpp 14 | 15 | # expand the wildcards 16 | MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES)) 17 | 18 | # make those paths relative to here 19 | LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%) 20 | 21 | LOCAL_C_INCLUDES := \ 22 | $(LOCAL_PATH)/../../../../Include/ \ 23 | $(LOCAL_PATH)/../../../../Source/ \ 24 | $(LOCAL_PATH)/../../../../Source/XnCommon \ 25 | 26 | LOCAL_CFLAGS := -fvisibility=hidden -DXN_DDK_EXPORTS 27 | 28 | LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker 29 | 30 | LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore XnFormats 31 | 32 | LOCAL_PREBUILT_LIBS := libc 33 | 34 | LOCAL_MODULE := XnDDK 35 | 36 | include $(BUILD_SHARED_LIBRARY) 37 | 38 | -------------------------------------------------------------------------------- /Platform/Android/jni/XnDeviceFile/Android.mk: -------------------------------------------------------------------------------- 1 | # XnDeviceFile Android makefile. 2 | # libXnDeviceFile.so 3 | # 4 | 5 | LOCAL_PATH:= $(call my-dir) 6 | include $(CLEAR_VARS) 7 | 8 | # set path to source 9 | MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnDeviceFile/ 10 | 11 | # list all source files 12 | MY_SRC_FILES := \ 13 | $(MY_PREFIX)*.cpp 14 | 15 | # expand the wildcards 16 | MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES)) 17 | 18 | # make those paths relative to here 19 | LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%) 20 | 21 | LOCAL_C_INCLUDES := \ 22 | $(LOCAL_PATH)/../../../../Include/ \ 23 | $(LOCAL_PATH)/../../../../Source/ \ 24 | $(LOCAL_PATH)/../../../../Source/XnCommon \ 25 | 26 | LOCAL_CFLAGS := -fvisibility=hidden -DXN_DEVICE_EXPORTS 27 | 28 | LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker 29 | 30 | LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore XnFormats XnDDK 31 | 32 | LOCAL_PREBUILT_LIBS := libc 33 | 34 | LOCAL_MODULE := XnDeviceFile 35 | 36 | include $(BUILD_SHARED_LIBRARY) 37 | 38 | -------------------------------------------------------------------------------- /Platform/Linux/Build/EngineLibMakefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Primesense Experience Engine library template makefile. 3 | # This file should not be made, but only included from other makefiles. 4 | # 5 | # Project makefile should define the following BEFORE including this file: 6 | # SRC_FILES - a list of all source files 7 | # LIB_NAME - output name 8 | # INC_DIRS - a list of additional include directories 9 | # LIB_DIRS - a list of additional library directories 10 | # USED_LIBS - a list of libraries to link with 11 | # DEFINES - [Optional] additional preprocessor defines 12 | # CFLAGS - [Optional] additional flags for the compiler 13 | # LDFLAGS - [Optional] additional flags for the linker 14 | ############################################################################# 15 | 16 | INC_DIRS += \ 17 | /usr/include/ni \ 18 | ../../../../Include \ 19 | ../../../../Source \ 20 | ../../../../Source/XnCommon 21 | 22 | BIN_DIR = ../../Bin 23 | 24 | include ../Common/CommonCppMakefile 25 | 26 | -------------------------------------------------------------------------------- /Platform/Android/jni/XnDeviceSensorV2/Android.mk: -------------------------------------------------------------------------------- 1 | # XnDeviceSensorV2 Android makefile. 2 | # libXnDeviceSensorV2.so 3 | # 4 | 5 | LOCAL_PATH:= $(call my-dir) 6 | include $(CLEAR_VARS) 7 | 8 | # set path to source 9 | MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnDeviceSensorV2/ 10 | 11 | # list all source files 12 | MY_SRC_FILES := \ 13 | $(MY_PREFIX)*.cpp 14 | 15 | # expand the wildcards 16 | MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES)) 17 | 18 | # make those paths relative to here 19 | LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%) 20 | 21 | LOCAL_C_INCLUDES := \ 22 | $(LOCAL_PATH)/../../../../Include/ \ 23 | $(LOCAL_PATH)/../../../../Source/ \ 24 | $(LOCAL_PATH)/../../../../Source/XnCommon \ 25 | 26 | LOCAL_CFLAGS := -fvisibility=hidden -DXN_DEVICE_EXPORTS 27 | 28 | LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker 29 | 30 | LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore XnFormats XnDDK 31 | 32 | LOCAL_PREBUILT_LIBS := libc 33 | 34 | LOCAL_MODULE := XnDeviceSensorV2 35 | 36 | include $(BUILD_SHARED_LIBRARY) 37 | 38 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Utils/EngineUtilMakefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Primesense Experience Engine util template makefile. 3 | # This file should not be made, but only included from other makefiles. 4 | # 5 | # Project makefile should define the following BEFORE including this file: 6 | # SRC_FILES - a list of all source files 7 | # LIB_NAME - output name 8 | # INC_DIRS - a list of additional include directories 9 | # LIB_DIRS - a list of additional library directories 10 | # USED_LIBS - a list of libraries to link with 11 | # DEFINES - [Optional] additional preprocessor defines 12 | # CFLAGS - [Optional] additional flags for the compiler 13 | # LDFLAGS - [Optional] additional flags for the linker 14 | ############################################################################# 15 | 16 | INC_DIRS += \ 17 | /usr/include/ni \ 18 | ../../../../../Include \ 19 | ../../../../../Source \ 20 | ../../../../../Source/XnCommon 21 | 22 | BIN_DIR = ../../../Bin 23 | 24 | include ../../Common/CommonCppMakefile 25 | -------------------------------------------------------------------------------- /Platform/Android/jni/XnFormats/Android.mk: -------------------------------------------------------------------------------- 1 | # XnFormats Android makefile. 2 | # libXnFormats.so 3 | # 4 | 5 | LOCAL_PATH:= $(call my-dir) 6 | include $(CLEAR_VARS) 7 | 8 | # set path to source 9 | MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnFormats/ 10 | 11 | # list all source files 12 | MY_SRC_FILES := \ 13 | $(MY_PREFIX)*.cpp \ 14 | $(MY_PREFIX)../External/LibJPEG/*.c 15 | 16 | # expand the wildcards 17 | MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES)) 18 | 19 | # make those paths relative to here 20 | LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%) 21 | 22 | LOCAL_C_INCLUDES := \ 23 | $(LOCAL_PATH)/../../../../Include/ \ 24 | $(LOCAL_PATH)/../../../../Source/ \ 25 | $(LOCAL_PATH)/../../../../Source/XnCommon \ 26 | $(LOCAL_PATH)/../../../../Source/External/LibJPEG \ 27 | 28 | LOCAL_CFLAGS := -fvisibility=hidden -DXN_FORMATS_EXPORTS 29 | 30 | LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker 31 | 32 | LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore 33 | 34 | LOCAL_PREBUILT_LIBS := libc 35 | 36 | LOCAL_MODULE := XnFormats 37 | 38 | include $(BUILD_SHARED_LIBRARY) 39 | 40 | -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/EE_NI/Lang/en-us/Loc_en-us.wxl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1033 4 | PrimeSense Sensor 5 | for Windows 6 | for Windows 64-bit 7 | Sensor 8 | 9 | PrimeSense 10 | This application is is not supported on your current OS. Minimal OS supported is Windows XP SP2 11 | .NET Framework 2.0 is required. Please install the .NET Framework then run this installer again. 12 | A newer version of !(loc.ProductName) is already installed. 13 | Choose the folder in which to install !(loc.ProductName) 14 | -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/EE_NI/EE_NI.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "EE_NI", "EE_NI.wixproj", "{C48CADD9-CCFF-4819-A860-840FC26E90AE}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x64 = Debug|x64 9 | Debug|x86 = Debug|x86 10 | Release|x64 = Release|x64 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x64.ActiveCfg = Debug|x64 15 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x64.Build.0 = Debug|x64 16 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x86.ActiveCfg = Debug|x86 17 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x86.Build.0 = Debug|x86 18 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x64.ActiveCfg = Release|x64 19 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x64.Build.0 = Release|x64 20 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x86.ActiveCfg = Release|x86 21 | {C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x86.Build.0 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /Source/External/LibJPEG/jconfig.ps3: -------------------------------------------------------------------------------- 1 | /* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | //#define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */ 23 | 24 | #define ALIGN_TYPE long /* Needed for 680x0 Macs */ 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #define USE_CCOMMAND /* Command line reader for Macintosh */ 37 | #define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */ 38 | 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | #undef PROGRESS_REPORT /* optional */ 42 | 43 | #define NO_GETENV 1 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /Source/External/LibJPEG/jconfig.lnx86: -------------------------------------------------------------------------------- 1 | /* jconfig.h. Generated automatically by configure. */ 2 | /* jconfig.cfg --- source file edited by configure script */ 3 | /* see jconfig.doc for explanations */ 4 | 5 | #define HAVE_PROTOTYPES 6 | #define HAVE_UNSIGNED_CHAR 7 | #define HAVE_UNSIGNED_SHORT 8 | #undef void 9 | #undef const 10 | #undef CHAR_IS_UNSIGNED 11 | #define HAVE_STDDEF_H 12 | #define HAVE_STDLIB_H 13 | #undef NEED_BSD_STRINGS 14 | #undef NEED_SYS_TYPES_H 15 | #undef NEED_FAR_POINTERS 16 | #undef NEED_SHORT_EXTERNAL_NAMES 17 | /* Define this if you get warnings about undefined structures. */ 18 | #undef INCOMPLETE_TYPES_BROKEN 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | #define INLINE __inline__ 24 | /* These are for configuring the JPEG memory manager. */ 25 | #undef DEFAULT_MAX_MEM 26 | #undef NO_MKTEMP 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | 30 | #ifdef JPEG_CJPEG_DJPEG 31 | 32 | #define BMP_SUPPORTED /* BMP image file format */ 33 | #define GIF_SUPPORTED /* GIF image file format */ 34 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 35 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 36 | #define TARGA_SUPPORTED /* Targa image file format */ 37 | 38 | #undef TWO_FILE_COMMANDLINE 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | 42 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 43 | #undef PROGRESS_REPORT 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /Source/External/LibJPEG/jconfig.vc: -------------------------------------------------------------------------------- 1 | /* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define _CRT_SECURE_NO_DEPRECATE 1 // Undeprecate CRT functions 5 | 6 | #define HAVE_PROTOTYPES 7 | #define HAVE_UNSIGNED_CHAR 8 | #define HAVE_UNSIGNED_SHORT 9 | /* #define void char */ 10 | /* #define const */ 11 | #undef CHAR_IS_UNSIGNED 12 | #define HAVE_STDDEF_H 13 | #define HAVE_STDLIB_H 14 | #undef NEED_BSD_STRINGS 15 | #undef NEED_SYS_TYPES_H 16 | #undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ 17 | #undef NEED_SHORT_EXTERNAL_NAMES 18 | #undef INCOMPLETE_TYPES_BROKEN 19 | 20 | /* Define "boolean" as unsigned char, not int, per Windows custom */ 21 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ 22 | typedef unsigned char boolean; 23 | #endif 24 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ 25 | 26 | 27 | #ifdef JPEG_INTERNALS 28 | 29 | #undef RIGHT_SHIFT_IS_UNSIGNED 30 | 31 | #endif /* JPEG_INTERNALS */ 32 | 33 | #ifdef JPEG_CJPEG_DJPEG 34 | 35 | #define BMP_SUPPORTED /* BMP image file format */ 36 | #define GIF_SUPPORTED /* GIF image file format */ 37 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 38 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 39 | #define TARGA_SUPPORTED /* Targa image file format */ 40 | 41 | #define TWO_FILE_COMMANDLINE /* optional */ 42 | #define USE_SETMODE /* Microsoft has setmode() */ 43 | #undef NEED_SIGNAL_CATCHER 44 | #undef DONT_USE_B_MODE 45 | #undef PROGRESS_REPORT /* optional */ 46 | 47 | #endif /* JPEG_CJPEG_DJPEG */ 48 | -------------------------------------------------------------------------------- /Source/External/LibJPEG/jchuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jchuff.h 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains declarations for Huffman entropy encoding routines 9 | * that are shared between the sequential encoder (jchuff.c) and the 10 | * progressive encoder (jcphuff.c). No other modules need to see these. 11 | */ 12 | 13 | /* The legal range of a DCT coefficient is 14 | * -1024 .. +1023 for 8-bit data; 15 | * -16384 .. +16383 for 12-bit data. 16 | * Hence the magnitude should always fit in 10 or 14 bits respectively. 17 | */ 18 | 19 | #if BITS_IN_JSAMPLE == 8 20 | #define MAX_COEF_BITS 10 21 | #else 22 | #define MAX_COEF_BITS 14 23 | #endif 24 | 25 | /* Derived data constructed for each Huffman table */ 26 | 27 | typedef struct { 28 | unsigned int ehufco[256]; /* code for each symbol */ 29 | char ehufsi[256]; /* length of code for each symbol */ 30 | /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ 31 | } c_derived_tbl; 32 | 33 | /* Short forms of external names for systems with brain-damaged linkers. */ 34 | 35 | #ifdef NEED_SHORT_EXTERNAL_NAMES 36 | #define jpeg_make_c_derived_tbl jMkCDerived 37 | #define jpeg_gen_optimal_table jGenOptTbl 38 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 39 | 40 | /* Expand a Huffman table definition into the derived format */ 41 | EXTERN(void) jpeg_make_c_derived_tbl 42 | JPP((j_compress_ptr cinfo, boolean isDC, int tblno, 43 | c_derived_tbl ** pdtbl)); 44 | 45 | /* Generate an optimal table definition given the specified counts */ 46 | EXTERN(void) jpeg_gen_optimal_table 47 | JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); 48 | -------------------------------------------------------------------------------- /Platform/Win32/CreateRedist/EE_NI/Includes/EENIVariables.wxi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Source/XnDDK/XnDeviceBaseProxy.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnDeviceBaseProxy.h" -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnFirmwareInfo.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnFirmwareInfo.h" -------------------------------------------------------------------------------- /Source/XnDDK/XnDDKStatus.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | // registration is done by including XnStatusRegister *before* including the list of errors 26 | #include 27 | #include 28 | -------------------------------------------------------------------------------- /Include/XnEE/XnEEMath.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_EE_MATH_H_ 23 | #define _XN_EE_MATH_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | 31 | #endif //_XN_EE_MATH_H_ 32 | 33 | -------------------------------------------------------------------------------- /Include/XnEE/XnEEGeometry.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_EE_GEOMETRY_H_ 23 | #define _XN_EE_GEOMETRY_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | 29 | #include 30 | #include 31 | 32 | #endif //_XN_EE_GEOMETRY_H_ 33 | 34 | -------------------------------------------------------------------------------- /Include/XnEE.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_EE_COMMON_H_ 23 | #define _XN_EE_COMMON_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | 29 | // Common 30 | #include 31 | #include 32 | 33 | #endif //_XN_EE_COMMON_H_ 34 | 35 | -------------------------------------------------------------------------------- /Source/XnCore/XnCoreStatus.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | // registration is done by including XnStatusRegister *before* including the list of errors 26 | #include 27 | #define XN_MESSAGE_MAP_REGISTER 28 | #include "XnCore.h" 29 | -------------------------------------------------------------------------------- /Source/XnFormats/XnFormatsStatus.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | // registration is done by including XnStatusRegister *before* including the list of errors 26 | #include 27 | #define XN_MESSAGE_MAP_REGISTER 28 | #include "XnFormatsStatus.h" 29 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #/****************************************************************************** 3 | #* * 4 | #* PrimeSense Sensor 5.0 Makefile * 5 | #* Copyright (C) 2010 PrimeSense Ltd. * 6 | #* * 7 | #******************************************************************************/ 8 | # default config is Release 9 | ifndef CFG 10 | CFG = Release 11 | endif 12 | 13 | # list all modules 14 | ALL_PROJS = \ 15 | XnCore \ 16 | XnFormats \ 17 | XnDDK \ 18 | XnDeviceSensorV2 \ 19 | Utils/XnSensorServer \ 20 | XnDeviceFile \ 21 | 22 | 23 | ALL_PROJS_CLEAN = $(foreach proj,$(ALL_PROJS),$(proj)-clean) 24 | 25 | # define a function which creates a target for each proj 26 | define CREATE_PROJ_TARGET 27 | 28 | .PHONY: $1 $1-clean 29 | 30 | $1: 31 | $(MAKE) -C $1 CFG=$(CFG) 32 | 33 | $1-clean: 34 | $(MAKE) -C $1 CFG=$(CFG) clean 35 | 36 | endef 37 | 38 | ########### TARGETS ############## 39 | 40 | .PHONY: all install uninstall clean 41 | 42 | # make all makefiles 43 | all: $(ALL_PROJS) 44 | 45 | # create projects targets 46 | $(foreach proj,$(ALL_PROJS),$(eval $(call CREATE_PROJ_TARGET,$(proj)))) 47 | 48 | # additional dependencies 49 | XnFormats: XnCore 50 | XnDDK: XnCore 51 | XnDDK: XnFormats 52 | XnLeanDeviceSensorV2: XnDDK 53 | XnLeanDeviceSensorV2: XnFormats 54 | XnLeanDeviceSensorV2: XnCore 55 | Utils/XnSensorServer: XnDDK 56 | Utils/XnSensorServer: XnDeviceSensorV2 57 | Utils/XnSensorServer: XnFormats 58 | XnDeviceFile: XnCore 59 | XnDeviceFile: XnDDK 60 | XnDeviceFile: XnFormats 61 | 62 | # clean is cleaning all projects 63 | clean: $(ALL_PROJS_CLEAN) 64 | 65 | # redist target 66 | redist: all 67 | cd ../CreateRedist; ./RedistMaker; cd - 68 | 69 | # install target 70 | install: redist 71 | cd ../Redist; ./install.sh; cd - 72 | 73 | # uninstall 74 | uninstall: 75 | cd ../Redist; ./install.sh -u; cd - 76 | 77 | -------------------------------------------------------------------------------- /Source/XnDDK/XnDeviceFunctionsTypedefs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_DEVICE_FUNCTIONS_TYPEDEFS_H__ 23 | #define __XN_DEVICE_FUNCTIONS_TYPEDEFS_H__ 24 | 25 | // create a list of typedefs 26 | 27 | #define XN_DEVICE_TYPEDEF_NAME(name) XnDevice##name##FuncPtr 28 | #define XN_DEVICE_INTERFACE_FUNCTION(name, sig) typedef XnStatus (*XN_DEVICE_TYPEDEF_NAME(name))sig; 29 | #include 30 | #undef XN_DEVICE_INTERFACE_FUNCTION 31 | 32 | #endif //__XN_DEVICE_FUNCTIONS_TYPEDEFS_H__ -------------------------------------------------------------------------------- /Include/XnEE/XnEEObjects.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_EE_OBJECTS_H_ 23 | #define _XN_EE_OBJECTS_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | #endif //_XN_EE_OBJECTS_H_ 36 | 37 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/CommonCSMakefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Primesense template makefile. 3 | # This file should not be made, but only included from other makefiles. 4 | # By default, this makefile compiles in release. To compile a debug version: 5 | # make CFG=Debug 6 | # 7 | # Project makefile should define the following BEFORE including this file: 8 | # SRC_FILES - a list of all source files 9 | # Output name under one of the following: 10 | # NETLIB_NAME (.net module) or 11 | # NETEXE_NAME (.net executable) 12 | # BIN_DIR - Bin directory (output dir) 13 | # INC_DIRS - a list of additional include directories 14 | # USED_LIBS - a list of libraries to link with 15 | # CSFLAGS - [Optional] additional flags for mono compiler 16 | # NET_WIN_FORMS - [Optional] when 1, application uses WinForms 17 | ############################################################################# 18 | 19 | # take this file's dir 20 | COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST))) 21 | 22 | include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak 23 | 24 | # create -r option to mcs 25 | USED_NETLIBS_OPTION = $(foreach lib,$(USED_LIBS),-r:$(lib).dll) 26 | 27 | ifeq "$(NET_WIN_FORMS)" "1" 28 | USED_NETLIBS_OPTION += -r:System.Windows.Forms.dll -r:System.Drawing.dll 29 | endif 30 | 31 | # add the output dir as a place to search for assemblies 32 | USED_NETLIBS_OPTION += -lib:$(OUT_DIR) 33 | 34 | ifeq "$(CFG)" "Release" 35 | CSFLAGS += -o+ 36 | endif 37 | 38 | # some lib / exe specifics 39 | ifneq "$(NETLIB_NAME)" "" 40 | OUTPUT_NAME = $(NETLIB_NAME).dll 41 | TARGET = library 42 | endif 43 | ifneq "$(NETEXE_NAME)" "" 44 | OUTPUT_NAME = $(NETEXE_NAME).exe 45 | TARGET = winexe 46 | endif 47 | 48 | OUTPUT_COMMAND = gmcs -out:$(OUTPUT_FILE) -target:$(TARGET) $(CSFLAGS) $(USED_NETLIBS_OPTION) $(SRC_FILES) 49 | 50 | ############################################################################# 51 | # Targets 52 | ############################################################################# 53 | include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak 54 | 55 | # Final output file 56 | $(OUTPUT_FILE): 57 | $(OUTPUT_COMMAND) 58 | 59 | -------------------------------------------------------------------------------- /Include/XnEE/XnEEFramework.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_EE_FW_H_ 23 | #define _XN_EE_FW_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | // Algorithms 29 | #include 30 | 31 | // Virtual Objects 32 | #include 33 | 34 | // Math 35 | #include 36 | 37 | // Geometry 38 | #include 39 | 40 | #endif //_XN_EE_FW_H_ 41 | 42 | -------------------------------------------------------------------------------- /Platform/Win32/Build/Res/Resource-DDK.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //{{NO_DEPENDENCIES}} 23 | // Microsoft Visual C++ generated include file. 24 | // Used by DDK.rc 25 | // 26 | #define IDI_MAINICON 110 27 | 28 | // Next default values for new objects 29 | // 30 | #ifdef APSTUDIO_INVOKED 31 | #ifndef APSTUDIO_READONLY_SYMBOLS 32 | #define _APS_NEXT_RESOURCE_VALUE 116 33 | #define _APS_NEXT_COMMAND_VALUE 40001 34 | #define _APS_NEXT_CONTROL_VALUE 1016 35 | #define _APS_NEXT_SYMED_VALUE 101 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/CommonDefs.mak: -------------------------------------------------------------------------------- 1 | # some defaults 2 | ifndef CFG 3 | CFG = Release 4 | endif 5 | 6 | # find out the platform on which we're running 7 | MACHINE = $(shell uname -m) 8 | ifneq (,$(findstring x86_64,$(MACHINE))) 9 | HOST_PLATFORM = x64 10 | else ifneq (,$(findstring x86,$(MACHINE))) 11 | HOST_PLATFORM = x86 12 | else ifneq (,$(findstring i686,$(MACHINE))) 13 | HOST_PLATFORM = x86 14 | else ifneq (,$(findstring i386,$(MACHINE))) 15 | HOST_PLATFORM = x86 16 | else ifneq (,$(findstring arm,$(MACHINE))) 17 | HOST_PLATFORM = Arm 18 | else ifneq (,$(findstring aarch64,$(MACHINE))) 19 | HOST_PLATFORM = AArch64 20 | else ifneq (,$(findstring ppc,$(MACHINE))) 21 | HOST_PLATFORM = Powerpc 22 | else ifneq (,$(findstring mips,$(MACHINE))) 23 | HOST_PLATFORM = Mips 24 | else ifneq (,$(findstring riscv64,$(MACHINE))) 25 | HOST_PLATFORM = Riscv64 26 | else ifneq (,$(findstring loongarch64,$(MACHINE))) 27 | HOST_PLATFORM = LoongArch64 28 | else 29 | DUMMY:=$(error Can't determine host platform) 30 | endif 31 | 32 | # now check if this is a cross-compilation or not 33 | ifeq "$(PLATFORM)" "" 34 | PLATFORM = $(HOST_PLATFORM) 35 | else 36 | ifneq "$(PLATFORM)" "$(HOST_PLATFORM)" 37 | # cross compiling. Take CXX and STAGING_DIR from environment 38 | PLATFORM_UPPER = $(shell echo $(PLATFORM) | tr 'a-z' 'A-Z') 39 | DUMMY:=$(eval CXX = $($(PLATFORM_UPPER)_CXX)) 40 | DUMMY:=$(eval TARGET_SYS_ROOT = $($(PLATFORM_UPPER)_STAGING)) 41 | 42 | ifeq "$(and $(CXX), $(TARGET_SYS_ROOT))" "" 43 | DUMMY:=$(error Cross-Compilation error. Can't find $(PLATFORM_UPPER)_CXX and $(PLATFORM_UPPER)_STAGING) 44 | endif 45 | endif 46 | endif 47 | 48 | # expand file list 49 | SRC_FILES_LIST = $(sort $(wildcard $(SRC_FILES))) 50 | 51 | # define the intermediate directory 52 | INT_DIR = $(PLATFORM)-$(CFG) 53 | 54 | # define output directory 55 | OUT_DIR = $(BIN_DIR)/$(PLATFORM)-$(CFG) 56 | 57 | # full path to output file 58 | OUTPUT_FILE = $(OUT_DIR)/$(OUTPUT_NAME) 59 | 60 | # take this file's dir 61 | COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST))) 62 | 63 | # get the OS type 64 | OSTYPE := $(shell uname -s) 65 | 66 | # platform specific args 67 | include $(COMMON_MAK_DIR)Platform.$(PLATFORM) 68 | -------------------------------------------------------------------------------- /Source/XnDeviceFile/XnFileOpenNiteImpl.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include 26 | #include "XnExportedFileDevice.h" 27 | 28 | //--------------------------------------------------------------------------- 29 | // Exporting 30 | //--------------------------------------------------------------------------- 31 | XN_EXPORT_MODULE(xn::Module) 32 | XN_EXPORT_PLAYER(XnExportedFileDevice) 33 | 34 | -------------------------------------------------------------------------------- /Source/XnDDK/XnStreamDataSetInternal.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_STREAM_DATA_SET_INTERNAL_H__ 23 | #define __XN_STREAM_DATA_SET_INTERNAL_H__ 24 | 25 | #include "XnStreamDataSet.h" 26 | #include 27 | 28 | //--------------------------------------------------------------------------- 29 | // Types 30 | //--------------------------------------------------------------------------- 31 | XN_DECLARE_STRINGS_HASH(XnStreamData*, XnStreamDataHash) 32 | 33 | struct XnStreamDataSet 34 | { 35 | XnStreamDataHash* pHash; 36 | }; 37 | 38 | #endif //__XN_STREAM_DATA_SET_INTERNAL_H__ 39 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnSensorServerRunner.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_SENSOR_SERVER_RUNNER_H__ 23 | #define __XN_SENSOR_SERVER_RUNNER_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Exported Functions 27 | //--------------------------------------------------------------------------- 28 | XN_DEVICE_API XnStatus XnSensorServerGetGlobalConfigFile(const XnChar* strConfigDir, XnChar* strConfigFile, XnUInt32 nBufSize); 29 | XN_DEVICE_API XnStatus XnSensorServerRun(const XnChar* strConfigFile); 30 | 31 | #endif //__XN_SENSOR_SERVER_RUNNER_H__ 32 | -------------------------------------------------------------------------------- /Source/XnDDK/XnIRStream.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnIRStream.h" 26 | 27 | //--------------------------------------------------------------------------- 28 | // Code 29 | //--------------------------------------------------------------------------- 30 | XnIRStream::XnIRStream(const XnChar* csName, XnBool bAllowCustomResolutions) : 31 | XnPixelStream(XN_STREAM_TYPE_IR, csName, bAllowCustomResolutions) 32 | { 33 | } 34 | -------------------------------------------------------------------------------- /Source/XnDDK/XnImageStream.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnImageStream.h" 26 | 27 | //--------------------------------------------------------------------------- 28 | // Code 29 | //--------------------------------------------------------------------------- 30 | XnImageStream::XnImageStream(const XnChar* csName, XnBool bAllowCustomResolutions) : 31 | XnPixelStream(XN_STREAM_TYPE_IMAGE, csName, bAllowCustomResolutions) 32 | { 33 | } 34 | -------------------------------------------------------------------------------- /Include/XnEE/XnEECore.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_EE_CORE_H_ 23 | #define _XN_EE_CORE_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | 29 | // Data Types 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | // Device 36 | #include 37 | 38 | // Algorithms 39 | #include 40 | 41 | // Utilities 42 | #include 43 | 44 | #endif //_XN_EE_CORE_H_ 45 | 46 | -------------------------------------------------------------------------------- /Include/XnEE/XnEEAlgorithms.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_EE_ALGORITHMS_H_ 23 | #define _XN_EE_ALGORITHMS_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | #endif //_XN_EE_ALGORITHMS_H_ 40 | 41 | -------------------------------------------------------------------------------- /Source/XnCore/XnVersion.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include 26 | #include 27 | 28 | //--------------------------------------------------------------------------- 29 | // Code 30 | //--------------------------------------------------------------------------- 31 | XN_CORE_API XnUInt32 XnGetVersion(void) 32 | { 33 | // Return the numeric version of Xiron version 34 | return (XN_VERSION); 35 | } 36 | 37 | XN_CORE_API const XnChar* XnGetVersionString(void) 38 | { 39 | // Return the string version of Xiron version 40 | return (XN_VERSION_STRING); 41 | } 42 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnStreamProcessor.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnStreamProcessor.h" 26 | #include 27 | #include "XnSensor.h" 28 | 29 | //--------------------------------------------------------------------------- 30 | // Code 31 | //--------------------------------------------------------------------------- 32 | XnStreamProcessor::XnStreamProcessor(XnDeviceStream* pStream, XnSensorStreamHelper* pHelper) : 33 | XnDataProcessor(pHelper->GetPrivateData(), pStream->GetType()), 34 | m_pStream(pStream), 35 | m_pHelper(pHelper) 36 | { 37 | } 38 | 39 | 40 | -------------------------------------------------------------------------------- /Source/XnDDK/XnIRStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_IR_STREAM_H__ 23 | #define __XN_IR_STREAM_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | 34 | /** Represents a base class for an image stream. */ 35 | class XN_DDK_CPP_API XnIRStream : public XnPixelStream 36 | { 37 | public: 38 | XnIRStream(const XnChar* csName, XnBool bAllowCustomResolutions); 39 | }; 40 | 41 | #endif //__XN_IR_STREAM_H__ -------------------------------------------------------------------------------- /Source/XnDDK/XnImageStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_IMAGE_STREAM_H__ 23 | #define __XN_IMAGE_STREAM_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | 34 | /** Represents a base class for an image stream. */ 35 | class XN_DDK_CPP_API XnImageStream : public XnPixelStream 36 | { 37 | public: 38 | XnImageStream(const XnChar* csName, XnBool bAllowCustomResolutions); 39 | }; 40 | 41 | #endif //__XN_IMAGE_STREAM_H__ -------------------------------------------------------------------------------- /Include/XnEE/XnV3DGeometry.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_3DGEOMETRY_H_ 23 | #define _XNV_3DGEOMETRY_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnVVirtualObject.h" 29 | #include "XnV3DVector.h" 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | 35 | class XN_EE_FW_API XnV3DGeometry : public XnVVirtualObject 36 | { 37 | public: 38 | virtual ~XnV3DGeometry() {} 39 | virtual XnBool IsIntersect(const XnV3DVector& pt) const = 0; 40 | }; 41 | 42 | 43 | #endif //_XNV_3DGEOMETRY_H_ 44 | 45 | -------------------------------------------------------------------------------- /Platform/Win32/Build/Engine.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnCore", "XnCore\XnCore.vcproj", "{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A}" 4 | EndProject 5 | Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnFormats", "XnFormats\XnFormats.vcproj", "{9CAEC325-EEE6-4A91-8819-004E20C419C0}" 6 | ProjectSection(ProjectDependencies) = postProject 7 | {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} 8 | EndProjectSection 9 | EndProject 10 | Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnDDK", "XnDDK\XnDDK.vcproj", "{FB08A9D1-10AF-418D-8786-F58FDF11254D}" 11 | ProjectSection(ProjectDependencies) = postProject 12 | {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} 13 | {9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0} 14 | EndProjectSection 15 | EndProject 16 | Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnDeviceSensorV2", "XnDeviceSensorV2\XnDeviceSensorV2.vcproj", "{1653839A-ABA5-4c0e-9EA2-2640B0275894}" 17 | ProjectSection(ProjectDependencies) = postProject 18 | {FB08A9D1-10AF-418D-8786-F58FDF11254D} = {FB08A9D1-10AF-418D-8786-F58FDF11254D} 19 | {9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0} 20 | {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} 21 | EndProjectSection 22 | EndProject 23 | Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "Utils\XnSensorServer", "Utils\XnSensorServer\XnSensorServer.vcproj", "{F68C824E-EA49-4A3C-A233-ADE2B3ECC375}" 24 | ProjectSection(ProjectDependencies) = postProject 25 | {FB08A9D1-10AF-418D-8786-F58FDF11254D} = {FB08A9D1-10AF-418D-8786-F58FDF11254D} 26 | {1653839A-ABA5-4c0e-9EA2-2640B0275894} = {1653839A-ABA5-4c0e-9EA2-2640B0275894} 27 | {9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0} 28 | EndProjectSection 29 | EndProject 30 | Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnDeviceFile", "XnDeviceFile\XnDeviceFile.vcproj", "{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5B}" 31 | ProjectSection(ProjectDependencies) = postProject 32 | {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} 33 | {FB08A9D1-10AF-418D-8786-F58FDF11254D} = {FB08A9D1-10AF-418D-8786-F58FDF11254D} 34 | {9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0} 35 | EndProjectSection 36 | EndProject 37 | -------------------------------------------------------------------------------- /Source/XnDDK/XnActualPropertyFactory.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_ACTUAL_PROPERTY_FACTORY_H__ 23 | #define __XN_ACTUAL_PROPERTY_FACTORY_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | class XnActualPropertyFactory 34 | { 35 | public: 36 | static XnStatus CreateProperty(XnPropertyType nType, const XnChar* strName, XnProperty** ppProperty, XnUInt32 nSize = 0); 37 | static XnStatus FreeProperty(XnProperty* pProperty); 38 | }; 39 | 40 | #endif //__XN_ACTUAL_PROPERTY_FACTORY_H__ 41 | -------------------------------------------------------------------------------- /Source/XnDDK/XnSimpleBufferPool.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_SIMPLE_BUFFER_POOL_H__ 23 | #define __XN_SIMPLE_BUFFER_POOL_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnBufferPool.h" 29 | #include 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | class XnSimpleBufferPool : public XnBufferPool 35 | { 36 | public: 37 | XnSimpleBufferPool(XnUInt32 nBufferCount); 38 | ~XnSimpleBufferPool(); 39 | 40 | protected: 41 | virtual XnStatus AllocateBuffers(); 42 | virtual void DestroyBuffer(XnBufferInPool* pBuffer); 43 | }; 44 | 45 | #endif // __XN_SIMPLE_BUFFER_POOL_H__ -------------------------------------------------------------------------------- /Source/XnDDK/XnCodecFactory.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_CODEC_FACTORY_H__ 23 | #define __XN_CODEC_FACTORY_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | //--------------------------------------------------------------------------- 35 | // Types 36 | //--------------------------------------------------------------------------- 37 | class XN_DDK_CPP_API XnCodecFactory 38 | { 39 | public: 40 | static XnStatus Create(XnCompressionFormats nFormat, XnDeviceModule* pStream, const XnChar* StreamName, XnCodec** ppCodec); 41 | static void Destroy(XnCodec* pCodec); 42 | }; 43 | 44 | #endif //__XN_CODEC_FACTORY_H__ -------------------------------------------------------------------------------- /Include/XnIOStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_IO_STREAM_H__ 23 | #define __XN_IO_STREAM_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | #include 31 | 32 | //--------------------------------------------------------------------------- 33 | // Types 34 | //--------------------------------------------------------------------------- 35 | class XN_CORE_CPP_API XnIOStream 36 | { 37 | public: 38 | XnIOStream() {} 39 | virtual ~XnIOStream() {} 40 | 41 | virtual XnStatus WriteData(const XnUChar* pData, XnUInt32 nDataSize) = 0; 42 | virtual XnStatus ReadData(XnUChar* pData, XnUInt32 nDataSize) = 0; 43 | virtual XnStatus Init() { return XN_STATUS_OK; } 44 | virtual XnStatus Free() { return XN_STATUS_OK; } 45 | }; 46 | 47 | #endif //__XN_IO_STREAM_H__ -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnSensorOpenNiteImpl.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include 26 | #include "XnExportedSensorDevice.h" 27 | #include "XnSensorDepthGenerator.h" 28 | #include "XnSensorImageGenerator.h" 29 | #include "XnSensorIRGenerator.h" 30 | #include "XnSensorAudioGenerator.h" 31 | #include "XnSensorClient.h" 32 | 33 | //--------------------------------------------------------------------------- 34 | // Exporting 35 | //--------------------------------------------------------------------------- 36 | 37 | XN_EXPORT_MODULE(xn::Module) 38 | XN_EXPORT_DEVICE(XnExportedSensorDevice) 39 | XN_EXPORT_DEPTH(XnExportedSensorDepthGenerator) 40 | XN_EXPORT_IMAGE(XnExportedSensorImageGenerator) 41 | XN_EXPORT_IR(XnExportedSensorIRGenerator) 42 | XN_EXPORT_AUDIO(XnExportedSensorAudioGenerator) 43 | 44 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnJpegImageProcessor.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_JPEG_IMAGE_PROCESSOR_H__ 23 | #define __XN_JPEG_IMAGE_PROCESSOR_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnImageProcessor.h" 29 | #include 30 | 31 | //--------------------------------------------------------------------------- 32 | // Code 33 | //--------------------------------------------------------------------------- 34 | 35 | class XnJpegImageProcessor : public XnImageProcessor 36 | { 37 | public: 38 | XnJpegImageProcessor(XnSensorImageStream* pStream, XnSensorStreamHelper* pHelper); 39 | ~XnJpegImageProcessor(); 40 | 41 | protected: 42 | virtual void ProcessFramePacketChunk(const XnSensorProtocolResponseHeader* pHeader, const XnUChar* pData, XnUInt32 nDataOffset, XnUInt32 nDataSize); 43 | }; 44 | 45 | #endif // __XN_JPEG_IMAGE_PROCESSOR_H__ -------------------------------------------------------------------------------- /Source/External/LibJPEG/jcinit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcinit.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains initialization logic for the JPEG compressor. 9 | * This routine is in charge of selecting the modules to be executed and 10 | * making an initialization call to each one. 11 | * 12 | * Logically, this code belongs in jcmaster.c. It's split out because 13 | * linking this routine implies linking the entire compression library. 14 | * For a transcoding-only application, we want to be able to use jcmaster.c 15 | * without linking in the whole library. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | 22 | 23 | /* 24 | * Master selection of compression modules. 25 | * This is done once at the start of processing an image. We determine 26 | * which modules will be used and give them appropriate initialization calls. 27 | */ 28 | 29 | GLOBAL(void) 30 | jinit_compress_master (j_compress_ptr cinfo) 31 | { 32 | /* Initialize master control (includes parameter checking/processing) */ 33 | jinit_c_master_control(cinfo, FALSE /* full compression */); 34 | 35 | /* Preprocessing */ 36 | if (! cinfo->raw_data_in) { 37 | jinit_color_converter(cinfo); 38 | jinit_downsampler(cinfo); 39 | jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); 40 | } 41 | /* Forward DCT */ 42 | jinit_forward_dct(cinfo); 43 | /* Entropy encoding: either Huffman or arithmetic coding. */ 44 | if (cinfo->arith_code) { 45 | ERREXIT(cinfo, JERR_ARITH_NOTIMPL); 46 | } else { 47 | if (cinfo->progressive_mode) { 48 | #ifdef C_PROGRESSIVE_SUPPORTED 49 | jinit_phuff_encoder(cinfo); 50 | #else 51 | ERREXIT(cinfo, JERR_NOT_COMPILED); 52 | #endif 53 | } else 54 | jinit_huff_encoder(cinfo); 55 | } 56 | 57 | /* Need a full-image coefficient buffer in any multi-pass mode. */ 58 | jinit_c_coef_controller(cinfo, 59 | (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); 60 | jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); 61 | 62 | jinit_marker_writer(cinfo); 63 | 64 | /* We can now tell the memory manager to allocate virtual arrays. */ 65 | (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); 66 | 67 | /* Write the datastream header (SOI) immediately. 68 | * Frame and scan headers are postponed till later. 69 | * This lets application insert special markers after the SOI. 70 | */ 71 | (*cinfo->marker->write_file_header) (cinfo); 72 | } 73 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/Bayer.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_BAYER_H_ 23 | #define _XN_BAYER_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnDeviceSensor.h" 29 | 30 | //--------------------------------------------------------------------------- 31 | // Defines 32 | //--------------------------------------------------------------------------- 33 | #define BAYER_RED 0 34 | #define BAYER_GREEN 1 35 | #define BAYER_BLUE 2 36 | #define BAYER_BPP 3 37 | 38 | //--------------------------------------------------------------------------- 39 | // Functions Declaration 40 | //--------------------------------------------------------------------------- 41 | void BayerUpdateGamma(float fGammaCorr); 42 | void Bayer2RGB888(const XnUInt8* pBayerImage, XnUInt8* pRGBImage, XnUInt32 nXRes, XnUInt32 nYRes, XnUInt32 nDownSampleStep, XnUInt32 nBadPixels); 43 | 44 | #endif //_XN_BAYER_H_ 45 | -------------------------------------------------------------------------------- /Source/XnDDK/XnStreamReaderStreamHolder.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_STREAM_READER_STREAM_HOLDER_H__ 23 | #define __XN_STREAM_READER_STREAM_HOLDER_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnStreamDeviceStreamHolder.h" 29 | #include "XnShiftToDepthStreamHelper.h" 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | class XN_DDK_CPP_API XnStreamReaderStreamHolder : public XnStreamDeviceStreamHolder 35 | { 36 | public: 37 | XnStreamReaderStreamHolder(XnDeviceStream* pStream); 38 | ~XnStreamReaderStreamHolder(); 39 | 40 | virtual XnStatus Init(const XnActualPropertiesHash* pProps); 41 | virtual XnStatus Free(); 42 | 43 | private: 44 | // helpers 45 | XnShiftToDepthStreamHelper* m_pS2DHelper; 46 | }; 47 | 48 | #endif //__XN_STREAM_READER_STREAM_HOLDER_H__ 49 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnDataProcessorHolder.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_STREAM_PROCESSOR_HOLDER_H__ 23 | #define __XN_STREAM_PROCESSOR_HOLDER_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnDataProcessor.h" 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | class XnDataProcessorHolder 34 | { 35 | public: 36 | XnDataProcessorHolder(); 37 | ~XnDataProcessorHolder(); 38 | 39 | XnStatus Init(); 40 | 41 | void Replace(XnDataProcessor* pNew); 42 | 43 | void Lock(); 44 | void Unlock(); 45 | void ProcessData(const XnSensorProtocolResponseHeader* pHeader, const XnUChar* pData, XnUInt32 nDataOffset, XnUInt32 nDataSize); 46 | 47 | private: 48 | XN_CRITICAL_SECTION_HANDLE m_hLock; 49 | XnDataProcessor* m_pProcessor; 50 | }; 51 | 52 | #endif //__XN_STREAM_PROCESSOR_HOLDER_H__ -------------------------------------------------------------------------------- /Source/XnDDK/XnIntPropertySynchronizer.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_INT_PROPERTY_SYNCHRONIZER_H__ 23 | #define __XN_INT_PROPERTY_SYNCHRONIZER_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | typedef XnStatus (XN_CALLBACK_TYPE* XnIntPropertyConvertCallback)(XnUInt64 nSourceValue, XnUInt64* pnDestValue); 35 | 36 | class XN_DDK_CPP_API XnIntPropertySynchronizer 37 | { 38 | public: 39 | XnIntPropertySynchronizer(); 40 | ~XnIntPropertySynchronizer(); 41 | 42 | XnStatus RegisterSynchronization(XnIntProperty* pSource, XnIntProperty* pDestination, XnIntPropertyConvertCallback pConvertFunc = NULL); 43 | 44 | private: 45 | XnList m_Cookies; 46 | }; 47 | 48 | #endif //__XN_INT_PROPERTY_SYNCHRONIZER_H__ 49 | -------------------------------------------------------------------------------- /Source/XnDeviceFile/XnFileWriterStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_FILE_STREAM_WRITER_H__ 23 | #define __XN_FILE_STREAM_WRITER_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | class XnFileWriterStream : public XnStreamWriterStream 34 | { 35 | public: 36 | XnFileWriterStream(const XnChar* strType, const XnChar* strName, XnDataPacker* pDataPacker); 37 | ~XnFileWriterStream(); 38 | 39 | XnStatus Init(); 40 | 41 | inline XnUInt64 GetNumberOfFrames() const { return m_NumberOfFrames.GetValue(); } 42 | 43 | XnUInt64 m_nNumFramesPos; 44 | 45 | protected: 46 | XnStatus WriteImpl(XnStreamData* pStreamData); 47 | 48 | private: 49 | XnActualIntProperty m_NumberOfFrames; 50 | }; 51 | 52 | #endif //__XN_FILE_STREAM_WRITER_H__ 53 | -------------------------------------------------------------------------------- /Include/XnEE/XnVStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_STREAM_H 23 | #define _XNV_STREAM_H 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include "XnVModule.h" 30 | #include 31 | 32 | //--------------------------------------------------------------------------- 33 | // Types 34 | //--------------------------------------------------------------------------- 35 | 36 | /** 37 | * A stream is a specific kind of module - one that has a buffer attached to it. 38 | */ 39 | class XN_EE_CORE_API XnVStream : public XnVModule 40 | { 41 | public: 42 | XnVStream(); 43 | 44 | XnStatus GetBuffer(void*& pBuffer) const; 45 | XnStatus GetBufferSize(XnUInt32& nSize) const; 46 | XnStatus GetBufferAllocatedSize(XnUInt32& nSize) const; 47 | 48 | XnStatus CopyFrom(const XnVStream& other, XnUInt64 nTimestamp = 0); 49 | XnStatus CopyFrom(const void* pSource, XnUInt32 nDataSize, XnUInt64 nTimestamp = 0); 50 | }; 51 | 52 | #endif // XNV_STREAM_H 53 | -------------------------------------------------------------------------------- /Source/XnDDK/XnStreamWriterStream.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnStreamWriterStream.h" 26 | 27 | //--------------------------------------------------------------------------- 28 | // Code 29 | //--------------------------------------------------------------------------- 30 | XnStreamWriterStream::XnStreamWriterStream(const XnChar* strType, const XnChar* strName, XnDataPacker* pDataPacker) : 31 | XnDeviceStream(strType, strName), 32 | m_pDataPacker(pDataPacker), 33 | m_nFrameID(0) 34 | {} 35 | 36 | XnStreamWriterStream::~XnStreamWriterStream() 37 | {} 38 | 39 | XnStatus XnStreamWriterStream::WriteImpl(XnStreamData* pStreamData) 40 | { 41 | m_nFrameID++; 42 | pStreamData->nFrameID = m_nFrameID; 43 | return (XN_STATUS_OK); 44 | } 45 | 46 | XnStatus XnStreamWriterStream::CalcRequiredSize(XnUInt32* pnRequiredSize) const 47 | { 48 | // we use the same size we have now 49 | *pnRequiredSize = GetRequiredDataSize(); 50 | return XN_STATUS_OK; 51 | } -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnFirmwareCommands.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_FIRMWARE_COMMANDS_H__ 23 | #define __XN_FIRMWARE_COMMANDS_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnDeviceSensor.h" 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | 34 | /** 35 | * Implements the various firmware opcodes. 36 | * TODO: all opcodes should move here from XnHostProtocol.cpp. 37 | */ 38 | class XnFirmwareCommands 39 | { 40 | public: 41 | XnFirmwareCommands(XnDevicePrivateData* pDevicePrivateData); 42 | 43 | XnStatus GetFirmwareParam(XnUInt16 nParam, XnUInt16* pnValue); 44 | XnStatus SetFirmwareParam(XnUInt16 nParam, XnUInt16 nValue); 45 | XnStatus SetMultipleFirmwareParams(XnInnerParamData* aParams, XnUInt32 nCount); 46 | 47 | private: 48 | XnDevicePrivateData* m_pDevicePrivateData; 49 | }; 50 | 51 | #endif //__XN_FIRMWARE_COMMANDS_H__ -------------------------------------------------------------------------------- /Platform/Linux/Build/Common/CommonJavaMakefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Primesense template makefile. 3 | # This file should not be made, but only included from other makefiles. 4 | # By default, this makefile compiles in release. To compile a debug version: 5 | # make CFG=Debug 6 | # 7 | # Project makefile should define the following BEFORE including this file: 8 | # SRC_FILES - a list of all source files 9 | # JAR_NAME - name of the package 10 | # BIN_DIR - Bin directory (output dir) 11 | # INC_DIRS - a list of additional include directories 12 | # LIB_DIRS - a list of additional library directories 13 | # USED_JARS - a list of libraries used 14 | # MAIN_CLASS - [Optional] for executable jar 15 | ############################################################################# 16 | 17 | # take this file's dir 18 | COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST))) 19 | 20 | include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak 21 | 22 | nullstring := 23 | space := $(nullstring) # end of the line 24 | 25 | USED_JARS_OPTION = 26 | ifneq "$(USED_JARS)" "" 27 | USED_JARS_PATH = $(foreach jar, $(USED_JARS), $(OUT_DIR)/$(jar).jar /usr/share/java/$(jar).jar) 28 | USED_JARS_OPTION = -cp $(subst $(space),:,$(strip $(USED_JARS_PATH))) 29 | endif 30 | 31 | OUTPUT_NAME = $(JAR_NAME).jar 32 | 33 | # create manifest file if needed 34 | JAR_MANIFEST_CREATE_COMMAND := 35 | MANIFEST_FILE := 36 | JAR_OPTIONS = -cf 37 | 38 | ifneq (, $(if $(or $(MAIN_CLASS), $(USED_JARS)),1)) 39 | JAR_OPTIONS = -cfm 40 | MANIFEST_FILE = Manifest.txt 41 | JAR_MANIFEST_CREATE_COMMAND = ( 42 | ifneq (,$(MAIN_CLASS)) 43 | JAR_MANIFEST_CREATE_COMMAND += echo "Main-Class: $(MAIN_CLASS)"; 44 | endif 45 | ifneq (,$(USED_JARS)) 46 | JAR_MANIFEST_CREATE_COMMAND += echo "Class-Path: $(USED_JARS_PATH)"; 47 | endif 48 | JAR_MANIFEST_CREATE_COMMAND += ) > $(MANIFEST_FILE) 49 | endif 50 | 51 | CREATE_SHORTCUT = 52 | ifneq (, $(MAIN_CLASS)) 53 | SHORTCUT = $(OUT_DIR)/$(JAR_NAME) 54 | CREATE_SHORTCUT = echo java -jar $(OUTPUT_NAME) > $(SHORTCUT); chmod +x $(SHORTCUT) 55 | endif 56 | 57 | ############################################################################# 58 | # Targets 59 | ############################################################################# 60 | include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak 61 | 62 | .PHONY: clean-manifest clean-int 63 | 64 | # Final output file 65 | $(OUTPUT_FILE): | $(INT_DIR) 66 | javac $(USED_JARS_OPTION) -d $(INT_DIR) $(SRC_FILES) 67 | $(JAR_MANIFEST_CREATE_COMMAND) 68 | jar $(JAR_OPTIONS) $@ $(MANIFEST_FILE) -C $(INT_DIR) . 69 | $(CREATE_SHORTCUT) 70 | 71 | clean-manifest: 72 | rm -rf $(MANIFEST_FILE) 73 | 74 | clean-int: 75 | rm -rf $(INT_DIR) 76 | 77 | clean: clean-manifest clean-int 78 | 79 | 80 | -------------------------------------------------------------------------------- /Include/XnIOFileStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_IO_FILE_STREAM_H__ 23 | #define __XN_IO_FILE_STREAM_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | class XN_CORE_CPP_API XnIOFileStream : public XnIOStream 35 | { 36 | public: 37 | XnIOFileStream(const XnChar* pcsFileName, XnUInt32 nFlags); 38 | ~XnIOFileStream() { Free(); } 39 | 40 | virtual XnStatus WriteData(const XnUChar* pData, XnUInt32 nDataSize); 41 | virtual XnStatus ReadData(XnUChar* pData, XnUInt32 nDataSize); 42 | virtual XnStatus Init(); 43 | virtual XnStatus Free(); 44 | 45 | XnStatus Tell(XnUInt64* pnOffset); 46 | XnStatus Seek(XnUInt64 nOffset); 47 | 48 | private: 49 | const XnChar* m_pcsFileName; 50 | XnUInt32 m_nFlags; 51 | XN_FILE_HANDLE m_hFile; 52 | }; 53 | 54 | #endif //__XN_IO_FILE_STREAM_H__ -------------------------------------------------------------------------------- /Source/XnCore/XnBuffer.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnBuffer.h" 26 | 27 | //--------------------------------------------------------------------------- 28 | // Code 29 | //--------------------------------------------------------------------------- 30 | XnStatus XnBuffer::Allocate(XnUInt32 nAllocSize) 31 | { 32 | Free(); 33 | XN_VALIDATE_ALIGNED_CALLOC(m_pData, XnUChar, nAllocSize, XN_DEFAULT_MEM_ALIGN); 34 | m_nMaxSize = nAllocSize; 35 | m_nSize = 0; 36 | m_bAllocated = TRUE; 37 | return (XN_STATUS_OK); 38 | } 39 | 40 | void XnBuffer::SetExternalBuffer(XnUChar* pBuffer, XnUInt32 nSize) 41 | { 42 | Free(); 43 | m_pData = pBuffer; 44 | m_nMaxSize = nSize; 45 | m_nSize = 0; 46 | m_bAllocated = FALSE; 47 | } 48 | 49 | XnStatus XnBuffer::Write(const XnUChar* pData, XnUInt32 nDataSize) 50 | { 51 | if (GetFreeSpaceInBuffer() < nDataSize) 52 | return XN_STATUS_INTERNAL_BUFFER_TOO_SMALL; 53 | 54 | UnsafeWrite(pData, nDataSize); 55 | 56 | return (XN_STATUS_OK); 57 | } 58 | -------------------------------------------------------------------------------- /Source/XnDDK/XnActualRealProperty.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnActualRealProperty.h" 26 | 27 | //--------------------------------------------------------------------------- 28 | // Code 29 | //--------------------------------------------------------------------------- 30 | XnActualRealProperty::XnActualRealProperty(const XnChar* strName, XnDouble dInitialValue /* = 0.0 */, const XnChar* strModule /* = "" */) : 31 | XnRealProperty(strName, &m_dValue, strModule), 32 | m_dValue(dInitialValue) 33 | { 34 | // set a callback for get operations 35 | UpdateGetCallback(GetCallback, this); 36 | } 37 | 38 | XnStatus XnActualRealProperty::SetCallback(XnActualRealProperty* pSender, XnDouble dValue, void* /*pCookie*/) 39 | { 40 | return pSender->UnsafeUpdateValue(dValue); 41 | } 42 | 43 | XnStatus XN_CALLBACK_TYPE XnActualRealProperty::GetCallback(const XnActualRealProperty* pSender, XnDouble* pdValue, void* /*pCookie*/) 44 | { 45 | *pdValue = pSender->GetValue(); 46 | return XN_STATUS_OK; 47 | } 48 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/Uncomp.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XN_UNCOMP_H_ 23 | #define _XN_UNCOMP_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnDeviceSensor.h" 29 | 30 | //--------------------------------------------------------------------------- 31 | // Defines 32 | //--------------------------------------------------------------------------- 33 | 34 | //--------------------------------------------------------------------------- 35 | // Functions Declaration 36 | //--------------------------------------------------------------------------- 37 | XnStatus XnStreamUncompressImageNew(const XnUInt8* pInput, const XnUInt32 nInputSize, 38 | XnUInt8* pOutput, XnUInt32* pnOutputSize, XnUInt16 nLineSize, 39 | XnUInt32* pnActualRead, XnBool bLastPart); 40 | XnStatus XnStreamUncompressYUVImagePS(const XnUInt8* pInput, const XnUInt32 nInputSize, 41 | XnUInt8* pOutput, XnUInt32* pnOutputSize, XnUInt16 nLineSize, 42 | XnUInt32* pnActualRead, XnBool bLastPart); 43 | 44 | #endif //_XN_UNCOMP_H_ 45 | -------------------------------------------------------------------------------- /Source/XnDDK/XnActualIntProperty.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnActualIntProperty.h" 26 | 27 | //--------------------------------------------------------------------------- 28 | // Code 29 | //--------------------------------------------------------------------------- 30 | XnActualIntProperty::XnActualIntProperty(const XnChar* strName, XnUInt64 nInitialValue /* = 0 */, const XnChar* strModule /* = "" */) : 31 | XnIntProperty(strName, &m_nValue, strModule), 32 | m_nValue(nInitialValue) 33 | { 34 | // set a callback for get operations 35 | UpdateGetCallback(GetCallback, this); 36 | } 37 | 38 | XnStatus XN_CALLBACK_TYPE XnActualIntProperty::SetCallback(XnActualIntProperty* pSender, XnUInt64 nValue, void* /*pCookie*/) 39 | { 40 | return pSender->UnsafeUpdateValue(nValue); 41 | } 42 | 43 | XnStatus XN_CALLBACK_TYPE XnActualIntProperty::GetCallback(const XnActualIntProperty* pSender, XnUInt64* pnValue, void* /*pCookie*/) 44 | { 45 | *pnValue = pSender->GetValue(); 46 | return XN_STATUS_OK; 47 | } 48 | -------------------------------------------------------------------------------- /Include/XnEE/XnVCenterOfMass.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_CENTER_OF_MASS_H_ 23 | #define _XNV_CENTER_OF_MASS_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnVDepthMap.h" 29 | #include "XnVStatus.h" 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | 35 | /** 36 | * Calculate projective Center of Mass - the average of all pixels that have depth. 37 | */ 38 | class XN_EE_FW_API XnVCenterOfMass 39 | { 40 | public: 41 | XnVCenterOfMass() 42 | {} 43 | 44 | /** 45 | * Calculates the center of mass of the given depth map 46 | * 47 | * @param dmMap [in] The depth map on which to run 48 | * @param ptCoM [out] The center of mass found. 49 | * 50 | * @return XN_STATUS_OK on success, XNV_STATUS_NOT_ENOUGH_INFORMATION if no points exist in the depth map. 51 | */ 52 | XnStatus Run(const XnVDepthMap& dmMap, XnVPoint& ptCoM); 53 | }; 54 | 55 | #endif //_XNV_CENTER_OF_MASS_H_ 56 | 57 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnFirmwareCommands.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnFirmwareCommands.h" 26 | #include "XnHostProtocol.h" 27 | 28 | //--------------------------------------------------------------------------- 29 | // Code 30 | //--------------------------------------------------------------------------- 31 | XnFirmwareCommands::XnFirmwareCommands(XnDevicePrivateData* pDevicePrivateData) : 32 | m_pDevicePrivateData(pDevicePrivateData) 33 | { 34 | } 35 | 36 | XnStatus XnFirmwareCommands::GetFirmwareParam(XnUInt16 nParam, XnUInt16* pnValue) 37 | { 38 | return XnHostProtocolGetParam(m_pDevicePrivateData, nParam, *pnValue); 39 | } 40 | 41 | XnStatus XnFirmwareCommands::SetFirmwareParam(XnUInt16 nParam, XnUInt16 nValue) 42 | { 43 | return XnHostProtocolSetParam(m_pDevicePrivateData, nParam, nValue); 44 | } 45 | 46 | XnStatus XnFirmwareCommands::SetMultipleFirmwareParams(XnInnerParamData* aParams, XnUInt32 nCount) 47 | { 48 | return XnHostProtocolSetMultipleParams(m_pDevicePrivateData, (XnUInt16)nCount, aParams); 49 | } 50 | -------------------------------------------------------------------------------- /Include/XnEE/XnVPointContainer.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_POINT_CONTAINER_H_ 23 | #define _XNV_POINT_CONTAINER_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | 29 | #include "XnVPoint.h" 30 | #include "XnVContainer.h" 31 | 32 | //--------------------------------------------------------------------------- 33 | // Types 34 | //--------------------------------------------------------------------------- 35 | 36 | /** 37 | * This is a specific XnVContainer, for holding XnVPoint instances. 38 | */ 39 | 40 | class XN_EE_CORE_API XnVPointContainer : public XnVContainer 41 | { 42 | public: 43 | XnVPointContainer(XnUInt32 nCapacity) : 44 | XnVContainer(nCapacity, sizeof(XnVPoint)) 45 | {} 46 | 47 | inline XnVPoint& operator[](XnInt32 nIndex) 48 | { 49 | return ((XnVPoint*)Data())[nIndex]; 50 | } 51 | inline const XnVPoint& operator[](XnInt32 nIndex) const 52 | { 53 | return ((XnVPoint*)Data())[nIndex]; 54 | } 55 | 56 | inline void Add(const XnVPoint& ptPoint); 57 | protected: 58 | }; 59 | 60 | #endif //_XNV_POINT_CONTAINER_H_ 61 | 62 | -------------------------------------------------------------------------------- /Include/XnEE/XnVBodyPart.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_BODY_PART_H 23 | #define _XNV_BODY_PART_H 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | 34 | /** 35 | * This object holds a single body part. A basic body part is defined by a point and confidence. 36 | */ 37 | class XN_EE_FW_API XnVBodyPart 38 | { 39 | public: 40 | XnVBodyPart() 41 | {} 42 | XnVBodyPart(const XnVBodyPart& other) 43 | { 44 | m_Confidence = other.Confidence(); 45 | m_Position = other.m_Position; 46 | } 47 | 48 | const XnFloat& Confidence() const 49 | {return m_Confidence;} 50 | XnFloat& Confidence() 51 | {return m_Confidence;} 52 | 53 | const XnVPoint& Position() const 54 | {return m_Position;} 55 | XnVPoint& Position() 56 | {return m_Position;} 57 | protected: 58 | XnFloat m_Confidence; 59 | XnVPoint m_Position; 60 | 61 | }; 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /Include/XnIONetworkStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_IO_NETWORK_STREAM_H__ 23 | #define __XN_IO_NETWORK_STREAM_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | class XN_CORE_CPP_API XnIONetworkStream : public XnIOStream 35 | { 36 | public: 37 | XnIONetworkStream(XN_SOCKET_HANDLE hSocket); 38 | ~XnIONetworkStream() { Free(); } 39 | 40 | virtual XnStatus WriteData(const XnUChar* pData, XnUInt32 nDataSize); 41 | virtual XnStatus ReadData(XnUChar* pData, XnUInt32 nDataSize); 42 | virtual XnStatus Init(); 43 | virtual XnStatus Free(); 44 | inline XnBool IsConnected() const { return m_bIsConnected; } 45 | void SetReadTimeout(XnUInt32 nMicrosecondsReadTimeout); 46 | 47 | private: 48 | XnUInt32 m_nReadTimeout; 49 | XN_SOCKET_HANDLE m_hSocket; 50 | XnBool m_bIsConnected; 51 | 52 | }; 53 | 54 | #endif //__XN_IO_NETWORK_STREAM_H__ -------------------------------------------------------------------------------- /Include/XnEE/XnVClosestPointFinder.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_CLOSEST_POINT_FINDER_H_ 23 | #define _XNV_CLOSEST_POINT_FINDER_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnVDepthMap.h" 29 | //--------------------------------------------------------------------------- 30 | // Types 31 | //--------------------------------------------------------------------------- 32 | 33 | /** 34 | * Calculate Projective Closest Point - find the minimum value of depth and the 35 | * pixel it was found in. 36 | */ 37 | class XN_EE_FW_API XnVClosestPointFinder 38 | { 39 | public: 40 | XnVClosestPointFinder() 41 | {} 42 | 43 | /** 44 | * Find the closest point in the given depth map 45 | * 46 | * @param [in] dmMap The depth map on which to run 47 | * @param [out] ptClosest The closest point in the depth map 48 | * 49 | * @return XN_STATUS_OK on success, XNV_STATUS_NOT_ENOUGH_INFORMATION if no points exist in the depth map. 50 | */ 51 | XnStatus Run(const XnVDepthMap& dmMap, XnVPoint& ptClosest); 52 | }; 53 | 54 | #endif //_XNV_CLOSEST_POINT_FINDER_H_ 55 | 56 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnUncompressedDepthProcessor.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_UNCOMPRESSED_DEPTH_PROCESSOR_H__ 23 | #define __XN_UNCOMPRESSED_DEPTH_PROCESSOR_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnDepthProcessor.h" 29 | 30 | //--------------------------------------------------------------------------- 31 | // Code 32 | //--------------------------------------------------------------------------- 33 | 34 | class XnUncompressedDepthProcessor : public XnDepthProcessor 35 | { 36 | public: 37 | XnUncompressedDepthProcessor(XnSensorDepthStream* pStream, XnSensorStreamHelper* pHelper); 38 | virtual ~XnUncompressedDepthProcessor(); 39 | 40 | protected: 41 | //--------------------------------------------------------------------------- 42 | // Overridden Functions 43 | //--------------------------------------------------------------------------- 44 | virtual void ProcessFramePacketChunk(const XnSensorProtocolResponseHeader* pHeader, const XnUChar* pData, XnUInt32 nDataOffset, XnUInt32 nDataSize); 45 | }; 46 | 47 | #endif //__XN_UNCOMPRESSED_DEPTH_PROCESSOR_H__ 48 | -------------------------------------------------------------------------------- /Include/XnEE/XnVHead.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_HEAD_H 23 | #define _XNV_HEAD_H 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | 35 | /** 36 | * A head is a body part that has a front vector and an up vector. 37 | */ 38 | 39 | class XN_EE_FW_API XnVHead : public XnVBodyPart 40 | { 41 | public: 42 | XnVHead() 43 | {} 44 | XnVHead(const XnVHead& other) 45 | { 46 | m_FrontVector = other.m_FrontVector; 47 | m_UpVector = other.m_UpVector; 48 | } 49 | 50 | const XnV3DVector& FrontVector() const 51 | {return m_FrontVector;} 52 | XnV3DVector& FrontVector() 53 | {return m_FrontVector;} 54 | 55 | const XnV3DVector& UpVector() const 56 | {return m_UpVector;} 57 | XnV3DVector& UpVector() 58 | {return m_UpVector;} 59 | protected: 60 | XnV3DVector m_FrontVector, m_UpVector; 61 | }; 62 | 63 | #endif // _XNV_HEAD_H 64 | -------------------------------------------------------------------------------- /Include/XnEE/XnVTorso.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef XNV_TORSO_H 23 | #define XNV_TORSO_H 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | 35 | /** 36 | * A torso is a body part that has a front vector and an up vector. 37 | */ 38 | 39 | class XN_EE_FW_API XnVTorso : public XnVBodyPart 40 | { 41 | public: 42 | XnVTorso() 43 | {} 44 | XnVTorso(const XnVTorso& other) 45 | { 46 | m_FrontVector = other.m_FrontVector; 47 | m_UpVector = other.m_UpVector; 48 | } 49 | 50 | const XnV3DVector& FrontVector() const 51 | {return m_FrontVector;} 52 | XnV3DVector& FrontVector() 53 | {return m_FrontVector;} 54 | 55 | const XnV3DVector& UpVector() const 56 | {return m_UpVector;} 57 | XnV3DVector& UpVector() 58 | {return m_UpVector;} 59 | protected: 60 | XnV3DVector m_FrontVector, m_UpVector; 61 | 62 | }; 63 | 64 | #endif // XNV_TORSO_H 65 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnUncompressedYUVImageProcessor.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_UNCOMPRESSED_YUV_IMAGE_PROCESSOR_H__ 23 | #define __XN_UNCOMPRESSED_YUV_IMAGE_PROCESSOR_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnImageProcessor.h" 29 | 30 | //--------------------------------------------------------------------------- 31 | // Code 32 | //--------------------------------------------------------------------------- 33 | 34 | class XnUncompressedYUVImageProcessor : public XnImageProcessor 35 | { 36 | public: 37 | XnUncompressedYUVImageProcessor(XnSensorImageStream* pStream, XnSensorStreamHelper* pHelper); 38 | ~XnUncompressedYUVImageProcessor(); 39 | 40 | //--------------------------------------------------------------------------- 41 | // Overridden Functions 42 | //--------------------------------------------------------------------------- 43 | protected: 44 | virtual void ProcessFramePacketChunk(const XnSensorProtocolResponseHeader* pHeader, const XnUChar* pData, XnUInt32 nDataOffset, XnUInt32 nDataSize); 45 | }; 46 | 47 | #endif //__XN_UNCOMPRESSED_YUV_IMAGE_PROCESSOR_H__ 48 | -------------------------------------------------------------------------------- /Source/XnDDK/XnActualStringProperty.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnActualStringProperty.h" 26 | 27 | //--------------------------------------------------------------------------- 28 | // Code 29 | //--------------------------------------------------------------------------- 30 | XnActualStringProperty::XnActualStringProperty(const XnChar* strName, const XnChar* strInitialValue /* = "" */, const XnChar* strModule /* = "" */ ) : 31 | XnStringProperty(strName, m_strValue, strModule) 32 | { 33 | strncpy(m_strValue, strInitialValue, XN_DEVICE_MAX_STRING_LENGTH); 34 | // set a callback for get operations 35 | UpdateGetCallback(GetCallback, this); 36 | } 37 | 38 | XnStatus XnActualStringProperty::SetCallback(XnActualStringProperty* pSender, const XnChar* strValue, void* /*pCookie*/) 39 | { 40 | return pSender->UnsafeUpdateValue(strValue); 41 | } 42 | 43 | XnStatus XnActualStringProperty::GetCallback(const XnActualStringProperty* pSender, XnChar* csValue, void* /*pCookie*/) 44 | { 45 | strncpy(csValue, pSender->GetValue(), XN_DEVICE_MAX_STRING_LENGTH); 46 | return XN_STATUS_OK; 47 | } 48 | -------------------------------------------------------------------------------- /Source/XnDeviceFile/XnExportedFileDevice.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_EXPORTED_SENSOR_DEVICE_H__ 23 | #define __XN_EXPORTED_SENSOR_DEVICE_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include "XnDeviceFileReader.h" 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | class XnExportedFileDevice : public xn::ModuleExportedProductionNode 35 | { 36 | public: 37 | static void FillCommonDescriptionFields(XnProductionNodeDescription* pDescription); 38 | void GetDescription(XnProductionNodeDescription* pDescription); 39 | XnStatus EnumerateProductionTrees(xn::Context& context, xn::NodeInfoList& TreesList, xn::EnumerationErrors* pErrors); 40 | XnStatus Create(xn::Context& context, const XnChar* strInstanceName, const XnChar* strCreationInfo, xn::NodeInfoList* pNeededTrees, const XnChar* strConfigurationDir, xn::ModuleProductionNode** ppInstance); 41 | void Destroy(xn::ModuleProductionNode* pInstance); 42 | }; 43 | 44 | #endif // __XN_EXPORTED_SENSOR_DEVICE_H__ -------------------------------------------------------------------------------- /Include/XnEE/XnVEventHandlers.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_V_EVENT_HANDLERS_H__ 23 | #define __XN_V_EVENT_HANDLERS_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include "XnVStatus.h" 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | class XN_EE_CORE_API XnVModulePropertyChangedHandler 35 | { 36 | public: 37 | virtual ~XnVModulePropertyChangedHandler() {} 38 | virtual void OnModulePropertyChanged(const XnChar* strModule, const XnChar* strProperty) = 0; 39 | }; 40 | 41 | class XN_EE_CORE_API XnVNewDataFromStreamHandler 42 | { 43 | public: 44 | virtual ~XnVNewDataFromStreamHandler() {} 45 | virtual void OnNewDataFromStream(const XnChar* strStream) = 0; 46 | }; 47 | 48 | class XN_EE_CORE_API XnVStreamCollectionChangedHandler 49 | { 50 | public: 51 | virtual ~XnVStreamCollectionChangedHandler() {} 52 | virtual void OnStreamAdded(const XnChar* strStream) = 0; 53 | virtual void OnStreamRemoved(const XnChar* strStream) = 0; 54 | }; 55 | 56 | #endif //__XN_V_EVENT_HANDLERS_H__ 57 | -------------------------------------------------------------------------------- /Source/XnDDK/XnDeviceModuleHolder.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_DEVICE_MODULE_HOLDER_H__ 23 | #define __XN_DEVICE_MODULE_HOLDER_H__ 24 | 25 | #include "XnActualPropertiesHash.h" 26 | #include "XnDeviceModule.h" 27 | 28 | class XN_DDK_CPP_API XnDeviceModuleHolder 29 | { 30 | public: 31 | /** 32 | * Creates a new module holder. 33 | * 34 | * @param pModule [in] The actual module. 35 | * @param bAllowNewProps [in] When TRUE, Init() method will create non-existing properties. 36 | */ 37 | XnDeviceModuleHolder(XnDeviceModule* pModule, XnBool bAllowNewProps = FALSE); 38 | virtual ~XnDeviceModuleHolder(); 39 | 40 | virtual XnStatus Init(const XnActualPropertiesHash* pInitialValues); 41 | 42 | inline XnDeviceModule* GetModule() const { return m_pModule; } 43 | 44 | protected: 45 | virtual XnStatus Free(); 46 | 47 | private: 48 | XnStatus UnsafeSetProperties(const XnActualPropertiesHash& props); 49 | XnStatus CreateProperty(XnProperty* pRequestProp); 50 | XnStatus UnsafeSetProperty(const XnProperty* pRequest, XnProperty* pProp); 51 | 52 | XnDeviceModule* m_pModule; 53 | XnPropertiesList m_Allocated; 54 | XnBool m_bAllowNewProps; 55 | }; 56 | 57 | XN_DECLARE_LIST_DECL(XN_DDK_CPP_API, XnDeviceModuleHolder*, XnDeviceModuleHolderList) 58 | 59 | 60 | #endif //__XN_DEVICE_MODULE_HOLDER_H__ 61 | -------------------------------------------------------------------------------- /Include/XnEE/XnVLabelPruner.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_LABEL_PRUNER_H_ 23 | #define _XNV_LABEL_PRUNER_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnVLabeledObject.h" 29 | #include "XnVDepthMap.h" 30 | #include "XnVLabelMatrix.h" 31 | 32 | //--------------------------------------------------------------------------- 33 | // Types 34 | //----------------------------------------------------------------------- 35 | 36 | /** 37 | * This algorithm removes from the input XnVDepthMap the values where the matching XnVLabelMatrix has 38 | * a value different from the input XnVObject::XnVLabel. 39 | */ 40 | 41 | class XN_EE_FW_API XnVLabelPruner 42 | { 43 | public: 44 | /** 45 | * Set NoSample value in all the places in the depth map that correspond with a label other than 46 | * the desired one. 47 | * 48 | * @param [in,out] dmMap The depth map to be pruned 49 | * @param [in] lmLabels Label per pixel 50 | * @param [in] nLabel The label we want to keep 51 | */ 52 | XnStatus Run(XnVDepthMap& dmMap, const XnVLabelMatrix& lmLabels, const XnVObject::XnVLabel nLabel); 53 | XnStatus Run(XnVLabeledObject& lo); 54 | }; 55 | 56 | #endif // _XNV_LABEL_PRUNER_H_ 57 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnSensorFirmware.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_SENSOR_FIRMWARE_H__ 23 | #define __XN_SENSOR_FIRMWARE_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnFirmwareInfo.h" 29 | #include "XnFirmwareCommands.h" 30 | #include "XnSensorFirmwareParams.h" 31 | #include "XnFirmwareStreams.h" 32 | 33 | //--------------------------------------------------------------------------- 34 | // Types 35 | //--------------------------------------------------------------------------- 36 | class XnSensorFirmware 37 | { 38 | public: 39 | XnSensorFirmware(XnDevicePrivateData* pDevicePrivateData); 40 | XnStatus Init(XnBool bReset); 41 | void Free(); 42 | 43 | inline XnFirmwareInfo* GetInfo() { return m_pInfo; } 44 | inline XnFirmwareCommands* GetCommands() { return &m_Commands; } 45 | inline XnSensorFirmwareParams* GetParams() { return &m_Params; } 46 | inline XnFirmwareStreams* GetStreams() { return &m_Streams; } 47 | 48 | private: 49 | XnFirmwareInfo* m_pInfo; 50 | XnFirmwareCommands m_Commands; 51 | XnSensorFirmwareParams m_Params; 52 | XnFirmwareStreams m_Streams; 53 | XnDevicePrivateData* m_pDevicePrivateData; 54 | }; 55 | 56 | #endif //__XN_SENSOR_FIRMWARE_H__ -------------------------------------------------------------------------------- /Source/XnFormats/XnCodec.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_CODEC_H__ 23 | #define __XN_CODEC_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include "XnFormats.h" 33 | 34 | //--------------------------------------------------------------------------- 35 | // Types 36 | //--------------------------------------------------------------------------- 37 | class XN_FORMATS_CPP_API XnCodec 38 | { 39 | public: 40 | static XnCompressionFormats GetCompressionFormatFromCodecID(XnCodecID codecID); 41 | static XnCodecID GetCodecIDFromCompressionFormat(XnCompressionFormats format); 42 | 43 | XnCodec() {} 44 | virtual ~XnCodec() {} 45 | 46 | virtual XnStatus Init() { return XN_STATUS_OK; } 47 | 48 | virtual XnCompressionFormats GetCompressionFormat() const = 0; 49 | 50 | virtual XnStatus Compress(const XnUChar* pData, XnUInt32 nDataSize, XnUChar* pCompressedData, XnUInt32* pnCompressedDataSize) = 0; 51 | 52 | virtual XnStatus Decompress(const XnUChar* pCompressedData, XnUInt32 nCompressedDataSize, XnUChar* pData, XnUInt32* pnDataSize) = 0; 53 | }; 54 | 55 | #endif //__XN_CODEC_H__ 56 | -------------------------------------------------------------------------------- /Include/XnEE/XnVObject.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_OBJECT_H_ 23 | #define _XNV_OBJECT_H_ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnV3DVector.h" 29 | //--------------------------------------------------------------------------- 30 | // Types 31 | //--------------------------------------------------------------------------- 32 | 33 | /** 34 | * Any Object in the scene, either inserted by the user or that really exists there 35 | * and can be defined, is an XnVObject. 36 | * There are 2 subclasses of XnVObject: XnVVirtualObject, for any user-created object, 37 | * such as boxes and spheres, and XnVRealObject, for any object that really exist 38 | * in the scene, such as hands, connected components and collision. 39 | */ 40 | 41 | class XN_EE_FW_API XnVObject 42 | { 43 | public: 44 | typedef XnUInt16 XnVLabel; 45 | 46 | XnVLabel GetID() const {return m_nID;} 47 | void SetID(XnVLabel Label) {m_nID = Label;} 48 | const XnVPoint& GetPoint() const {return m_ptRepresentative;} 49 | void SetPoint(const XnV3DVector& ptPoint) {m_ptRepresentative = ptPoint;} 50 | protected: 51 | XnVLabel m_nID; 52 | XnV3DVector m_ptRepresentative; 53 | }; 54 | 55 | #endif //_XNV_OBJECT_H_ 56 | 57 | -------------------------------------------------------------------------------- /Include/XnEE/XnVHand.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef _XNV_HAND_H 23 | #define _XNV_HAND_H 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | 34 | /** 35 | * A hand is comprised of its 3 joints: The shoulder, the elbow and the palm. 36 | */ 37 | class XN_EE_FW_API XnVHand 38 | { 39 | public: 40 | XnVHand() 41 | {} 42 | XnVHand(const XnVHand& other) 43 | { 44 | this->m_Elbow = other.m_Elbow; 45 | this->m_Palm = other.m_Palm; 46 | this->m_Shoulder = other.m_Shoulder; 47 | } 48 | 49 | const XnVBodyPart& Shoulder() const 50 | {return m_Shoulder;} 51 | XnVBodyPart& Shoulder() 52 | {return m_Shoulder;} 53 | 54 | const XnVBodyPart& Elbow() const 55 | {return m_Elbow;} 56 | XnVBodyPart& Elbow() 57 | {return m_Elbow;} 58 | 59 | const XnVBodyPart& Palm() const 60 | {return m_Palm;} 61 | XnVBodyPart& Palm() 62 | {return m_Palm;} 63 | 64 | protected: 65 | XnVBodyPart m_Shoulder; 66 | XnVBodyPart m_Elbow; 67 | XnVBodyPart m_Palm; 68 | }; 69 | 70 | #endif 71 | 72 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/IXnSensorStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __I_XN_SENSOR_STREAM_H__ 23 | #define __I_XN_SENSOR_STREAM_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include 29 | #include 30 | #include "XnSharedMemoryBufferPool.h" 31 | 32 | //--------------------------------------------------------------------------- 33 | // Forward Declarations 34 | //--------------------------------------------------------------------------- 35 | class XnDataProcessor; 36 | 37 | //--------------------------------------------------------------------------- 38 | // Types 39 | //--------------------------------------------------------------------------- 40 | class IXnSensorStream 41 | { 42 | public: 43 | ~IXnSensorStream() {} 44 | 45 | virtual void GetFirmwareStreamConfig(XnResolutions* pnRes, XnUInt32* pnFPS) = 0; 46 | virtual XnStatus ConfigureStreamImpl() = 0; 47 | virtual XnStatus OpenStreamImpl() = 0; 48 | virtual XnStatus CloseStreamImpl() = 0; 49 | virtual XnStatus CreateDataProcessor(XnDataProcessor** ppProcessor) = 0; 50 | virtual XnStatus MapPropertiesToFirmware() = 0; 51 | virtual XnSharedMemoryBufferPool* GetSharedMemoryBuffer() = 0; 52 | }; 53 | 54 | #endif //__I_XN_SENSOR_STREAM_H__ 55 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnJpegImageProcessor.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | //--------------------------------------------------------------------------- 23 | // Includes 24 | //--------------------------------------------------------------------------- 25 | #include "XnJpegImageProcessor.h" 26 | #include 27 | 28 | //--------------------------------------------------------------------------- 29 | // Code 30 | //--------------------------------------------------------------------------- 31 | 32 | XnJpegImageProcessor::XnJpegImageProcessor(XnSensorImageStream* pStream, XnSensorStreamHelper* pHelper) : 33 | XnImageProcessor(pStream, pHelper, TRUE) 34 | { 35 | SetAllowDoubleSOFPackets(TRUE); 36 | } 37 | 38 | XnJpegImageProcessor::~XnJpegImageProcessor() 39 | { 40 | } 41 | 42 | void XnJpegImageProcessor::ProcessFramePacketChunk(const XnSensorProtocolResponseHeader* /*pHeader*/, const XnUChar* pData, XnUInt32 /*nDataOffset*/, XnUInt32 nDataSize) 43 | { 44 | XN_PROFILING_START_SECTION("XnJpegImageProcessor::ProcessFramePacketChunk"); 45 | 46 | // when image is uncompressed, we can just copy it directly to write buffer 47 | XnBuffer* pWriteBuffer = GetWriteBuffer(); 48 | 49 | // make sure we have enough room 50 | if (CheckWriteBufferForOverflow(nDataSize)) 51 | { 52 | pWriteBuffer->UnsafeWrite(pData, nDataSize); 53 | } 54 | 55 | XN_PROFILING_END_SECTION; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Source/XnDeviceSensorV2/XnCmosInfo.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_CMOS_INFO_H__ 23 | #define __XN_CMOS_INFO_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnSensorFirmware.h" 29 | 30 | //--------------------------------------------------------------------------- 31 | // Types 32 | //--------------------------------------------------------------------------- 33 | typedef struct 34 | { 35 | XnCmosBlankingInformation BlankingInfo; 36 | XnResolutions nRes; 37 | XnUInt32 nFPS; 38 | } XnCmosBlankingData; 39 | 40 | class XnCmosInfo 41 | { 42 | public: 43 | XnCmosInfo(XnSensorFirmware* pFirmware, XnDevicePrivateData* pDevicePrivateData); 44 | ~XnCmosInfo(); 45 | 46 | XnStatus SetCmosConfig(XnCMOSType nCmos, XnResolutions nResolution, XnUInt32 nFPS); 47 | 48 | inline const XnCmosBlankingCoefficients* GetBlankingCoefficients(XnCMOSType nCmos) const { return m_pCurrCmosBlankingInfo[nCmos]; } 49 | 50 | private: 51 | XN_DECLARE_LIST(XnCmosBlankingData, XnCmosBlankingDataList) 52 | 53 | XnSensorFirmware* m_pFirmware; 54 | XnDevicePrivateData* m_pDevicePrivateData; 55 | 56 | XnCmosBlankingDataList m_CmosBlankingInfo; 57 | XnCmosBlankingCoefficients* m_pCurrCmosBlankingInfo[XN_CMOS_COUNT]; 58 | }; 59 | 60 | #endif //__XN_CMOS_INFO_H__ 61 | -------------------------------------------------------------------------------- /Source/XnDDK/XnStreamWriterStream.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_STREAM_WRITER_STREAM_H__ 23 | #define __XN_STREAM_WRITER_STREAM_H__ 24 | 25 | //--------------------------------------------------------------------------- 26 | // Includes 27 | //--------------------------------------------------------------------------- 28 | #include "XnDeviceStream.h" 29 | #include "XnDataPacker.h" 30 | 31 | //--------------------------------------------------------------------------- 32 | // Types 33 | //--------------------------------------------------------------------------- 34 | class XN_DDK_CPP_API XnStreamWriterStream : public XnDeviceStream 35 | { 36 | public: 37 | XnStreamWriterStream(const XnChar* strType, const XnChar* strName, XnDataPacker* pDataPacker); 38 | ~XnStreamWriterStream(); 39 | 40 | inline XnUInt32 GetFrameID() { return m_nFrameID; } 41 | inline XnDataPacker* GetDataPacker() { return m_pDataPacker; } 42 | 43 | protected: 44 | XnStatus WriteImpl(XnStreamData* pStreamData); 45 | XnStatus ReadImpl(XnStreamData* /*pStreamOutput*/) { return XN_STATUS_IO_DEVICE_FUNCTION_NOT_SUPPORTED; } 46 | XnStatus Mirror(XnStreamData* /*pStreamData*/) const { return XN_STATUS_IO_DEVICE_FUNCTION_NOT_SUPPORTED; } 47 | 48 | XnStatus CalcRequiredSize(XnUInt32* pnRequiredSize) const; 49 | 50 | private: 51 | XnUInt32 m_nFrameID; 52 | XnDataPacker* m_pDataPacker; 53 | }; 54 | 55 | #endif //__XN_STREAM_WRITER_STREAM_H__ 56 | -------------------------------------------------------------------------------- /Source/XnDDK/XnPropertySetInternal.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * * 3 | * PrimeSense Sensor 5.x Alpha * 4 | * Copyright (C) 2011 PrimeSense Ltd. * 5 | * * 6 | * This file is part of PrimeSense Sensor. * 7 | * * 8 | * PrimeSense Sensor is free software: you can redistribute it and/or modify* 9 | * it under the terms of the GNU Lesser General Public License as published * 10 | * by the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * PrimeSense Sensor is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU Lesser General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU Lesser General Public License * 19 | * along with PrimeSense Sensor. If not, see .* 20 | * * 21 | ****************************************************************************/ 22 | #ifndef __XN_PROPERTY_SET_INTERNAL_H__ 23 | #define __XN_PROPERTY_SET_INTERNAL_H__ 24 | 25 | #include 26 | #include "XnActualPropertiesHash.h" 27 | 28 | XN_DECLARE_STRINGS_HASH_DECL(XN_DDK_CPP_API, XnActualPropertiesHash*, XnPropertySetDataInternal) 29 | 30 | class XnPropertySetData; 31 | 32 | struct XnPropertySet 33 | { 34 | XnPropertySetData* pData; 35 | }; 36 | 37 | class XnPropertySetData : public XnPropertySetDataInternal 38 | { 39 | public: 40 | ~XnPropertySetData() 41 | { 42 | XnPropertySet set; 43 | set.pData = this; 44 | XnPropertySetClear(&set); 45 | } 46 | }; 47 | 48 | #define _XN_PROPERTY_SET_NAME(name) __ ## name ## _ ## Data 49 | 50 | #define XN_PROPERTY_SET_CREATE_ON_STACK(name) \ 51 | XnPropertySetData _XN_PROPERTY_SET_NAME(name); \ 52 | XnPropertySet name; \ 53 | name.pData = &_XN_PROPERTY_SET_NAME(name); 54 | 55 | XN_DDK_API XnStatus XnPropertySetDataAttachModule(XnPropertySetData* pSetData, const XnChar* strModuleName, XnActualPropertiesHash* pModule); 56 | XN_DDK_API XnStatus XnPropertySetDataDetachModule(XnPropertySetData* pSetData, const XnChar* strModuleName, XnActualPropertiesHash** ppModule); 57 | XN_DDK_API XnStatus XnPropertySetCloneModule(const XnPropertySet* pSource, XnPropertySet* pDest, const XnChar* strModule, const XnChar* strNewName); 58 | 59 | #endif //__XN_PROPERTY_SET_INTERNAL_H__ 60 | --------------------------------------------------------------------------------