![]() |
OpenNI 1.5.4
|
XnModuleCFunctions.h
Go to the documentation of this file.
00001 /**************************************************************************** 00002 * * 00003 * OpenNI 1.x Alpha * 00004 * Copyright (C) 2011 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 #ifndef XN_MODULE_C_FUNCTIONS_H_ 00023 #define XN_MODULE_C_FUNCTIONS_H_ 00024 00025 #include "XnModuleCppInterface.h" 00026 00027 using namespace xn; 00028 00029 #ifdef XN_NO_DYNAMIC_CAST 00030 #include "XnDerivedCast.h" 00031 #endif 00032 00033 #define _XN_VALIDATE_CAPABILITY_INTERFACE_RET(capInterface, retVal) \ 00034 if (capInterface == NULL) \ 00035 return retVal; 00036 00037 #define _XN_VALIDATE_CAPABILITY_INTERFACE(capInterface) \ 00038 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(capInterface, XN_STATUS_INVALID_OPERATION) 00039 00040 XnBool XN_CALLBACK_TYPE __ModuleIsCapabilitySupported(XnModuleNodeHandle hInstance, const XnChar* strCapabilityName) 00041 { 00042 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00043 return pNode->IsCapabilitySupported(strCapabilityName); 00044 } 00045 00046 XnStatus XN_CALLBACK_TYPE __ModuleInitNotifications(XnModuleNodeHandle hInstance, XnNodeNotifications* pNotifications, void* pCookie) 00047 { 00048 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00049 ModuleExtendedSerializationInterface* pInterface = pNode->GetExtendedSerializationInterface(); 00050 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00051 return pInterface->NotifyExState(pNotifications, pCookie); 00052 } 00053 void XN_CALLBACK_TYPE __ModuleStopNotifications(XnModuleNodeHandle hInstance) 00054 { 00055 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00056 ModuleExtendedSerializationInterface* pInterface = pNode->GetExtendedSerializationInterface(); 00057 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00058 pInterface->UnregisterExNotifications(); 00059 } 00060 00061 XnStatus XN_CALLBACK_TYPE __ModuleSetLockState(XnModuleNodeHandle hInstance, XnBool bLocked) 00062 { 00063 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00064 ModuleLockAwareInterface* pInterface = pNode->GetLockAwareInterface(); 00065 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00066 return pInterface->SetLockState(bLocked); 00067 } 00068 00069 XnBool XN_CALLBACK_TYPE __ModuleGetLockState(XnModuleNodeHandle hInstance) 00070 { 00071 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00072 ModuleLockAwareInterface* pInterface = pNode->GetLockAwareInterface(); 00073 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 00074 return pInterface->GetLockState(); 00075 } 00076 00077 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToLockChange(XnModuleNodeHandle hInstance, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00078 { 00079 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00080 ModuleLockAwareInterface* pInterface = pNode->GetLockAwareInterface(); 00081 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00082 return pInterface->RegisterToLockChange(handler, pCookie, *phCallback); 00083 } 00084 00085 void XN_CALLBACK_TYPE __ModuleUnregisterFromLockChange(XnModuleNodeHandle hInstance, XnCallbackHandle hCallback) 00086 { 00087 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00088 ModuleLockAwareInterface* pInterface = pNode->GetLockAwareInterface(); 00089 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00090 pInterface->UnregisterFromLockChange(hCallback); 00091 } 00092 00093 XnStatus XN_CALLBACK_TYPE __ModuleGetErrorState(XnModuleNodeHandle hInstance) 00094 { 00095 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00096 ModuleErrorStateInterface* pInterface = pNode->GetErrorStateInterface(); 00097 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, XN_STATUS_OK); 00098 return pInterface->GetErrorState(); 00099 } 00100 00101 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToErrorStateChange(XnModuleNodeHandle hInstance, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00102 { 00103 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00104 ModuleErrorStateInterface* pInterface = pNode->GetErrorStateInterface(); 00105 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00106 return pInterface->RegisterToErrorStateChange(handler, pCookie, *phCallback); 00107 } 00108 00109 void XN_CALLBACK_TYPE __ModuleUnregisterFromErrorStateChange(XnModuleNodeHandle hInstance, XnCallbackHandle hCallback) 00110 { 00111 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00112 ModuleErrorStateInterface* pInterface = pNode->GetErrorStateInterface(); 00113 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00114 pInterface->UnregisterFromErrorStateChange(hCallback); 00115 } 00116 00117 XnStatus XN_CALLBACK_TYPE __ModuleGeneralIntGetRange(XnModuleNodeHandle hInstance, const XnChar* strCap, XnInt32* pnMin, XnInt32* pnMax, XnInt32* pnStep, XnInt32* pnDefault, XnBool* pbIsAutoSupported) 00118 { 00119 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00120 ModuleGeneralIntInterface* pInterface = pNode->GetGeneralIntInterface(strCap); 00121 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00122 return pInterface->GetRange(strCap, *pnMin, *pnMax, *pnStep, *pnDefault, *pbIsAutoSupported); 00123 } 00124 00125 XnStatus XN_CALLBACK_TYPE __ModuleGeneralIntGet(XnModuleNodeHandle hInstance, const XnChar* strCap, XnInt32* pnValue) 00126 { 00127 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00128 ModuleGeneralIntInterface* pInterface = pNode->GetGeneralIntInterface(strCap); 00129 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00130 return pInterface->Get(strCap, *pnValue); 00131 } 00132 00133 XnStatus XN_CALLBACK_TYPE __ModuleGeneralIntSet(XnModuleNodeHandle hInstance, const XnChar* strCap, XnInt32 nValue) 00134 { 00135 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00136 ModuleGeneralIntInterface* pInterface = pNode->GetGeneralIntInterface(strCap); 00137 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00138 return pInterface->Set(strCap, nValue); 00139 } 00140 00141 XnStatus XN_CALLBACK_TYPE __ModuleGeneralIntRegisterToValueChange 00142 (XnModuleNodeHandle hInstance, const XnChar* strCap, XnModuleStateChangedHandler handler, 00143 void* pCookie, XnCallbackHandle* phCallback) 00144 { 00145 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00146 ModuleGeneralIntInterface* pInterface = pNode->GetGeneralIntInterface(strCap); 00147 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00148 return pInterface->RegisterToValueChange(strCap, handler, pCookie, *phCallback); 00149 } 00150 00151 void XN_CALLBACK_TYPE __ModuleGeneralIntUnregisterFromValueChange 00152 (XnModuleNodeHandle hInstance, const XnChar* strCap, XnCallbackHandle hCallback) 00153 { 00154 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00155 ModuleGeneralIntInterface* pInterface = pNode->GetGeneralIntInterface(strCap); 00156 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00157 pInterface->UnregisterFromValueChange(strCap, hCallback); 00158 } 00159 00160 XnStatus XN_CALLBACK_TYPE __ModuleSetIntProperty(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt64 nValue) 00161 { 00162 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00163 return pNode->SetIntProperty(strName, nValue); 00164 } 00165 00166 XnStatus XN_CALLBACK_TYPE __ModuleSetRealProperty(XnModuleNodeHandle hInstance, const XnChar* strName, XnDouble dValue) 00167 { 00168 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00169 return pNode->SetRealProperty(strName, dValue); 00170 } 00171 00172 XnStatus XN_CALLBACK_TYPE __ModuleSetStringProperty(XnModuleNodeHandle hInstance, const XnChar* strName, const XnChar* strValue) 00173 { 00174 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00175 return pNode->SetStringProperty(strName, strValue); 00176 } 00177 00178 XnStatus XN_CALLBACK_TYPE __ModuleSetGeneralProperty(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt32 nBufferSize, const void* pBuffer) 00179 { 00180 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00181 return pNode->SetGeneralProperty(strName, nBufferSize, pBuffer); 00182 } 00183 00184 XnStatus XN_CALLBACK_TYPE __ModuleGetIntProperty(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt64* pnValue) 00185 { 00186 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00187 return pNode->GetIntProperty(strName, *pnValue); 00188 } 00189 00190 XnStatus XN_CALLBACK_TYPE __ModuleGetRealProperty(XnModuleNodeHandle hInstance, const XnChar* strName, XnDouble* pdValue) 00191 { 00192 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00193 return pNode->GetRealProperty(strName, *pdValue); 00194 } 00195 00196 XnStatus XN_CALLBACK_TYPE __ModuleGetStringProperty(XnModuleNodeHandle hInstance, const XnChar* strName, XnChar* csValue, XnUInt32 nBufSize) 00197 { 00198 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00199 return pNode->GetStringProperty(strName, csValue, nBufSize); 00200 } 00201 00202 XnStatus XN_CALLBACK_TYPE __ModuleGetGeneralProperty(XnModuleNodeHandle hInstance, const XnChar* strName, XnUInt32 nBufferSize, void* pBuffer) 00203 { 00204 ModuleProductionNode* pNode = (ModuleProductionNode*)hInstance; 00205 return pNode->GetGeneralProperty(strName, nBufferSize, pBuffer); 00206 } 00207 00208 XnStatus XN_CALLBACK_TYPE __ModuleSetOutputStream(XnModuleNodeHandle hInstance, void *pCookie, XnRecorderOutputStreamInterface *pStream) 00209 { 00210 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00211 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00212 return pNode->SetOutputStream(pCookie, pStream); 00213 } 00214 00215 XnStatus XN_CALLBACK_TYPE __ModuleSetInputStream(XnModuleNodeHandle hInstance, void *pStreamCookie, XnPlayerInputStreamInterface *pStream) 00216 { 00217 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00218 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00219 return pNode->SetInputStream(pStreamCookie, pStream); 00220 } 00221 00222 XnStatus XN_CALLBACK_TYPE __ModuleReadNext(XnModuleNodeHandle hInstance) 00223 { 00224 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00225 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00226 return pNode->ReadNext(); 00227 } 00228 00229 XnStatus XN_CALLBACK_TYPE __ModuleSetRepeat(XnModuleNodeHandle hInstance, XnBool bRepeat) 00230 { 00231 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00232 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00233 return pNode->SetRepeat(bRepeat); 00234 } 00235 00236 XnStatus XN_CALLBACK_TYPE __ModuleSeekToTimeStamp(XnModuleNodeHandle hInstance, XnInt64 nTimeOffset, XnPlayerSeekOrigin origin) 00237 { 00238 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00239 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00240 return pNode->SeekToTimeStamp(nTimeOffset, origin); 00241 } 00242 00243 XnStatus XN_CALLBACK_TYPE __ModuleSeekToFrame(XnModuleNodeHandle hInstance, const XnChar* strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin) 00244 { 00245 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00246 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00247 return pNode->SeekToFrame(strNodeName, nFrameOffset, origin); 00248 } 00249 00250 XnStatus XN_CALLBACK_TYPE __ModuleTellTimestamp(XnModuleNodeHandle hInstance, XnUInt64* pnTimestamp) 00251 { 00252 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00253 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00254 return pNode->TellTimestamp(*pnTimestamp); 00255 } 00256 00257 XnStatus XN_CALLBACK_TYPE __ModuleTellFrame(XnModuleNodeHandle hInstance, const XnChar* strNodeName, XnUInt32* pnFrame) 00258 { 00259 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00260 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00261 return pNode->TellFrame(strNodeName, *pnFrame); 00262 } 00263 00264 XnStatus XN_CALLBACK_TYPE __ModuleGetNumFrames(XnModuleNodeHandle hInstance, const XnChar* strNodeName, XnUInt32* pnFrames) 00265 { 00266 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00267 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00268 return pNode->GetNumFrames(strNodeName, *pnFrames); 00269 } 00270 00271 const XnChar* XN_CALLBACK_TYPE __ModuleGetSupportedFormat(XnModuleNodeHandle hInstance) 00272 { 00273 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00274 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00275 return pNode->GetSupportedFormat(); 00276 } 00277 00278 XnBool XN_CALLBACK_TYPE __ModuleIsEOF(XnModuleNodeHandle hGenerator) 00279 { 00280 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00281 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00282 return pNode->IsEOF(); 00283 } 00284 00285 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToEndOfFileReached(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00286 { 00287 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00288 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00289 return pNode->RegisterToEndOfFileReached(handler, pCookie, *phCallback); 00290 } 00291 00292 void XN_CALLBACK_TYPE __ModuleUnregisterFromEndOfFileReached(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00293 { 00294 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00295 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00296 pNode->UnregisterFromEndOfFileReached(hCallback); 00297 } 00298 00299 XnStatus XN_CALLBACK_TYPE __ModuleSetNodeNotifications(XnModuleNodeHandle hInstance, void *pNodeNotificationsCookie, XnNodeNotifications *pNodeNotifications) 00300 { 00301 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00302 ModulePlayer* pNode = dynamic_cast<ModulePlayer*>(pProdNode); 00303 return pNode->SetNodeNotifications(pNodeNotificationsCookie, pNodeNotifications); 00304 } 00305 00306 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeAdded(XnModuleNodeHandle hGenerator, const XnChar *strNodeName, XnProductionNodeType type, XnCodecID compression) 00307 { 00308 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00309 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00310 return pNode->OnNodeAdded(strNodeName, type, compression); 00311 } 00312 00313 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeRemoved(XnModuleNodeHandle hGenerator, const XnChar *strNodeName) 00314 { 00315 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00316 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00317 return pNode->OnNodeRemoved(strNodeName); 00318 } 00319 00320 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeIntPropChanged(XnModuleNodeHandle hGenerator, const XnChar *strNodeName, const XnChar* strPropName, XnUInt64 nValue) 00321 { 00322 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00323 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00324 return pNode->OnNodeIntPropChanged(strNodeName, strPropName, nValue); 00325 } 00326 00327 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeRealPropChanged(XnModuleNodeHandle hGenerator, const XnChar *strNodeName, const XnChar* strPropName, XnDouble dValue) 00328 { 00329 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00330 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00331 return pNode->OnNodeRealPropChanged(strNodeName, strPropName, dValue); 00332 } 00333 00334 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeStringPropChanged(XnModuleNodeHandle hGenerator, const XnChar *strNodeName, const XnChar* strPropName, const XnChar* strValue) 00335 { 00336 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00337 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00338 return pNode->OnNodeStringPropChanged(strNodeName, strPropName, strValue); 00339 } 00340 00341 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeGeneralPropChanged(XnModuleNodeHandle hGenerator, const XnChar *strNodeName, const XnChar* strPropName, XnUInt32 nBufferSize, const void* pBuffer) 00342 { 00343 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00344 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00345 return pNode->OnNodeGeneralPropChanged(strNodeName, strPropName, nBufferSize, pBuffer); 00346 } 00347 00348 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeNewData(XnModuleNodeHandle hGenerator, const XnChar *strNodeName, XnUInt64 nTimeStamp, XnUInt32 nFrame, const void *pData, XnUInt32 nSize) 00349 { 00350 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00351 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00352 return pNode->OnNodeNewData(strNodeName, nTimeStamp, nFrame, pData, nSize); 00353 } 00354 00355 XnStatus XN_CALLBACK_TYPE __ModuleOnNodeStateReady(XnModuleNodeHandle hGenerator, const XnChar *strNodeName) 00356 { 00357 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00358 ModuleRecorder* pNode = dynamic_cast<ModuleRecorder*>(pProdNode); 00359 return pNode->OnNodeStateReady(strNodeName); 00360 } 00361 00362 XnStatus XN_CALLBACK_TYPE __ModuleGetDeviceName(XnModuleNodeHandle hInstance, XnChar* strBuffer, XnUInt32* pnBufferSize) 00363 { 00364 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00365 ModuleDevice* pNode = dynamic_cast<ModuleDevice*>(pProdNode); 00366 ModuleDeviceIdentificationInterface* pInterface = pNode->GetIdentificationInterface(); 00367 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00368 return pInterface->GetDeviceName(strBuffer, *pnBufferSize); 00369 } 00370 00371 XnStatus XN_CALLBACK_TYPE __ModuleGetVendorSpecificData(XnModuleNodeHandle hInstance, XnChar* strBuffer, XnUInt32* pnBufferSize) 00372 { 00373 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00374 ModuleDevice* pNode = dynamic_cast<ModuleDevice*>(pProdNode); 00375 ModuleDeviceIdentificationInterface* pInterface = pNode->GetIdentificationInterface(); 00376 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00377 return pInterface->GetVendorSpecificData(strBuffer, *pnBufferSize); 00378 } 00379 00380 XnStatus XN_CALLBACK_TYPE __ModuleGetSerialNumber(XnModuleNodeHandle hInstance, XnChar* strBuffer, XnUInt32* pnBufferSize) 00381 { 00382 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hInstance; 00383 ModuleDevice* pNode = dynamic_cast<ModuleDevice*>(pProdNode); 00384 ModuleDeviceIdentificationInterface* pInterface = pNode->GetIdentificationInterface(); 00385 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00386 return pInterface->GetSerialNumber(strBuffer, *pnBufferSize); 00387 } 00388 00389 XnStatus XN_CALLBACK_TYPE __ModuleSetMirror(XnModuleNodeHandle hGenerator, XnBool bMirror) 00390 { 00391 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00392 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00393 ModuleMirrorInterface* pInterface = pNode->GetMirrorInterface(); 00394 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00395 return pInterface->SetMirror(bMirror); 00396 } 00397 00398 XnBool XN_CALLBACK_TYPE __ModuleIsMirrored(XnModuleNodeHandle hGenerator) 00399 { 00400 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00401 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00402 ModuleMirrorInterface* pInterface = pNode->GetMirrorInterface(); 00403 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 00404 return pInterface->IsMirrored(); 00405 } 00406 00407 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToMirrorChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00408 { 00409 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00410 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00411 ModuleMirrorInterface* pInterface = pNode->GetMirrorInterface(); 00412 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00413 return pInterface->RegisterToMirrorChange(handler, pCookie, *phCallback); 00414 } 00415 00416 void XN_CALLBACK_TYPE __ModuleUnregisterFromMirrorChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00417 { 00418 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00419 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00420 ModuleMirrorInterface* pInterface = pNode->GetMirrorInterface(); 00421 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00422 pInterface->UnregisterFromMirrorChange(hCallback); 00423 } 00424 00425 XnBool XN_CALLBACK_TYPE __ModuleIsViewPointSupported(XnModuleNodeHandle hGenerator, XnNodeHandle hNode) 00426 { 00427 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00428 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00429 ProductionNode node(hNode); 00430 ModuleAlternativeViewPointInterface* pInterface = pNode->GetAlternativeViewPointInterface(); 00431 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 00432 return pInterface->IsViewPointSupported(node); 00433 } 00434 00435 XnStatus XN_CALLBACK_TYPE __ModuleSetViewPoint(XnModuleNodeHandle hGenerator, XnNodeHandle hNode) 00436 { 00437 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00438 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00439 ProductionNode node(hNode); 00440 ModuleAlternativeViewPointInterface* pInterface = pNode->GetAlternativeViewPointInterface(); 00441 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00442 return pInterface->SetViewPoint(node); 00443 } 00444 00445 XnStatus XN_CALLBACK_TYPE __ModuleResetViewPoint(XnModuleNodeHandle hGenerator) 00446 { 00447 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00448 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00449 ModuleAlternativeViewPointInterface* pInterface = pNode->GetAlternativeViewPointInterface(); 00450 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00451 return pInterface->ResetViewPoint(); 00452 } 00453 00454 XnBool XN_CALLBACK_TYPE __ModuleIsViewPointAs(XnModuleNodeHandle hGenerator, XnNodeHandle hNode) 00455 { 00456 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00457 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00458 ModuleAlternativeViewPointInterface* pInterface = pNode->GetAlternativeViewPointInterface(); 00459 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 00460 ProductionNode node(hNode); 00461 return pInterface->IsViewPointAs(node); 00462 } 00463 00464 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToViewPointChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00465 { 00466 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00467 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00468 ModuleAlternativeViewPointInterface* pInterface = pNode->GetAlternativeViewPointInterface(); 00469 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00470 return pInterface->RegisterToViewPointChange(handler, pCookie, *phCallback); 00471 } 00472 00473 void XN_CALLBACK_TYPE __ModuleUnregisterFromViewPointChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00474 { 00475 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00476 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00477 ModuleAlternativeViewPointInterface* pInterface = pNode->GetAlternativeViewPointInterface(); 00478 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00479 pInterface->UnregisterFromViewPointChange(hCallback); 00480 } 00481 00482 XnBool XN_CALLBACK_TYPE __ModuleCanFrameSyncWith(XnModuleNodeHandle hGenerator, XnNodeHandle hNode) 00483 { 00484 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00485 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00486 ModuleFrameSyncInterface* pInterface = pNode->GetFrameSyncInterface(); 00487 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 00488 ProductionNode node(hNode); 00489 return pInterface->CanFrameSyncWith(node); 00490 } 00491 00492 XnStatus XN_CALLBACK_TYPE __ModuleFrameSyncWith(XnModuleNodeHandle hGenerator, XnNodeHandle hNode) 00493 { 00494 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00495 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00496 ModuleFrameSyncInterface* pInterface = pNode->GetFrameSyncInterface(); 00497 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00498 ProductionNode node(hNode); 00499 return pInterface->FrameSyncWith(node); 00500 } 00501 00502 XnStatus XN_CALLBACK_TYPE __ModuleStopFrameSyncWith(XnModuleNodeHandle hGenerator, XnNodeHandle hNode) 00503 { 00504 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00505 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00506 ModuleFrameSyncInterface* pInterface = pNode->GetFrameSyncInterface(); 00507 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00508 ProductionNode node(hNode); 00509 return pInterface->StopFrameSyncWith(node); 00510 } 00511 00512 XnBool XN_CALLBACK_TYPE __ModuleIsFrameSyncedWith(XnModuleNodeHandle hGenerator, XnNodeHandle hNode) 00513 { 00514 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00515 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00516 ModuleFrameSyncInterface* pInterface = pNode->GetFrameSyncInterface(); 00517 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 00518 ProductionNode node(hNode); 00519 return pInterface->IsFrameSyncedWith(node); 00520 } 00521 00522 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToFrameSyncChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00523 { 00524 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00525 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00526 ModuleFrameSyncInterface* pInterface = pNode->GetFrameSyncInterface(); 00527 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00528 return pInterface->RegisterToFrameSyncChange(handler, pCookie, *phCallback); 00529 } 00530 00531 void XN_CALLBACK_TYPE __ModuleUnregisterFromFrameSyncChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00532 { 00533 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00534 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00535 ModuleFrameSyncInterface* pInterface = pNode->GetFrameSyncInterface(); 00536 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00537 pInterface->UnregisterFromFrameSyncChange(hCallback); 00538 } 00539 00540 XnStatus XN_CALLBACK_TYPE __ModuleStartGenerating(XnModuleNodeHandle hGenerator) 00541 { 00542 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00543 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00544 return pNode->StartGenerating(); 00545 } 00546 00547 XnBool XN_CALLBACK_TYPE __ModuleIsGenerating(XnModuleNodeHandle hGenerator) 00548 { 00549 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00550 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00551 return pNode->IsGenerating(); 00552 } 00553 00554 void XN_CALLBACK_TYPE __ModuleStopGenerating(XnModuleNodeHandle hGenerator) 00555 { 00556 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00557 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00558 pNode->StopGenerating(); 00559 } 00560 00561 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToGenerationRunningChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00562 { 00563 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00564 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00565 return pNode->RegisterToGenerationRunningChange(handler, pCookie, *phCallback); 00566 } 00567 00568 void XN_CALLBACK_TYPE __ModuleUnregisterFromGenerationRunningChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00569 { 00570 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00571 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00572 pNode->UnregisterFromGenerationRunningChange(hCallback); 00573 } 00574 00575 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToNewDataAvailable(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00576 { 00577 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00578 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00579 return pNode->RegisterToNewDataAvailable(handler, pCookie, *phCallback); 00580 } 00581 00582 void XN_CALLBACK_TYPE __ModuleUnregisterFromNewDataAvailable(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00583 { 00584 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00585 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00586 pNode->UnregisterFromNewDataAvailable(hCallback); 00587 } 00588 00589 XnBool XN_CALLBACK_TYPE __ModuleIsNewDataAvailable(XnModuleNodeHandle hGenerator, XnUInt64* pnTimestamp) 00590 { 00591 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00592 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00593 return pNode->IsNewDataAvailable(*pnTimestamp); 00594 } 00595 00596 XnStatus XN_CALLBACK_TYPE __ModuleUpdateData(XnModuleNodeHandle hGenerator) 00597 { 00598 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00599 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00600 return pNode->UpdateData(); 00601 } 00602 00603 const void* XN_CALLBACK_TYPE __ModuleGetData(XnModuleNodeHandle hGenerator) 00604 { 00605 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00606 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00607 return pNode->GetData(); 00608 } 00609 00610 XnUInt32 XN_CALLBACK_TYPE __ModuleGetDataSize(XnModuleNodeHandle hGenerator) 00611 { 00612 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00613 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00614 return pNode->GetDataSize(); 00615 } 00616 00617 XnUInt64 XN_CALLBACK_TYPE __ModuleGetTimestamp(XnModuleNodeHandle hGenerator) 00618 { 00619 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00620 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00621 return pNode->GetTimestamp(); 00622 } 00623 00624 XnUInt32 XN_CALLBACK_TYPE __ModuleGetFrameID(XnModuleNodeHandle hGenerator) 00625 { 00626 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00627 ModuleGenerator* pNode = dynamic_cast<ModuleGenerator*>(pProdNode); 00628 return pNode->GetFrameID(); 00629 } 00630 00631 XnStatus XN_CALLBACK_TYPE __ModuleSetCropping(XnModuleNodeHandle hGenerator, const XnCropping* pCropping) 00632 { 00633 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00634 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00635 ModuleCroppingInterface* pInterface = pNode->GetCroppingInterface(); 00636 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00637 return pInterface->SetCropping(*pCropping); 00638 } 00639 00640 XnStatus XN_CALLBACK_TYPE __ModuleGetCropping(XnModuleNodeHandle hGenerator, XnCropping* pCropping) 00641 { 00642 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00643 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00644 ModuleCroppingInterface* pInterface = pNode->GetCroppingInterface(); 00645 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00646 return pInterface->GetCropping(*pCropping); 00647 } 00648 00649 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToCroppingChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00650 { 00651 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00652 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00653 ModuleCroppingInterface* pInterface = pNode->GetCroppingInterface(); 00654 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00655 return pInterface->RegisterToCroppingChange(handler, pCookie, *phCallback); 00656 } 00657 00658 void XN_CALLBACK_TYPE __ModuleUnregisterFromCroppingChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00659 { 00660 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00661 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00662 ModuleCroppingInterface* pInterface = pNode->GetCroppingInterface(); 00663 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00664 pInterface->UnregisterFromCroppingChange(hCallback); 00665 } 00666 00667 XnStatus XN_CALLBACK_TYPE __ModuleSetPowerLineFrequency(XnModuleNodeHandle hGenerator, XnPowerLineFrequency nFrequency) 00668 { 00669 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00670 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00671 ModuleAntiFlickerInterface* pInterface = pNode->GetAntiFlickerInterface(); 00672 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00673 return pInterface->SetPowerLineFrequency(nFrequency); 00674 } 00675 00676 XnPowerLineFrequency XN_CALLBACK_TYPE __ModuleGetPowerLineFrequency(XnModuleNodeHandle hGenerator) 00677 { 00678 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00679 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00680 ModuleAntiFlickerInterface* pInterface = pNode->GetAntiFlickerInterface(); 00681 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, XN_POWER_LINE_FREQUENCY_OFF); 00682 return pInterface->GetPowerLineFrequency(); 00683 } 00684 00685 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToPowerLineFrequencyChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00686 { 00687 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00688 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00689 ModuleAntiFlickerInterface* pInterface = pNode->GetAntiFlickerInterface(); 00690 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00691 return pInterface->RegisterToPowerLineFrequencyChange(handler, pCookie, *phCallback); 00692 } 00693 00694 void XN_CALLBACK_TYPE __ModuleUnregisterFromPowerLineFrequencyChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00695 { 00696 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00697 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00698 ModuleAntiFlickerInterface* pInterface = pNode->GetAntiFlickerInterface(); 00699 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00700 pInterface->UnregisterFromPowerLineFrequencyChange(hCallback); 00701 } 00702 00703 XnUInt32 XN_CALLBACK_TYPE __ModuleGetSupportedMapOutputModesCount(XnModuleNodeHandle hGenerator) 00704 { 00705 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00706 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00707 return pNode->GetSupportedMapOutputModesCount(); 00708 } 00709 00710 XnStatus XN_CALLBACK_TYPE __ModuleGetSupportedMapOutputModes(XnModuleNodeHandle hGenerator, XnMapOutputMode* aModes, XnUInt32* pnCount) 00711 { 00712 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00713 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00714 return pNode->GetSupportedMapOutputModes(aModes, *pnCount); 00715 } 00716 00717 XnStatus XN_CALLBACK_TYPE __ModuleSetMapOutputMode(XnModuleNodeHandle hGenerator, const XnMapOutputMode* pOutputMode) 00718 { 00719 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00720 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00721 return pNode->SetMapOutputMode(*pOutputMode); 00722 } 00723 00724 XnStatus XN_CALLBACK_TYPE __ModuleGetMapOutputMode(XnModuleNodeHandle hGenerator, XnMapOutputMode* pOutputMode) 00725 { 00726 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00727 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00728 return pNode->GetMapOutputMode(*pOutputMode); 00729 } 00730 00731 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToMapOutputModeChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00732 { 00733 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00734 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00735 return pNode->RegisterToMapOutputModeChange(handler, pCookie, *phCallback); 00736 } 00737 00738 void XN_CALLBACK_TYPE __ModuleUnregisterFromMapOutputModeChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00739 { 00740 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00741 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00742 pNode->UnregisterFromMapOutputModeChange(hCallback); 00743 } 00744 00745 XnUInt32 XN_CALLBACK_TYPE __ModuleGetBytesPerPixel(XnModuleNodeHandle hGenerator) 00746 { 00747 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00748 ModuleMapGenerator* pNode = dynamic_cast<ModuleMapGenerator*>(pProdNode); 00749 return pNode->GetBytesPerPixel(); 00750 } 00751 00752 XnUInt32 XN_CALLBACK_TYPE __ModuleGetSupportedUserPositionsCount(XnModuleNodeHandle hGenerator) 00753 { 00754 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00755 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00756 ModuleUserPositionInterface* pInterface = pNode->GetUserPositionInterface(); 00757 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, 0); 00758 return pInterface->GetSupportedUserPositionsCount(); 00759 } 00760 00761 XnStatus XN_CALLBACK_TYPE __ModuleSetUserPosition(XnModuleNodeHandle hGenerator, XnUInt32 nIndex, const XnBoundingBox3D* pPosition) 00762 { 00763 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00764 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00765 ModuleUserPositionInterface* pInterface = pNode->GetUserPositionInterface(); 00766 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00767 return pInterface->SetUserPosition(nIndex, *pPosition); 00768 } 00769 00770 XnStatus XN_CALLBACK_TYPE __ModuleGetUserPosition(XnModuleNodeHandle hGenerator, XnUInt32 nIndex, XnBoundingBox3D* pPosition) 00771 { 00772 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00773 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00774 ModuleUserPositionInterface* pInterface = pNode->GetUserPositionInterface(); 00775 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00776 return pInterface->GetUserPosition(nIndex, *pPosition); 00777 } 00778 00779 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToUserPositionChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00780 { 00781 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00782 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00783 ModuleUserPositionInterface* pInterface = pNode->GetUserPositionInterface(); 00784 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 00785 return pInterface->RegisterToUserPositionChange(handler, pCookie, *phCallback); 00786 } 00787 00788 void XN_CALLBACK_TYPE __ModuleUnregisterFromUserPositionChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00789 { 00790 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00791 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00792 ModuleUserPositionInterface* pInterface = pNode->GetUserPositionInterface(); 00793 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 00794 pInterface->UnregisterFromUserPositionChange(hCallback); 00795 } 00796 00797 XnDepthPixel XN_CALLBACK_TYPE __ModuleGetDeviceMaxDepth(XnModuleNodeHandle hGenerator) 00798 { 00799 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00800 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00801 return pNode->GetDeviceMaxDepth(); 00802 } 00803 00804 void XN_CALLBACK_TYPE __ModuleGetFieldOfView(XnModuleNodeHandle hGenerator, XnFieldOfView* pFOV) 00805 { 00806 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00807 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00808 pNode->GetFieldOfView(*pFOV); 00809 } 00810 00811 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToFieldOfViewChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00812 { 00813 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00814 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00815 return pNode->RegisterToFieldOfViewChange(handler, pCookie, *phCallback); 00816 } 00817 00818 void XN_CALLBACK_TYPE __ModuleUnregisterFromFieldOfViewChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00819 { 00820 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00821 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00822 pNode->UnregisterFromFieldOfViewChange(hCallback); 00823 } 00824 00825 XnDepthPixel* XN_CALLBACK_TYPE __ModuleGetDepthMap(XnModuleNodeHandle hGenerator) 00826 { 00827 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00828 ModuleDepthGenerator* pNode = dynamic_cast<ModuleDepthGenerator*>(pProdNode); 00829 return pNode->GetDepthMap(); 00830 } 00831 00832 XnUInt8* XN_CALLBACK_TYPE __ModuleGetImageMap(XnModuleNodeHandle hGenerator) 00833 { 00834 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00835 ModuleImageGenerator* pNode = dynamic_cast<ModuleImageGenerator*>(pProdNode); 00836 return pNode->GetImageMap(); 00837 } 00838 00839 XnBool XN_CALLBACK_TYPE __ModuleIsPixelFormatSupported(XnModuleNodeHandle hGenerator, XnPixelFormat Format) 00840 { 00841 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00842 ModuleImageGenerator* pNode = dynamic_cast<ModuleImageGenerator*>(pProdNode); 00843 return pNode->IsPixelFormatSupported(Format); 00844 } 00845 00846 XnStatus XN_CALLBACK_TYPE __ModuleSetPixelFormat(XnModuleNodeHandle hGenerator, XnPixelFormat Format) 00847 { 00848 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00849 ModuleImageGenerator* pNode = dynamic_cast<ModuleImageGenerator*>(pProdNode); 00850 return pNode->SetPixelFormat(Format); 00851 } 00852 00853 XnPixelFormat XN_CALLBACK_TYPE __ModuleGetPixelFormat(XnModuleNodeHandle hGenerator) 00854 { 00855 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00856 ModuleImageGenerator* pNode = dynamic_cast<ModuleImageGenerator*>(pProdNode); 00857 return pNode->GetPixelFormat(); 00858 } 00859 00860 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToPixelFormatChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00861 { 00862 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00863 ModuleImageGenerator* pNode = dynamic_cast<ModuleImageGenerator*>(pProdNode); 00864 return pNode->RegisterToPixelFormatChange(handler, pCookie, *phCallback); 00865 } 00866 00867 void XN_CALLBACK_TYPE __ModuleUnregisterFromPixelFormatChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00868 { 00869 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00870 ModuleImageGenerator* pNode = dynamic_cast<ModuleImageGenerator*>(pProdNode); 00871 pNode->UnregisterFromPixelFormatChange(hCallback); 00872 } 00873 00874 XnIRPixel* XN_CALLBACK_TYPE __ModuleGetIRMap(XnModuleNodeHandle hGenerator) 00875 { 00876 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00877 ModuleIRGenerator* pNode = dynamic_cast<ModuleIRGenerator*>(pProdNode); 00878 return pNode->GetIRMap(); 00879 } 00880 00881 XnStatus XN_CALLBACK_TYPE __ModuleAddGesture(XnModuleNodeHandle hGenerator, const XnChar* strGesture, XnBoundingBox3D* pArea) 00882 { 00883 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00884 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00885 return pNode->AddGesture(strGesture, pArea); 00886 } 00887 00888 XnStatus XN_CALLBACK_TYPE __ModuleRemoveGesture(XnModuleNodeHandle hGenerator, const XnChar* strGesture) 00889 { 00890 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00891 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00892 return pNode->RemoveGesture(strGesture); 00893 } 00894 XnStatus XN_CALLBACK_TYPE __ModuleGetActiveGestures(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt16* pnGestures) 00895 { 00896 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00897 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00898 return pNode->GetActiveGestures(pstrGestures, *pnGestures); 00899 } 00900 XnStatus XN_CALLBACK_TYPE __ModuleGetAllActiveGestures(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt32 nNameLength, XnUInt16* pnGestures) 00901 { 00902 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00903 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00904 return pNode->GetAllActiveGestures(pstrGestures, nNameLength, *pnGestures); 00905 } 00906 XnStatus XN_CALLBACK_TYPE __ModuleEnumerateGestures(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt16* pnGestures) 00907 { 00908 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00909 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00910 return pNode->EnumerateGestures(pstrGestures, *pnGestures); 00911 } 00912 XnStatus XN_CALLBACK_TYPE __ModuleEnumerateAllGestures(XnModuleNodeHandle hGenerator, XnChar** pstrGestures, XnUInt32 nNameLength, XnUInt16* pnGestures) 00913 { 00914 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00915 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00916 return pNode->EnumerateAllGestures(pstrGestures, nNameLength, *pnGestures); 00917 } 00918 XnBool XN_CALLBACK_TYPE __ModuleIsGestureAvailable(XnModuleNodeHandle hGenerator, const XnChar* strGesture) 00919 { 00920 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00921 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00922 return pNode->IsGestureAvailable(strGesture); 00923 } 00924 XnBool XN_CALLBACK_TYPE __ModuleIsGestureProgressSupported(XnModuleNodeHandle hGenerator, const XnChar* strGesture) 00925 { 00926 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00927 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00928 return pNode->IsGestureProgressSupported(strGesture); 00929 } 00930 XnStatus XN_CALLBACK_TYPE __ModuleRegisterGestureCallbacks(XnModuleNodeHandle hGenerator, XnModuleGestureRecognized RecognizedCB, XnModuleGestureProgress ProgressCB, void* pCookie, XnCallbackHandle* phCallback) 00931 { 00932 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00933 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00934 return pNode->RegisterGestureCallbacks(RecognizedCB, ProgressCB, pCookie, *phCallback); 00935 } 00936 void XN_CALLBACK_TYPE __ModuleUnregisterGestureCallbacks(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00937 { 00938 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00939 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00940 pNode->UnregisterGestureCallbacks(hCallback); 00941 } 00942 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToGestureChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 00943 { 00944 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00945 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00946 return pNode->RegisterToGestureChange(handler, pCookie, *phCallback); 00947 } 00948 void XN_CALLBACK_TYPE __ModuleUnregisterFromGestureChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00949 { 00950 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00951 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00952 pNode->UnregisterFromGestureChange(hCallback); 00953 } 00954 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToGestureIntermediateStageCompleted(XnModuleNodeHandle hGenerator, XnModuleGestureIntermediateStageCompleted handler, void* pCookie, XnCallbackHandle* phCallback) 00955 { 00956 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00957 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00958 return pNode->RegisterToGestureIntermediateStageCompleted(handler, pCookie, *phCallback); 00959 } 00960 void XN_CALLBACK_TYPE __ModuleUnregisterFromGestureIntermediateStageCompleted(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00961 { 00962 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00963 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00964 pNode->UnregisterFromGestureIntermediateStageCompleted(hCallback); 00965 } 00966 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToGestureReadyForNextIntermediateStage(XnModuleNodeHandle hGenerator, XnModuleGestureReadyForNextIntermediateStage handler, void* pCookie, XnCallbackHandle* phCallback) 00967 { 00968 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00969 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00970 return pNode->RegisterToGestureReadyForNextIntermediateStage(handler, pCookie, *phCallback); 00971 } 00972 void XN_CALLBACK_TYPE __ModuleUnregisterFromGestureReadyForNextIntermediateStage(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00973 { 00974 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00975 ModuleGestureGenerator* pNode = dynamic_cast<ModuleGestureGenerator*>(pProdNode); 00976 pNode->UnregisterFromGestureReadyForNextIntermediateStage(hCallback); 00977 } 00978 00979 const XnLabel* XN_CALLBACK_TYPE __ModuleGetLabelMap(XnModuleNodeHandle hGenerator) 00980 { 00981 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00982 ModuleSceneAnalyzer* pNode = dynamic_cast<ModuleSceneAnalyzer*>(pProdNode); 00983 return pNode->GetLabelMap(); 00984 } 00985 XnStatus XN_CALLBACK_TYPE __ModuleGetFloor(XnModuleNodeHandle hGenerator, XnPlane3D* pPlane) 00986 { 00987 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00988 ModuleSceneAnalyzer* pNode = dynamic_cast<ModuleSceneAnalyzer*>(pProdNode); 00989 return pNode->GetFloor(*pPlane); 00990 } 00991 00992 XnStatus XN_CALLBACK_TYPE __ModuleRegisterHandCallbacks(XnModuleNodeHandle hGenerator, XnModuleHandCreate CreateCB, XnModuleHandUpdate UpdateCB, XnModuleHandDestroy DestroyCB, void* pCookie, XnCallbackHandle* phCallback) 00993 { 00994 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 00995 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 00996 return pNode->RegisterHandCallbacks(CreateCB, UpdateCB, DestroyCB, pCookie, *phCallback); 00997 } 00998 void XN_CALLBACK_TYPE __ModuleUnregisterHandCallbacks(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 00999 { 01000 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01001 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 01002 pNode->UnregisterHandCallbacks(hCallback); 01003 } 01004 XnStatus XN_CALLBACK_TYPE __ModuleStopTracking(XnModuleNodeHandle hGenerator, XnUserID user) 01005 { 01006 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01007 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 01008 return pNode->StopTracking(user); 01009 } 01010 XnStatus XN_CALLBACK_TYPE __ModuleStopTrackingAll(XnModuleNodeHandle hGenerator) 01011 { 01012 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01013 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 01014 return pNode->StopTrackingAll(); 01015 } 01016 XnStatus XN_CALLBACK_TYPE __ModuleStartTracking(XnModuleNodeHandle hGenerator, const XnPoint3D* pPosition) 01017 { 01018 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01019 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 01020 return pNode->StartTracking(*pPosition); 01021 } 01022 XnStatus XN_CALLBACK_TYPE __ModuleSetTrackingSmoothing(XnModuleNodeHandle hGenerator, XnFloat fSmoothingFactor) 01023 { 01024 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01025 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 01026 return pNode->SetSmoothing(fSmoothingFactor); 01027 } 01028 01029 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToHandTouchingFOVEdgeCallback(XnModuleNodeHandle hGenerator, XnModuleHandTouchingFOVEdge handler, void* pCookie, XnCallbackHandle* phCallback) 01030 { 01031 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01032 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 01033 ModuleHandTouchingFOVEdgeInterface* pInterface = pNode->GetHandTouchingFOVEdgeInterface(); 01034 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01035 return pInterface->RegisterToHandTouchingFOVEdge(handler, pCookie, *phCallback); 01036 } 01037 void XN_CALLBACK_TYPE __ModuleUnregisterFromHandTouchingFOVEdgeCallback(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01038 { 01039 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01040 ModuleHandsGenerator* pNode = dynamic_cast<ModuleHandsGenerator*>(pProdNode); 01041 ModuleHandTouchingFOVEdgeInterface* pInterface = pNode->GetHandTouchingFOVEdgeInterface(); 01042 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, ); 01043 pInterface->UnregisterFromHandTouchingFOVEdge(hCallback); 01044 } 01045 01046 XnBool XN_CALLBACK_TYPE __ModuleIsJointAvailable(XnModuleNodeHandle hGenerator, XnSkeletonJoint eJoint) 01047 { 01048 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01049 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01050 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01051 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01052 return pInterface->IsJointAvailable(eJoint); 01053 } 01054 XnBool XN_CALLBACK_TYPE __ModuleIsProfileAvailable(XnModuleNodeHandle hGenerator, XnSkeletonProfile eProfile) 01055 { 01056 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01057 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01058 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01059 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01060 return pInterface->IsProfileAvailable(eProfile); 01061 } 01062 XnStatus XN_CALLBACK_TYPE __ModuleSetSkeletonProfile(XnModuleNodeHandle hGenerator, XnSkeletonProfile eProfile) 01063 { 01064 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01065 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01066 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01067 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01068 return pInterface->SetSkeletonProfile(eProfile); 01069 } 01070 XnStatus XN_CALLBACK_TYPE __ModuleSetJointActive(XnModuleNodeHandle hGenerator, XnSkeletonJoint eJoint, XnBool bState) 01071 { 01072 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01073 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01074 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01075 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01076 return pInterface->SetJointActive(eJoint, bState); 01077 } 01078 XnBool XN_CALLBACK_TYPE __ModuleIsJointActive(XnModuleNodeHandle hGenerator, XnSkeletonJoint eJoint) 01079 { 01080 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01081 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01082 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01083 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01084 return pInterface->IsJointActive(eJoint); 01085 } 01086 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToJointConfigurationChange(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 01087 { 01088 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01089 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01090 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01091 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01092 return pInterface->RegisterToJointConfigurationChange(handler, pCookie, *phCallback); 01093 } 01094 void XN_CALLBACK_TYPE __ModuleUnregisterFromJointConfigurationChange(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01095 { 01096 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01097 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01098 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01099 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01100 pInterface->UnregisterFromJointConfigurationChange(hCallback); 01101 } 01102 XnStatus XN_CALLBACK_TYPE __ModuleEnumerateActiveJoints(XnModuleNodeHandle hGenerator, XnSkeletonJoint* pJoints, XnUInt16* pnJoints) 01103 { 01104 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01105 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01106 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01107 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01108 return pInterface->EnumerateActiveJoints(pJoints, *pnJoints); 01109 } 01110 XnStatus XN_CALLBACK_TYPE __ModuleGetSkeletonJoint(XnModuleNodeHandle hGenerator, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation* pJoint) 01111 { 01112 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01113 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01114 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01115 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01116 return pInterface->GetSkeletonJoint(user, eJoint, *pJoint); 01117 } 01118 XnStatus XN_CALLBACK_TYPE __ModuleGetSkeletonJointPosition(XnModuleNodeHandle hGenerator, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointPosition* pJoint) 01119 { 01120 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01121 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01122 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01123 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01124 return pInterface->GetSkeletonJointPosition(user, eJoint, *pJoint); 01125 } 01126 XnStatus XN_CALLBACK_TYPE __ModuleGetSkeletonJointOrientation(XnModuleNodeHandle hGenerator, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation* pJoint) 01127 { 01128 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01129 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01130 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01131 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01132 return pInterface->GetSkeletonJointOrientation(user, eJoint, *pJoint); 01133 } 01134 XnBool XN_CALLBACK_TYPE __ModuleIsSkeletonTracking(XnModuleNodeHandle hGenerator, XnUserID user) 01135 { 01136 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01137 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01138 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01139 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01140 return pInterface->IsTracking(user); 01141 } 01142 XnBool XN_CALLBACK_TYPE __ModuleIsSkeletonCalibrated(XnModuleNodeHandle hGenerator, XnUserID user) 01143 { 01144 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01145 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01146 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01147 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01148 return pInterface->IsCalibrated(user); 01149 } 01150 XnBool XN_CALLBACK_TYPE __ModuleIsSkeletonCalibrating(XnModuleNodeHandle hGenerator, XnUserID user) 01151 { 01152 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01153 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01154 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01155 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01156 return pInterface->IsCalibrating(user); 01157 } 01158 01159 XnStatus XN_CALLBACK_TYPE __ModuleRequestSkeletonCalibration(XnModuleNodeHandle hGenerator, XnUserID user, XnBool bForce) 01160 { 01161 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01162 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01163 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01164 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01165 return pInterface->RequestCalibration(user, bForce); 01166 } 01167 XnStatus XN_CALLBACK_TYPE __ModuleAbortSkeletonCalibration(XnModuleNodeHandle hGenerator, XnUserID user) 01168 { 01169 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01170 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01171 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01172 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01173 return pInterface->AbortCalibration(user); 01174 } 01175 XnStatus XN_CALLBACK_TYPE __ModuleSaveCalibrationDataToFile(XnModuleNodeHandle hGenerator, XnUserID user, const XnChar* strFileName) 01176 { 01177 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01178 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01179 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01180 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01181 return pInterface->SaveCalibrationDataToFile(user, strFileName); 01182 } 01183 XnStatus XN_CALLBACK_TYPE __ModuleLoadCalibrationDataFromFile(XnModuleNodeHandle hGenerator, XnUserID user, const XnChar* strFileName) 01184 { 01185 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01186 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01187 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01188 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01189 return pInterface->LoadCalibrationDataFromFile(user, strFileName); 01190 } 01191 XnStatus XN_CALLBACK_TYPE __ModuleSaveCalibrationData(XnModuleNodeHandle hGenerator, XnUserID user, XnUInt32 nSlot) 01192 { 01193 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01194 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01195 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01196 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01197 return pInterface->SaveCalibrationData(user, nSlot); 01198 } 01199 XnStatus XN_CALLBACK_TYPE __ModuleLoadCalibrationData(XnModuleNodeHandle hGenerator, XnUserID user, XnUInt32 nSlot) 01200 { 01201 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01202 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01203 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01204 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01205 return pInterface->LoadCalibrationData(user, nSlot); 01206 } 01207 XnStatus XN_CALLBACK_TYPE __ModuleClearCalibrationData(XnModuleNodeHandle hGenerator, XnUInt32 nSlot) 01208 { 01209 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01210 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01211 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01212 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01213 return pInterface->ClearCalibrationData(nSlot); 01214 } 01215 XnBool XN_CALLBACK_TYPE __ModuleIsCalibrationData(XnModuleNodeHandle hGenerator, XnUInt32 nSlot) 01216 { 01217 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01218 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01219 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01220 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01221 return pInterface->IsCalibrationData(nSlot); 01222 } 01223 XnStatus XN_CALLBACK_TYPE __ModuleStartSkeletonTracking(XnModuleNodeHandle hGenerator, XnUserID user) 01224 { 01225 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01226 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01227 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01228 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01229 return pInterface->StartTracking(user); 01230 } 01231 XnStatus XN_CALLBACK_TYPE __ModuleStopSkeletonTracking(XnModuleNodeHandle hGenerator, XnUserID user) 01232 { 01233 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01234 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01235 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01236 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01237 return pInterface->StopTracking(user); 01238 } 01239 XnStatus XN_CALLBACK_TYPE __ModuleResetSkeleton(XnModuleNodeHandle hGenerator, XnUserID user) 01240 { 01241 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01242 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01243 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01244 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01245 return pInterface->Reset(user); 01246 } 01247 XnBool XN_CALLBACK_TYPE __ModuleNeedPoseForSkeletonCalibration(XnModuleNodeHandle hGenerator) 01248 { 01249 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01250 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01251 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01252 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, FALSE); 01253 return pInterface->NeedPoseForCalibration(); 01254 } 01255 XnStatus XN_CALLBACK_TYPE __ModuleGetSkeletonCalibrationPose(XnModuleNodeHandle hGenerator, XnChar* strPose) 01256 { 01257 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01258 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01259 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01260 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01261 return pInterface->GetCalibrationPose(strPose); 01262 } 01263 XnStatus XN_CALLBACK_TYPE __ModuleSetSkeletonSmoothing(XnModuleNodeHandle hGenerator, XnFloat fSmoothingFactor) 01264 { 01265 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01266 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01267 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01268 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01269 return pInterface->SetSmoothing(fSmoothingFactor); 01270 } 01271 XnStatus XN_CALLBACK_TYPE __ModuleRegisterCalibrationCallbacks(XnModuleNodeHandle hGenerator, XnModuleCalibrationStart CalibrationStartCB, XnModuleCalibrationEnd CalibrationEndCB, void* pCookie, XnCallbackHandle* phCallback) 01272 { 01273 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01274 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01275 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01276 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01277 return pInterface->RegisterCalibrationCallbacks(CalibrationStartCB, CalibrationEndCB, pCookie, *phCallback); 01278 } 01279 void XN_CALLBACK_TYPE __ModuleUnregisterCalibrationCallbacks(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01280 { 01281 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01282 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01283 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01284 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01285 pInterface->UnregisterCalibrationCallbacks(hCallback); 01286 } 01287 01288 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToCalibrationStartCallback(XnModuleNodeHandle hGenerator, XnModuleCalibrationStart handler, void* pCookie, XnCallbackHandle* phCallback) 01289 { 01290 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01291 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01292 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01293 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01294 return pInterface->RegisterToCalibrationStart(handler, pCookie, *phCallback); 01295 } 01296 void XN_CALLBACK_TYPE __ModuleUnregisterFromCalibrationStartCallback(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01297 { 01298 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01299 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01300 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01301 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01302 pInterface->UnregisterFromCalibrationStart(hCallback); 01303 } 01304 01305 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToCalibrationInProgressCallback(XnModuleNodeHandle hGenerator, XnModuleCalibrationInProgress handler, void* pCookie, XnCallbackHandle* phCallback) 01306 { 01307 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01308 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01309 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01310 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01311 return pInterface->RegisterToCalibrationInProgress(handler, pCookie, *phCallback); 01312 } 01313 void XN_CALLBACK_TYPE __ModuleUnregisterFromCalibrationInProgressCallback(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01314 { 01315 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01316 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01317 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01318 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01319 pInterface->UnregisterFromCalibrationInProgress(hCallback); 01320 } 01321 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToCalibrationCompleteCallback(XnModuleNodeHandle hGenerator, XnModuleCalibrationComplete handler, void* pCookie, XnCallbackHandle* phCallback) 01322 { 01323 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01324 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01325 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01326 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01327 return pInterface->RegisterToCalibrationComplete(handler, pCookie, *phCallback); 01328 } 01329 void XN_CALLBACK_TYPE __ModuleUnregisterFromCalibrationCompleteCallback(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01330 { 01331 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01332 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01333 ModuleSkeletonInterface* pInterface = pNode->GetSkeletonInterface(); 01334 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01335 pInterface->UnregisterFromCalibrationComplete(hCallback); 01336 } 01338 XnUInt32 XN_CALLBACK_TYPE __ModuleGetNumberOfPoses(XnModuleNodeHandle hGenerator) 01339 { 01340 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01341 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01342 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01343 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface, 0); 01344 return pInterface->GetNumberOfPoses(); 01345 } 01346 XnStatus XN_CALLBACK_TYPE __ModuleGetAvailablePoses(XnModuleNodeHandle hGenerator, XnChar** pstrPoses, XnUInt32* pnPoses) 01347 { 01348 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01349 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01350 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01351 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01352 return pInterface->GetAvailablePoses(pstrPoses, *pnPoses); 01353 } 01354 XnStatus XN_CALLBACK_TYPE __ModuleGetAllAvailablePoses(XnModuleNodeHandle hGenerator, XnChar** pstrPoses, XnUInt32 nNameLength, XnUInt32* pnPoses) 01355 { 01356 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01357 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01358 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01359 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01360 return pInterface->GetAllAvailablePoses(pstrPoses, nNameLength, *pnPoses); 01361 } 01362 01363 01364 XnStatus XN_CALLBACK_TYPE __ModuleStartPoseDetection(XnModuleNodeHandle hGenerator, const XnChar* strPose, XnUserID user) 01365 { 01366 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01367 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01368 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01369 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01370 return pInterface->StartPoseDetection(strPose, user); 01371 } 01372 XnStatus XN_CALLBACK_TYPE __ModuleStopPoseDetection(XnModuleNodeHandle hGenerator, XnUserID user) 01373 { 01374 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01375 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01376 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01377 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01378 return pInterface->StopPoseDetection(user); 01379 } 01380 XnStatus XN_CALLBACK_TYPE __ModuleStopSinglePoseDetection(XnModuleNodeHandle hGenerator, XnUserID user, const XnChar* strPose) 01381 { 01382 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01383 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01384 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01385 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01386 return pInterface->StopSinglePoseDetection(user, strPose); 01387 } 01388 01389 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToPoseCallbacks(XnModuleNodeHandle hGenerator, XnModulePoseDetectionCallback PoseDetectionStartCB, XnModulePoseDetectionCallback PoseDetectionEndCB, void* pCookie, XnCallbackHandle* phCallback) 01390 { 01391 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01392 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01393 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01394 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01395 return pInterface->RegisterToPoseDetectionCallbacks(PoseDetectionStartCB, PoseDetectionEndCB, pCookie, *phCallback); 01396 } 01397 void XN_CALLBACK_TYPE __ModuleUnregisterFromPoseCallbacks(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01398 { 01399 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01400 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01401 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01402 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01403 pInterface->UnregisterFromPoseDetectionCallbacks(hCallback); 01404 } 01405 01406 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToPoseDetected(XnModuleNodeHandle hGenerator, XnModulePoseDetectionCallback handler, void* pCookie, XnCallbackHandle* phCallback) 01407 { 01408 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01409 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01410 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01411 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01412 return pInterface->RegisterToPoseDetected(handler, pCookie, *phCallback); 01413 } 01414 void XN_CALLBACK_TYPE __ModuleUnregisterFromPoseDetected(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01415 { 01416 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01417 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01418 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01419 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01420 pInterface->UnregisterFromPoseDetected(hCallback); 01421 } 01422 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToOutOfPose(XnModuleNodeHandle hGenerator, XnModulePoseDetectionCallback handler, void* pCookie, XnCallbackHandle* phCallback) 01423 { 01424 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01425 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01426 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01427 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01428 return pInterface->RegisterToOutOfPose(handler, pCookie, *phCallback); 01429 } 01430 void XN_CALLBACK_TYPE __ModuleUnregisterFromOutOfPose(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01431 { 01432 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01433 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01434 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01435 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01436 pInterface->UnregisterFromOutOfPose(hCallback); 01437 } 01438 01439 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToPoseInProgressCallback(XnModuleNodeHandle hGenerator, XnModulePoseDetectionInProgressCallback handler, void* pCookie, XnCallbackHandle* phCallback) 01440 { 01441 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01442 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01443 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01444 _XN_VALIDATE_CAPABILITY_INTERFACE(pInterface); 01445 return pInterface->RegisterToPoseDetectionInProgress(handler, pCookie, *phCallback); 01446 } 01447 void XN_CALLBACK_TYPE __ModuleUnregisterFromPoseInProgressCallback(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01448 { 01449 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01450 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01451 ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface(); 01452 _XN_VALIDATE_CAPABILITY_INTERFACE_RET(pInterface,); 01453 pInterface->UnregisterFromPoseDetectionInProgress(hCallback); 01454 } 01455 01456 01457 XnUInt16 XN_CALLBACK_TYPE __ModuleGetNumberOfUsers(XnModuleNodeHandle hGenerator) 01458 { 01459 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01460 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01461 return pNode->GetNumberOfUsers(); 01462 } 01463 XnStatus XN_CALLBACK_TYPE __ModuleGetUsers(XnModuleNodeHandle hGenerator, XnUserID* pUsers, XnUInt16* pnUsers) 01464 { 01465 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01466 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01467 return pNode->GetUsers(pUsers, *pnUsers); 01468 } 01469 XnStatus XN_CALLBACK_TYPE __ModuleGetUserCoM(XnModuleNodeHandle hGenerator, XnUserID user, XnPoint3D* pCoM) 01470 { 01471 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01472 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01473 return pNode->GetCoM(user, *pCoM); 01474 } 01475 XnStatus XN_CALLBACK_TYPE __ModuleGetUserPixels(XnModuleNodeHandle hGenerator, XnUserID user, XnSceneMetaData* pScene) 01476 { 01477 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01478 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01479 return pNode->GetUserPixels(user, pScene); 01480 } 01481 XnStatus XN_CALLBACK_TYPE __ModuleRegisterUserCallbacks(XnModuleNodeHandle hGenerator, XnModuleUserHandler NewUserCB, XnModuleUserHandler LostUserCB, void* pCookie, XnCallbackHandle* phCallback) 01482 { 01483 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01484 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01485 return pNode->RegisterUserCallbacks(NewUserCB, LostUserCB, pCookie, *phCallback); 01486 } 01487 void XN_CALLBACK_TYPE __ModuleUnregisterUserCallbacks(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01488 { 01489 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01490 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01491 pNode->UnregisterUserCallbacks(hCallback); 01492 } 01493 01494 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToUserExitCallback(XnModuleNodeHandle hGenerator, XnModuleUserHandler handler, void* pCookie, XnCallbackHandle* phCallback) 01495 { 01496 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01497 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01498 return pNode->RegisterToUserExit(handler, pCookie, *phCallback); 01499 } 01500 void XN_CALLBACK_TYPE __ModuleUnregisterFromUserExitCallback(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01501 { 01502 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01503 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01504 pNode->UnregisterFromUserExit(hCallback); 01505 } 01506 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToUserReEnterCallback(XnModuleNodeHandle hGenerator, XnModuleUserHandler handler, void* pCookie, XnCallbackHandle* phCallback) 01507 { 01508 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01509 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01510 return pNode->RegisterToUserReEnter(handler, pCookie, *phCallback); 01511 } 01512 void XN_CALLBACK_TYPE __ModuleUnregisterFromUserReEnterCallback(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01513 { 01514 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01515 ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode); 01516 pNode->UnregisterFromUserReEnter(hCallback); 01517 } 01518 01519 01520 XnUChar* XN_CALLBACK_TYPE __ModuleGetAudioBuffer(XnModuleNodeHandle hGenerator) 01521 { 01522 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01523 ModuleAudioGenerator* pNode = dynamic_cast<ModuleAudioGenerator*>(pProdNode); 01524 return pNode->GetAudioBuffer(); 01525 } 01526 XnUInt32 XN_CALLBACK_TYPE __ModuleGetSupportedWaveOutputModesCount(XnModuleNodeHandle hGenerator) 01527 { 01528 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01529 ModuleAudioGenerator* pNode = dynamic_cast<ModuleAudioGenerator*>(pProdNode); 01530 return pNode->GetSupportedWaveOutputModesCount(); 01531 } 01532 XnStatus XN_CALLBACK_TYPE __ModuleGetSupportedWaveOutputModes(XnModuleNodeHandle hGenerator, XnWaveOutputMode* aSupportedModes, XnUInt32* pnCount) 01533 { 01534 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01535 ModuleAudioGenerator* pNode = dynamic_cast<ModuleAudioGenerator*>(pProdNode); 01536 return pNode->GetSupportedWaveOutputModes(aSupportedModes, *pnCount); 01537 } 01538 XnStatus XN_CALLBACK_TYPE __ModuleSetWaveOutputMode(XnModuleNodeHandle hGenerator, const XnWaveOutputMode* pOutputMode) 01539 { 01540 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01541 ModuleAudioGenerator* pNode = dynamic_cast<ModuleAudioGenerator*>(pProdNode); 01542 return pNode->SetWaveOutputMode(*pOutputMode); 01543 } 01544 XnStatus XN_CALLBACK_TYPE __ModuleGetWaveOutputMode(XnModuleNodeHandle hGenerator, XnWaveOutputMode* pOutputMode) 01545 { 01546 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01547 ModuleAudioGenerator* pNode = dynamic_cast<ModuleAudioGenerator*>(pProdNode); 01548 return pNode->GetWaveOutputMode(*pOutputMode); 01549 } 01550 XnStatus XN_CALLBACK_TYPE __ModuleRegisterToWaveOutputModeChanges(XnModuleNodeHandle hGenerator, XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback) 01551 { 01552 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01553 ModuleAudioGenerator* pNode = dynamic_cast<ModuleAudioGenerator*>(pProdNode); 01554 return pNode->RegisterToWaveOutputModeChanges(handler, pCookie, *phCallback); 01555 } 01556 void XN_CALLBACK_TYPE __ModuleUnregisterFromWaveOutputModeChanges(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback) 01557 { 01558 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator; 01559 ModuleAudioGenerator* pNode = dynamic_cast<ModuleAudioGenerator*>(pProdNode); 01560 pNode->UnregisterFromWaveOutputModeChanges(hCallback); 01561 } 01562 01563 XnCodecID XN_CALLBACK_TYPE __ModuleGetCodecID(XnModuleNodeHandle hCodec) 01564 { 01565 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hCodec; 01566 ModuleCodec* pCodec = dynamic_cast<ModuleCodec*>(pProdNode); 01567 return pCodec->GetCodecID(); 01568 } 01569 XnStatus XN_CALLBACK_TYPE __ModuleCodecInit(XnModuleNodeHandle hCodec, XnNodeHandle hNode) 01570 { 01571 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hCodec; 01572 ModuleCodec* pCodec = dynamic_cast<ModuleCodec*>(pProdNode); 01573 return pCodec->Init(ProductionNode(hNode)); 01574 } 01575 XnStatus XN_CALLBACK_TYPE __ModuleCompressData(XnModuleNodeHandle hCodec, const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) 01576 { 01577 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hCodec; 01578 ModuleCodec* pCodec = dynamic_cast<ModuleCodec*>(pProdNode); 01579 return pCodec->CompressData(pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten); 01580 } 01581 XnStatus XN_CALLBACK_TYPE __ModuleDecompressData(XnModuleNodeHandle hCodec, const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) 01582 { 01583 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hCodec; 01584 ModuleCodec* pCodec = dynamic_cast<ModuleCodec*>(pProdNode); 01585 return pCodec->DecompressData(pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten); 01586 } 01587 01588 const XnChar* XN_CALLBACK_TYPE __ModuleScriptGetSupportedFormat(XnModuleNodeHandle hScript) 01589 { 01590 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hScript; 01591 ModuleScriptNode* pScript = dynamic_cast<ModuleScriptNode*>(pProdNode); 01592 return pScript->GetSupportedFormat(); 01593 } 01594 01595 XnStatus XN_CALLBACK_TYPE __ModuleLoadScriptFromFile(XnModuleNodeHandle hScript, const XnChar* strFileName) 01596 { 01597 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hScript; 01598 ModuleScriptNode* pScript = dynamic_cast<ModuleScriptNode*>(pProdNode); 01599 return pScript->LoadScriptFromFile(strFileName); 01600 } 01601 01602 XnStatus XN_CALLBACK_TYPE __ModuleLoadScriptFromString(XnModuleNodeHandle hScript, const XnChar* strScript) 01603 { 01604 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hScript; 01605 ModuleScriptNode* pScript = dynamic_cast<ModuleScriptNode*>(pProdNode); 01606 return pScript->LoadScriptFromString(strScript); 01607 } 01608 01609 XnStatus XN_CALLBACK_TYPE __ModuleScriptRun(XnModuleNodeHandle hScript, XnNodeInfoList* pCreatedNodes, XnEnumerationErrors* pErrors) 01610 { 01611 ModuleProductionNode* pProdNode = (ModuleProductionNode*)hScript; 01612 ModuleScriptNode* pScript = dynamic_cast<ModuleScriptNode*>(pProdNode); 01613 NodeInfoList createdNodes(pCreatedNodes); 01614 EnumerationErrors errors(pErrors); 01615 return pScript->Run(createdNodes, errors); 01616 } 01617 01618 void XN_CALLBACK_TYPE __ModuleGetExtendedSerializationInterface(XnModuleExtendedSerializationInterface* pInterface) 01619 { 01620 pInterface->InitNotifications = __ModuleInitNotifications; 01621 pInterface->StopNotifications = __ModuleStopNotifications; 01622 } 01623 01624 void XN_CALLBACK_TYPE __ModuleGetLockAwareInterface(XnModuleLockAwareInterface* pInterface) 01625 { 01626 pInterface->SetLockState = __ModuleSetLockState; 01627 pInterface->GetLockState = __ModuleGetLockState; 01628 pInterface->RegisterToLockChange = __ModuleRegisterToLockChange; 01629 pInterface->UnregisterFromLockChange = __ModuleUnregisterFromLockChange; 01630 } 01631 01632 void XN_CALLBACK_TYPE __ModuleGetErrorStateInterface(XnModuleErrorStateInterface* pInterface) 01633 { 01634 pInterface->GetErrorState = __ModuleGetErrorState; 01635 pInterface->RegisterToErrorStateChange = __ModuleRegisterToErrorStateChange; 01636 pInterface->UnregisterFromErrorStateChange = __ModuleUnregisterFromErrorStateChange; 01637 } 01638 01639 void XN_CALLBACK_TYPE __ModuleGetGeneralIntInterface(XnModuleGeneralIntInterface* pInterface) 01640 { 01641 pInterface->GetRange = __ModuleGeneralIntGetRange; 01642 pInterface->Get = __ModuleGeneralIntGet; 01643 pInterface->Set = __ModuleGeneralIntSet; 01644 pInterface->RegisterToValueChange = __ModuleGeneralIntRegisterToValueChange; 01645 pInterface->UnregisterFromValueChange = __ModuleGeneralIntUnregisterFromValueChange; 01646 } 01647 01648 void XN_CALLBACK_TYPE __ModuleGetProductionNodeInterface(XnModuleProductionNodeInterface* pInterface) 01649 { 01650 pInterface->IsCapabilitySupported = __ModuleIsCapabilitySupported; 01651 pInterface->SetIntProperty = __ModuleSetIntProperty; 01652 pInterface->SetRealProperty = __ModuleSetRealProperty; 01653 pInterface->SetStringProperty = __ModuleSetStringProperty; 01654 pInterface->SetGeneralProperty = __ModuleSetGeneralProperty; 01655 pInterface->GetIntProperty = __ModuleGetIntProperty; 01656 pInterface->GetRealProperty = __ModuleGetRealProperty; 01657 pInterface->GetStringProperty = __ModuleGetStringProperty; 01658 pInterface->GetGeneralProperty = __ModuleGetGeneralProperty; 01659 01660 __ModuleGetExtendedSerializationInterface(pInterface->pExtendedSerializationInterface); 01661 __ModuleGetLockAwareInterface(pInterface->pLockAwareInterface); 01662 __ModuleGetErrorStateInterface(pInterface->pErrorStateInterface); 01663 __ModuleGetGeneralIntInterface(pInterface->pGeneralIntInterface); 01664 } 01665 01666 void XN_CALLBACK_TYPE __ModuleGetDeviceIdentificationInterface(XnModuleDeviceIdentificationInterface* pInterface) 01667 { 01668 pInterface->GetDeviceName = __ModuleGetDeviceName; 01669 pInterface->GetVendorSpecificData = __ModuleGetVendorSpecificData; 01670 pInterface->GetSerialNumber = __ModuleGetSerialNumber; 01671 } 01672 01673 void XN_CALLBACK_TYPE __ModuleGetDeviceInterface(XnModuleDeviceInterface* pInterface) 01674 { 01675 __ModuleGetProductionNodeInterface(pInterface->pProductionNode); 01676 __ModuleGetDeviceIdentificationInterface(pInterface->pDeviceIdentificationInterface); 01677 } 01678 01679 void XN_CALLBACK_TYPE __ModuleGetMirrorInterface(XnModuleMirrorInterface* pInterface) 01680 { 01681 pInterface->SetMirror = __ModuleSetMirror; 01682 pInterface->IsMirrored = __ModuleIsMirrored; 01683 pInterface->RegisterToMirrorChange = __ModuleRegisterToMirrorChange; 01684 pInterface->UnregisterFromMirrorChange = __ModuleUnregisterFromMirrorChange; 01685 } 01686 01687 void XN_CALLBACK_TYPE __ModuleGetAlternativeViewPointInterface(XnModuleAlternativeViewPointInterface* pInterface) 01688 { 01689 pInterface->IsViewPointSupported = __ModuleIsViewPointSupported; 01690 pInterface->SetViewPoint = __ModuleSetViewPoint; 01691 pInterface->ResetViewPoint = __ModuleResetViewPoint; 01692 pInterface->IsViewPointAs = __ModuleIsViewPointAs; 01693 pInterface->RegisterToViewPointChange = __ModuleRegisterToViewPointChange; 01694 pInterface->UnregisterFromViewPointChange = __ModuleUnregisterFromViewPointChange; 01695 } 01696 01697 void XN_CALLBACK_TYPE __ModuleGetFrameSyncInterface(XnModuleFrameSyncInterface* pInterface) 01698 { 01699 pInterface->CanFrameSyncWith = __ModuleCanFrameSyncWith; 01700 pInterface->FrameSyncWith = __ModuleFrameSyncWith; 01701 pInterface->StopFrameSyncWith = __ModuleStopFrameSyncWith; 01702 pInterface->IsFrameSyncedWith = __ModuleIsFrameSyncedWith; 01703 pInterface->RegisterToFrameSyncChange = __ModuleRegisterToFrameSyncChange; 01704 pInterface->UnregisterFromFrameSyncChange = __ModuleUnregisterFromFrameSyncChange; 01705 } 01706 01707 void XN_CALLBACK_TYPE __ModuleGetGeneratorInterface(XnModuleGeneratorInterface* pInterface) 01708 { 01709 __ModuleGetProductionNodeInterface(pInterface->pProductionNodeInterface); 01710 pInterface->StartGenerating = __ModuleStartGenerating; 01711 pInterface->IsGenerating = __ModuleIsGenerating; 01712 pInterface->StopGenerating = __ModuleStopGenerating; 01713 pInterface->RegisterToGenerationRunningChange = __ModuleRegisterToGenerationRunningChange; 01714 pInterface->UnregisterFromGenerationRunningChange = __ModuleUnregisterFromGenerationRunningChange; 01715 pInterface->RegisterToNewDataAvailable = __ModuleRegisterToNewDataAvailable; 01716 pInterface->UnregisterFromNewDataAvailable = __ModuleUnregisterFromNewDataAvailable; 01717 pInterface->IsNewDataAvailable = __ModuleIsNewDataAvailable; 01718 pInterface->UpdateData = __ModuleUpdateData; 01719 pInterface->GetData = __ModuleGetData; 01720 pInterface->GetDataSize = __ModuleGetDataSize; 01721 pInterface->GetTimestamp = __ModuleGetTimestamp; 01722 pInterface->GetFrameID = __ModuleGetFrameID; 01723 __ModuleGetMirrorInterface(pInterface->pMirrorInterface); 01724 __ModuleGetAlternativeViewPointInterface(pInterface->pAlternativeViewPointInterface); 01725 __ModuleGetFrameSyncInterface(pInterface->pFrameSyncInterface); 01726 } 01727 01728 void XN_CALLBACK_TYPE __ModuleGetNodeNotificationsInterface(XnNodeNotifications *pInterface) 01729 { 01730 pInterface->OnNodeAdded = __ModuleOnNodeAdded; 01731 pInterface->OnNodeRemoved = __ModuleOnNodeRemoved; 01732 pInterface->OnNodeIntPropChanged = __ModuleOnNodeIntPropChanged; 01733 pInterface->OnNodeRealPropChanged = __ModuleOnNodeRealPropChanged; 01734 pInterface->OnNodeStringPropChanged = __ModuleOnNodeStringPropChanged; 01735 pInterface->OnNodeGeneralPropChanged = __ModuleOnNodeGeneralPropChanged; 01736 pInterface->OnNodeStateReady = __ModuleOnNodeStateReady; 01737 pInterface->OnNodeNewData = __ModuleOnNodeNewData; 01738 } 01739 01740 void XN_CALLBACK_TYPE __ModuleGetRecorderInterface(XnModuleRecorderInterface* pInterface) 01741 { 01742 pInterface->SetOutputStream = __ModuleSetOutputStream; 01743 __ModuleGetProductionNodeInterface(pInterface->pProductionNode); 01744 __ModuleGetNodeNotificationsInterface(pInterface->pNodeNotifications); 01745 } 01746 01747 void XN_CALLBACK_TYPE __ModuleGetPlayerInterface(XnModulePlayerInterface* pInterface) 01748 { 01749 __ModuleGetProductionNodeInterface(pInterface->pProductionNode); 01750 pInterface->SetInputStream = __ModuleSetInputStream; 01751 pInterface->ReadNext = __ModuleReadNext; 01752 pInterface->SetNodeNotifications = __ModuleSetNodeNotifications; 01753 pInterface->SetRepeat = __ModuleSetRepeat; 01754 pInterface->SeekToTimeStamp = __ModuleSeekToTimeStamp; 01755 pInterface->SeekToFrame = __ModuleSeekToFrame; 01756 pInterface->TellTimestamp = __ModuleTellTimestamp; 01757 pInterface->TellFrame = __ModuleTellFrame; 01758 pInterface->GetNumFrames = __ModuleGetNumFrames; 01759 pInterface->GetSupportedFormat = __ModuleGetSupportedFormat; 01760 pInterface->IsEOF = __ModuleIsEOF; 01761 pInterface->RegisterToEndOfFileReached = __ModuleRegisterToEndOfFileReached; 01762 pInterface->UnregisterFromEndOfFileReached = __ModuleUnregisterFromEndOfFileReached; 01763 } 01764 01765 void XN_CALLBACK_TYPE __ModuleGetCroppingInterface(XnModuleCroppingInterface* pInterface) 01766 { 01767 pInterface->SetCropping = __ModuleSetCropping; 01768 pInterface->GetCropping = __ModuleGetCropping; 01769 pInterface->RegisterToCroppingChange = __ModuleRegisterToCroppingChange; 01770 pInterface->UnregisterFromCroppingChange = __ModuleUnregisterFromCroppingChange; 01771 } 01772 01773 void XN_CALLBACK_TYPE __ModuleGetAntiFlickerInterface(XnModuleAntiFlickerInterface* pInterface) 01774 { 01775 pInterface->SetPowerLineFrequency = __ModuleSetPowerLineFrequency; 01776 pInterface->GetPowerLineFrequency = __ModuleGetPowerLineFrequency; 01777 pInterface->RegisterToPowerLineFrequencyChange = __ModuleRegisterToPowerLineFrequencyChange; 01778 pInterface->UnregisterFromPowerLineFrequencyChange = __ModuleUnregisterFromPowerLineFrequencyChange; 01779 } 01780 01781 void XN_CALLBACK_TYPE __ModuleGetMapGeneratorInterface(XnModuleMapGeneratorInterface* pInterface) 01782 { 01783 __ModuleGetGeneratorInterface(pInterface->pGeneratorInterface); 01784 pInterface->GetSupportedMapOutputModesCount = __ModuleGetSupportedMapOutputModesCount; 01785 pInterface->GetSupportedMapOutputModes = __ModuleGetSupportedMapOutputModes; 01786 pInterface->SetMapOutputMode = __ModuleSetMapOutputMode; 01787 pInterface->GetMapOutputMode = __ModuleGetMapOutputMode; 01788 pInterface->RegisterToMapOutputModeChange = __ModuleRegisterToMapOutputModeChange; 01789 pInterface->UnregisterFromMapOutputModeChange = __ModuleUnregisterFromMapOutputModeChange; 01790 pInterface->GetBytesPerPixel = __ModuleGetBytesPerPixel; 01791 __ModuleGetCroppingInterface(pInterface->pCroppingInterface); 01792 __ModuleGetAntiFlickerInterface(pInterface->pAntiFlickerInterface); 01793 } 01794 01795 void XN_CALLBACK_TYPE __ModuleGetUserPositionInterface(XnModuleUserPositionCapabilityInterface* pInterface) 01796 { 01797 pInterface->GetSupportedUserPositionsCount = __ModuleGetSupportedUserPositionsCount; 01798 pInterface->SetUserPosition = __ModuleSetUserPosition; 01799 pInterface->GetUserPosition = __ModuleGetUserPosition; 01800 pInterface->RegisterToUserPositionChange = __ModuleRegisterToUserPositionChange; 01801 pInterface->UnregisterFromUserPositionChange = __ModuleUnregisterFromUserPositionChange; 01802 } 01803 01804 void XN_CALLBACK_TYPE __ModuleGetDepthGeneratorInterface(XnModuleDepthGeneratorInterface* pInterface) 01805 { 01806 __ModuleGetMapGeneratorInterface(pInterface->pMapInterface); 01807 pInterface->GetDeviceMaxDepth = __ModuleGetDeviceMaxDepth; 01808 pInterface->GetFieldOfView = __ModuleGetFieldOfView; 01809 pInterface->RegisterToFieldOfViewChange = __ModuleRegisterToFieldOfViewChange; 01810 pInterface->UnregisterFromFieldOfViewChange = __ModuleUnregisterFromFieldOfViewChange; 01811 pInterface->GetDepthMap = __ModuleGetDepthMap; 01812 __ModuleGetUserPositionInterface(pInterface->pUserPositionInterface); 01813 } 01814 01815 void XN_CALLBACK_TYPE __ModuleGetImageGeneratorInterface(XnModuleImageGeneratorInterface* pInterface) 01816 { 01817 __ModuleGetMapGeneratorInterface(pInterface->pMapInterface); 01818 pInterface->GetImageMap = __ModuleGetImageMap; 01819 pInterface->IsPixelFormatSupported = __ModuleIsPixelFormatSupported; 01820 pInterface->SetPixelFormat = __ModuleSetPixelFormat; 01821 pInterface->GetPixelFormat = __ModuleGetPixelFormat; 01822 pInterface->RegisterToPixelFormatChange = __ModuleRegisterToPixelFormatChange; 01823 pInterface->UnregisterFromPixelFormatChange = __ModuleUnregisterFromPixelFormatChange; 01824 } 01825 01826 void XN_CALLBACK_TYPE __ModuleGetIRGeneratorInterface(XnModuleIRGeneratorInterface* pInterface) 01827 { 01828 __ModuleGetMapGeneratorInterface(pInterface->pMapInterface); 01829 pInterface->GetIRMap = __ModuleGetIRMap; 01830 } 01831 01832 void XN_CALLBACK_TYPE __ModuleGetGestureGeneratorInterface(XnModuleGestureGeneratorInterface* pInterface) 01833 { 01834 __ModuleGetGeneratorInterface(pInterface->pGeneratorInterface); 01835 pInterface->AddGesture = __ModuleAddGesture; 01836 pInterface->RemoveGesture = __ModuleRemoveGesture; 01837 pInterface->GetActiveGestures = __ModuleGetActiveGestures; 01838 pInterface->GetAllActiveGestures = __ModuleGetAllActiveGestures; 01839 pInterface->EnumerateGestures = __ModuleEnumerateGestures; 01840 pInterface->EnumerateAllGestures = __ModuleEnumerateAllGestures; 01841 pInterface->IsGestureAvailable = __ModuleIsGestureAvailable; 01842 pInterface->IsGestureProgressSupported = __ModuleIsGestureProgressSupported; 01843 pInterface->RegisterGestureCallbacks = __ModuleRegisterGestureCallbacks; 01844 pInterface->UnregisterGestureCallbacks = __ModuleUnregisterGestureCallbacks; 01845 pInterface->RegisterToGestureChange = __ModuleRegisterToGestureChange; 01846 pInterface->UnregisterFromGestureChange = __ModuleUnregisterFromGestureChange; 01847 01848 pInterface->RegisterToGestureIntermediateStageCompleted = __ModuleRegisterToGestureIntermediateStageCompleted; 01849 pInterface->UnregisterFromGestureIntermediateStageCompleted = __ModuleUnregisterFromGestureIntermediateStageCompleted; 01850 pInterface->RegisterToGestureReadyForNextIntermediateStage = __ModuleRegisterToGestureReadyForNextIntermediateStage; 01851 pInterface->UnregisterFromGestureReadyForNextIntermediateStage = __ModuleUnregisterFromGestureReadyForNextIntermediateStage; 01852 } 01853 01854 void XN_CALLBACK_TYPE __ModuleGetSceneAnalyzerInterface(XnModuleSceneAnalyzerInterface* pInterface) 01855 { 01856 __ModuleGetMapGeneratorInterface(pInterface->pMapInterface); 01857 pInterface->GetLabelMap = __ModuleGetLabelMap; 01858 pInterface->GetFloor = __ModuleGetFloor; 01859 } 01860 01861 void XN_CALLBACK_TYPE __ModuleGetSkeletonInterface(XnModuleSkeletonCapabilityInterface* pInterface) 01862 { 01863 pInterface->IsJointAvailable = __ModuleIsJointAvailable; 01864 pInterface->IsProfileAvailable = __ModuleIsProfileAvailable; 01865 pInterface->SetSkeletonProfile = __ModuleSetSkeletonProfile; 01866 pInterface->SetJointActive = __ModuleSetJointActive; 01867 pInterface->IsJointActive = __ModuleIsJointActive; 01868 pInterface->RegisterToJointConfigurationChange = __ModuleRegisterToJointConfigurationChange; 01869 pInterface->UnregisterFromJointConfigurationChange = __ModuleUnregisterFromJointConfigurationChange; 01870 pInterface->EnumerateActiveJoints = __ModuleEnumerateActiveJoints; 01871 pInterface->GetSkeletonJoint = __ModuleGetSkeletonJoint; 01872 pInterface->GetSkeletonJointPosition = __ModuleGetSkeletonJointPosition; 01873 pInterface->GetSkeletonJointOrientation = __ModuleGetSkeletonJointOrientation; 01874 pInterface->IsTracking = __ModuleIsSkeletonTracking; 01875 pInterface->IsCalibrated = __ModuleIsSkeletonCalibrated; 01876 pInterface->IsCalibrating = __ModuleIsSkeletonCalibrating; 01877 pInterface->RequestCalibration = __ModuleRequestSkeletonCalibration; 01878 pInterface->AbortCalibration = __ModuleAbortSkeletonCalibration; 01879 pInterface->SaveCalibrationDataToFile = __ModuleSaveCalibrationDataToFile; 01880 pInterface->LoadCalibrationDataFromFile = __ModuleLoadCalibrationDataFromFile; 01881 pInterface->SaveCalibrationData = __ModuleSaveCalibrationData; 01882 pInterface->LoadCalibrationData = __ModuleLoadCalibrationData; 01883 pInterface->ClearCalibrationData = __ModuleClearCalibrationData; 01884 pInterface->IsCalibrationData = __ModuleIsCalibrationData; 01885 pInterface->StartTracking = __ModuleStartSkeletonTracking; 01886 pInterface->StopTracking = __ModuleStopSkeletonTracking; 01887 pInterface->Reset = __ModuleResetSkeleton; 01888 pInterface->NeedPoseForCalibration = __ModuleNeedPoseForSkeletonCalibration; 01889 pInterface->GetCalibrationPose = __ModuleGetSkeletonCalibrationPose; 01890 pInterface->SetSmoothing = __ModuleSetSkeletonSmoothing; 01891 pInterface->RegisterCalibrationCallbacks = __ModuleRegisterCalibrationCallbacks; 01892 pInterface->UnregisterCalibrationCallbacks = __ModuleUnregisterCalibrationCallbacks; 01893 01894 pInterface->RegisterToCalibrationInProgress = __ModuleRegisterToCalibrationInProgressCallback; 01895 pInterface->UnregisterFromCalibrationInProgress = __ModuleUnregisterFromCalibrationInProgressCallback; 01896 pInterface->RegisterToCalibrationComplete = __ModuleRegisterToCalibrationCompleteCallback; 01897 pInterface->UnregisterFromCalibrationComplete = __ModuleUnregisterFromCalibrationCompleteCallback; 01898 01899 pInterface->RegisterToCalibrationStart = __ModuleRegisterToCalibrationStartCallback; 01900 pInterface->UnregisterFromCalibrationStart = __ModuleUnregisterFromCalibrationStartCallback; 01901 } 01902 01903 void XN_CALLBACK_TYPE __ModuleGetPoseDetectionInterface(XnModulePoseDetectionCapabilityInterface* pInteface) 01904 { 01905 pInteface->GetNumberOfPoses = __ModuleGetNumberOfPoses; 01906 pInteface->GetAvailablePoses = __ModuleGetAvailablePoses; 01907 pInteface->GetAllAvailablePoses = __ModuleGetAllAvailablePoses; 01908 pInteface->StartPoseDetection = __ModuleStartPoseDetection; 01909 pInteface->StopPoseDetection = __ModuleStopPoseDetection; 01910 pInteface->StopSinglePoseDetection = __ModuleStopSinglePoseDetection; 01911 pInteface->RegisterToPoseCallbacks = __ModuleRegisterToPoseCallbacks; 01912 pInteface->UnregisterFromPoseCallbacks = __ModuleUnregisterFromPoseCallbacks; 01913 01914 pInteface->RegisterToPoseDetectionInProgress = __ModuleRegisterToPoseInProgressCallback; 01915 pInteface->UnregisterFromPoseDetectionInProgress = __ModuleUnregisterFromPoseInProgressCallback; 01916 01917 pInteface->RegisterToPoseDetected = __ModuleRegisterToPoseDetected; 01918 pInteface->UnregisterFromPoseDetected = __ModuleUnregisterFromPoseDetected; 01919 pInteface->RegisterToOutOfPose = __ModuleRegisterToOutOfPose; 01920 pInteface->UnregisterFromOutOfPose = __ModuleUnregisterFromOutOfPose; 01921 } 01922 01923 void XN_CALLBACK_TYPE __ModuleGetUserGeneratorInterface(XnModuleUserGeneratorInterface* pInterface) 01924 { 01925 __ModuleGetGeneratorInterface(pInterface->pGeneratorInterface); 01926 01927 pInterface->GetNumberOfUsers = __ModuleGetNumberOfUsers; 01928 pInterface->GetUsers = __ModuleGetUsers; 01929 pInterface->GetCoM = __ModuleGetUserCoM; 01930 pInterface->GetUserPixels = __ModuleGetUserPixels; 01931 pInterface->RegisterUserCallbacks = __ModuleRegisterUserCallbacks; 01932 pInterface->UnregisterUserCallbacks = __ModuleUnregisterUserCallbacks; 01933 01934 __ModuleGetSkeletonInterface(pInterface->pSkeletonInterface); 01935 __ModuleGetPoseDetectionInterface(pInterface->pPoseDetectionInterface); 01936 01937 pInterface->RegisterToUserExit = __ModuleRegisterToUserExitCallback; 01938 pInterface->UnregisterFromUserExit = __ModuleUnregisterFromUserExitCallback; 01939 pInterface->RegisterToUserReEnter = __ModuleRegisterToUserReEnterCallback; 01940 pInterface->UnregisterFromUserReEnter = __ModuleUnregisterFromUserReEnterCallback; 01941 } 01942 01943 void XN_CALLBACK_TYPE __ModuleGetHandTouchingFOVEdgeInterface(XnModuleHandTouchingFOVEdgeCapabilityInterface* pInterface) 01944 { 01945 pInterface->RegisterToHandTouchingFOVEdge = __ModuleRegisterToHandTouchingFOVEdgeCallback; 01946 pInterface->UnregisterFromHandTouchingFOVEdge = __ModuleUnregisterFromHandTouchingFOVEdgeCallback; 01947 } 01948 void XN_CALLBACK_TYPE __ModuleGetHandsGeneratorInterface(XnModuleHandsGeneratorInterface* pInterface) 01949 { 01950 __ModuleGetGeneratorInterface(pInterface->pGeneratorInterface); 01951 01952 pInterface->StartTracking = __ModuleStartTracking; 01953 pInterface->StopTracking = __ModuleStopTracking; 01954 pInterface->StopTrackingAll = __ModuleStopTrackingAll; 01955 pInterface->RegisterHandCallbacks = __ModuleRegisterHandCallbacks; 01956 pInterface->UnregisterHandCallbacks = __ModuleUnregisterHandCallbacks; 01957 pInterface->SetSmoothing = __ModuleSetTrackingSmoothing; 01958 01959 __ModuleGetHandTouchingFOVEdgeInterface(pInterface->pHandTouchingFOVEdgeInterface); 01960 } 01961 01962 void XN_CALLBACK_TYPE __ModuleGetAudioGeneratorInterface(XnModuleAudioGeneratorInterface* pInterface) 01963 { 01964 __ModuleGetGeneratorInterface(pInterface->pGeneratorInterface); 01965 01966 pInterface->GetAudioBuffer = __ModuleGetAudioBuffer; 01967 pInterface->GetSupportedWaveOutputModesCount = __ModuleGetSupportedWaveOutputModesCount; 01968 pInterface->GetSupportedWaveOutputModes = __ModuleGetSupportedWaveOutputModes; 01969 pInterface->SetWaveOutputMode = __ModuleSetWaveOutputMode; 01970 pInterface->GetWaveOutputMode = __ModuleGetWaveOutputMode; 01971 pInterface->RegisterToWaveOutputModeChanges = __ModuleRegisterToWaveOutputModeChanges; 01972 pInterface->UnregisterFromWaveOutputModeChanges = __ModuleUnregisterFromWaveOutputModeChanges; 01973 } 01974 01975 void XN_CALLBACK_TYPE __ModuleGetCodecInterface(XnModuleCodecInterface* pInterface) 01976 { 01977 __ModuleGetProductionNodeInterface(pInterface->pProductionNode); 01978 01979 pInterface->GetCodecID = __ModuleGetCodecID; 01980 pInterface->Init = __ModuleCodecInit; 01981 pInterface->CompressData = __ModuleCompressData; 01982 pInterface->DecompressData = __ModuleDecompressData; 01983 } 01984 01985 void XN_CALLBACK_TYPE __ModuleGetScriptNodeInterface(XnModuleScriptNodeInterface* pInterface) 01986 { 01987 __ModuleGetProductionNodeInterface(pInterface->pProductionNode); 01988 01989 pInterface->GetSupportedFormat = __ModuleScriptGetSupportedFormat; 01990 pInterface->LoadScriptFromFile = __ModuleLoadScriptFromFile; 01991 pInterface->LoadScriptFromString = __ModuleLoadScriptFromString; 01992 pInterface->Run = __ModuleScriptRun; 01993 } 01994 01995 #endif /* XN_MODULE_C_FUNCTIONS_H_ */
Generated on Wed May 16 2012 10:16:05 for OpenNI 1.5.4 by
![doxygen](doxygen.png)