├── Bin
├── SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2
├── SensorKinect093-Bin-Linux-x86-v5.1.2.1.tar.bz2
├── SensorKinect093-Bin-MacOSX-v5.1.2.1.tar.bz2
├── SensorKinect093-Bin-Win32-v5.1.2.1.msi
└── SensorKinect093-Bin-Win64-v5.1.2.1.msi
├── CHANGES
├── Data
└── GlobalDefaultsKinect.ini
├── GPL.txt
├── Include
├── XnCommon.h
├── XnCore.h
├── XnDDK.h
├── XnDDKStatus.h
├── XnDevice.h
├── XnDeviceProto.inl
├── XnDeviceProxy.h
├── XnEE.h
├── XnEE
│ ├── XnEEAlgorithms.h
│ ├── XnEECore.h
│ ├── XnEEFramework.h
│ ├── XnEEGeometry.h
│ ├── XnEEMath.h
│ ├── XnEEObjects.h
│ ├── XnV3DBox.h
│ ├── XnV3DGeometry.h
│ ├── XnV3DVector.h
│ ├── XnVAudioBuffer.h
│ ├── XnVBodyPart.h
│ ├── XnVBoundingBox.h
│ ├── XnVCenterOfMass.h
│ ├── XnVClosestPointFinder.h
│ ├── XnVConnectedComponentDetector.h
│ ├── XnVContainer.h
│ ├── XnVDepthMap.h
│ ├── XnVDepthMatrix.h
│ ├── XnVDepthRepresentation.h
│ ├── XnVDevice.h
│ ├── XnVDeviceCallbackHandler.h
│ ├── XnVDeviceRecorder.h
│ ├── XnVDownscale.h
│ ├── XnVEventHandlers.h
│ ├── XnVExtremes.h
│ ├── XnVGeneralStaticMap.h
│ ├── XnVHand.h
│ ├── XnVHead.h
│ ├── XnVHumanStretch.h
│ ├── XnVImageMap.h
│ ├── XnVImageMatrix.h
│ ├── XnVInitStreamProperties.h
│ ├── XnVLabelMatrix.h
│ ├── XnVLabelPruner.h
│ ├── XnVLabeledObject.h
│ ├── XnVMathCommon.h
│ ├── XnVMatrix.h
│ ├── XnVMatrix3X3.h
│ ├── XnVModule.h
│ ├── XnVObject.h
│ ├── XnVPixelStreamData.h
│ ├── XnVPoint.h
│ ├── XnVPointContainer.h
│ ├── XnVPropertySet.h
│ ├── XnVRealObject.h
│ ├── XnVRealWorldTranslator.h
│ ├── XnVSkeleton.h
│ ├── XnVSphere.h
│ ├── XnVStaticMap.h
│ ├── XnVStatus.h
│ ├── XnVStream.h
│ ├── XnVStreamContainer.h
│ ├── XnVStreamData.h
│ ├── XnVTorso.h
│ ├── XnVUpscale.h
│ ├── XnVUserExtractor.h
│ └── XnVVirtualObject.h
├── XnFormatsStatus.h
├── XnIOFileStream.h
├── XnIONetworkStream.h
├── XnIOParams.h
├── XnIOStream.h
├── XnPlatformBC.h
├── XnPropertySet.h
├── XnPsVersion.h
├── XnStream.h
├── XnStreamData.h
├── XnStreamDataSet.h
├── XnStreamFormats.h
└── XnStreamParams.h
├── LGPL.txt
├── OpenNI
└── Data
│ └── SamplesConfig.xml
├── PSCommon
└── Platform
│ └── Win32
│ └── CreateRedist
│ ├── CopyToRepository.py
│ ├── __init__.py
│ ├── redist_base.py
│ └── redist_base.pyc
├── Platform
├── Android
│ └── jni
│ │ ├── Android.mk
│ │ ├── Application.mk
│ │ ├── XnCore
│ │ └── Android.mk
│ │ ├── XnDDK
│ │ └── Android.mk
│ │ ├── XnDeviceFile
│ │ └── Android.mk
│ │ ├── XnDeviceSensorV2
│ │ └── Android.mk
│ │ └── XnFormats
│ │ └── Android.mk
├── Linux
│ ├── Build
│ │ ├── Common
│ │ │ ├── CommonCSMakefile
│ │ │ ├── CommonCppMakefile
│ │ │ ├── CommonDefs.mak
│ │ │ ├── CommonJavaMakefile
│ │ │ ├── CommonTargets.mak
│ │ │ ├── Platform.Arm
│ │ │ ├── Platform.x64
│ │ │ └── Platform.x86
│ │ ├── EngineLibMakefile
│ │ ├── Makefile
│ │ ├── Utils
│ │ │ ├── EngineUtilMakefile
│ │ │ └── XnSensorServer
│ │ │ │ └── Makefile
│ │ ├── XnCore
│ │ │ └── Makefile
│ │ ├── XnDDK
│ │ │ └── Makefile
│ │ ├── XnDeviceFile
│ │ │ └── Makefile
│ │ ├── XnDeviceSensorV2
│ │ │ └── Makefile
│ │ └── XnFormats
│ │ │ └── Makefile
│ ├── CreateRedist
│ │ ├── RedistMaker
│ │ └── install.sh
│ └── Install
│ │ ├── 55-primesense-usb.rules
│ │ └── blacklist-gspca-kinect.conf
└── Win32
│ ├── Build
│ ├── Engine.sln
│ ├── Res
│ │ ├── DDK.rc
│ │ ├── Resource-DDK.h
│ │ └── mainicon.ico
│ ├── Utils
│ │ └── XnSensorServer
│ │ │ └── XnSensorServer.vcproj
│ ├── XnCore
│ │ └── XnCore.vcproj
│ ├── XnDDK
│ │ └── XnDDK.vcproj
│ ├── XnDeviceFile
│ │ └── XnDeviceFile.vcproj
│ ├── XnDeviceSensorV2
│ │ └── XnDeviceSensorV2.vcproj
│ └── XnFormats
│ │ └── XnFormats.vcproj
│ ├── CreateRedist
│ ├── EE_NI
│ │ ├── EE_NI.sln
│ │ ├── EE_NI.wixproj
│ │ ├── EE_NI.wxs
│ │ ├── Fragments
│ │ │ └── BinariesFragment.wxs
│ │ ├── Includes
│ │ │ ├── EENIVariables.wxi
│ │ │ └── EENIVariables.wxi.bak
│ │ ├── Lang
│ │ │ └── en-us
│ │ │ │ └── Loc_en-us.wxl
│ │ ├── Resources
│ │ │ ├── Header.bmp
│ │ │ └── mainicon.ico
│ │ ├── UI
│ │ │ └── CustomeInstallUI.wxs
│ │ ├── checkVersion.vbs
│ │ └── setup.exe
│ ├── Engine_Config.xml
│ └── Redist.py
│ └── Driver
│ ├── amd64
│ ├── WdfCoInstaller01009.dll
│ └── psdrv3.sys
│ ├── dpinst-amd64.exe
│ ├── dpinst-x86.exe
│ ├── dpinst.xml
│ ├── psdrv3.cat
│ ├── psdrv3.ico
│ ├── psdrv3.inf
│ └── x86
│ ├── WdfCoInstaller01009.dll
│ └── psdrv3.sys
├── README
└── Source
├── External
└── LibJPEG
│ ├── README
│ ├── cderror.h
│ ├── jcapimin.c
│ ├── jcapistd.c
│ ├── jccoefct.c
│ ├── jccolor.c
│ ├── jcdctmgr.c
│ ├── jchuff.c
│ ├── jchuff.h
│ ├── jcinit.c
│ ├── jcmainct.c
│ ├── jcmarker.c
│ ├── jcmaster.c
│ ├── jcomapi.c
│ ├── jconfig.h
│ ├── jconfig.lnx86
│ ├── jconfig.ps3
│ ├── jconfig.vc
│ ├── jcparam.c
│ ├── jcphuff.c
│ ├── jcprepct.c
│ ├── jcsample.c
│ ├── jctrans.c
│ ├── jdapimin.c
│ ├── jdapistd.c
│ ├── jdatadst.c
│ ├── jdatasrc.c
│ ├── jdcoefct.c
│ ├── jdcolor.c
│ ├── jdct.h
│ ├── jddctmgr.c
│ ├── jdhuff.c
│ ├── jdhuff.h
│ ├── jdinput.c
│ ├── jdmainct.c
│ ├── jdmarker.c
│ ├── jdmaster.c
│ ├── jdmerge.c
│ ├── jdphuff.c
│ ├── jdpostct.c
│ ├── jdsample.c
│ ├── jdtrans.c
│ ├── jerror.c
│ ├── jerror.h
│ ├── jfdctflt.c
│ ├── jfdctfst.c
│ ├── jfdctint.c
│ ├── jidctflt.c
│ ├── jidctfst.c
│ ├── jidctint.c
│ ├── jidctred.c
│ ├── jinclude.h
│ ├── jmemmgr.c
│ ├── jmemnobs.c
│ ├── jmemsys.h
│ ├── jmorecfg.h
│ ├── jpegint.h
│ ├── jpeglib.h
│ ├── jquant1.c
│ ├── jquant2.c
│ ├── jutils.c
│ └── jversion.h
├── Utils
└── XnSensorServer
│ └── SensorServer.cpp
├── XnCore
├── XnBuffer.cpp
├── XnBuffer.h
├── XnCore.cpp
├── XnCoreGlobals.h
├── XnCoreStatus.cpp
├── XnIOFileStream.cpp
├── XnIONetworkStream.cpp
└── XnVersion.cpp
├── XnDDK
├── IXnDevice.h
├── XnActualGeneralProperty.cpp
├── XnActualGeneralProperty.h
├── XnActualIntProperty.cpp
├── XnActualIntProperty.h
├── XnActualPropertiesHash.cpp
├── XnActualPropertiesHash.h
├── XnActualPropertyFactory.cpp
├── XnActualPropertyFactory.h
├── XnActualRealProperty.cpp
├── XnActualRealProperty.h
├── XnActualStringProperty.cpp
├── XnActualStringProperty.h
├── XnAudioStream.cpp
├── XnAudioStream.h
├── XnBackwardsCompatibility36.cpp
├── XnBackwardsCompatibility36.h
├── XnBufferPool.cpp
├── XnBufferPool.h
├── XnCodecFactory.cpp
├── XnCodecFactory.h
├── XnDDK.cpp
├── XnDDKStatus.cpp
├── XnDataPacker.cpp
├── XnDataPacker.h
├── XnDepthStream.cpp
├── XnDepthStream.h
├── XnDeviceBase.cpp
├── XnDeviceBase.h
├── XnDeviceBaseProxy.cpp
├── XnDeviceBaseProxy.h
├── XnDeviceFunctionsTypedefs.h
├── XnDeviceInterfaceAdapter.h
├── XnDeviceInterfaceImpl.h
├── XnDeviceManager.cpp
├── XnDeviceManager.h
├── XnDeviceModule.cpp
├── XnDeviceModule.h
├── XnDeviceModuleHolder.cpp
├── XnDeviceModuleHolder.h
├── XnDeviceProxy.cpp
├── XnDeviceStream.cpp
├── XnDeviceStream.h
├── XnExternalBufferPool.cpp
├── XnExternalBufferPool.h
├── XnFrameBufferManager.cpp
├── XnFrameBufferManager.h
├── XnFrameStream.cpp
├── XnFrameStream.h
├── XnGeneralProperty.cpp
├── XnGeneralProperty.h
├── XnIRStream.cpp
├── XnIRStream.h
├── XnImageStream.cpp
├── XnImageStream.h
├── XnIntProperty.cpp
├── XnIntProperty.h
├── XnIntPropertySynchronizer.cpp
├── XnIntPropertySynchronizer.h
├── XnPixelStream.cpp
├── XnPixelStream.h
├── XnProperty.cpp
├── XnProperty.h
├── XnPropertySet.cpp
├── XnPropertySetInternal.h
├── XnRealProperty.cpp
├── XnRealProperty.h
├── XnShiftToDepth.cpp
├── XnShiftToDepth.h
├── XnShiftToDepthStreamHelper.cpp
├── XnShiftToDepthStreamHelper.h
├── XnSimpleBufferPool.cpp
├── XnSimpleBufferPool.h
├── XnStreamData.cpp
├── XnStreamDataInternal.h
├── XnStreamDataSet.cpp
├── XnStreamDataSetInternal.h
├── XnStreamDevice.cpp
├── XnStreamDevice.h
├── XnStreamDeviceStreamHolder.cpp
├── XnStreamDeviceStreamHolder.h
├── XnStreamReaderDevice.cpp
├── XnStreamReaderDevice.h
├── XnStreamReaderStream.cpp
├── XnStreamReaderStream.h
├── XnStreamReaderStreamHolder.cpp
├── XnStreamReaderStreamHolder.h
├── XnStreamWriterDevice.cpp
├── XnStreamWriterDevice.h
├── XnStreamWriterStream.cpp
├── XnStreamWriterStream.h
├── XnStreamingStream.cpp
├── XnStreamingStream.h
├── XnStringProperty.cpp
└── XnStringProperty.h
├── XnDeviceFile
├── XnDeviceFile.cpp
├── XnDeviceFile.h
├── XnDeviceFileReader.cpp
├── XnDeviceFileReader.h
├── XnDeviceFileReaderBC.cpp
├── XnDeviceFileReaderBC.h
├── XnDeviceFileWriter.cpp
├── XnDeviceFileWriter.h
├── XnExportedFileDevice.cpp
├── XnExportedFileDevice.h
├── XnFileDevice.cpp
├── XnFileDevice.h
├── XnFileDeviceBC.cpp
├── XnFileOpenNiteImpl.cpp
├── XnFileWriterStream.cpp
├── XnFileWriterStream.h
└── XnNiInputStream.h
├── XnDeviceSensorV2
├── Bayer.cpp
├── Bayer.h
├── IXnSensorStream.h
├── Registration.cpp
├── Registration.h
├── Uncomp.cpp
├── Uncomp.h
├── XnAudioProcessor.cpp
├── XnAudioProcessor.h
├── XnBayerImageProcessor.cpp
├── XnBayerImageProcessor.h
├── XnCmosInfo.cpp
├── XnCmosInfo.h
├── XnDataProcessor.cpp
├── XnDataProcessor.h
├── XnDataProcessorHolder.cpp
├── XnDataProcessorHolder.h
├── XnDepthProcessor.cpp
├── XnDepthProcessor.h
├── XnDeviceSensor.cpp
├── XnDeviceSensor.h
├── XnDeviceSensorIO.cpp
├── XnDeviceSensorIO.h
├── XnDeviceSensorInit.cpp
├── XnDeviceSensorInit.h
├── XnDeviceSensorProtocol.cpp
├── XnDeviceSensorProtocol.h
├── XnExportedSensorDevice.cpp
├── XnExportedSensorDevice.h
├── XnExportedSensorGenerator.cpp
├── XnExportedSensorGenerator.h
├── XnFirmwareCommands.cpp
├── XnFirmwareCommands.h
├── XnFirmwareInfo.cpp
├── XnFirmwareInfo.h
├── XnFirmwareStreams.cpp
├── XnFirmwareStreams.h
├── XnFrameStreamProcessor.cpp
├── XnFrameStreamProcessor.h
├── XnHostProtocol.cpp
├── XnHostProtocol.h
├── XnIRProcessor.cpp
├── XnIRProcessor.h
├── XnImageProcessor.cpp
├── XnImageProcessor.h
├── XnJpegImageProcessor.cpp
├── XnJpegImageProcessor.h
├── XnJpegToRGBImageProcessor.cpp
├── XnJpegToRGBImageProcessor.h
├── XnMultiPropChangedHandler.cpp
├── XnMultiPropChangedHandler.h
├── XnPSCompressedDepthProcessor.cpp
├── XnPSCompressedDepthProcessor.h
├── XnPSCompressedImageProcessor.cpp
├── XnPSCompressedImageProcessor.h
├── XnPacked11DepthProcessor.cpp
├── XnPacked11DepthProcessor.h
├── XnPacked12DepthProcessor.cpp
├── XnPacked12DepthProcessor.h
├── XnParams.h
├── XnSensor.cpp
├── XnSensor.h
├── XnSensorAudioGenerator.cpp
├── XnSensorAudioGenerator.h
├── XnSensorAudioStream.cpp
├── XnSensorAudioStream.h
├── XnSensorClient.cpp
├── XnSensorClient.h
├── XnSensorClientServer.h
├── XnSensorClientStream.cpp
├── XnSensorClientStream.h
├── XnSensorDepthGenerator.cpp
├── XnSensorDepthGenerator.h
├── XnSensorDepthStream.cpp
├── XnSensorDepthStream.h
├── XnSensorDevice.cpp
├── XnSensorDevice.h
├── XnSensorFPS.cpp
├── XnSensorFPS.h
├── XnSensorFirmware.cpp
├── XnSensorFirmware.h
├── XnSensorFirmwareParams.cpp
├── XnSensorFirmwareParams.h
├── XnSensorFixedParams.cpp
├── XnSensorFixedParams.h
├── XnSensorGenerator.cpp
├── XnSensorGenerator.h
├── XnSensorIRGenerator.cpp
├── XnSensorIRGenerator.h
├── XnSensorIRStream.cpp
├── XnSensorIRStream.h
├── XnSensorImageGenerator.cpp
├── XnSensorImageGenerator.h
├── XnSensorImageStream.cpp
├── XnSensorImageStream.h
├── XnSensorMapGenerator.cpp
├── XnSensorMapGenerator.h
├── XnSensorOpenNiteImpl.cpp
├── XnSensorProductionNode.cpp
├── XnSensorProductionNode.h
├── XnSensorServer.cpp
├── XnSensorServer.h
├── XnSensorServerRunner.h
├── XnSensorStreamHelper.cpp
├── XnSensorStreamHelper.h
├── XnSensorsManager.cpp
├── XnSensorsManager.h
├── XnServerLogger.h
├── XnServerSensorInvoker.cpp
├── XnServerSensorInvoker.h
├── XnServerSession.cpp
├── XnServerSession.h
├── XnStreamProcessor.cpp
├── XnStreamProcessor.h
├── XnUncompressedBayerProcessor.cpp
├── XnUncompressedBayerProcessor.h
├── XnUncompressedDepthProcessor.cpp
├── XnUncompressedDepthProcessor.h
├── XnUncompressedYUVImageProcessor.cpp
├── XnUncompressedYUVImageProcessor.h
├── XnUncompressedYUVtoRGBImageProcessor.cpp
├── XnUncompressedYUVtoRGBImageProcessor.h
├── XnWholePacketProcessor.cpp
├── XnWholePacketProcessor.h
├── YUV.cpp
└── YUV.h
└── XnFormats
├── Xn16zCodec.h
├── Xn16zEmbTablesCodec.h
├── Xn8zCodec.h
├── XnCodec.h
├── XnCodecBase.h
├── XnCodecs.cpp
├── XnFormats.cpp
├── XnFormats.h
├── XnFormatsMirror.cpp
├── XnFormatsStatus.cpp
├── XnJpegCodec.h
├── XnNiCodec.h
├── XnStreamCompression.cpp
├── XnStreamCompression.h
└── XnUncompressedCodec.h
/Bin/SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Bin/SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2
--------------------------------------------------------------------------------
/Bin/SensorKinect093-Bin-Linux-x86-v5.1.2.1.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Bin/SensorKinect093-Bin-Linux-x86-v5.1.2.1.tar.bz2
--------------------------------------------------------------------------------
/Bin/SensorKinect093-Bin-MacOSX-v5.1.2.1.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Bin/SensorKinect093-Bin-MacOSX-v5.1.2.1.tar.bz2
--------------------------------------------------------------------------------
/Bin/SensorKinect093-Bin-Win32-v5.1.2.1.msi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Bin/SensorKinect093-Bin-Win32-v5.1.2.1.msi
--------------------------------------------------------------------------------
/Bin/SensorKinect093-Bin-Win64-v5.1.2.1.msi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Bin/SensorKinect093-Bin-Win64-v5.1.2.1.msi
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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__
--------------------------------------------------------------------------------
/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/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__
--------------------------------------------------------------------------------
/OpenNI/Data/SamplesConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
40 |
41 |
42 |
50 |
51 |
52 |
60 |
61 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/PSCommon/Platform/Win32/CreateRedist/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/PSCommon/Platform/Win32/CreateRedist/__init__.py
--------------------------------------------------------------------------------
/PSCommon/Platform/Win32/CreateRedist/redist_base.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/PSCommon/Platform/Win32/CreateRedist/redist_base.pyc
--------------------------------------------------------------------------------
/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/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/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/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/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/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 |
--------------------------------------------------------------------------------
/Platform/Linux/Build/Common/CommonDefs.mak:
--------------------------------------------------------------------------------
1 | ifndef _COMMON_DEFS_MAKE_
2 | _COMMON_DEFS_MAKE_=1
3 |
4 | # some defaults
5 | ifndef CFG
6 | CFG = Release
7 | endif
8 |
9 | # find out the platform on which we're running
10 | MACHINE = $(shell uname -m)
11 | ifneq (,$(findstring x86_64,$(MACHINE)))
12 | HOST_PLATFORM = x64
13 | else ifneq (,$(findstring x86,$(MACHINE)))
14 | HOST_PLATFORM = x86
15 | else ifneq (,$(findstring i686,$(MACHINE)))
16 | HOST_PLATFORM = x86
17 | else ifneq (,$(findstring i386,$(MACHINE)))
18 | HOST_PLATFORM = x86
19 | else ifneq (,$(findstring arm,$(MACHINE)))
20 | HOST_PLATFORM = Arm
21 | else
22 | DUMMY:=$(error Can't determine host platform)
23 | endif
24 |
25 | # now check if this is a cross-compilation or not
26 | ifeq "$(PLATFORM)" ""
27 | PLATFORM = $(HOST_PLATFORM)
28 | else
29 | ifneq "$(PLATFORM)" "$(HOST_PLATFORM)"
30 | # cross compiling. Take CXX and STAGING_DIR from environment
31 | PLATFORM_UPPER = $(shell echo $(PLATFORM) | tr 'a-z' 'A-Z')
32 | DUMMY:=$(eval CXX = $($(PLATFORM_UPPER)_CXX))
33 | DUMMY:=$(eval TARGET_SYS_ROOT = $($(PLATFORM_UPPER)_STAGING))
34 |
35 | ifeq "$(and $(CXX), $(TARGET_SYS_ROOT))" ""
36 | DUMMY:=$(error Cross-Compilation error. Can't find $(PLATFORM_UPPER)_CXX and $(PLATFORM_UPPER)_STAGING)
37 | endif
38 | endif
39 | endif
40 |
41 | # expand file list
42 | SRC_FILES_LIST = $(wildcard $(SRC_FILES))
43 |
44 | # define the intermediate directory
45 | INT_DIR = $(PLATFORM)-$(CFG)
46 |
47 | # define output directory
48 | OUT_DIR = $(BIN_DIR)/$(PLATFORM)-$(CFG)
49 |
50 | # full path to output file
51 | OUTPUT_FILE = $(OUT_DIR)/$(OUTPUT_NAME)
52 |
53 | # take this file's dir
54 | COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
55 |
56 | # get the OS type
57 | OSTYPE := $(shell uname -s)
58 |
59 | # platform specific args
60 | include $(COMMON_MAK_DIR)Platform.$(PLATFORM)
61 |
62 | endif # _COMMON_DEFS_MAKE_
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/Linux/Build/Common/Platform.Arm:
--------------------------------------------------------------------------------
1 | ifeq "$(CFG)" "Release"
2 |
3 | # Hardware specifying flags
4 | CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-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.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/Common/Platform.x86:
--------------------------------------------------------------------------------
1 | # some defaults
2 | export GLUT_SUPPORTED=1
3 |
4 | ifndef SSE_GENERATION
5 | SSE_GENERATION = 3
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 | else
23 | DUMMY:=($error "Only SSE2 and SSE3 are supported")
24 | endif
25 | endif
26 |
--------------------------------------------------------------------------------
/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/Linux/Build/Makefile:
--------------------------------------------------------------------------------
1 |
2 | #/******************************************************************************
3 | #* *
4 | #* PrimeSense Sensor 5.0 Makefile *
5 | #* Copyright (C) 2010 PrimeSense Ltd. *
6 | #* *
7 | #******************************************************************************/
8 | include Common/CommonDefs.mak
9 |
10 | # default config is Release
11 | ifndef CFG
12 | CFG = Release
13 | endif
14 |
15 | # list all modules
16 | ALL_PROJS = \
17 | XnCore \
18 | XnFormats \
19 | XnDDK \
20 | XnDeviceSensorV2 \
21 | Utils/XnSensorServer \
22 | XnDeviceFile \
23 |
24 |
25 | ALL_PROJS_CLEAN = $(foreach proj,$(ALL_PROJS),$(proj)-clean)
26 |
27 | # define a function which creates a target for each proj
28 | define CREATE_PROJ_TARGET
29 |
30 | .PHONY: $1 $1-clean
31 |
32 | $1:
33 | $(MAKE) -C $1 CFG=$(CFG)
34 |
35 | $1-clean:
36 | $(MAKE) -C $1 CFG=$(CFG) clean
37 |
38 | endef
39 |
40 | ########### TARGETS ##############
41 |
42 | .PHONY: all install uninstall clean
43 |
44 | # make all makefiles
45 | all: $(ALL_PROJS)
46 |
47 | # create projects targets
48 | $(foreach proj,$(ALL_PROJS),$(eval $(call CREATE_PROJ_TARGET,$(proj))))
49 |
50 | # additional dependencies
51 | XnFormats: XnCore
52 | XnDDK: XnCore
53 | XnDDK: XnFormats
54 | XnLeanDeviceSensorV2: XnDDK
55 | XnLeanDeviceSensorV2: XnFormats
56 | XnLeanDeviceSensorV2: XnCore
57 | Utils/XnSensorServer: XnDDK
58 | Utils/XnSensorServer: XnDeviceSensorV2
59 | Utils/XnSensorServer: XnFormats
60 | XnDeviceFile: XnCore
61 | XnDeviceFile: XnDDK
62 | XnDeviceFile: XnFormats
63 |
64 | # clean is cleaning all projects
65 | clean: $(ALL_PROJS_CLEAN)
66 |
67 | # redist target
68 | redist: all
69 | cd ../CreateRedist; ./RedistMaker; cd -
70 |
71 | # install target
72 | install: redist
73 | cd ../Redist; ./install.sh; cd -
74 |
75 | # uninstall
76 | uninstall:
77 | cd ../Redist; ./install.sh -u; cd -
78 |
79 |
--------------------------------------------------------------------------------
/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/Linux/Build/Utils/XnSensorServer/Makefile:
--------------------------------------------------------------------------------
1 | SRC_FILES = ../../../../../Source/Utils/XnSensorServer/*.cpp
2 |
3 | EXE_NAME = XnSensorServer
4 | #--avin mod--
5 | USED_LIBS = OpenNI XnCore XnFormats XnDDK XnDeviceSensorV2KM
6 |
7 | include ../EngineUtilMakefile
8 |
9 |
--------------------------------------------------------------------------------
/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/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/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 | #--avin mod--
4 | LIB_NAME = XnDeviceSensorV2KM
5 | USED_LIBS = XnCore XnFormats XnDDK OpenNI
6 | DEFINES = XN_DEVICE_EXPORTS
7 |
8 | include ../EngineLibMakefile
9 |
10 |
--------------------------------------------------------------------------------
/Platform/Linux/Build/XnFormats/Makefile:
--------------------------------------------------------------------------------
1 | SRC_FILES = \
2 | ../../../../Source/XnFormats/*.cpp \
3 | ../../../../Source/External/LibJPEG/*.c
4 |
5 | LIB_NAME = XnFormats
6 | USED_LIBS = XnCore OpenNI
7 | DEFINES = XN_FORMATS_EXPORTS
8 | INC_DIRS = ../../../../Source/External/LibJPEG
9 |
10 | include ../EngineLibMakefile
11 |
--------------------------------------------------------------------------------
/Platform/Linux/CreateRedist/RedistMaker:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | OS_TYPE=`uname -s`
4 | MACHINE_TYPE=`uname -m`
5 |
6 | function calc_jobs_number() {
7 | if [ $OS_TYPE == "Darwin" ] ; then
8 | N_CORES=$(sysctl -n hw.physicalcpu)
9 | else
10 | N_CORES=$(grep "processor\W:" /proc/cpuinfo | wc -l)
11 | fi
12 | echo $((N_CORES*2))
13 | }
14 |
15 | if [ $# -gt 1 ]
16 | then
17 | echo "Usaga: $0 [PLATFORM]"
18 | exit 1
19 | fi
20 |
21 | if [ $# -eq 1 ]
22 | then
23 | PLATFORM=$1
24 | else
25 | case $MACHINE_TYPE in
26 | x86 | i386 | i686)
27 | PLATFORM="x86" ;;
28 | x86_64)
29 | PLATFORM="x64" ;;
30 | arm*)
31 | PLATFORM="Arm" ;;
32 | *)
33 | echo "Unknown machine type: $MACHINE_TYPE"
34 | exit 1
35 | ;;
36 | esac
37 | fi
38 |
39 | export PLATFORM
40 |
41 | if [ "$OS_TYPE" == "Darwin" ]; then
42 | TAR_TARGET="MacOSX"
43 | else
44 | TAR_TARGET="Linux-$PLATFORM"
45 | fi
46 |
47 | SCRIPT_DIR=`pwd`
48 |
49 | # Take version
50 | MAJOR=`grep "#define XN_PS_MAJOR_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
51 | MINOR=`grep "#define XN_PS_MINOR_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
52 | MAINTENANCE=`grep "#define XN_PS_MAINTENANCE_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
53 | BUILD=`grep "#define XN_PS_BUILD_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
54 |
55 | PS_VERSION="$MAJOR.$MINOR.$MAINTENANCE.$BUILD"
56 |
57 | echo "Creating redist for Sensor v$PS_VERSION"
58 |
59 | REDIST_NAME="Sensor-Bin-$TAR_TARGET-v$PS_VERSION"
60 | REDIST_DIR="Redist/$REDIST_NAME"
61 |
62 | # clean
63 | echo "Cleaning previous outputs..."
64 | rm -rf Final
65 | rm -rf ../$REDIST_DIR
66 |
67 | # Build Engine
68 | echo "Building..."
69 | make -C ../Build clean > /dev/null
70 | make -j$(calc_jobs_number) -C ../Build
71 |
72 | # create redist folder structure
73 | echo "Creating redist folder..."
74 | mkdir -p ../$REDIST_DIR
75 | mkdir -p ../$REDIST_DIR/Lib
76 | mkdir -p ../$REDIST_DIR/Bin
77 | mkdir -p ../$REDIST_DIR/Install
78 | mkdir -p ../$REDIST_DIR/Config
79 |
80 | # copy files to redist
81 | cp ../../../GPL.txt ../$REDIST_DIR
82 | cp ../../../LGPL.txt ../$REDIST_DIR
83 | #--avin mod--
84 | cp ../Bin/$PLATFORM-Release/libXnDeviceSensorV2KM.* ../$REDIST_DIR/Lib
85 | cp ../Bin/$PLATFORM-Release/libXnDeviceFile.* ../$REDIST_DIR/Lib
86 | cp ../Bin/$PLATFORM-Release/libXnDDK.* ../$REDIST_DIR/Lib
87 | cp ../Bin/$PLATFORM-Release/libXnFormats.* ../$REDIST_DIR/Lib
88 | cp ../Bin/$PLATFORM-Release/libXnCore.* ../$REDIST_DIR/Lib
89 | cp ../Bin/$PLATFORM-Release/XnSensorServer ../$REDIST_DIR/Bin
90 | cp ../Install/* ../$REDIST_DIR/Install
91 | cp install.sh ../$REDIST_DIR
92 |
93 | #--avin mod--
94 | cp ../../../Data/GlobalDefaultsKinect.ini ../$REDIST_DIR/Config
95 |
96 | # create tar
97 | echo "Creating tar..."
98 | mkdir -p Final
99 | cd ../Redist
100 |
101 | tar -cjf $SCRIPT_DIR/Final/$REDIST_NAME.tar.bz2 $REDIST_NAME
102 |
103 | cd $SCRIPT_DIR
104 |
105 | echo "Done!"
106 |
--------------------------------------------------------------------------------
/Platform/Linux/Install/55-primesense-usb.rules:
--------------------------------------------------------------------------------
1 | # PrimeSense Devices
2 | SUBSYSTEM=="usb", ATTR{idProduct}=="0200", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
3 | SUBSYSTEM=="usb", ATTR{idProduct}=="0300", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
4 | SUBSYSTEM=="usb", ATTR{idProduct}=="0400", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
5 | SUBSYSTEM=="usb", ATTR{idProduct}=="0500", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
6 | SUBSYSTEM=="usb", ATTR{idProduct}=="0600", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
7 | SUBSYSTEM=="usb", ATTR{idProduct}=="0601", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
8 |
9 | #--avin mod--
10 | # Kinect
11 | SUBSYSTEM=="usb", ATTR{idProduct}=="02ae", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
12 | SUBSYSTEM=="usb", ATTR{idProduct}=="02ad", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="audio"
13 | SUBSYSTEM=="usb", ATTR{idProduct}=="02b0", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
14 | SUBSYSTEM=="usb", ATTR{idProduct}=="02be", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="audio"
15 | SUBSYSTEM=="usb", ATTR{idProduct}=="02bf", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
16 |
--------------------------------------------------------------------------------
/Platform/Linux/Install/blacklist-gspca-kinect.conf:
--------------------------------------------------------------------------------
1 | blacklist gspca_kinect
2 |
3 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/Win32/Build/Res/mainicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Build/Res/mainicon.ico
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Platform/Win32/CreateRedist/EE_NI/Includes/EENIVariables.wxi:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Platform/Win32/CreateRedist/EE_NI/Includes/EENIVariables.wxi.bak:
--------------------------------------------------------------------------------
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 |
47 |
48 |
--------------------------------------------------------------------------------
/Platform/Win32/CreateRedist/EE_NI/Lang/en-us/Loc_en-us.wxl:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1033
4 |
5 | PrimeSense Sensor KinectMod
6 | for Windows
7 | for Windows 64-bit
8 | Sensor
9 |
10 | PrimeSense
11 | This application is is not supported on your current OS. Minimal OS supported is Windows XP SP2
12 | .NET Framework 2.0 is required. Please install the .NET Framework then run this installer again.
13 | A newer version of !(loc.ProductName) is already installed.
14 | Choose the folder in which to install !(loc.ProductName)
15 |
--------------------------------------------------------------------------------
/Platform/Win32/CreateRedist/EE_NI/Resources/Header.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/CreateRedist/EE_NI/Resources/Header.bmp
--------------------------------------------------------------------------------
/Platform/Win32/CreateRedist/EE_NI/Resources/mainicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/CreateRedist/EE_NI/Resources/mainicon.ico
--------------------------------------------------------------------------------
/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/Win32/CreateRedist/EE_NI/setup.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/CreateRedist/EE_NI/setup.exe
--------------------------------------------------------------------------------
/Platform/Win32/CreateRedist/Engine_Config.xml:
--------------------------------------------------------------------------------
1 |
2 | EngineWin32
3 | WIN32
4 | 5.1.2
5 | ..\..\..\
6 | \Platform\Win32\Build\EngineWin32.sln
7 | \Platform\Win32\Redist\Samples\Build\All_2008.sln
8 |
9 |
--------------------------------------------------------------------------------
/Platform/Win32/Driver/amd64/WdfCoInstaller01009.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/amd64/WdfCoInstaller01009.dll
--------------------------------------------------------------------------------
/Platform/Win32/Driver/amd64/psdrv3.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/amd64/psdrv3.sys
--------------------------------------------------------------------------------
/Platform/Win32/Driver/dpinst-amd64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/dpinst-amd64.exe
--------------------------------------------------------------------------------
/Platform/Win32/Driver/dpinst-x86.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/dpinst-x86.exe
--------------------------------------------------------------------------------
/Platform/Win32/Driver/dpinst.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | PrimeSense Sensor Device Driver Installer
7 |
8 | Welcome to the PrimeSense Sensor Device Driver Installer!
9 | This wizard will walk you through updating the drivers for your PrimeSense Sensor device.
10 |
11 | Installing the software for your PrimeSense Sensor device...
12 |
13 | Congratulations! You have finished installing your PrimeSense Sensor device drivers!
14 |
15 | psdrv3.ico
16 |
17 |
--------------------------------------------------------------------------------
/Platform/Win32/Driver/psdrv3.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/psdrv3.cat
--------------------------------------------------------------------------------
/Platform/Win32/Driver/psdrv3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/psdrv3.ico
--------------------------------------------------------------------------------
/Platform/Win32/Driver/x86/WdfCoInstaller01009.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/x86/WdfCoInstaller01009.dll
--------------------------------------------------------------------------------
/Platform/Win32/Driver/x86/psdrv3.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avin2/SensorKinect/15f1975d5e50d84ca06ff784f83f8b7836749a7b/Platform/Win32/Driver/x86/psdrv3.sys
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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.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.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/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 |
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/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/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/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/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__
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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__
--------------------------------------------------------------------------------
/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 | #include
28 |
29 | class XN_DDK_CPP_API XnDeviceModuleHolder
30 | {
31 | public:
32 | /**
33 | * Creates a new module holder.
34 | *
35 | * @param pModule [in] The actual module.
36 | * @param bAllowNewProps [in] When TRUE, Init() method will create non-existing properties.
37 | */
38 | XnDeviceModuleHolder(XnDeviceModule* pModule, XnBool bAllowNewProps = FALSE);
39 | virtual ~XnDeviceModuleHolder();
40 |
41 | virtual XnStatus Init(const XnActualPropertiesHash* pInitialValues);
42 |
43 | inline XnDeviceModule* GetModule() const { return m_pModule; }
44 |
45 | protected:
46 | virtual XnStatus Free();
47 |
48 | private:
49 | XnStatus UnsafeSetProperties(const XnActualPropertiesHash& props);
50 | XnStatus CreateProperty(XnProperty* pRequestProp);
51 | XnStatus UnsafeSetProperty(const XnProperty* pRequest, XnProperty* pProp);
52 |
53 | XnDeviceModule* m_pModule;
54 | XnPropertiesList m_Allocated;
55 | XnBool m_bAllowNewProps;
56 | };
57 |
58 | typedef XnListT XnDeviceModuleHolderList;
59 |
60 |
61 | #endif //__XN_DEVICE_MODULE_HOLDER_H__
62 |
--------------------------------------------------------------------------------
/Source/XnDDK/XnExternalBufferPool.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_EXTERNAL_BUFFER_POOL_H_
23 | #define _XN_EXTERNAL_BUFFER_POOL_H_
24 |
25 | //---------------------------------------------------------------------------
26 | // Includes
27 | //---------------------------------------------------------------------------
28 | #include
29 | #include
30 | #include
31 |
32 | //---------------------------------------------------------------------------
33 | // Types
34 | //---------------------------------------------------------------------------
35 | class XnExternalBufferPool : public XnBufferPool
36 | {
37 | public:
38 | XnExternalBufferPool();
39 | ~XnExternalBufferPool();
40 |
41 | XnStatus SetBuffers(XnUInt32 nCount, const XnGeneralBuffer* aBuffers);
42 |
43 | protected:
44 | virtual XnStatus AllocateBuffers(XnUInt32 nSize);
45 | virtual void DestroyBuffer(void* pBuffer);
46 |
47 | private:
48 | XnArray m_buffers;
49 | };
50 |
51 |
52 | #endif // _XN_EXTERNAL_BUFFER_POOL_H_
--------------------------------------------------------------------------------
/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/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.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 |
--------------------------------------------------------------------------------
/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__
--------------------------------------------------------------------------------
/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 XnIntSynchronizerCookie; // forward declaration
37 |
38 | class XN_DDK_CPP_API XnIntPropertySynchronizer
39 | {
40 | public:
41 | XnIntPropertySynchronizer();
42 | ~XnIntPropertySynchronizer();
43 |
44 | XnStatus RegisterSynchronization(XnIntProperty* pSource, XnIntProperty* pDestination, XnIntPropertyConvertCallback pConvertFunc = NULL);
45 |
46 | private:
47 | typedef XnListT CookiesList;
48 | CookiesList m_Cookies;
49 | };
50 |
51 | #endif //__XN_INT_PROPERTY_SYNCHRONIZER_H__
52 |
--------------------------------------------------------------------------------
/Source/XnDDK/XnSimpleBufferPool.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 "XnSimpleBufferPool.h"
26 |
27 | //---------------------------------------------------------------------------
28 | // Code
29 | //---------------------------------------------------------------------------
30 | XnSimpleBufferPool::XnSimpleBufferPool(XnUInt32 nBufferCount) :
31 | m_nBufferCount(nBufferCount)
32 | {}
33 |
34 | XnSimpleBufferPool::~XnSimpleBufferPool()
35 | {
36 | FreeAll(TRUE);
37 | }
38 |
39 | XnStatus XnSimpleBufferPool::AllocateBuffers(XnUInt32 nSize)
40 | {
41 | XnStatus nRetVal = XN_STATUS_OK;
42 |
43 | // now allocate new
44 | for (XnUInt32 i = 0; i < m_nBufferCount; ++i)
45 | {
46 | void* pBuffer;
47 | XN_VALIDATE_ALIGNED_CALLOC(pBuffer, XnUChar, nSize, XN_DEFAULT_MEM_ALIGN);
48 | nRetVal = AddNewBuffer(pBuffer, nSize);
49 | XN_IS_STATUS_OK(nRetVal);
50 | }
51 |
52 | return (XN_STATUS_OK);
53 | }
54 |
55 | void XnSimpleBufferPool::DestroyBuffer(void* pBuffer)
56 | {
57 | xnOSFreeAligned(pBuffer);
58 | }
59 |
60 |
--------------------------------------------------------------------------------
/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 |
30 | //---------------------------------------------------------------------------
31 | // Types
32 | //---------------------------------------------------------------------------
33 | class XnSimpleBufferPool : public XnBufferPool
34 | {
35 | public:
36 | XnSimpleBufferPool(XnUInt32 nBufferCount);
37 | ~XnSimpleBufferPool();
38 |
39 | protected:
40 | virtual XnStatus AllocateBuffers(XnUInt32 nSize);
41 | virtual void DestroyBuffer(void* pBuffer);
42 |
43 | private:
44 | XnUInt32 m_nBufferCount;
45 | };
46 |
47 | #endif // __XN_SIMPLE_BUFFER_POOL_H__
--------------------------------------------------------------------------------
/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 | typedef XnStringsHashT XnStreamDataHash;
32 |
33 | struct XnStreamDataSet
34 | {
35 | XnStreamDataHash* pHash;
36 | };
37 |
38 | #endif //__XN_STREAM_DATA_SET_INTERNAL_H__
39 |
--------------------------------------------------------------------------------
/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/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/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__
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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 |
31 | //---------------------------------------------------------------------------
32 | // Forward Declarations
33 | //---------------------------------------------------------------------------
34 | class XnDataProcessor;
35 |
36 | //---------------------------------------------------------------------------
37 | // Types
38 | //---------------------------------------------------------------------------
39 | class IXnSensorStream
40 | {
41 | public:
42 | ~IXnSensorStream() {}
43 |
44 | virtual void GetFirmwareStreamConfig(XnResolutions* pnRes, XnUInt32* pnFPS) = 0;
45 | virtual XnStatus ConfigureStreamImpl() = 0;
46 | virtual XnStatus OpenStreamImpl() = 0;
47 | virtual XnStatus CloseStreamImpl() = 0;
48 | virtual XnStatus CreateDataProcessor(XnDataProcessor** ppProcessor) = 0;
49 | virtual XnStatus MapPropertiesToFirmware() = 0;
50 | };
51 |
52 | #endif //__I_XN_SENSOR_STREAM_H__
53 |
--------------------------------------------------------------------------------
/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/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_DISABLE_COPY_AND_ASSIGN(XnDataProcessorHolder);
49 |
50 | XN_CRITICAL_SECTION_HANDLE m_hLock;
51 | XnDataProcessor* m_pProcessor;
52 | };
53 |
54 | #endif //__XN_STREAM_PROCESSOR_HOLDER_H__
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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__
--------------------------------------------------------------------------------
/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/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, XnFrameBufferManager* pBufferManager);
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/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/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/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/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, XnFrameBufferManager* pBufferManager);
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 |
--------------------------------------------------------------------------------
/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, XnFrameBufferManager* pBufferManager);
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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------