OpenNI 1.0.0
|
00001 /***************************************************************************** 00002 * * 00003 * OpenNI 1.0 Alpha * 00004 * Copyright (C) 2010 PrimeSense Ltd. * 00005 * * 00006 * This file is part of OpenNI. * 00007 * * 00008 * OpenNI is free software: you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published * 00010 * by the Free Software Foundation, either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * OpenNI is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with OpenNI. If not, see <http://www.gnu.org/licenses/>. * 00020 * * 00021 *****************************************************************************/ 00022 00023 00024 00025 00026 #ifndef __XN_MODULE_INTERFACE_H__ 00027 #define __XN_MODULE_INTERFACE_H__ 00028 00029 //--------------------------------------------------------------------------- 00030 // Includes 00031 //--------------------------------------------------------------------------- 00032 #include <XnTypes.h> 00033 00034 //--------------------------------------------------------------------------- 00035 // Defines 00036 //--------------------------------------------------------------------------- 00037 #define XN_MODULE_LOAD xnModuleLoad 00038 #define XN_MODULE_UNLOAD xnModuleUnload 00039 #define XN_MODULE_GET_EXPORTED_NODES_COUNT xnModuleGetExportedNodesCount 00040 #define XN_MODULE_GET_EXPORTED_NODES_ENTRY_POINTS xnModuleGetExportedNodesEntryPoints 00041 #define XN_MODULE_GET_OPEN_NI_VERSION xnModuleGetOpenNIVersion 00042 00043 //--------------------------------------------------------------------------- 00044 // Forward Declarations 00045 //--------------------------------------------------------------------------- 00046 struct XnModuleExportedProductionNodeInterface; 00047 struct XnModuleProductionNodeInterface; 00048 struct XnModuleDeviceInterface; 00049 struct XnModuleDepthGeneratorInterface; 00050 struct XnModuleImageGeneratorInterface; 00051 struct XnModuleIRGeneratorInterface; 00052 struct XnModuleGestureGeneratorInterface; 00053 struct XnModuleUserGeneratorInterface; 00054 struct XnModuleHandsGeneratorInterface; 00055 struct XnModuleSceneAnalyzerInterface; 00056 struct XnModuleAudioGeneratorInterface; 00057 struct XnModuleRecorderInterface; 00058 struct XnModulePlayerInterface; 00059 struct XnModuleGeneratorInterface; 00060 struct XnModuleCodecInterface; 00061 00062 //--------------------------------------------------------------------------- 00063 // Types 00064 //--------------------------------------------------------------------------- 00065 00066 typedef void (XN_CALLBACK_TYPE* XnModuleGetExportedInterfacePtr)(XnModuleExportedProductionNodeInterface* pInterface); 00067 typedef XnStatus (XN_C_DECL* XnModuleLoadPtr)(); 00068 typedef XnStatus (XN_C_DECL* XnModuleUnloadPtr)(); 00069 typedef XnUInt32 (XN_C_DECL* XnModuleGetExportedNodesCountPtr)(); 00070 typedef XnStatus (XN_C_DECL* XnModuleGetExportedNodesEntryPointsPtr)(XnModuleGetExportedInterfacePtr* aEntryPoints, XnUInt32 nCount); 00071 typedef void (XN_C_DECL* XnModuleGetOpenNIVersionPtr)(XnVersion* pVersion); 00072 00074 typedef void (XN_CALLBACK_TYPE* XnModuleStateChangedHandler)(void* pCookie); 00075 00076 // User 00077 typedef void (XN_CALLBACK_TYPE* XnModuleUserHandler)(XnUserID user, void* pCookie); 00078 00079 // UI 00080 typedef void (XN_CALLBACK_TYPE* XnModuleHandCreate)(XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00081 typedef void (XN_CALLBACK_TYPE* XnModuleHandUpdate)(XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00082 typedef void (XN_CALLBACK_TYPE* XnModuleHandDestroy)(XnUserID user, XnFloat fTime, void* pCookie); 00083 00084 // Gesture Module 00085 typedef void (XN_CALLBACK_TYPE* XnModuleGestureRecognized)(const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie); 00086 typedef void (XN_CALLBACK_TYPE* XnModuleGestureProgress)(const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie); 00087 00088 // Skeleton 00089 typedef void (XN_CALLBACK_TYPE* XnModuleCalibrationStart)(XnUserID user, void* pCookie); 00090 typedef void (XN_CALLBACK_TYPE* XnModuleCalibrationEnd)(XnUserID user, XnBool bSuccess, void* pCookie); 00091 00092 // Pose Detection 00093 typedef void (XN_CALLBACK_TYPE* XnModulePoseDetectionCallback)(const XnChar* strPose, XnUserID user, void* pCookie); 00094 00095 typedef struct XnModuleExportedProductionNodeInterface 00096 { 00102 void (XN_CALLBACK_TYPE* GetDescription) 00103 (XnProductionNodeDescription* pDescription); 00104 00112 XnStatus (XN_CALLBACK_TYPE* EnumerateProductionTrees) 00113 (XnContext* pContext, 00114 XnNodeInfoList* pNodesList, 00115 XnEnumerationErrors* pErrors); 00116 00127 XnStatus (XN_CALLBACK_TYPE* Create) 00128 (XnContext* pContext, 00129 const XnChar* strInstanceName, 00130 const XnChar* strCreationInfo, 00131 XnNodeInfoList* pNeededNodes, 00132 const XnChar* strConfigurationDir, 00133 XnModuleNodeHandle* phInstance); 00134 00140 void (XN_CALLBACK_TYPE* Destroy) 00141 (XnModuleNodeHandle hInstance); 00142 00150 union 00151 { 00152 void (XN_CALLBACK_TYPE* Device)(XnModuleDeviceInterface* pInterface); 00153 void (XN_CALLBACK_TYPE* Depth)(XnModuleDepthGeneratorInterface* pInterface); 00154 void (XN_CALLBACK_TYPE* Image)(XnModuleImageGeneratorInterface* pInterface); 00155 void (XN_CALLBACK_TYPE* IR)(XnModuleIRGeneratorInterface* pInterface); 00156 void (XN_CALLBACK_TYPE* User)(XnModuleUserGeneratorInterface* pInterface); 00157 void (XN_CALLBACK_TYPE* Hands)(XnModuleHandsGeneratorInterface* pInterace); 00158 void (XN_CALLBACK_TYPE* Gesture)(XnModuleGestureGeneratorInterface* pInterface); 00159 void (XN_CALLBACK_TYPE* Scene)(XnModuleSceneAnalyzerInterface* pInterface); 00160 void (XN_CALLBACK_TYPE* Audio)(XnModuleAudioGeneratorInterface* pInterface); 00161 void (XN_CALLBACK_TYPE* Recorder)(XnModuleRecorderInterface* pInterface); 00162 void (XN_CALLBACK_TYPE* Player)(XnModulePlayerInterface* pInterface); 00163 void (XN_CALLBACK_TYPE* Codec)(XnModuleCodecInterface* pInterface); 00164 00165 void (XN_CALLBACK_TYPE* General)(void*); 00166 } GetInterface; 00167 00168 } XnModuleExportedProductionNodeInterface; 00169 00170 typedef struct XnModuleExtendedSerializationInterface 00171 { 00172 XnStatus (XN_CALLBACK_TYPE* InitNotifications)(XnModuleNodeHandle hInstance, XnNodeNotifications* pNotifications, void* pCookie); 00173 void (XN_CALLBACK_TYPE* StopNotifications)(XnModuleNodeHandle hInstance); 00174 00175 } XnModuleExtendedSerializationInterface; 00176 00177 typedef struct XnModuleLockAwareInterface 00178 { 00185 XnStatus (XN_CALLBACK_TYPE* SetLockState)(XnModuleNodeHandle hInstance, XnBool bLocked); 00186 00192 XnBool (XN_CALLBACK_TYPE* GetLockState)(XnModuleNodeHandle hInstance); 00193 00202 XnStatus (XN_CALLBACK_TYPE* RegisterToLockChange) 00203 (XnModuleNodeHandle hInstance, XnModuleStateChangedHandler handler, 00204 void* pCookie, XnCallbackHandle* phCallback); 00205 00212 void (XN_CALLBACK_TYPE* UnregisterFromLockChange) 00213 (XnModuleNodeHandle hInstance, XnCallbackHandle hCallback); 00214 00215 } XnModuleLockAwareInterface; 00216 00217 typedef struct XnModuleErrorStateInterface 00218 { 00224 XnStatus (XN_CALLBACK_TYPE* GetErrorState)(XnModuleNodeHandle hInstance); 00225 00234 XnStatus (XN_CALLBACK_TYPE* RegisterToErrorStateChange) 00235 (XnModuleNodeHandle hInstance, XnModuleStateChangedHandler handler, 00236 void* pCookie, XnCallbackHandle* phCallback); 00237 00244 void (XN_CALLBACK_TYPE* UnregisterFromErrorStateChange) 00245 (XnModuleNodeHandle hInstance, XnCallbackHandle hCallback); 00246 00247 } XnModuleErrorStateInterface; 00248 00249 typedef struct XnModuleProductionNodeInterface 00250 { 00257 XnBool (XN_CALLBACK_TYPE* IsCapabilitySupported)( 00258 XnModuleNodeHandle hInstance, 00259 const XnChar* strCapabilityName 00260 ); 00261 00269 XnStatus (XN_CALLBACK_TYPE* SetIntProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt64 nValue); 00270 XnStatus (XN_CALLBACK_TYPE* SetRealProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, XnDouble dValue); 00271 XnStatus (XN_CALLBACK_TYPE* SetStringProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, const XnChar* strValue); 00272 XnStatus (XN_CALLBACK_TYPE* SetGeneralProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt32 nBufferSize, const void* pBuffer); 00273 00281 XnStatus (XN_CALLBACK_TYPE* GetIntProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt64* pnValue); 00282 XnStatus (XN_CALLBACK_TYPE* GetRealProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, XnDouble* pdValue); 00283 XnStatus (XN_CALLBACK_TYPE* GetStringProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, XnChar* csValue, XnUInt32 nBufSize); 00284 XnStatus (XN_CALLBACK_TYPE* GetGeneralProperty)(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt32 nBufferSize, void* pBuffer); 00285 00286 XnModuleExtendedSerializationInterface* pExtendedSerializationInterface; 00287 XnModuleLockAwareInterface* pLockAwareInterface; 00288 XnModuleErrorStateInterface* pErrorStateInterface; 00289 00290 } XnModuleProductionNodeInterface; 00291 00292 typedef struct XnModuleDeviceInterface 00293 { 00294 XnModuleProductionNodeInterface* pProductionNode; 00295 } XnModuleDeviceInterface; 00296 00297 typedef struct XnModuleMirrorInterface 00298 { 00305 XnStatus (XN_CALLBACK_TYPE* SetMirror)(XnModuleNodeHandle hInstance, XnBool bMirror); 00306 00312 XnBool (XN_CALLBACK_TYPE* IsMirrored)(XnModuleNodeHandle hInstance); 00313 00322 XnStatus (XN_CALLBACK_TYPE* RegisterToMirrorChange) 00323 (XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00324 void* pCookie, XnCallbackHandle* phCallback); 00325 00332 void (XN_CALLBACK_TYPE* UnregisterFromMirrorChange) 00333 (XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00334 00335 } XnModuleMirrorInterface; 00336 00337 typedef struct XnModuleAlternativeViewPointInterface 00338 { 00348 XnBool (XN_CALLBACK_TYPE* IsViewPointSupported)(XnModuleNodeHandle hGenerator, XnNodeHandle hOther); 00349 00356 XnStatus (XN_CALLBACK_TYPE* SetViewPoint)(XnModuleNodeHandle hGenerator, XnNodeHandle hOther); 00357 00364 XnBool (XN_CALLBACK_TYPE* IsViewPointAs)(XnModuleNodeHandle hGenerator, XnNodeHandle hOther); 00365 00371 XnStatus (XN_CALLBACK_TYPE* ResetViewPoint)(XnModuleNodeHandle hGenerator); 00372 00381 XnStatus (XN_CALLBACK_TYPE* RegisterToViewPointChange)(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback); 00382 00389 void (XN_CALLBACK_TYPE* UnregisterFromViewPointChange)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00390 00391 } XnModuleAlternativeViewPointInterface; 00392 00393 typedef struct XnModuleFrameSyncInterface 00394 { 00403 XnBool (XN_CALLBACK_TYPE* CanFrameSyncWith)(XnModuleNodeHandle hGenerator, XnNodeHandle hOther); 00404 00411 XnStatus (XN_CALLBACK_TYPE* FrameSyncWith)(XnModuleNodeHandle hGenerator, XnNodeHandle hOther); 00412 00419 XnStatus (XN_CALLBACK_TYPE* StopFrameSyncWith)(XnModuleNodeHandle hGenerator, XnNodeHandle hOther); 00420 00427 XnBool (XN_CALLBACK_TYPE* IsFrameSyncedWith)(XnModuleNodeHandle hGenerator, XnNodeHandle hOther); 00428 00437 XnStatus (XN_CALLBACK_TYPE* RegisterToFrameSyncChange)(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback); 00438 00445 void (XN_CALLBACK_TYPE* UnregisterFromFrameSyncChange)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00446 00447 } XnModuleFrameSyncInterface; 00448 00449 typedef struct XnModuleSeekingInterface 00450 { 00451 XnUInt64 (XN_CALLBACK_TYPE* GetMinTimestamp)(XnModuleNodeHandle hGenerator); 00452 XnUInt64 (XN_CALLBACK_TYPE* GetMaxTimestamp)(XnModuleNodeHandle hGenerator); 00453 XnStatus (XN_CALLBACK_TYPE* SeekToTimestamp)(XnModuleNodeHandle hGenerator, XnUInt64 nTimestamp); 00454 00455 } XnModuleSeekingInterface; 00456 00458 typedef struct XnModuleGeneratorInterface 00459 { 00463 XnModuleProductionNodeInterface* pProductionNodeInterface; 00464 00470 XnStatus (XN_CALLBACK_TYPE* StartGenerating) 00471 (XnModuleNodeHandle hGenerator); 00472 00478 XnBool (XN_CALLBACK_TYPE* IsGenerating) 00479 (XnModuleNodeHandle hGenerator); 00480 00486 void (XN_CALLBACK_TYPE* StopGenerating) 00487 (XnModuleNodeHandle hGenerator); 00488 00497 XnStatus (XN_CALLBACK_TYPE* RegisterToGenerationRunningChange) 00498 (XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00499 void* pCookie, XnCallbackHandle* phCallback); 00500 00507 void (XN_CALLBACK_TYPE* UnregisterFromGenerationRunningChange) 00508 (XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00509 00517 XnStatus (XN_CALLBACK_TYPE* RegisterToNewDataAvailable) 00518 (XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00519 void* pCookie, XnCallbackHandle* phCallback); 00520 00527 void (XN_CALLBACK_TYPE* UnregisterFromNewDataAvailable) 00528 (XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00529 00536 XnBool (XN_CALLBACK_TYPE* IsNewDataAvailable) 00537 (XnModuleNodeHandle hGenerator, XnUInt64* pnTimestamp); 00538 00545 XnStatus (XN_CALLBACK_TYPE* UpdateData) 00546 (XnModuleNodeHandle hGenerator); 00547 00553 XnUInt32 (XN_CALLBACK_TYPE* GetDataSize)(XnModuleNodeHandle hGenerator); 00554 00560 XnUInt64 (XN_CALLBACK_TYPE* GetTimestamp)(XnModuleNodeHandle hGenerator); 00561 00567 XnUInt32 (XN_CALLBACK_TYPE* GetFrameID)(XnModuleNodeHandle hGenerator); 00568 00569 XnModuleMirrorInterface* pMirrorInterface; 00570 XnModuleAlternativeViewPointInterface* pAlternativeViewPointInterface; 00571 XnModuleSeekingInterface* pSeekingInterface; 00572 XnModuleFrameSyncInterface* pFrameSyncInterface; 00573 00574 } XnModuleGeneratorInterface; 00575 00576 typedef struct XnModuleRecorderInterface 00577 { 00578 /* 00579 * Sets the output stream for the recorder module. 00580 * 00581 * @param hInstance [in] A handle to the instance. 00582 * @param pStreamToken [in] A token that the recorder module must save for passing to later stream calls. 00583 * @param pStream [in] The stream interface the recorder module must save for later stream calls. 00584 */ 00585 XnStatus (XN_CALLBACK_TYPE* SetOutputStream) 00586 (XnModuleNodeHandle hInstance, void *pStreamToken, XnRecorderOutputStreamInterface *pStream); 00587 00588 XnModuleProductionNodeInterface* pProductionNode; 00589 XnNodeNotifications* pNodeNotifications; 00590 } XnModuleRecorderInterface; 00591 00592 typedef struct XnModulePlayerInterface 00593 { 00594 /* 00595 * Sets the input stream for the player module 00596 * 00597 * @param hInstance [in] A handle to the instance. 00598 * @param pStreamCookie [in] A cookie that the player module must save for passing to later stream calls. 00599 * @param pStream [in] The stream interface the player module must save for later stream calls. 00600 */ 00601 XnStatus (XN_CALLBACK_TYPE* SetInputStream) 00602 (XnModuleNodeHandle hInstance, void *pStreamCookie, XnPlayerInputStreamInterface *pStream); 00603 00609 XnStatus (XN_CALLBACK_TYPE* ReadNext)(XnModuleNodeHandle hInstance); 00610 00611 /* 00612 * Sets the node notifications object to be used by the player. The player will use this object to 00613 * notify about events it encounters in the stream that was set with @ref SetInputStream(). 00614 * 00615 * @param hInstance [in] A handle to the instance. 00616 * @param pNodeNotificationsCookie [in] A cookie that the player module must save for passing to node notification calls. 00617 * @param pNodeNotifications [in] The node notifications interface that the player module will use to raise node notifications it finds in the stream. 00618 */ 00619 XnStatus (XN_CALLBACK_TYPE* SetNodeNotifications) 00620 (XnModuleNodeHandle hInstance, void *pNodeNotificationsCookie, XnNodeNotifications *pNodeNotifications); 00621 00622 XnStatus (XN_CALLBACK_TYPE* SetRawNodeNotifications) 00623 (XnModuleNodeHandle hInstance, void *pRawNodeNotificationsCookie, XnNodeNotifications *pRawNodeNotifications); 00624 00625 00626 /* 00627 * Determines whether the player repeats the played stream or not. 00628 * 00629 * @param bRepeat [in] If TRUE, repeat is set to be ON. If FALSE, repeat is set to be OFF. 00630 */ 00631 XnStatus (XN_CALLBACK_TYPE* SetRepeat) 00632 (XnModuleNodeHandle hInstance, XnBool bRepeat); 00633 00634 XnStatus (XN_CALLBACK_TYPE* SeekToTimeStamp) 00635 (XnModuleNodeHandle hInstance, XnInt64 nTimeOffset, XnPlayerSeekOrigin origin); 00636 00637 XnStatus (XN_CALLBACK_TYPE* SeekToFrame) 00638 (XnModuleNodeHandle hInstance, const XnChar* strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin); 00639 00640 XnStatus (XN_CALLBACK_TYPE* TellTimestamp) 00641 (XnModuleNodeHandle hInstance, XnUInt64* pnTimestamp); 00642 00643 XnStatus (XN_CALLBACK_TYPE* TellFrame) 00644 (XnModuleNodeHandle hInstance, const XnChar* strNodeName, XnUInt32* pnFrame); 00645 00646 XnStatus (XN_CALLBACK_TYPE* GetNumFrames) 00647 (XnModuleNodeHandle hInstance, const XnChar* strNodeName, XnUInt32* pnFrames); 00648 00649 const XnChar* (XN_CALLBACK_TYPE* GetSupportedFormat) 00650 (XnModuleNodeHandle hInstance); 00651 00652 XnBool (XN_CALLBACK_TYPE* IsEOF) 00653 (XnModuleNodeHandle hInstance); 00654 00663 XnStatus (XN_CALLBACK_TYPE* RegisterToEndOfFileReached) 00664 (XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00665 void* pCookie, XnCallbackHandle* phCallback); 00666 00673 void (XN_CALLBACK_TYPE* UnregisterFromEndOfFileReached) 00674 (XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00675 00676 XnModuleProductionNodeInterface* pProductionNode; 00677 XnModuleSeekingInterface* pSeekingInterface; 00678 } XnModulePlayerInterface; 00679 00680 typedef struct XnModuleCroppingInterface 00681 { 00688 XnStatus (XN_CALLBACK_TYPE* SetCropping)(XnModuleNodeHandle hGenerator, const XnCropping* pCropping); 00689 00696 XnStatus (XN_CALLBACK_TYPE* GetCropping)(XnModuleNodeHandle hGenerator, XnCropping* pCropping); 00697 00706 XnStatus (XN_CALLBACK_TYPE* RegisterToCroppingChange) 00707 (XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00708 void* pCookie, XnCallbackHandle* phCallback); 00709 00716 void (XN_CALLBACK_TYPE* UnregisterFromCroppingChange) 00717 (XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00718 00719 } XnModuleCroppingInterface; 00720 00721 typedef struct XnModuleMapGeneratorInterface 00722 { 00726 XnModuleGeneratorInterface* pGeneratorInterface; 00727 00734 XnUInt32 (XN_CALLBACK_TYPE* GetSupportedMapOutputModesCount) 00735 (XnModuleNodeHandle hGenerator); 00736 00746 XnStatus (XN_CALLBACK_TYPE* GetSupportedMapOutputModes) 00747 (XnModuleNodeHandle hGenerator, 00748 XnMapOutputMode* aModes, XnUInt32* pnCount); 00749 00756 XnStatus (XN_CALLBACK_TYPE* SetMapOutputMode) 00757 (XnModuleNodeHandle hGenerator, const XnMapOutputMode* pOutputMode); 00758 00765 XnStatus (XN_CALLBACK_TYPE* GetMapOutputMode) 00766 (XnModuleNodeHandle hGenerator, XnMapOutputMode* pOutputMode); 00767 00776 XnStatus (XN_CALLBACK_TYPE* RegisterToMapOutputModeChange) 00777 (XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00778 void* pCookie, XnCallbackHandle* phCallback); 00779 00786 void (XN_CALLBACK_TYPE* UnregisterFromMapOutputModeChange) 00787 (XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00788 00789 XnModuleCroppingInterface* pCroppingInterface; 00790 00791 } XnModuleMapGeneratorInterface; 00792 00796 typedef struct XnModuleUserPositionCapabilityInterface 00797 { 00803 XnUInt32 (XN_CALLBACK_TYPE* GetSupportedUserPositionsCount) 00804 (XnModuleNodeHandle hGenerator); 00805 00813 XnStatus (XN_CALLBACK_TYPE* SetUserPosition)( 00814 XnModuleNodeHandle hGenerator, 00815 XnUInt32 nIndex, 00816 const XnBoundingBox3D* pPosition); 00817 00825 XnStatus (XN_CALLBACK_TYPE* GetUserPosition) 00826 (XnModuleNodeHandle hGenerator, XnUInt32 nIndex, XnBoundingBox3D* pPosition); 00827 00836 XnStatus (XN_CALLBACK_TYPE* RegisterToUserPositionChange) 00837 (XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00838 void* pCookie, XnCallbackHandle* phCallback); 00839 00846 void (XN_CALLBACK_TYPE* UnregisterFromUserPositionChange) 00847 (XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00848 00849 } XnModuleUserPositionCapabilityInterface; 00850 00852 typedef struct XnModuleDepthGeneratorInterface 00853 { 00857 XnModuleMapGeneratorInterface* pMapInterface; 00858 00864 XnDepthPixel* (XN_CALLBACK_TYPE* GetDepthMap) 00865 (XnModuleNodeHandle hGenerator); 00866 00872 XnDepthPixel (XN_CALLBACK_TYPE* GetDeviceMaxDepth) 00873 (XnModuleNodeHandle hGenerator); 00874 00883 void (XN_CALLBACK_TYPE* GetFieldOfView)(XnModuleNodeHandle hGenerator, XnFieldOfView* pFOV); 00884 00893 XnStatus (XN_CALLBACK_TYPE* RegisterToFieldOfViewChange)(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00894 void* pCookie, XnCallbackHandle* phCallback); 00895 00902 void (XN_CALLBACK_TYPE* UnregisterFromFieldOfViewChange)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00903 00907 XnModuleUserPositionCapabilityInterface* pUserPositionInterface; 00908 00909 } XnModuleDepthGeneratorInterface; 00910 00912 typedef struct XnModuleImageGeneratorInterface 00913 { 00917 XnModuleMapGeneratorInterface* pMapInterface; 00918 00920 XnUInt8* (XN_CALLBACK_TYPE* GetImageMap)( 00921 XnModuleNodeHandle hGenerator 00922 ); 00923 00930 XnBool (XN_CALLBACK_TYPE* IsPixelFormatSupported)(XnModuleNodeHandle hGenerator, XnPixelFormat Format); 00931 00938 XnStatus (XN_CALLBACK_TYPE* SetPixelFormat)(XnModuleNodeHandle hGenerator, XnPixelFormat Format); 00939 00945 XnPixelFormat (XN_CALLBACK_TYPE* GetPixelFormat)(XnModuleNodeHandle hGenerator); 00946 00955 XnStatus (XN_CALLBACK_TYPE* RegisterToPixelFormatChange)(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 00956 void* pCookie, XnCallbackHandle* phCallback); 00957 00964 void (XN_CALLBACK_TYPE* UnregisterFromPixelFormatChange)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00965 00966 } XnModuleImageGeneratorInterface; 00967 00969 typedef struct XnModuleIRGeneratorInterface 00970 { 00974 XnModuleMapGeneratorInterface* pMapInterface; 00975 00977 XnIRPixel* (XN_CALLBACK_TYPE* GetIRMap)( 00978 XnModuleNodeHandle hGenerator 00979 ); 00980 00981 } XnModuleIRGeneratorInterface; 00982 00984 typedef struct XnModuleGestureGeneratorInterface 00985 { 00986 XnModuleGeneratorInterface* pGeneratorInterface; 00987 00988 XnStatus (XN_CALLBACK_TYPE* AddGesture)(XnModuleNodeHandle hGenerator, const XnChar* strGesture, XnBoundingBox3D* pArea); 00989 XnStatus (XN_CALLBACK_TYPE* RemoveGesture)(XnModuleNodeHandle hGenerator, const XnChar* strGesture); 00990 XnStatus (XN_CALLBACK_TYPE* GetActiveGestures)(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt16* nGestures); 00991 XnStatus (XN_CALLBACK_TYPE* EnumerateGestures)(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt16* nGestures); 00992 XnBool (XN_CALLBACK_TYPE* IsGestureAvailable)(XnModuleNodeHandle hInstance, const XnChar* strGesture); 00993 XnBool (XN_CALLBACK_TYPE* IsGestureProgressSupported)(XnModuleNodeHandle hGenerator, const XnChar* strGesture); 00994 XnStatus (XN_CALLBACK_TYPE* RegisterGestureCallbacks)(XnModuleNodeHandle hGenerator, XnModuleGestureRecognized RecognizedCB, XnModuleGestureProgress ProgressCB, void* pCookie, XnCallbackHandle* phCallback); 00995 void (XN_CALLBACK_TYPE* UnregisterGestureCallbacks)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00996 XnStatus (XN_CALLBACK_TYPE* RegisterToGestureChange)(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback); 00997 void (XN_CALLBACK_TYPE* UnregisterFromGestureChange)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 00998 00999 XnStatus (XN_CALLBACK_TYPE* GetAllActiveGestures)(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt32 nNameLength, XnUInt16* nGestures); 01000 XnStatus (XN_CALLBACK_TYPE* EnumerateAllGestures)(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt32 nNameLength, XnUInt16* nGestures); 01001 } XnModuleGestureGeneratorInterface; 01002 01004 typedef struct XnModuleSceneAnalyzerInterface 01005 { 01006 XnModuleMapGeneratorInterface* pMapInterface; 01007 01008 const XnLabel* (XN_CALLBACK_TYPE* GetLabelMap)(XnModuleNodeHandle hGenerator); 01009 XnStatus (XN_CALLBACK_TYPE* GetFloor)(XnModuleNodeHandle hGenerator, XnPlane3D* pPlane); 01010 } XnModuleSceneAnalyzerInterface; 01011 01015 typedef struct XnModuleHandsGeneratorInterface 01016 { 01017 XnModuleGeneratorInterface* pGeneratorInterface; 01018 01019 XnStatus (XN_CALLBACK_TYPE* RegisterHandCallbacks)(XnModuleNodeHandle hGenerator, XnModuleHandCreate CreateCB, XnModuleHandUpdate UpdateCB, XnModuleHandDestroy DestroyCB, void* pCookie, XnCallbackHandle* phCallback); 01020 void (XN_CALLBACK_TYPE* UnregisterHandCallbacks)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 01021 XnStatus (XN_CALLBACK_TYPE* StopTracking)(XnModuleNodeHandle hGenerator, XnUserID user); 01022 XnStatus (XN_CALLBACK_TYPE* StopTrackingAll)(XnModuleNodeHandle hGenerator); 01023 XnStatus (XN_CALLBACK_TYPE* StartTracking)(XnModuleNodeHandle hGenerator, const XnPoint3D* pPosition); 01024 XnStatus (XN_CALLBACK_TYPE* SetSmoothing)(XnModuleNodeHandle hGenerator, XnFloat fSmoothingFactor); 01025 } XnModuleHandsGeneratorInterface; 01026 01030 typedef struct XnModuleSkeletonCapabilityInterface 01031 { 01032 XnBool (XN_CALLBACK_TYPE* IsJointAvailable)(XnModuleNodeHandle hGenerator, XnSkeletonJoint eJoint); 01033 XnBool (XN_CALLBACK_TYPE* IsProfileAvailable)(XnModuleNodeHandle hGenerator, XnSkeletonProfile eProfile); 01034 XnStatus (XN_CALLBACK_TYPE* SetSkeletonProfile)(XnModuleNodeHandle hGenerator, XnSkeletonProfile eProfile); 01035 XnStatus (XN_CALLBACK_TYPE* SetJointActive)(XnModuleNodeHandle hGenerator, XnSkeletonJoint eJoint, XnBool bState); 01036 XnBool (XN_CALLBACK_TYPE* IsJointActive)(XnModuleNodeHandle hGenerator, XnSkeletonJoint eJoint); 01037 XnStatus (XN_CALLBACK_TYPE* RegisterToJointConfigurationChange)(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback); 01038 void (XN_CALLBACK_TYPE* UnregisterFromJointConfigurationChange)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 01039 XnStatus (XN_CALLBACK_TYPE* EnumerateActiveJoints)(XnModuleNodeHandle hGenerator, XnSkeletonJoint* pJoints, XnUInt16* pnJoints); 01040 XnStatus (XN_CALLBACK_TYPE* GetSkeletonJoint)(XnModuleNodeHandle hGenerator, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation* pJoint); 01041 XnStatus (XN_CALLBACK_TYPE* GetSkeletonJointPosition)(XnModuleNodeHandle hGenerator, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointPosition* pJoint); 01042 XnStatus (XN_CALLBACK_TYPE* GetSkeletonJointOrientation)(XnModuleNodeHandle hGenerator, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation* pJoint); 01043 XnBool (XN_CALLBACK_TYPE* IsTracking)(XnModuleNodeHandle hGenerator, XnUserID user); 01044 XnBool (XN_CALLBACK_TYPE* IsCalibrated)(XnModuleNodeHandle hGenerator, XnUserID user); 01045 XnBool (XN_CALLBACK_TYPE* IsCalibrating)(XnModuleNodeHandle hGenerator, XnUserID user); 01046 XnStatus (XN_CALLBACK_TYPE* RequestCalibration)(XnModuleNodeHandle hGenerator, XnUserID user, XnBool bForce); 01047 XnStatus (XN_CALLBACK_TYPE* AbortCalibration)(XnModuleNodeHandle hGenerator, XnUserID user); 01048 XnStatus (XN_CALLBACK_TYPE* SaveCalibrationData)(XnModuleNodeHandle hGenerator, XnUserID user, XnUInt32 nSlot); 01049 XnStatus (XN_CALLBACK_TYPE* LoadCalibrationData)(XnModuleNodeHandle hGenerator, XnUserID user, XnUInt32 nSlot); 01050 XnStatus (XN_CALLBACK_TYPE* ClearCalibrationData)(XnModuleNodeHandle hGenerator, XnUInt32 nSlot); 01051 XnBool (XN_CALLBACK_TYPE* IsCalibrationData)(XnModuleNodeHandle hGenerator, XnUInt32 nSlot); 01052 XnStatus (XN_CALLBACK_TYPE* StartTracking)(XnModuleNodeHandle hGenerator, XnUserID user); 01053 XnStatus (XN_CALLBACK_TYPE* StopTracking)(XnModuleNodeHandle hGenerator, XnUserID user); 01054 XnStatus (XN_CALLBACK_TYPE* Reset)(XnModuleNodeHandle hGenerator, XnUserID user); 01055 XnBool (XN_CALLBACK_TYPE* NeedPoseForCalibration)(XnModuleNodeHandle hGenerator); 01056 XnStatus (XN_CALLBACK_TYPE* GetCalibrationPose)(XnModuleNodeHandle hGenerator, XnChar* strPose); 01057 XnStatus (XN_CALLBACK_TYPE* SetSmoothing)(XnModuleNodeHandle hGenerator, XnFloat fSmoothingFactor); 01058 XnStatus (XN_CALLBACK_TYPE* RegisterCalibrationCallbacks)(XnModuleNodeHandle hGenerator, XnModuleCalibrationStart CalibrationStartCB, XnModuleCalibrationEnd CalibrationEndCB, void* pCookie, XnCallbackHandle* phCallback); 01059 void (XN_CALLBACK_TYPE* UnregisterCalibrationCallbacks)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 01060 01061 } XnModuleSkeletonCapabilityInterface; 01062 01063 typedef struct XnModulePoseDetectionCapabilityInterface 01064 { 01065 XnUInt32 (XN_CALLBACK_TYPE* GetNumberOfPoses)(XnModuleNodeHandle hGenerator); 01066 XnStatus (XN_CALLBACK_TYPE* GetAvailablePoses)(XnModuleNodeHandle hGenerator, XnChar** pstrPoses, XnUInt32* pnPoses); 01067 XnStatus (XN_CALLBACK_TYPE* StartPoseDetection)(XnModuleNodeHandle hGenerator, const XnChar* strPose, XnUserID user); 01068 XnStatus (XN_CALLBACK_TYPE* StopPoseDetection)(XnModuleNodeHandle hGenerator, XnUserID user); 01069 XnStatus (XN_CALLBACK_TYPE* RegisterToPoseCallbacks)(XnModuleNodeHandle hGenerator, XnModulePoseDetectionCallback StartPoseCB, XnModulePoseDetectionCallback EndCB, void* pCookie, XnCallbackHandle* phCallback); 01070 void (XN_CALLBACK_TYPE* UnregisterFromPoseCallbacks)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 01071 01072 XnStatus (XN_CALLBACK_TYPE* GetAllAvailablePoses)(XnModuleNodeHandle hGenerator, XnChar** pstrPoses, XnUInt32 nNameLength, XnUInt32* pnPoses); 01073 } XnModulePoseDetectionCapabilityInterface; 01074 01076 typedef struct XnModuleUserGeneratorInterface 01077 { 01078 XnModuleGeneratorInterface* pGeneratorInterface; 01079 01080 XnUInt16 (XN_CALLBACK_TYPE* GetNumberOfUsers)(XnModuleNodeHandle hGenerator); 01081 XnStatus (XN_CALLBACK_TYPE* GetUsers)(XnModuleNodeHandle hGenerator, XnUserID* pUsers, XnUInt16* pnUsers); 01082 XnStatus (XN_CALLBACK_TYPE* GetCoM)(XnModuleNodeHandle hGenerator, XnUserID user, XnPoint3D* pCoM); 01083 XnStatus (XN_CALLBACK_TYPE* GetUserPixels)(XnModuleNodeHandle hGenerator, XnUserID user, XnSceneMetaData* pScene); 01084 XnStatus (XN_CALLBACK_TYPE* RegisterUserCallbacks)(XnModuleNodeHandle hGenerator, XnModuleUserHandler NewUserCB, XnModuleUserHandler LostUserCB, void* pCookie, XnCallbackHandle* phCallback); 01085 void (XN_CALLBACK_TYPE* UnregisterUserCallbacks)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 01086 01090 XnModuleSkeletonCapabilityInterface* pSkeletonInterface; 01094 XnModulePoseDetectionCapabilityInterface* pPoseDetectionInteface; 01095 01096 } XnModuleUserGeneratorInterface; 01097 01099 typedef struct XnModuleAudioGeneratorInterface 01100 { 01101 XnModuleGeneratorInterface* pGeneratorInterface; 01102 01103 XnUChar* (XN_CALLBACK_TYPE* GetAudioBuffer)(XnModuleNodeHandle hGenerator); 01104 XnUInt32 (XN_CALLBACK_TYPE* GetSupportedWaveOutputModesCount)(XnModuleNodeHandle hGenerator); 01105 XnStatus (XN_CALLBACK_TYPE* GetSupportedWaveOutputModes)(XnModuleNodeHandle hGenerator, XnWaveOutputMode* aSupportedModes, XnUInt32* pnCount); 01106 XnStatus (XN_CALLBACK_TYPE* SetWaveOutputMode)(XnModuleNodeHandle hGenerator, const XnWaveOutputMode* OutputMode); 01107 XnStatus (XN_CALLBACK_TYPE* GetWaveOutputMode)(XnModuleNodeHandle hGenerator, XnWaveOutputMode* OutputMode); 01108 XnStatus (XN_CALLBACK_TYPE* RegisterToWaveOutputModeChanges)(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, 01109 void* pCookie, XnCallbackHandle* phCallback); 01110 void (XN_CALLBACK_TYPE* UnregisterFromWaveOutputModeChanges)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback); 01111 01112 } XnModuleAudioGeneratorInterface; 01113 01114 typedef struct XnModuleCodecInterface 01115 { 01116 XnModuleProductionNodeInterface* pProductionNode; 01117 01118 XnCodecID (XN_CALLBACK_TYPE* GetCodecID)(XnModuleNodeHandle hCodec); 01119 XnStatus (XN_CALLBACK_TYPE* Init)(XnModuleNodeHandle hCodec, XnNodeHandle hNode); 01120 XnStatus (XN_CALLBACK_TYPE* CompressData)(XnModuleNodeHandle hCodec, const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten); 01121 XnStatus (XN_CALLBACK_TYPE* DecompressData)(XnModuleNodeHandle hCodec, const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten); 01122 } XnModuleCodecInterface; 01123 01124 #endif // __XN_MODULE_INTERFACE_H__