OpenNI 1.5.7
XnCppWrapper.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef __XN_CPP_WRAPPER_H__
22 #define __XN_CPP_WRAPPER_H__
23 
24 //---------------------------------------------------------------------------
25 // Includes
26 //---------------------------------------------------------------------------
27 #include <XnOpenNI.h>
28 #include <XnCodecIDs.h>
29 
30 //---------------------------------------------------------------------------
31 // Types
32 //---------------------------------------------------------------------------
33 namespace xn
34 {
35  //---------------------------------------------------------------------------
36  // Forward Declarations
37  //---------------------------------------------------------------------------
38  class ProductionNode;
39  class EnumerationErrors;
40  class NodeInfo;
41  class NodeInfoList;
42  class Context;
43  class Query;
44  class Generator;
45 
71  //---------------------------------------------------------------------------
72  // Types
73  //---------------------------------------------------------------------------
74 
100  typedef void (XN_CALLBACK_TYPE* StateChangedHandler)(ProductionNode& node, void* pCookie);
101 
102  //---------------------------------------------------------------------------
103  // Internal stuff
104  //---------------------------------------------------------------------------
105  typedef XnStatus (*_XnRegisterStateChangeFuncPtr)(XnNodeHandle hNode, XnStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback);
106  typedef void (*_XnUnregisterStateChangeFuncPtr)(XnNodeHandle hNode, XnCallbackHandle hCallback);
107 
108  static XnStatus _RegisterToStateChange(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
109  static void _UnregisterFromStateChange(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback);
110 
111  //---------------------------------------------------------------------------
112  // Some Utilities
113  //---------------------------------------------------------------------------
118  class Version
119  {
120  public:
121  Version(const XnVersion& version) : m_version(version) {}
122  Version(XnUInt8 nMajor, XnUInt8 nMinor, XnUInt16 nMaintenance, XnUInt32 nBuild)
123  {
124  m_version.nMajor = nMajor;
125  m_version.nMinor = nMinor;
126  m_version.nMaintenance = nMaintenance;
127  m_version.nBuild = nBuild;
128  }
129 
130  bool operator==(const Version& other) const
131  {
132  return (xnVersionCompare(&m_version, &other.m_version) == 0);
133  }
134  bool operator!=(const Version& other) const
135  {
136  return (xnVersionCompare(&m_version, &other.m_version) != 0);
137  }
138  bool operator<(const Version& other) const
139  {
140  return (xnVersionCompare(&m_version, &other.m_version) < 0);
141  }
142  bool operator<=(const Version& other) const
143  {
144  return (xnVersionCompare(&m_version, &other.m_version) <= 0);
145  }
146  bool operator>(const Version& other) const
147  {
148  return (xnVersionCompare(&m_version, &other.m_version) > 0);
149  }
150  bool operator>=(const Version& other) const
151  {
152  return (xnVersionCompare(&m_version, &other.m_version) >= 0);
153  }
154 
155  static Version Current()
156  {
157  XnVersion version;
158  xnGetVersion(&version);
159  return Version(version);
160  }
161 
162  XnUInt8 Major() const { return m_version.nMajor; }
163  XnUInt8 Minor() const { return m_version.nMinor; }
164  XnUInt16 Maintenance() const { return m_version.nMaintenance; }
165  XnUInt32 Build() const { return m_version.nBuild; }
166 
167  XnUInt8& Major() { return m_version.nMajor; }
168  XnUInt8& Minor() { return m_version.nMinor; }
169  XnUInt16& Maintenance() { return m_version.nMaintenance; }
170  XnUInt32& Build() { return m_version.nBuild; }
171 
172  const XnVersion* GetUnderlying() const { return &m_version; }
173  XnVersion* GetUnderlying() { return &m_version; }
174 
175  private:
176  XnVersion m_version;
177  };
178 
179  //---------------------------------------------------------------------------
180  // Meta Data
181  //---------------------------------------------------------------------------
182 
198  {
199  public:
205  inline OutputMetaData(const XnUInt8** ppData) : m_pAllocatedData(NULL), m_ppData(ppData), m_nAllocatedSize(0)
206  {
207  xnOSMemSet(&m_output, 0, sizeof(XnOutputMetaData));
208  }
209 
213  virtual ~OutputMetaData() { Free(); }
214 
218  inline XnUInt64 Timestamp() const { return m_output.nTimestamp; }
219 
223  inline XnUInt64& Timestamp() { return m_output.nTimestamp; }
224 
229  inline XnUInt32 FrameID() const { return m_output.nFrameID; }
230 
235  inline XnUInt32& FrameID() { return m_output.nFrameID; }
236 
245  inline XnUInt32 DataSize() const { return m_output.nDataSize; }
246 
255  inline XnUInt32& DataSize() { return m_output.nDataSize; }
256 
261  inline XnBool IsDataNew() const { return m_output.bIsNew; }
262 
267  inline XnBool& IsDataNew() { return m_output.bIsNew; }
268 
272  inline const XnOutputMetaData* GetUnderlying() const { return &m_output; }
276  inline XnOutputMetaData* GetUnderlying() { return &m_output; }
277 
282  inline const XnUInt8* Data() const { return *m_ppData; }
287  inline const XnUInt8*& Data() { return *m_ppData; }
288 
292  inline XnUInt8* WritableData()
293  {
294  MakeDataWritable();
295  return m_pAllocatedData;
296  }
297 
306  XnStatus AllocateData(XnUInt32 nBytes)
307  {
308  if (nBytes > m_nAllocatedSize)
309  {
310  // reallocate
311  XnUInt8* pData = (XnUInt8*)xnOSMallocAligned(nBytes, XN_DEFAULT_MEM_ALIGN);
312  XN_VALIDATE_ALLOC_PTR(pData);
313 
314  // allocation succeeded, replace
315  Free();
316  m_pAllocatedData = pData;
317  m_nAllocatedSize = nBytes;
318  }
319 
320  DataSize() = nBytes;
321  *m_ppData = m_pAllocatedData;
322 
323  return XN_STATUS_OK;
324  }
325 
329  void Free()
330  {
331  if (m_nAllocatedSize != 0)
332  {
333  xnOSFreeAligned(m_pAllocatedData);
334  m_pAllocatedData = NULL;
335  m_nAllocatedSize = 0;
336  }
337  }
338 
344  {
345  XnStatus nRetVal = XN_STATUS_OK;
346 
347  // check data isn't already writable
348  if (Data() != m_pAllocatedData || DataSize() > m_nAllocatedSize)
349  {
350  const XnUInt8* pOrigData = *m_ppData;
351 
352  nRetVal = AllocateData(DataSize());
353  XN_IS_STATUS_OK(nRetVal);
354 
355  if (pOrigData != NULL)
356  {
357  xnOSMemCopy(m_pAllocatedData, pOrigData, DataSize());
358  }
359  else
360  {
361  xnOSMemSet(m_pAllocatedData, 0, DataSize());
362  }
363  }
364 
365  return (XN_STATUS_OK);
366  }
367 
368  protected:
370 
371  private:
372  XnOutputMetaData m_output;
373 
374  const XnUInt8** m_ppData;
375  XnUInt32 m_nAllocatedSize;
376  };
377 
391  {
392  public:
399  inline MapMetaData(XnPixelFormat format, const XnUInt8** ppData) : OutputMetaData(ppData)
400  {
401  xnOSMemSet(&m_map, 0, sizeof(XnMapMetaData));
402  m_map.pOutput = OutputMetaData::GetUnderlying();
403  m_map.PixelFormat = format;
404  }
405 
411  inline XnUInt32 XRes() const { return m_map.Res.X; }
417  inline XnUInt32& XRes() { return m_map.Res.X; }
418 
424  inline XnUInt32 YRes() const { return m_map.Res.Y; }
430  inline XnUInt32& YRes() { return m_map.Res.Y; }
431 
440  inline XnUInt32 XOffset() const { return m_map.Offset.X; }
449  inline XnUInt32& XOffset() { return m_map.Offset.X; }
450 
459  inline XnUInt32 YOffset() const { return m_map.Offset.Y; }
468  inline XnUInt32& YOffset() { return m_map.Offset.Y; }
469 
474  inline XnUInt32 FullXRes() const { return m_map.FullRes.X; }
475 
476 
481  inline XnUInt32& FullXRes() { return m_map.FullRes.X; }
482 
486  inline XnUInt32 FullYRes() const { return m_map.FullRes.Y; }
490  inline XnUInt32& FullYRes() { return m_map.FullRes.Y; }
491 
495  inline XnUInt32 FPS() const { return m_map.nFPS; }
499  inline XnUInt32& FPS() { return m_map.nFPS; }
500 
504  inline XnPixelFormat PixelFormat() const { return m_map.PixelFormat; }
505 
509  inline const XnMapMetaData* GetUnderlying() const { return &m_map; }
513  inline XnMapMetaData* GetUnderlying() { return &m_map; }
514 
518  inline XnUInt32 BytesPerPixel() const
519  {
520  switch (PixelFormat())
521  {
523  return sizeof(XnRGB24Pixel);
525  return sizeof(XnYUV422DoublePixel)/2;
527  return sizeof(XnGrayscale8Pixel);
529  return sizeof(XnGrayscale16Pixel);
531  return 2;
532  default:
533  XN_ASSERT(FALSE);
534  return 0;
535  }
536  }
537 
544  XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes)
545  {
546  XnStatus nRetVal = XN_STATUS_OK;
547 
548  XnUInt32 nSize = nXRes * nYRes * BytesPerPixel();
549  nRetVal = OutputMetaData::AllocateData(nSize);
550  XN_IS_STATUS_OK(nRetVal);
551 
552  FullXRes() = XRes() = nXRes;
553  FullYRes() = YRes() = nYRes;
554  XOffset() = YOffset() = 0;
555 
556  return (XN_STATUS_OK);
557  }
558 
567  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnUInt8* pExternalBuffer)
568  {
569  XnStatus nRetVal = XN_STATUS_OK;
570 
571  if (pExternalBuffer == NULL)
572  {
573  nRetVal = AllocateData(nXRes, nYRes);
574  XN_IS_STATUS_OK(nRetVal);
575  }
576  else
577  {
578  FullXRes() = XRes() = nXRes;
579  FullYRes() = YRes() = nYRes;
580  XOffset() = YOffset() = 0;
581  Data() = pExternalBuffer;
582  DataSize() = nXRes * nYRes * BytesPerPixel();
583  }
584 
585  return (XN_STATUS_OK);
586  }
587 
588  protected:
589  XnPixelFormat& PixelFormatImpl() { return m_map.PixelFormat; }
590 
591  private:
592  // block copy ctor and assignment operator
593  MapMetaData& operator=(const MapMetaData&);
594  inline MapMetaData(const MapMetaData& other);
595 
596  // Members
597  XnMapMetaData m_map;
598  };
599 
607  template<class _pixelType>
608  class Map
609  {
610  public:
611  inline Map(_pixelType*& pData, XnUInt32& nXRes, XnUInt32 &nYRes) :
612  m_pData(pData), m_nXRes(nXRes), m_nYRes(nYRes)
613  {}
614 
622  inline XnUInt32 XRes() const { return m_nXRes; }
630  inline XnUInt32 YRes() const { return m_nYRes; }
631 
643  inline const _pixelType& operator[](XnUInt32 nIndex) const
644  {
645  XN_ASSERT(nIndex < (m_nXRes * m_nYRes));
646  return m_pData[nIndex];
647  }
659  inline _pixelType& operator[](XnUInt32 nIndex)
660  {
661  XN_ASSERT(nIndex < (m_nXRes *m_nYRes));
662  return m_pData[nIndex];
663  }
664 
673  inline const _pixelType& operator()(XnUInt32 x, XnUInt32 y) const
674  {
675  XN_ASSERT(x < m_nXRes && y < m_nYRes);
676  return m_pData[y*m_nXRes + x];
677  }
686  inline _pixelType& operator()(XnUInt32 x, XnUInt32 y)
687  {
688  XN_ASSERT(x < m_nXRes && y < m_nYRes);
689  return m_pData[y*m_nXRes + x];
690  }
691 
692  private:
693  /* block copy ctor and assignment operator */
694  Map(const Map& other);
695  Map& operator=(const Map&);
696 
697  _pixelType*& m_pData;
698  XnUInt32& m_nXRes;
699  XnUInt32& m_nYRes;
700  };
701 
753  class DepthMetaData : public MapMetaData
754  {
755  public:
759  inline DepthMetaData() :
760  MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_depth.pData),
761  m_depthMap(const_cast<XnDepthPixel*&>(m_depth.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
762  m_writableDepthMap((XnDepthPixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
763  {
764  xnOSMemSet(&m_depth, 0, sizeof(XnDepthMetaData));
765  m_depth.pMap = MapMetaData::GetUnderlying();
766  }
767 
775  inline void InitFrom(const DepthMetaData& other)
776  {
777  xnCopyDepthMetaData(&m_depth, &other.m_depth);
778  }
779 
790  inline XnStatus InitFrom(const DepthMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel* pExternalBuffer)
791  {
792  InitFrom(other);
793  return ReAdjust(nXRes, nYRes, pExternalBuffer);
794  }
795 
803  {
804  // copy props
805  InitFrom(other);
806  // and make a copy of the data (this will allocate and copy data)
807  return MakeDataWritable();
808  }
809 
813  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel* pExternalBuffer = NULL)
814  {
815  return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
816  }
817 
823  inline XnDepthPixel ZRes() const { return m_depth.nZRes; }
829  inline XnDepthPixel& ZRes() { return m_depth.nZRes; }
830 
843  inline const XnDepthPixel* Data() const { return (const XnDepthPixel*)MapMetaData::Data(); }
856  inline const XnDepthPixel*& Data() { return (const XnDepthPixel*&)MapMetaData::Data(); }
857 
858 
863 
867  inline const xn::DepthMap& DepthMap() const { return m_depthMap; }
872  {
873  MakeDataWritable();
874  return m_writableDepthMap;
875  }
876 
882  inline const XnDepthPixel& operator[](XnUInt32 nIndex) const
883  {
884  XN_ASSERT(nIndex < (XRes()*YRes()));
885  return Data()[nIndex];
886  }
887 
894  inline const XnDepthPixel& operator()(XnUInt32 x, XnUInt32 y) const
895  {
896  XN_ASSERT(x < XRes() && y < YRes());
897  return Data()[y*XRes() + x];
898  }
899 
903  inline const XnDepthMetaData* GetUnderlying() const { return &m_depth; }
907  inline XnDepthMetaData* GetUnderlying() { return &m_depth; }
908 
909  private:
910  // block copy ctor and assignment operator (because we can't return errors in those)
911  DepthMetaData(const DepthMetaData& other);
912  DepthMetaData& operator=(const DepthMetaData&);
913 
914  XnDepthMetaData m_depth;
915  const xn::DepthMap m_depthMap;
916  xn::DepthMap m_writableDepthMap;
917  };
918 
945  class ImageMetaData : public MapMetaData
946  {
947  public:
948  inline ImageMetaData() :
949  MapMetaData(XN_PIXEL_FORMAT_RGB24, &m_image.pData),
950  m_imageMap(const_cast<XnUInt8*&>(m_image.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
951  m_writableImageMap((XnUInt8*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
952  m_rgb24Map((XnRGB24Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
953  m_writableRgb24Map((XnRGB24Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
954  m_gray16Map((XnGrayscale16Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
955  m_writableGray16Map((XnGrayscale16Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
956  m_gray8Map((XnGrayscale8Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
957  m_writableGray8Map((XnGrayscale8Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
958  {
959  xnOSMemSet(&m_image, 0, sizeof(XnImageMetaData));
960  m_image.pMap = MapMetaData::GetUnderlying();
961  }
962 
970  inline void InitFrom(const ImageMetaData& other)
971  {
972  xnCopyImageMetaData(&m_image, &other.m_image);
973  }
974 
986  inline XnStatus InitFrom(const ImageMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8* pExternalBuffer)
987  {
988  InitFrom(other);
989  XnStatus nRetVal = ReAdjust(nXRes, nYRes, format, pExternalBuffer);
990  XN_IS_STATUS_OK(nRetVal);
991  PixelFormat() = format;
992  return XN_STATUS_OK;
993  }
994 
1002  inline XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format)
1003  {
1004  XnPixelFormat origFormat = PixelFormat();
1005  PixelFormat() = format;
1006  XnStatus nRetVal = MapMetaData::AllocateData(nXRes, nYRes);
1007  if (nRetVal != XN_STATUS_OK)
1008  {
1009  PixelFormat() = origFormat;
1010  return (nRetVal);
1011  }
1012 
1013  return XN_STATUS_OK;
1014  }
1015 
1021  inline XnStatus CopyFrom(const ImageMetaData& other)
1022  {
1023  // copy props
1024  xnCopyImageMetaData(&m_image, &other.m_image);
1025  // and make a copy of the data (this will allocate and copy data)
1026  return MakeDataWritable();
1027  }
1028 
1038  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8* pExternalBuffer = NULL)
1039  {
1040  XnPixelFormat origFormat = PixelFormat();
1041  PixelFormat() = format;
1042  XnStatus nRetVal = MapMetaData::ReAdjust(nXRes, nYRes, pExternalBuffer);
1043  if (nRetVal != XN_STATUS_OK)
1044  {
1045  PixelFormat() = origFormat;
1046  return (nRetVal);
1047  }
1048 
1049  return XN_STATUS_OK;
1050  }
1051 
1074 
1078  inline XnUInt8* WritableData() { return MapMetaData::WritableData(); }
1079 
1084  inline const XnRGB24Pixel* RGB24Data() const { return (const XnRGB24Pixel*)MapMetaData::Data(); }
1089  inline const XnRGB24Pixel*& RGB24Data() { return (const XnRGB24Pixel*&)MapMetaData::Data(); }
1094 
1100  inline const XnYUV422DoublePixel* YUV422Data() const { return (const XnYUV422DoublePixel*)MapMetaData::Data(); }
1111 
1116  inline const XnGrayscale8Pixel* Grayscale8Data() const { return (const XnGrayscale8Pixel*)MapMetaData::Data(); }
1126 
1131  inline const XnGrayscale16Pixel* Grayscale16Data() const { return (const XnGrayscale16Pixel*)MapMetaData::Data(); }
1141 
1145  inline const xn::ImageMap& ImageMap() const { return m_imageMap; }
1149  inline xn::ImageMap& WritableImageMap() { MakeDataWritable(); return m_writableImageMap; }
1150 
1156  inline const xn::RGB24Map& RGB24Map() const { return m_rgb24Map; }
1160  inline xn::RGB24Map& WritableRGB24Map() { MakeDataWritable(); return m_writableRgb24Map; }
1161 
1165  inline const xn::Grayscale8Map& Grayscale8Map() const { return m_gray8Map; }
1169  inline xn::Grayscale8Map& WritableGrayscale8Map() { MakeDataWritable(); return m_writableGray8Map; }
1170 
1175  inline const xn::Grayscale16Map& Grayscale16Map() const { return m_gray16Map; }
1179  inline xn::Grayscale16Map& WritableGrayscale16Map() { MakeDataWritable(); return m_writableGray16Map; }
1180 
1184  inline const XnImageMetaData* GetUnderlying() const { return &m_image; }
1188  inline XnImageMetaData* GetUnderlying() { return &m_image; }
1189 
1190  private:
1191  // block copy ctor and assignment operator
1192  ImageMetaData(const ImageMetaData& other);
1193  ImageMetaData& operator=(const ImageMetaData&);
1194 
1195  XnImageMetaData m_image;
1196  const xn::ImageMap m_imageMap;
1197  xn::ImageMap m_writableImageMap;
1198  const xn::RGB24Map m_rgb24Map;
1199  xn::RGB24Map m_writableRgb24Map;
1200  const xn::Grayscale16Map m_gray16Map;
1201  xn::Grayscale16Map m_writableGray16Map;
1202  const xn::Grayscale8Map m_gray8Map;
1203  xn::Grayscale8Map m_writableGray8Map;
1204  };
1205 
1215  class IRMetaData : public MapMetaData
1216  {
1217  public:
1218  inline IRMetaData() :
1219  MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_ir.pData),
1220  m_irMap(const_cast<XnIRPixel*&>(m_ir.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
1221  m_writableIRMap((XnIRPixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
1222  {
1223  xnOSMemSet(&m_ir, 0, sizeof(XnIRMetaData));
1224  m_ir.pMap = MapMetaData::GetUnderlying();
1225  }
1226 
1234  inline void InitFrom(const IRMetaData& other)
1235  {
1236  xnCopyIRMetaData(&m_ir, &other.m_ir);
1237  }
1238 
1248  inline XnStatus InitFrom(const IRMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel* pExternalBuffer)
1249  {
1250  InitFrom(other);
1251  return ReAdjust(nXRes, nYRes, pExternalBuffer);
1252  }
1253 
1260  {
1261  // copy props
1262  xnCopyIRMetaData(&m_ir, &other.m_ir);
1263  // and make a copy of the data (this will allocate and copy data)
1264  return MakeDataWritable();
1265  }
1266 
1270  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel* pExternalBuffer = NULL)
1271  {
1272  return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
1273  }
1274 
1287  inline const XnIRPixel* Data() const { return (const XnIRPixel*)MapMetaData::Data(); }
1300  inline const XnIRPixel*& Data() { return (const XnIRPixel*&)MapMetaData::Data(); }
1305 
1311  inline const XnIRPixel& operator[](XnUInt32 nIndex) const
1312  {
1313  XN_ASSERT(nIndex < (XRes()*YRes()));
1314  return Data()[nIndex];
1315  }
1316 
1323  inline const XnIRPixel& operator()(XnUInt32 x, XnUInt32 y) const
1324  {
1325  XN_ASSERT(x < XRes() && y < YRes());
1326  return Data()[y*XRes() + x];
1327  }
1328 
1337  inline const xn::IRMap& IRMap() const { return m_irMap; }
1346  inline xn::IRMap& WritableIRMap() { MakeDataWritable(); return m_writableIRMap; }
1347 
1351  inline const XnIRMetaData* GetUnderlying() const { return &m_ir; }
1355  inline XnIRMetaData* GetUnderlying() { return &m_ir; }
1356 
1357  private:
1358  // block copy ctor and assignment operator
1359  IRMetaData(const IRMetaData& other);
1360  IRMetaData& operator=(const IRMetaData&);
1361 
1362  XnIRMetaData m_ir;
1363  const xn::IRMap m_irMap;
1364  xn::IRMap m_writableIRMap;
1365  };
1366 
1374  {
1375  public:
1376  XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_UNALIGNED_ADDRESS_WARNING_ID);
1377  inline AudioMetaData() : OutputMetaData(&m_audio.pData)
1378  {
1379  xnOSMemSet(&m_audio, 0, sizeof(XnAudioMetaData));
1380  m_audio.pOutput = OutputMetaData::GetUnderlying();
1381  }
1382 
1384 
1392  inline void InitFrom(const AudioMetaData& other)
1393  {
1394  xnCopyAudioMetaData(&m_audio, &other.m_audio);
1395  }
1396 
1400  inline XnUInt8 NumberOfChannels() const { return m_audio.Wave.nChannels; }
1404  inline XnUInt8& NumberOfChannels() { return m_audio.Wave.nChannels; }
1405 
1409  inline XnUInt32 SampleRate() const { return m_audio.Wave.nSampleRate; }
1413  inline XnUInt32& SampleRate() { return m_audio.Wave.nSampleRate; }
1414 
1418  inline XnUInt16 BitsPerSample() const { return m_audio.Wave.nBitsPerSample; }
1422  inline XnUInt16& BitsPerSample() { return m_audio.Wave.nBitsPerSample; }
1423 
1427  inline const XnAudioMetaData* GetUnderlying() const { return &m_audio; }
1431  inline XnAudioMetaData* GetUnderlying() { return &m_audio; }
1432 
1433  private:
1434  // block copy ctor and assignment operator
1435  AudioMetaData(const AudioMetaData& other);
1436  AudioMetaData& operator=(const AudioMetaData&);
1437 
1438  XnAudioMetaData m_audio;
1439  };
1440 
1450  {
1451  public:
1452  inline SceneMetaData() :
1453  MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_scene.pData),
1454  m_labelMap(const_cast<XnLabel*&>(m_scene.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
1455  m_writableLabelMap((XnLabel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
1456  {
1457  xnOSMemSet(&m_scene, 0, sizeof(XnSceneMetaData));
1458  m_scene.pMap = MapMetaData::GetUnderlying();
1459  }
1460 
1468  inline void InitFrom(const SceneMetaData& other)
1469  {
1470  xnCopySceneMetaData(&m_scene, &other.m_scene);
1471  }
1472 
1482  inline XnStatus InitFrom(const SceneMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel* pExternalBuffer)
1483  {
1484  InitFrom(other);
1485  return ReAdjust(nXRes, nYRes, pExternalBuffer);
1486  }
1487 
1494  {
1495  // copy props
1496  xnCopySceneMetaData(&m_scene, &other.m_scene);
1497  // and make a copy of the data (this will allocate and copy data)
1498  return MakeDataWritable();
1499  }
1500 
1504  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel* pExternalBuffer = NULL)
1505  {
1506  return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
1507  }
1508 
1522  inline const XnLabel* Data() const { return (const XnLabel*)MapMetaData::Data(); }
1536  inline const XnLabel*& Data() { return (const XnLabel*&)MapMetaData::Data(); }
1537 
1542 
1546  inline const xn::LabelMap& LabelMap() const { return m_labelMap; }
1550  inline xn::LabelMap& WritableLabelMap() { MakeDataWritable(); return m_writableLabelMap; }
1551 
1562  inline const XnLabel& operator[](XnUInt32 nIndex) const
1563  {
1564  XN_ASSERT(nIndex < (XRes()*YRes()));
1565  return Data()[nIndex];
1566  }
1567 
1579  inline const XnLabel& operator()(XnUInt32 x, XnUInt32 y) const
1580  {
1581  XN_ASSERT(x < XRes() && y < YRes());
1582  return (*this)[y*XRes() + x];
1583  }
1584 
1588  inline const XnSceneMetaData* GetUnderlying() const { return &m_scene; }
1592  inline XnSceneMetaData* GetUnderlying() { return &m_scene; }
1593 
1594  private:
1595  // block copy ctor and assignment operator
1596  SceneMetaData(const SceneMetaData& other);
1597  SceneMetaData& operator=(const SceneMetaData&);
1598 
1599  XnSceneMetaData m_scene;
1600  const xn::LabelMap m_labelMap;
1601  xn::LabelMap m_writableLabelMap;
1602  };
1603 
1604  //---------------------------------------------------------------------------
1605  // NodeWrapper
1606  //---------------------------------------------------------------------------
1607 
1628  {
1629  public:
1630  friend class Context;
1631 
1637  inline NodeWrapper(XnNodeHandle hNode) : m_hNode(NULL), m_hShuttingDownCallback(NULL)
1638  {
1639  SetHandle(hNode);
1640  }
1641 
1642  inline NodeWrapper(const NodeWrapper& other) : m_hNode(NULL), m_hShuttingDownCallback(NULL)
1643  {
1644  SetHandle(other.GetHandle());
1645  }
1646 
1647  inline NodeWrapper& operator=(const NodeWrapper& other)
1648  {
1649  SetHandle(other.GetHandle());
1650  return *this;
1651  }
1652 
1653  inline ~NodeWrapper()
1654  {
1655  SetHandle(NULL);
1656  }
1657 
1658  inline operator XnNodeHandle() const { return GetHandle(); }
1659 
1663  inline XnNodeHandle GetHandle() const { return m_hNode; }
1664 
1670  inline XnBool operator==(const NodeWrapper& other)
1671  {
1672  return (GetHandle() == other.GetHandle());
1673  }
1674 
1680  inline XnBool operator!=(const NodeWrapper& other)
1681  {
1682  return (GetHandle() != other.GetHandle());
1683  }
1684 
1698  inline XnBool IsValid() const { return (GetHandle() != NULL); }
1699 
1700  /*
1701  * @brief Gets the instance name of a node. Unless the application made a specific
1702  * request for a specific name, the name will be of the form: "Depth1", "Image2", etc.
1703  */
1704  const XnChar* GetName() const {return xnGetNodeName(GetHandle()); }
1705 
1710  inline XnStatus AddRef() { return xnProductionNodeAddRef(GetHandle()); }
1711 
1716  inline void Release()
1717  {
1718  SetHandle(NULL);
1719  }
1720 
1721 
1725  inline void SetHandle(XnNodeHandle hNode)
1726  {
1727  if (m_hNode == hNode)
1728  {
1729  // Optimization: do nothing
1730  return;
1731  }
1732 
1733  // check currently held node. If we're holding a node, release it
1734  if (m_hNode != NULL)
1735  {
1736  XnContext* pContext = xnGetRefContextFromNodeHandle(m_hNode);
1737  xnContextUnregisterFromShutdown(pContext, m_hShuttingDownCallback);
1738  xnContextRelease(pContext);
1739  xnProductionNodeRelease(m_hNode);
1740  }
1741 
1742  // check new node handle, if it points to a node, add ref to it
1743  if (hNode != NULL)
1744  {
1745  XnStatus nRetVal = xnProductionNodeAddRef(hNode);
1746  XN_ASSERT(nRetVal == XN_STATUS_OK);
1747  XN_REFERENCE_VARIABLE(nRetVal);
1748 
1749  XnContext* pContext = xnGetRefContextFromNodeHandle(hNode);
1750 
1751  nRetVal = xnContextRegisterForShutdown(pContext, ContextShuttingDownCallback, this, &m_hShuttingDownCallback);
1752  XN_ASSERT(nRetVal == XN_STATUS_OK);
1753 
1754  xnContextRelease(pContext);
1755  }
1756 
1757  m_hNode = hNode;
1758  }
1759 
1760  inline void TakeOwnership(XnNodeHandle hNode)
1761  {
1762  SetHandle(hNode);
1763 
1764  if (hNode != NULL)
1765  {
1766  xnProductionNodeRelease(hNode);
1767  }
1768  }
1769 
1771  inline XnStatus XN_API_DEPRECATED("Please use AddRef() instead.") Ref() { return AddRef(); }
1772  inline void XN_API_DEPRECATED("Please use Release() instead.") Unref() { Release(); }
1775  private:
1776  XnNodeHandle m_hNode;
1777  XnCallbackHandle m_hShuttingDownCallback;
1778 
1779  static void XN_CALLBACK_TYPE ContextShuttingDownCallback(XnContext* /*pContext*/, void* pCookie)
1780  {
1781  NodeWrapper* pThis = (NodeWrapper*)pCookie;
1782  pThis->m_hNode = NULL;
1783  }
1784  };
1785 
1786  //---------------------------------------------------------------------------
1787  // Node Info
1788  //---------------------------------------------------------------------------
1789 
1801  class NodeInfo
1802  {
1803  public:
1809  NodeInfo(XnNodeInfo* pInfo) : m_pNeededNodes(NULL), m_bOwnerOfNode(FALSE)
1810  {
1811  SetUnderlyingObject(pInfo);
1812  }
1813 
1819  NodeInfo(const NodeInfo& other) : m_pNeededNodes(NULL), m_bOwnerOfNode(FALSE)
1820  {
1821  SetUnderlyingObject(other.m_pInfo);
1822  }
1823 
1828  {
1829  SetUnderlyingObject(NULL);
1830  }
1831 
1837  inline NodeInfo& operator=(const NodeInfo& other)
1838  {
1839  SetUnderlyingObject(other.m_pInfo);
1840  return *this;
1841  }
1842 
1846  inline operator XnNodeInfo*()
1847  {
1848  return m_pInfo;
1849  }
1850 
1856  inline XnStatus SetInstanceName(const XnChar* strName)
1857  {
1858  return xnNodeInfoSetInstanceName(m_pInfo, strName);
1859  }
1860 
1875  {
1876  return *xnNodeInfoGetDescription(m_pInfo);
1877  }
1878 
1890  inline const XnChar* GetInstanceName() const
1891  {
1892  return xnNodeInfoGetInstanceName(m_pInfo);
1893  }
1894 
1906  inline const XnChar* GetCreationInfo() const
1907  {
1908  return xnNodeInfoGetCreationInfo(m_pInfo);
1909  }
1910 
1911  /*
1912  * @brief Gets the list of dependant nodes for this node alternative.
1913  * These are any other node alternatives that the node is dependant on.
1914  */
1915  inline NodeInfoList& GetNeededNodes() const;
1916 
1924  inline XnStatus GetInstance(ProductionNode& node) const;
1925 
1930  inline const void* GetAdditionalData() const
1931  {
1932  return xnNodeInfoGetAdditionalData(m_pInfo);
1933  }
1934 
1939  inline XnStatus GetTreeStringRepresentation(XnChar* csResultBuffer, XnUInt32 nBufferSize) const
1940  {
1941  return xnNodeInfoGetTreeStringRepresentation(m_pInfo, csResultBuffer, nBufferSize);
1942  }
1943 
1944  private:
1945  inline void SetUnderlyingObject(XnNodeInfo* pInfo);
1946 
1947  XnNodeInfo* m_pInfo;
1948  mutable NodeInfoList* m_pNeededNodes;
1949  XnBool m_bOwnerOfNode; // backwards compatibility
1950  friend class Context;
1951  };
1952 
1953  //---------------------------------------------------------------------------
1954  // Query
1955  //---------------------------------------------------------------------------
1956 
1975  class Query
1976  {
1977  public:
1978  inline Query() : m_bAllocated(TRUE)
1979  {
1980  xnNodeQueryAllocate(&m_pQuery);
1981  }
1982 
1983  inline Query(XnNodeQuery* pNodeQuery) : m_pQuery(pNodeQuery), m_bAllocated(FALSE)
1984  {
1985  }
1986 
1988  {
1989  if (m_bAllocated)
1990  {
1991  xnNodeQueryFree(m_pQuery);
1992  }
1993  }
1994 
1998  inline const XnNodeQuery* GetUnderlyingObject() const { return m_pQuery; }
1999  inline XnNodeQuery* GetUnderlyingObject() { return m_pQuery; }
2000 
2005  inline XnStatus SetVendor(const XnChar* strVendor)
2006  {
2007  return xnNodeQuerySetVendor(m_pQuery, strVendor);
2008  }
2009 
2018  inline XnStatus SetName(const XnChar* strName)
2019  {
2020  return xnNodeQuerySetName(m_pQuery, strName);
2021  }
2022 
2026  inline XnStatus SetMinVersion(const XnVersion& minVersion)
2027  {
2028  return xnNodeQuerySetMinVersion(m_pQuery, &minVersion);
2029  }
2030 
2034  inline XnStatus SetMinVersion(const Version& minVersion)
2035  {
2036  return xnNodeQuerySetMinVersion(m_pQuery, minVersion.GetUnderlying());
2037  }
2038 
2042  inline XnStatus SetMaxVersion(const XnVersion& maxVersion)
2043  {
2044  return xnNodeQuerySetMaxVersion(m_pQuery, &maxVersion);
2045  }
2046 
2050  inline XnStatus SetMaxVersion(const Version& maxVersion)
2051  {
2052  return xnNodeQuerySetMaxVersion(m_pQuery, maxVersion.GetUnderlying());
2053  }
2054 
2067  inline XnStatus AddSupportedCapability(const XnChar* strNeededCapability)
2068  {
2069  return xnNodeQueryAddSupportedCapability(m_pQuery, strNeededCapability);
2070  }
2071 
2083  {
2084  return xnNodeQueryAddSupportedMapOutputMode(m_pQuery, &MapOutputMode);
2085  }
2086 
2091  inline XnStatus SetSupportedMinUserPositions(const XnUInt32 nCount)
2092  {
2093  return xnNodeQuerySetSupportedMinUserPositions(m_pQuery, nCount);
2094  }
2095 
2107  inline XnStatus SetExistingNodeOnly(XnBool bExistingNode)
2108  {
2109  return xnNodeQuerySetExistingNodeOnly(m_pQuery, bExistingNode);
2110  }
2111 
2116  inline XnStatus AddNeededNode(const XnChar* strInstanceName)
2117  {
2118  return xnNodeQueryAddNeededNode(m_pQuery, strInstanceName);
2119  }
2120 
2125  inline XnStatus SetCreationInfo(const XnChar* strCreationInfo)
2126  {
2127  return xnNodeQuerySetCreationInfo(m_pQuery, strCreationInfo);
2128  }
2129 
2130  private:
2131  XnNodeQuery* m_pQuery;
2132  XnBool m_bAllocated;
2133  };
2134 
2135  //---------------------------------------------------------------------------
2136  // Node Info List
2137  //---------------------------------------------------------------------------
2138 
2144  {
2145  public:
2149  class Iterator
2150  {
2151  public:
2152  friend class NodeInfoList;
2153 
2166  XnBool operator==(const Iterator& other) const
2167  {
2168  return m_it.pCurrent == other.m_it.pCurrent;
2169  }
2170 
2177  XnBool operator!=(const Iterator& other) const
2178  {
2179  return m_it.pCurrent != other.m_it.pCurrent;
2180  }
2181 
2187  {
2188  UpdateInternalObject(xnNodeInfoListGetNext(m_it));
2189  return *this;
2190  }
2191 
2196  inline Iterator operator++(int)
2197  {
2198  XnNodeInfoListIterator curr = m_it;
2199  UpdateInternalObject(xnNodeInfoListGetNext(m_it));
2200  return Iterator(curr);
2201  }
2202 
2207  {
2208  UpdateInternalObject(xnNodeInfoListGetPrevious(m_it));
2209  return *this;
2210  }
2211 
2215  inline Iterator operator--(int)
2216  {
2217  XnNodeInfoListIterator curr = m_it;
2218  UpdateInternalObject(xnNodeInfoListGetPrevious(m_it));
2219  return Iterator(curr);
2220  }
2221 
2226  {
2227  return m_Info;
2228  }
2229 
2230  private:
2231  inline Iterator(XnNodeInfoListIterator it) : m_Info(NULL)
2232  {
2233  UpdateInternalObject(it);
2234  }
2235 
2236  inline void UpdateInternalObject(XnNodeInfoListIterator it)
2237  {
2238  m_it = it;
2240  {
2241  XnNodeInfo* pInfo = xnNodeInfoListGetCurrent(it);
2242  m_Info = NodeInfo(pInfo);
2243  }
2244  else
2245  {
2246  m_Info = NodeInfo(NULL);
2247  }
2248  }
2249 
2250  NodeInfo m_Info;
2252  };
2253 
2257  inline NodeInfoList()
2258  {
2259  xnNodeInfoListAllocate(&m_pList);
2260  m_bAllocated = TRUE;
2261  }
2262 
2269  inline NodeInfoList(XnNodeInfoList* pList) : m_pList(pList), m_bAllocated(FALSE) {}
2270 
2271  inline ~NodeInfoList()
2272  {
2273  FreeImpl();
2274  }
2275 
2279  inline XnNodeInfoList* GetUnderlyingObject() const { return m_pList; }
2280 
2288  {
2289  FreeImpl();
2290  m_pList = pList;
2291  m_bAllocated = TRUE;
2292  }
2293 
2298  inline XnStatus Add(XnProductionNodeDescription& description, const XnChar* strCreationInfo, NodeInfoList* pNeededNodes)
2299  {
2300  XnNodeInfoList* pList = (pNeededNodes == NULL) ? NULL : pNeededNodes->GetUnderlyingObject();
2301  return xnNodeInfoListAdd(m_pList, &description, strCreationInfo, pList);
2302  }
2303 
2308  inline XnStatus AddEx(XnProductionNodeDescription& description, const XnChar* strCreationInfo, NodeInfoList* pNeededNodes, const void* pAdditionalData, XnFreeHandler pFreeHandler)
2309  {
2310  XnNodeInfoList* pList = (pNeededNodes == NULL) ? NULL : pNeededNodes->GetUnderlyingObject();
2311  return xnNodeInfoListAddEx(m_pList, &description, strCreationInfo, pList, pAdditionalData, pFreeHandler);
2312  }
2313 
2318  inline XnStatus AddNode(NodeInfo& info)
2319  {
2320  return xnNodeInfoListAddNode(m_pList, info);
2321  }
2322 
2328  {
2329  return xnNodeInfoListAddNodeFromList(m_pList, it.m_it);
2330  }
2331 
2336  inline Iterator Begin() const
2337  {
2338  return Iterator(xnNodeInfoListGetFirst(m_pList));
2339  }
2340 
2345  inline Iterator End() const
2346  {
2347  XnNodeInfoListIterator it = { NULL };
2348  return Iterator(it);
2349  }
2350 
2355  inline Iterator RBegin() const
2356  {
2357  return Iterator(xnNodeInfoListGetLast(m_pList));
2358  }
2359 
2364  inline Iterator REnd() const
2365  {
2366  XnNodeInfoListIterator it = { NULL };
2367  return Iterator(it);
2368  }
2369 
2375  {
2376  return xnNodeInfoListRemove(m_pList, it.m_it);
2377  }
2378 
2383  inline XnStatus Clear()
2384  {
2385  return xnNodeInfoListClear(m_pList);
2386  }
2387 
2393  {
2394  return xnNodeInfoListAppend(m_pList, other.GetUnderlyingObject());
2395  }
2396 
2400  inline XnBool IsEmpty()
2401  {
2402  return xnNodeInfoListIsEmpty(m_pList);
2403  }
2404 
2409  inline XnStatus FilterList(Context& context, Query& query);
2410 
2411  private:
2412  inline void FreeImpl()
2413  {
2414  if (m_bAllocated)
2415  {
2416  xnNodeInfoListFree(m_pList);
2417  m_bAllocated = FALSE;
2418  m_pList = NULL;
2419  }
2420  }
2421 
2422  XnNodeInfoList* m_pList;
2423  XnBool m_bAllocated;
2424  };
2425 
2426  //---------------------------------------------------------------------------
2427  // Production Nodes Functionality
2428  //---------------------------------------------------------------------------
2429 
2434  class Capability : public NodeWrapper
2435  {
2436  public:
2443  Capability(const NodeWrapper& node) : NodeWrapper(node) {}
2444  };
2445 
2480  {
2481  public:
2489 
2493  inline XnStatus GetErrorState() const
2494  {
2495  return xnGetNodeErrorState(GetHandle());
2496  }
2497 
2508  {
2509  return _RegisterToStateChange(xnRegisterToNodeErrorStateChange, GetHandle(), handler, pCookie, hCallback);
2510  }
2511 
2520  {
2521  _UnregisterFromStateChange(xnUnregisterFromNodeErrorStateChange, GetHandle(), hCallback);
2522  }
2523  };
2524 
2531  {
2532  public:
2539  GeneralIntCapability(XnNodeHandle hNode, const XnChar* strCap) : Capability(hNode), m_strCap(strCap) {}
2540  GeneralIntCapability(const NodeWrapper& node, const XnChar* strCap) : Capability(node), m_strCap(strCap) {}
2541 
2546  inline void GetRange(XnInt32& nMin, XnInt32& nMax, XnInt32& nStep, XnInt32& nDefault, XnBool& bIsAutoSupported) const
2547  {
2548  xnGetGeneralIntRange(GetHandle(), m_strCap, &nMin, &nMax, &nStep, &nDefault, &bIsAutoSupported);
2549  }
2550 
2555  inline XnInt32 Get()
2556  {
2557  XnInt32 nValue;
2558  xnGetGeneralIntValue(GetHandle(), m_strCap, &nValue);
2559  return nValue;
2560  }
2561 
2566  inline XnStatus Set(XnInt32 nValue)
2567  {
2568  return xnSetGeneralIntValue(GetHandle(), m_strCap, nValue);
2569  }
2570 
2580  XnStatus RegisterToValueChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
2581 
2589  void UnregisterFromValueChange(XnCallbackHandle hCallback);
2590 
2591  private:
2592  const XnChar* m_strCap;
2593  };
2594 
2631  {
2632  public:
2638  inline ProductionNode(XnNodeHandle hNode = NULL) : NodeWrapper(hNode) {}
2639  inline ProductionNode(const NodeWrapper& other) : NodeWrapper(other) {}
2640 
2649  inline NodeInfo GetInfo() const { return NodeInfo(xnGetNodeInfo(GetHandle())); }
2650 
2656  {
2657  return xnAddNeededNode(GetHandle(), needed.GetHandle());
2658  }
2659 
2665  {
2666  return xnRemoveNeededNode(GetHandle(), needed.GetHandle());
2667  }
2668 
2680  inline void GetContext(Context& context) const;
2681 
2691  inline Context GetContext() const;
2692 
2704  inline XnBool IsCapabilitySupported(const XnChar* strCapabilityName) const
2705  {
2706  return xnIsCapabilitySupported(GetHandle(), strCapabilityName);
2707  }
2708 
2713  inline XnStatus SetIntProperty(const XnChar* strName, XnUInt64 nValue)
2714  {
2715  return xnSetIntProperty(GetHandle(), strName, nValue);
2716  }
2717 
2722  inline XnStatus SetRealProperty(const XnChar* strName, XnDouble dValue)
2723  {
2724  return xnSetRealProperty(GetHandle(), strName, dValue);
2725  }
2726 
2731  inline XnStatus SetStringProperty(const XnChar* strName, const XnChar* strValue)
2732  {
2733  return xnSetStringProperty(GetHandle(), strName, strValue);
2734  }
2735 
2740  inline XnStatus SetGeneralProperty(const XnChar* strName, XnUInt32 nBufferSize, const void* pBuffer)
2741  {
2742  return xnSetGeneralProperty(GetHandle(), strName, nBufferSize, pBuffer);
2743  }
2744 
2749  inline XnStatus GetIntProperty(const XnChar* strName, XnUInt64& nValue) const
2750  {
2751  return xnGetIntProperty(GetHandle(), strName, &nValue);
2752  }
2753 
2758  inline XnStatus GetRealProperty(const XnChar* strName, XnDouble &dValue) const
2759  {
2760  return xnGetRealProperty(GetHandle(), strName, &dValue);
2761  }
2762 
2767  inline XnStatus GetStringProperty(const XnChar* strName, XnChar* csValue, XnUInt32 nBufSize) const
2768  {
2769  return xnGetStringProperty(GetHandle(), strName, csValue, nBufSize);
2770  }
2771 
2776  inline XnStatus GetGeneralProperty(const XnChar* strName, XnUInt32 nBufferSize, void* pBuffer) const
2777  {
2778  return xnGetGeneralProperty(GetHandle(), strName, nBufferSize, pBuffer);
2779  }
2780 
2786  {
2787  return xnLockNodeForChanges(GetHandle(), phLock);
2788  }
2789 
2794  inline void UnlockForChanges(XnLockHandle hLock)
2795  {
2796  xnUnlockNodeForChanges(GetHandle(), hLock);
2797  }
2798 
2804  {
2805  return xnLockedNodeStartChanges(GetHandle(), hLock);
2806  }
2807 
2813  {
2814  xnLockedNodeEndChanges(GetHandle(), hLock);
2815  }
2816 
2826  {
2827  return ErrorStateCapability(GetHandle());
2828  }
2829 
2839  {
2840  return ErrorStateCapability(GetHandle());
2841  }
2842 
2854  inline GeneralIntCapability GetGeneralIntCap(const XnChar* strCapability)
2855  {
2856  return GeneralIntCapability(GetHandle(), strCapability);
2857  }
2858  };
2859 
2870  {
2871  public:
2879 
2889  inline XnStatus GetDeviceName(XnChar* strBuffer, XnUInt32 nBufferSize)
2890  {
2891  return xnGetDeviceName(GetHandle(), strBuffer, &nBufferSize);
2892  }
2893 
2903  inline XnStatus GetVendorSpecificData(XnChar* strBuffer, XnUInt32 nBufferSize)
2904  {
2905  return xnGetVendorSpecificData(GetHandle(), strBuffer, &nBufferSize);
2906  }
2907 
2917  inline XnStatus GetSerialNumber(XnChar* strBuffer, XnUInt32 nBufferSize)
2918  {
2919  return xnGetSerialNumber(GetHandle(), strBuffer, &nBufferSize);
2920  }
2921  };
2922 
2936  class Device : public ProductionNode
2937  {
2938  public:
2939  inline Device(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
2940  inline Device(const NodeWrapper& other) : ProductionNode(other) {}
2941 
2950  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
2951 
2966  {
2967  return DeviceIdentificationCapability(GetHandle());
2968  }
2969  };
2970 
3019  {
3020  public:
3021  inline MirrorCapability(XnNodeHandle hNode) : Capability(hNode) {}
3022  MirrorCapability(const NodeWrapper& node) : Capability(node) {}
3023 
3030  inline XnStatus SetMirror(XnBool bMirror)
3031  {
3032  return xnSetMirror(GetHandle(), bMirror);
3033  }
3034 
3038  inline XnBool IsMirrored() const
3039  {
3040  return xnIsMirrored(GetHandle());
3041  }
3042 
3052  inline XnStatus RegisterToMirrorChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
3053  {
3054  return _RegisterToStateChange(xnRegisterToMirrorChange, GetHandle(), handler, pCookie, hCallback);
3055  }
3056 
3065  {
3066  _UnregisterFromStateChange(xnUnregisterFromMirrorChange, GetHandle(), hCallback);
3067  }
3068  };
3069 
3103  {
3104  public:
3107 
3122  inline XnBool IsViewPointSupported(ProductionNode& otherNode) const
3123  {
3124  return xnIsViewPointSupported(GetHandle(), otherNode.GetHandle());
3125  }
3126 
3135  {
3136  return xnSetViewPoint(GetHandle(), otherNode.GetHandle());
3137  }
3138 
3143  {
3144  return xnResetViewPoint(GetHandle());
3145  }
3146 
3154  inline XnBool IsViewPointAs(ProductionNode& otherNode) const
3155  {
3156  return xnIsViewPointAs(GetHandle(), otherNode.GetHandle());
3157  }
3158 
3168  inline XnStatus RegisterToViewPointChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
3169  {
3170  return _RegisterToStateChange(xnRegisterToViewPointChange, GetHandle(), handler, pCookie, hCallback);
3171  }
3172 
3181  {
3182  _UnregisterFromStateChange(xnUnregisterFromViewPointChange, GetHandle(), hCallback);
3183  }
3184 
3196  XnStatus GetPixelCoordinatesInViewPoint(ProductionNode& other, XnUInt32 x, XnUInt32 y, XnUInt32& altX, XnUInt32& altY)
3197  {
3198  return xnGetPixelCoordinatesInViewPoint(GetHandle(), other.GetHandle(), x, y, &altX, &altY);
3199  }
3200  };
3201 
3224  {
3225  public:
3226  inline FrameSyncCapability(XnNodeHandle hNode) : Capability(hNode) {}
3228 
3237  inline XnBool CanFrameSyncWith(Generator& other) const;
3238 
3245  inline XnStatus FrameSyncWith(Generator& other);
3246 
3251  inline XnStatus StopFrameSyncWith(Generator& other);
3252 
3259  inline XnBool IsFrameSyncedWith(Generator& other) const;
3260 
3270  inline XnStatus RegisterToFrameSyncChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
3271  {
3272  return _RegisterToStateChange(xnRegisterToFrameSyncChange, GetHandle(), handler, pCookie, hCallback);
3273  }
3274 
3283  {
3284  _UnregisterFromStateChange(xnUnregisterFromFrameSyncChange, GetHandle(), hCallback);
3285  }
3286  };
3287 
3340  class Generator : public ProductionNode
3341  {
3342  public:
3348  inline Generator(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
3349  inline Generator(const NodeWrapper& other) : ProductionNode(other) {}
3350 
3371  {
3372  return xnStartGenerating(GetHandle());
3373  }
3374 
3378  inline XnBool IsGenerating() const
3379  {
3380  return xnIsGenerating(GetHandle());
3381  }
3382 
3392  {
3393  return xnStopGenerating(GetHandle());
3394  }
3395 
3410  {
3411  return _RegisterToStateChange(xnRegisterToGenerationRunningChange, GetHandle(), handler, pCookie, hCallback);
3412  }
3413 
3422  {
3423  _UnregisterFromStateChange(xnUnregisterFromGenerationRunningChange, GetHandle(), hCallback);
3424  }
3425 
3440  {
3441  return _RegisterToStateChange(xnRegisterToNewDataAvailable, GetHandle(), handler, pCookie, hCallback);
3442  }
3443 
3452  {
3453  _UnregisterFromStateChange(xnUnregisterFromNewDataAvailable, GetHandle(), hCallback);
3454  }
3455 
3464  inline XnBool IsNewDataAvailable(XnUInt64* pnTimestamp = NULL) const
3465  {
3466  return xnIsNewDataAvailable(GetHandle(), pnTimestamp);
3467  }
3468 
3488  {
3489  return xnWaitAndUpdateData(GetHandle());
3490  }
3491 
3496  inline XnBool IsDataNew() const
3497  {
3498  return xnIsDataNew(GetHandle());
3499  }
3500 
3518  inline const void* GetData()
3519  {
3520  return xnGetData(GetHandle());
3521  }
3522 
3536  inline XnUInt32 GetDataSize() const
3537  {
3538  return xnGetDataSize(GetHandle());
3539  }
3540 
3554  inline XnUInt64 GetTimestamp() const
3555  {
3556  return xnGetTimestamp(GetHandle());
3557  }
3558 
3571  inline XnUInt32 GetFrameID() const
3572  {
3573  return xnGetFrameID(GetHandle());
3574  }
3575 
3584  inline const MirrorCapability GetMirrorCap() const
3585  {
3586  return MirrorCapability(GetHandle());
3587  }
3588 
3598  {
3599  return MirrorCapability(GetHandle());
3600  }
3601 
3613  {
3614  return AlternativeViewPointCapability(GetHandle());
3615  }
3616 
3628  {
3629  return AlternativeViewPointCapability(GetHandle());
3630  }
3631 
3642  {
3643  return FrameSyncCapability(GetHandle());
3644  }
3645 
3656  {
3657  return FrameSyncCapability(GetHandle());
3658  }
3659  };
3660 
3705  class Recorder : public ProductionNode
3706  {
3707  public:
3713  inline Recorder(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
3714  inline Recorder(const NodeWrapper& other) : ProductionNode(other) {}
3715 
3723  inline XnStatus Create(Context& context, const XnChar* strFormatName = NULL);
3724 
3733  inline XnStatus SetDestination(XnRecordMedium destType, const XnChar* strDest)
3734  {
3735  return xnSetRecorderDestination(GetHandle(), destType, strDest);
3736  }
3737 
3747  inline XnStatus GetDestination(XnRecordMedium& destType, XnChar* strDest, XnUInt32 nBufSize)
3748  {
3749  return xnGetRecorderDestination(GetHandle(), &destType, strDest, nBufSize);
3750  }
3751 
3762  {
3763  return xnAddNodeToRecording(GetHandle(), Node.GetHandle(), compression);
3764  }
3765 
3773  {
3774  return xnRemoveNodeFromRecording(GetHandle(), Node.GetHandle());
3775  }
3776 
3789  inline XnStatus Record()
3790  {
3791  return xnRecord(GetHandle());
3792  }
3793  };
3794 
3822  class Player : public ProductionNode
3823  {
3824  public:
3830  inline Player(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
3831  inline Player(const NodeWrapper& other) : ProductionNode(other) {}
3832 
3841  inline XnStatus Create(Context& context, const XnChar* strFormatName);
3842 
3843 
3858  inline XnStatus SetRepeat(XnBool bRepeat)
3859  {
3860  return xnSetPlayerRepeat(GetHandle(), bRepeat);
3861  }
3862 
3867  inline XnStatus SetSource(XnRecordMedium sourceType, const XnChar* strSource)
3868  {
3869  return xnSetPlayerSource(GetHandle(), sourceType, strSource);
3870  }
3871 
3880  inline XnStatus GetSource(XnRecordMedium &sourceType, XnChar* strSource, XnUInt32 nBufSize) const
3881  {
3882  return xnGetPlayerSource(GetHandle(), &sourceType, strSource, nBufSize);
3883  }
3884 
3890  {
3891  return xnPlayerReadNext(GetHandle());
3892  }
3893 
3918  inline XnStatus SeekToTimeStamp(XnInt64 nTimeOffset, XnPlayerSeekOrigin origin)
3919  {
3920  return xnSeekPlayerToTimeStamp(GetHandle(), nTimeOffset, origin);
3921  }
3922 
3947  inline XnStatus SeekToFrame(const XnChar* strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin)
3948  {
3949  return xnSeekPlayerToFrame(GetHandle(), strNodeName, nFrameOffset, origin);
3950  }
3951 
3957  inline XnStatus TellTimestamp(XnUInt64& nTimestamp) const
3958  {
3959  return xnTellPlayerTimestamp(GetHandle(), &nTimestamp);
3960  }
3961 
3974  inline XnStatus TellFrame(const XnChar* strNodeName, XnUInt32& nFrame) const
3975  {
3976  return xnTellPlayerFrame(GetHandle(), strNodeName, &nFrame);
3977  }
3978 
3986  inline XnStatus GetNumFrames(const XnChar* strNodeName, XnUInt32& nFrames) const
3987  {
3988  return xnGetPlayerNumFrames(GetHandle(), strNodeName, &nFrames);
3989  }
3990 
3995  inline const XnChar* GetSupportedFormat() const
3996  {
3997  return xnGetPlayerSupportedFormat(GetHandle());
3998  }
3999 
4005  {
4006  XnNodeInfoList* pList;
4007  XnStatus nRetVal = xnEnumeratePlayerNodes(GetHandle(), &pList);
4008  XN_IS_STATUS_OK(nRetVal);
4009 
4010  list.ReplaceUnderlyingObject(pList);
4011 
4012  return (XN_STATUS_OK);
4013  }
4014 
4023  inline XnBool IsEOF() const
4024  {
4025  return xnIsPlayerAtEOF(GetHandle());
4026  }
4027 
4038  {
4039  return _RegisterToStateChange(xnRegisterToEndOfFileReached, GetHandle(), handler, pCookie, hCallback);
4040  }
4041 
4050  {
4051  _UnregisterFromStateChange(xnUnregisterFromEndOfFileReached, GetHandle(), hCallback);
4052  }
4053 
4072  inline XnStatus SetPlaybackSpeed(XnDouble dSpeed)
4073  {
4074  return xnSetPlaybackSpeed(GetHandle(), dSpeed);
4075  }
4076 
4081  inline XnDouble GetPlaybackSpeed() const
4082  {
4083  return xnGetPlaybackSpeed(GetHandle());
4084  }
4085  };
4086 
4115  {
4116  public:
4122  inline CroppingCapability(XnNodeHandle hNode) : Capability(hNode) {}
4124 
4134  inline XnStatus SetCropping(const XnCropping& Cropping)
4135  {
4136  return xnSetCropping(GetHandle(), &Cropping);
4137  }
4138 
4149  inline XnStatus GetCropping(XnCropping& Cropping) const
4150  {
4151  return xnGetCropping(GetHandle(), &Cropping);
4152  }
4153 
4163  inline XnStatus RegisterToCroppingChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
4164  {
4165  return _RegisterToStateChange(xnRegisterToCroppingChange, GetHandle(), handler, pCookie, hCallback);
4166  }
4167 
4176  {
4177  _UnregisterFromStateChange(xnUnregisterFromCroppingChange, GetHandle(), hCallback);
4178  }
4179  };
4180 
4190  {
4191  public:
4199 
4205  {
4206  return xnSetPowerLineFrequency(GetHandle(), nFrequency);
4207  }
4208 
4214  {
4215  return xnGetPowerLineFrequency(GetHandle());
4216  }
4217 
4228  {
4229  return _RegisterToStateChange(xnRegisterToPowerLineFrequencyChange, GetHandle(), handler, pCookie, hCallback);
4230  }
4231 
4240  {
4241  _UnregisterFromStateChange(xnUnregisterFromPowerLineFrequencyChange, GetHandle(), hCallback);
4242  }
4243  };
4244 
4268  class MapGenerator : public Generator
4269  {
4270  public:
4276  inline MapGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
4277  inline MapGenerator(const NodeWrapper& other) : Generator(other) {}
4278 
4286  inline XnUInt32 GetSupportedMapOutputModesCount() const
4287  {
4288  return xnGetSupportedMapOutputModesCount(GetHandle());
4289  }
4290 
4301  inline XnStatus GetSupportedMapOutputModes(XnMapOutputMode* aModes, XnUInt32& nCount) const
4302  {
4303  return xnGetSupportedMapOutputModes(GetHandle(), aModes, &nCount);
4304  }
4305 
4319  inline XnStatus SetMapOutputMode(const XnMapOutputMode& OutputMode)
4320  {
4321  return xnSetMapOutputMode(GetHandle(), &OutputMode);
4322  }
4323 
4341  inline XnStatus GetMapOutputMode(XnMapOutputMode &OutputMode) const
4342  {
4343  return xnGetMapOutputMode(GetHandle(), &OutputMode);
4344  }
4345 
4354  inline XnUInt32 GetBytesPerPixel() const
4355  {
4356  return xnGetBytesPerPixel(GetHandle());
4357  }
4358 
4369  {
4370  return _RegisterToStateChange(xnRegisterToMapOutputModeChange, GetHandle(), handler, pCookie, hCallback);
4371  }
4372 
4381  {
4382  _UnregisterFromStateChange(xnUnregisterFromMapOutputModeChange, GetHandle(), hCallback);
4383  }
4384 
4393  inline const CroppingCapability GetCroppingCap() const
4394  {
4395  return CroppingCapability(GetHandle());
4396  }
4397 
4407  {
4408  return CroppingCapability(GetHandle());
4409  }
4410 
4417  {
4418  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_BRIGHTNESS);
4419  }
4420 
4427  {
4428  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_CONTRAST);
4429  }
4430 
4437  {
4438  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_HUE);
4439  }
4440 
4447  {
4448  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_SATURATION);
4449  }
4450 
4457  {
4458  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_SHARPNESS);
4459  }
4460 
4467  {
4468  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_GAMMA);
4469  }
4470 
4477  {
4479  }
4480 
4487  {
4489  }
4490 
4497  {
4498  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_GAIN);
4499  }
4500 
4507  {
4508  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_PAN);
4509  }
4510 
4517  {
4518  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_TILT);
4519  }
4520 
4527  {
4528  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_ROLL);
4529  }
4530 
4537  {
4538  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_ZOOM);
4539  }
4540 
4547  {
4548  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_EXPOSURE);
4549  }
4550 
4557  {
4559  }
4560 
4561 
4568  {
4569  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_IRIS);
4570  }
4571 
4578  {
4579  return GeneralIntCapability(GetHandle(), XN_CAPABILITY_FOCUS);
4580  }
4581 
4588  {
4590  }
4591 
4598  {
4599  return AntiFlickerCapability(GetHandle());
4600  }
4601  };
4602 
4612  {
4613  public:
4619  inline UserPositionCapability(XnNodeHandle hNode = NULL) : Capability(hNode) {}
4621 
4626  inline XnUInt32 GetSupportedUserPositionsCount() const
4627  {
4628  return xnGetSupportedUserPositionsCount(GetHandle());
4629  }
4630 
4635  inline XnStatus SetUserPosition(XnUInt32 nIndex, const XnBoundingBox3D& Position)
4636  {
4637  return xnSetUserPosition(GetHandle(), nIndex, &Position);
4638  }
4639 
4644  inline XnStatus GetUserPosition(XnUInt32 nIndex, XnBoundingBox3D& Position) const
4645  {
4646  return xnGetUserPosition(GetHandle(), nIndex, &Position);
4647  }
4648 
4659  {
4660  return _RegisterToStateChange(xnRegisterToUserPositionChange, GetHandle(), handler, pCookie, hCallback);
4661  }
4662 
4671  {
4672  _UnregisterFromStateChange(xnUnregisterFromUserPositionChange, GetHandle(), hCallback);
4673  }
4674  };
4675 
4721  {
4722  public:
4728  inline DepthGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
4729  inline DepthGenerator(const NodeWrapper& other) : MapGenerator(other) {}
4730 
4738  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
4739 
4756  inline void GetMetaData(DepthMetaData& metaData) const
4757  {
4758  xnGetDepthMetaData(GetHandle(), metaData.GetUnderlying());
4759  }
4760 
4765  inline const XnDepthPixel* GetDepthMap() const
4766  {
4767  return xnGetDepthMap(GetHandle());
4768  }
4769 
4780  {
4781  return xnGetDeviceMaxDepth(GetHandle());
4782  }
4783 
4803  {
4804  return xnGetDepthFieldOfView(GetHandle(), &FOV);
4805  }
4806 
4817  {
4818  return _RegisterToStateChange(xnRegisterToDepthFieldOfViewChange, GetHandle(), handler, pCookie, hCallback);
4819  }
4820 
4829  {
4830  _UnregisterFromStateChange(xnUnregisterFromDepthFieldOfViewChange, GetHandle(), hCallback);
4831  }
4832 
4842  inline XnStatus ConvertProjectiveToRealWorld(XnUInt32 nCount, const XnPoint3D aProjective[], XnPoint3D aRealWorld[]) const
4843  {
4844  return xnConvertProjectiveToRealWorld(GetHandle(), nCount, aProjective, aRealWorld);
4845  }
4846 
4856  inline XnStatus ConvertRealWorldToProjective(XnUInt32 nCount, const XnPoint3D aRealWorld[], XnPoint3D aProjective[]) const
4857  {
4858  return xnConvertRealWorldToProjective(GetHandle(), nCount, aRealWorld, aProjective);
4859  }
4860 
4867  {
4868  return UserPositionCapability(GetHandle());
4869  }
4870 
4877  {
4878  return UserPositionCapability(GetHandle());
4879  }
4880  };
4881 
4887  {
4888  public:
4894  inline MockDepthGenerator(XnNodeHandle hNode = NULL) : DepthGenerator(hNode) {}
4895  inline MockDepthGenerator(const NodeWrapper& other) : DepthGenerator(other) {}
4896 
4903  XnStatus Create(Context& context, const XnChar* strName = NULL);
4904 
4912  XnStatus CreateBasedOn(DepthGenerator& other, const XnChar* strName = NULL);
4913 
4918  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel* pDepthMap)
4919  {
4920  return xnMockDepthSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pDepthMap);
4921  }
4922 
4931  inline XnStatus SetData(const DepthMetaData& depthMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
4932  {
4933  return SetData(nFrameID, nTimestamp, depthMD.DataSize(), depthMD.Data());
4934  }
4935 
4941  inline XnStatus SetData(const DepthMetaData& depthMD)
4942  {
4943  return SetData(depthMD, depthMD.FrameID(), depthMD.Timestamp());
4944  }
4945  };
4946 
4966  {
4967  public:
4973  inline ImageGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
4974  inline ImageGenerator(const NodeWrapper& other) : MapGenerator(other) {}
4975 
4981  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
4982 
4999  inline void GetMetaData(ImageMetaData& metaData) const
5000  {
5001  xnGetImageMetaData(GetHandle(), metaData.GetUnderlying());
5002  }
5003 
5008  inline const XnRGB24Pixel* GetRGB24ImageMap() const
5009  {
5010  return xnGetRGB24ImageMap(GetHandle());
5011  }
5012 
5018  {
5019  return xnGetYUV422ImageMap(GetHandle());
5020  }
5021 
5027  {
5028  return xnGetGrayscale8ImageMap(GetHandle());
5029  }
5030 
5036  {
5037  return xnGetGrayscale16ImageMap(GetHandle());
5038  }
5039 
5044  inline const XnUInt8* GetImageMap() const
5045  {
5046  return xnGetImageMap(GetHandle());
5047  }
5048 
5059  inline XnBool IsPixelFormatSupported(XnPixelFormat Format) const
5060  {
5061  return xnIsPixelFormatSupported(GetHandle(), Format);
5062  }
5063 
5082  {
5083  return xnSetPixelFormat(GetHandle(), Format);
5084  }
5085 
5097  {
5098  return xnGetPixelFormat(GetHandle());
5099  }
5100 
5111  {
5112  return _RegisterToStateChange(xnRegisterToPixelFormatChange, GetHandle(), handler, pCookie, hCallback);
5113  }
5114 
5123  {
5124  _UnregisterFromStateChange(xnUnregisterFromPixelFormatChange, GetHandle(), hCallback);
5125  }
5126  };
5127 
5133  {
5134  public:
5140  inline MockImageGenerator(XnNodeHandle hNode = NULL) : ImageGenerator(hNode) {}
5141  inline MockImageGenerator(const NodeWrapper& other) : ImageGenerator(other) {}
5142 
5149  XnStatus Create(Context& context, const XnChar* strName = NULL);
5150 
5158  XnStatus CreateBasedOn(ImageGenerator& other, const XnChar* strName = NULL);
5159 
5164  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8* pImageMap)
5165  {
5166  return xnMockImageSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pImageMap);
5167  }
5168 
5177  inline XnStatus SetData(const ImageMetaData& imageMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
5178  {
5179  return SetData(nFrameID, nTimestamp, imageMD.DataSize(), imageMD.Data());
5180  }
5181 
5187  inline XnStatus SetData(const ImageMetaData& imageMD)
5188  {
5189  return SetData(imageMD, imageMD.FrameID(), imageMD.Timestamp());
5190  }
5191  };
5192 
5201  class IRGenerator : public MapGenerator
5202  {
5203  public:
5209  inline IRGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
5210  inline IRGenerator(const NodeWrapper& other) : MapGenerator(other) {}
5211 
5218  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
5219 
5236  inline void GetMetaData(IRMetaData& metaData) const
5237  {
5238  xnGetIRMetaData(GetHandle(), metaData.GetUnderlying());
5239  }
5240 
5244  inline const XnIRPixel* GetIRMap() const
5245  {
5246  return xnGetIRMap(GetHandle());
5247  }
5248  };
5249 
5255  {
5256  public:
5262  inline MockIRGenerator(XnNodeHandle hNode = NULL) : IRGenerator(hNode) {}
5263  inline MockIRGenerator(const NodeWrapper& other) : IRGenerator(other) {}
5264 
5271  XnStatus Create(Context& context, const XnChar* strName = NULL);
5278  XnStatus CreateBasedOn(IRGenerator& other, const XnChar* strName = NULL);
5279 
5284  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel* pIRMap)
5285  {
5286  return xnMockIRSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pIRMap);
5287  }
5288 
5297  inline XnStatus SetData(const IRMetaData& irMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
5298  {
5299  return SetData(nFrameID, nTimestamp, irMD.DataSize(), irMD.Data());
5300  }
5301 
5307  inline XnStatus SetData(const IRMetaData& irMD)
5308  {
5309  return SetData(irMD, irMD.FrameID(), irMD.Timestamp());
5310  }
5311  };
5312 
5381  {
5382  public:
5388  inline GestureGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
5389  inline GestureGenerator(const NodeWrapper& other) : Generator(other) {}
5390 
5404  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
5405 
5419  inline XnStatus AddGesture(const XnChar* strGesture, XnBoundingBox3D* pArea)
5420  {
5421  return xnAddGesture(GetHandle(), strGesture, pArea);
5422  }
5423 
5431  inline XnStatus RemoveGesture(const XnChar* strGesture)
5432  {
5433  return xnRemoveGesture(GetHandle(), strGesture);
5434  }
5435 
5444  inline XnStatus GetAllActiveGestures(XnChar** astrGestures, XnUInt32 nNameLength, XnUInt16& nGestures) const
5445  {
5446  return xnGetAllActiveGestures(GetHandle(), astrGestures, nNameLength, &nGestures);
5447  }
5448 
5453  inline XnUInt16 GetNumberOfAvailableGestures() const
5454  {
5455  return xnGetNumberOfAvailableGestures(GetHandle());
5456  }
5457 
5466  inline XnStatus EnumerateAllGestures(XnChar** astrGestures, XnUInt32 nNameLength, XnUInt16& nGestures) const
5467  {
5468  return xnEnumerateAllGestures(GetHandle(), astrGestures, nNameLength, &nGestures);
5469  }
5470 
5476  inline XnBool IsGestureAvailable(const XnChar* strGesture) const
5477  {
5478  return xnIsGestureAvailable(GetHandle(), strGesture);
5479  }
5480 
5485  inline XnBool IsGestureProgressSupported(const XnChar* strGesture) const
5486  {
5487  return xnIsGestureProgressSupported(GetHandle(), strGesture);
5488  }
5489 
5511  typedef void (XN_CALLBACK_TYPE* GestureRecognized)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie);
5512 
5539  typedef void (XN_CALLBACK_TYPE* GestureProgress)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie);
5540 
5552  XnStatus RegisterGestureCallbacks(GestureRecognized RecognizedCB, GestureProgress ProgressCB, void* pCookie, XnCallbackHandle& hCallback)
5553  {
5554  XnStatus nRetVal = XN_STATUS_OK;
5555 
5556  GestureCookie* pGestureCookie;
5557  XN_VALIDATE_ALLOC(pGestureCookie, GestureCookie);
5558  pGestureCookie->recognizedHandler = RecognizedCB;
5559  pGestureCookie->progressHandler = ProgressCB;
5560  pGestureCookie->pUserCookie = pCookie;
5561 
5562  nRetVal = xnRegisterGestureCallbacks(GetHandle(), GestureRecognizedCallback, GestureProgressCallback, pGestureCookie, &pGestureCookie->hCallback);
5563  if (nRetVal != XN_STATUS_OK)
5564  {
5565  xnOSFree(pGestureCookie);
5566  return (nRetVal);
5567  }
5568 
5569  hCallback = pGestureCookie;
5570 
5571  return (XN_STATUS_OK);
5572  }
5573 
5582  {
5583  GestureCookie* pGestureCookie = (GestureCookie*)hCallback;
5584  xnUnregisterGestureCallbacks(GetHandle(), pGestureCookie->hCallback);
5585  xnOSFree(pGestureCookie);
5586  }
5587 
5597  inline XnStatus RegisterToGestureChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
5598  {
5599  return _RegisterToStateChange(xnRegisterToGestureChange, GetHandle(), handler, pCookie, hCallback);
5600  }
5601 
5610  {
5611  _UnregisterFromStateChange(xnUnregisterFromGestureChange, GetHandle(), hCallback);
5612  }
5613 
5641  typedef void (XN_CALLBACK_TYPE* GestureIntermediateStageCompleted)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie);
5642 
5652  XnStatus RegisterToGestureIntermediateStageCompleted(GestureIntermediateStageCompleted handler, void* pCookie, XnCallbackHandle& hCallback)
5653  {
5654  XnStatus nRetVal = XN_STATUS_OK;
5655 
5656  GestureIntermediateStageCompletedCookie* pGestureCookie;
5657  XN_VALIDATE_ALLOC(pGestureCookie, GestureIntermediateStageCompletedCookie);
5658  pGestureCookie->handler = handler;
5659  pGestureCookie->pUserCookie = pCookie;
5660 
5661  nRetVal = xnRegisterToGestureIntermediateStageCompleted(GetHandle(), GestureIntermediateStageCompletedCallback, pGestureCookie, &pGestureCookie->hCallback);
5662  if (nRetVal != XN_STATUS_OK)
5663  {
5664  xnOSFree(pGestureCookie);
5665  return (nRetVal);
5666  }
5667 
5668  hCallback = pGestureCookie;
5669 
5670  return (XN_STATUS_OK);
5671  }
5672 
5681  {
5682  GestureIntermediateStageCompletedCookie* pGestureCookie = (GestureIntermediateStageCompletedCookie*)hCallback;
5683  xnUnregisterFromGestureIntermediateStageCompleted(GetHandle(), pGestureCookie->hCallback);
5684  xnOSFree(pGestureCookie);
5685  }
5686 
5705  typedef void (XN_CALLBACK_TYPE* GestureReadyForNextIntermediateStage)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie);
5706 
5716  XnStatus RegisterToGestureReadyForNextIntermediateStage(GestureReadyForNextIntermediateStage handler, void* pCookie, XnCallbackHandle& hCallback)
5717  {
5718  XnStatus nRetVal = XN_STATUS_OK;
5719 
5720  GestureReadyForNextIntermediateStageCookie* pGestureCookie;
5721  XN_VALIDATE_ALLOC(pGestureCookie, GestureReadyForNextIntermediateStageCookie);
5722  pGestureCookie->handler = handler;
5723  pGestureCookie->pUserCookie = pCookie;
5724 
5725  nRetVal = xnRegisterToGestureReadyForNextIntermediateStage(GetHandle(), GestureReadyForNextIntermediateStageCallback, pGestureCookie, &pGestureCookie->hCallback);
5726  if (nRetVal != XN_STATUS_OK)
5727  {
5728  xnOSFree(pGestureCookie);
5729  return (nRetVal);
5730  }
5731 
5732  hCallback = pGestureCookie;
5733 
5734  return (XN_STATUS_OK);
5735  }
5736 
5745  {
5746  GestureReadyForNextIntermediateStageCookie* pGestureCookie = (GestureReadyForNextIntermediateStageCookie*)hCallback;
5747  xnUnregisterFromGestureReadyForNextIntermediateStage(GetHandle(), pGestureCookie->hCallback);
5748  xnOSFree(pGestureCookie);
5749  }
5750 
5752  inline XnStatus XN_API_DEPRECATED("Use GetAllActiveGestures() instead") GetActiveGestures(XnChar*& astrGestures, XnUInt16& nGestures) const
5753  {
5754  return xnGetActiveGestures(GetHandle(), &astrGestures, &nGestures);
5755  }
5756  inline XnStatus XN_API_DEPRECATED("Use EnumerateAllGestures() instead") EnumerateGestures(XnChar*& astrGestures, XnUInt16& nGestures) const
5757  {
5758  return xnEnumerateGestures(GetHandle(), &astrGestures, &nGestures);
5759  }
5762  private:
5763  typedef struct GestureCookie
5764  {
5765  GestureRecognized recognizedHandler;
5766  GestureProgress progressHandler;
5767  void* pUserCookie;
5768  XnCallbackHandle hCallback;
5769  } GestureCookie;
5770 
5771  static void XN_CALLBACK_TYPE GestureRecognizedCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie)
5772  {
5773  GestureCookie* pGestureCookie = (GestureCookie*)pCookie;
5774  GestureGenerator gen(hNode);
5775  if (pGestureCookie->recognizedHandler != NULL)
5776  {
5777  pGestureCookie->recognizedHandler(gen, strGesture, pIDPosition, pEndPosition, pGestureCookie->pUserCookie);
5778  }
5779  }
5780 
5781  static void XN_CALLBACK_TYPE GestureProgressCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie)
5782  {
5783  GestureCookie* pGestureCookie = (GestureCookie*)pCookie;
5784  GestureGenerator gen(hNode);
5785  if (pGestureCookie->progressHandler != NULL)
5786  {
5787  pGestureCookie->progressHandler(gen, strGesture, pPosition, fProgress, pGestureCookie->pUserCookie);
5788  }
5789  }
5790 
5791  typedef struct GestureIntermediateStageCompletedCookie
5792  {
5793  GestureIntermediateStageCompleted handler;
5794  void* pUserCookie;
5795  XnCallbackHandle hCallback;
5796  } GestureIntermediateStageCompletedCookie;
5797 
5798  static void XN_CALLBACK_TYPE GestureIntermediateStageCompletedCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie)
5799  {
5800  GestureIntermediateStageCompletedCookie* pGestureCookie = (GestureIntermediateStageCompletedCookie*)pCookie;
5801  GestureGenerator gen(hNode);
5802  if (pGestureCookie->handler != NULL)
5803  {
5804  pGestureCookie->handler(gen, strGesture, pPosition, pGestureCookie->pUserCookie);
5805  }
5806  }
5807 
5808  typedef struct GestureReadyForNextIntermediateStageCookie
5809  {
5810  GestureReadyForNextIntermediateStage handler;
5811  void* pUserCookie;
5812  XnCallbackHandle hCallback;
5813  } GestureReadyForNextIntermediateStageCookie;
5814 
5815  static void XN_CALLBACK_TYPE GestureReadyForNextIntermediateStageCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie)
5816  {
5817  GestureReadyForNextIntermediateStageCookie* pGestureCookie = (GestureReadyForNextIntermediateStageCookie*)pCookie;
5818  GestureGenerator gen(hNode);
5819  if (pGestureCookie->handler != NULL)
5820  {
5821  pGestureCookie->handler(gen, strGesture, pPosition, pGestureCookie->pUserCookie);
5822  }
5823  }
5824  };
5825 
5845  {
5846  public:
5852  inline SceneAnalyzer(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
5853  inline SceneAnalyzer(const NodeWrapper& other) : MapGenerator(other) {}
5854 
5862  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
5863 
5864 
5884  inline void GetMetaData(SceneMetaData& metaData) const
5885  {
5886  xnGetSceneMetaData(GetHandle(), metaData.GetUnderlying());
5887  }
5888 
5893  inline const XnLabel* GetLabelMap() const
5894  {
5895  return xnGetLabelMap(GetHandle());
5896  }
5897 
5903  inline XnStatus GetFloor(XnPlane3D& Plane) const
5904  {
5905  return xnGetFloor(GetHandle(), &Plane);
5906  }
5907  };
5908 
5917  {
5918  public:
5926 
5937  typedef void (XN_CALLBACK_TYPE* HandTouchingFOVEdge)(HandTouchingFOVEdgeCapability& touchingfov, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie);
5938 
5948  inline XnStatus RegisterToHandTouchingFOVEdge(HandTouchingFOVEdge handler, void* pCookie, XnCallbackHandle& hCallback)
5949  {
5950  XnStatus nRetVal = XN_STATUS_OK;
5951 
5952  HandTouchingFOVEdgeCookie* pHandCookie;
5953  XN_VALIDATE_ALLOC(pHandCookie, HandTouchingFOVEdgeCookie);
5954  pHandCookie->handler = handler;
5955  pHandCookie->pUserCookie = pCookie;
5956 
5957  nRetVal = xnRegisterToHandTouchingFOVEdge(GetHandle(), HandTouchingFOVEdgeCB, pHandCookie, &pHandCookie->hCallback);
5958  if (nRetVal != XN_STATUS_OK)
5959  {
5960  xnOSFree(pHandCookie);
5961  return (nRetVal);
5962  }
5963 
5964  hCallback = pHandCookie;
5965 
5966  return (XN_STATUS_OK);
5967  }
5968 
5977  {
5978  HandTouchingFOVEdgeCookie* pHandCookie = (HandTouchingFOVEdgeCookie*)hCallback;
5979  xnUnregisterFromHandTouchingFOVEdge(GetHandle(), pHandCookie->hCallback);
5980  xnOSFree(pHandCookie);
5981  }
5982  private:
5983  typedef struct HandTouchingFOVEdgeCookie
5984  {
5985  HandTouchingFOVEdge handler;
5986  void* pUserCookie;
5987  XnCallbackHandle hCallback;
5988  } HandTouchingFOVEdgeCookie;
5989 
5990  static void XN_CALLBACK_TYPE HandTouchingFOVEdgeCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie)
5991  {
5992  HandTouchingFOVEdgeCookie* pHandCookie = (HandTouchingFOVEdgeCookie*)pCookie;
5993  HandTouchingFOVEdgeCapability cap(hNode);
5994  if (pHandCookie->handler != NULL)
5995  {
5996  pHandCookie->handler(cap, user, pPosition, fTime, eDir, pHandCookie->pUserCookie);
5997  }
5998  }
5999 
6000  };
6001 
6089  class HandsGenerator : public Generator
6090  {
6091  public:
6097  inline HandsGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
6098  inline HandsGenerator(const NodeWrapper& other) : Generator(other) {}
6099 
6107  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
6108 
6124  typedef void (XN_CALLBACK_TYPE* HandCreate)(HandsGenerator& generator, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie);
6125 
6142  typedef void (XN_CALLBACK_TYPE* HandUpdate)(HandsGenerator& generator, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie);
6143 
6157  typedef void (XN_CALLBACK_TYPE* HandDestroy)(HandsGenerator& generator, XnUserID user, XnFloat fTime, void* pCookie);
6158 
6171  inline XnStatus RegisterHandCallbacks(HandCreate CreateCB, HandUpdate UpdateCB, HandDestroy DestroyCB, void* pCookie, XnCallbackHandle& hCallback)
6172  {
6173  XnStatus nRetVal = XN_STATUS_OK;
6174 
6175  HandCookie* pHandCookie;
6176  XN_VALIDATE_ALLOC(pHandCookie, HandCookie);
6177  pHandCookie->createHandler = CreateCB;
6178  pHandCookie->updateHandler = UpdateCB;
6179  pHandCookie->destroyHandler = DestroyCB;
6180  pHandCookie->pUserCookie = pCookie;
6181 
6182  nRetVal = xnRegisterHandCallbacks(GetHandle(), HandCreateCB, HandUpdateCB, HandDestroyCB, pHandCookie, &pHandCookie->hCallback);
6183  if (nRetVal != XN_STATUS_OK)
6184  {
6185  xnOSFree(pHandCookie);
6186  return (nRetVal);
6187  }
6188 
6189  hCallback = pHandCookie;
6190 
6191  return (XN_STATUS_OK);
6192  }
6193 
6202  {
6203  HandCookie* pHandCookie = (HandCookie*)hCallback;
6204  xnUnregisterHandCallbacks(GetHandle(), pHandCookie->hCallback);
6205  xnOSFree(pHandCookie);
6206  }
6207 
6222  {
6223  return xnStopTracking(GetHandle(), user);
6224  }
6225 
6235  {
6236  return xnStopTrackingAll(GetHandle());
6237  }
6238 
6255  inline XnStatus StartTracking(const XnPoint3D& ptPosition)
6256  {
6257  return xnStartTracking(GetHandle(), &ptPosition);
6258  }
6259 
6276  inline XnStatus SetSmoothing(XnFloat fSmoothingFactor)
6277  {
6278  return xnSetTrackingSmoothing(GetHandle(), fSmoothingFactor);
6279  }
6280 
6289  {
6290  return HandTouchingFOVEdgeCapability(GetHandle());
6291  }
6292 
6301  {
6302  return HandTouchingFOVEdgeCapability(GetHandle());
6303  }
6304 
6305  private:
6306  typedef struct HandCookie
6307  {
6308  HandCreate createHandler;
6309  HandUpdate updateHandler;
6310  HandDestroy destroyHandler;
6311  void* pUserCookie;
6312  XnCallbackHandle hCallback;
6313  } HandCookie;
6314 
6315  static void XN_CALLBACK_TYPE HandCreateCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie)
6316  {
6317  HandCookie* pHandCookie = (HandCookie*)pCookie;
6318  HandsGenerator gen(hNode);
6319  if (pHandCookie->createHandler != NULL)
6320  {
6321  pHandCookie->createHandler(gen, user, pPosition, fTime, pHandCookie->pUserCookie);
6322  }
6323  }
6324  static void XN_CALLBACK_TYPE HandUpdateCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie)
6325  {
6326  HandCookie* pHandCookie = (HandCookie*)pCookie;
6327  HandsGenerator gen(hNode);
6328  if (pHandCookie->updateHandler != NULL)
6329  {
6330  pHandCookie->updateHandler(gen, user, pPosition, fTime, pHandCookie->pUserCookie);
6331  }
6332  }
6333  static void XN_CALLBACK_TYPE HandDestroyCB(XnNodeHandle hNode, XnUserID user, XnFloat fTime, void* pCookie)
6334  {
6335  HandCookie* pHandCookie = (HandCookie*)pCookie;
6336  HandsGenerator gen(hNode);
6337  if (pHandCookie->destroyHandler != NULL)
6338  {
6339  pHandCookie->destroyHandler(gen, user, fTime, pHandCookie->pUserCookie);
6340  }
6341  }
6342  };
6343 
6401  {
6402  public:
6408  inline SkeletonCapability(XnNodeHandle hNode) : Capability(hNode) {}
6410 
6416  inline XnBool IsJointAvailable(XnSkeletonJoint eJoint) const
6417  {
6418  return xnIsJointAvailable(GetHandle(), eJoint);
6419  }
6420 
6426  inline XnBool IsProfileAvailable(XnSkeletonProfile eProfile) const
6427  {
6428  return xnIsProfileAvailable(GetHandle(), eProfile);
6429  }
6430 
6462  {
6463  return xnSetSkeletonProfile(GetHandle(), eProfile);
6464  }
6465 
6489  inline XnStatus SetJointActive(XnSkeletonJoint eJoint, XnBool bState)
6490  {
6491  return xnSetJointActive(GetHandle(), eJoint, bState);
6492  }
6493 
6499  inline XnBool IsJointActive(XnSkeletonJoint eJoint) const
6500  {
6501  return xnIsJointActive(GetHandle(), eJoint);
6502  }
6503 
6514  {
6515  return _RegisterToStateChange(xnRegisterToJointConfigurationChange, GetHandle(), handler, pCookie, hCallback);
6516  }
6517 
6526  {
6527  _UnregisterFromStateChange(xnUnregisterFromJointConfigurationChange, GetHandle(), hCallback);
6528  }
6529 
6534  inline XnStatus EnumerateActiveJoints(XnSkeletonJoint* pJoints, XnUInt16& nJoints) const
6535  {
6536  return xnEnumerateActiveJoints(GetHandle(), pJoints, &nJoints);
6537  }
6538 
6548  {
6549  return xnGetSkeletonJoint(GetHandle(), user, eJoint, &Joint);
6550  }
6551 
6574  {
6575  return xnGetSkeletonJointPosition(GetHandle(), user, eJoint, &Joint);
6576  }
6577 
6586  {
6587  return xnGetSkeletonJointOrientation(GetHandle(), user, eJoint, &Joint);
6588  }
6589 
6600  inline XnBool IsTracking(XnUserID user) const
6601  {
6602  return xnIsSkeletonTracking(GetHandle(), user);
6603  }
6604 
6615  inline XnBool IsCalibrated(XnUserID user) const
6616  {
6617 
6618  return xnIsSkeletonCalibrated(GetHandle(), user);
6619  }
6620 
6631  inline XnBool IsCalibrating(XnUserID user) const
6632  {
6633  return xnIsSkeletonCalibrating(GetHandle(), user);
6634  }
6635 
6660  inline XnStatus RequestCalibration(XnUserID user, XnBool bForce)
6661  {
6662  return xnRequestSkeletonCalibration(GetHandle(), user, bForce);
6663  }
6664 
6675  {
6676  return xnAbortSkeletonCalibration(GetHandle(), user);
6677  }
6678 
6697  inline XnStatus SaveCalibrationDataToFile(XnUserID user, const XnChar* strFileName)
6698  {
6699  return xnSaveSkeletonCalibrationDataToFile(GetHandle(), user, strFileName);
6700  }
6701 
6708  inline XnStatus LoadCalibrationDataFromFile(XnUserID user, const XnChar* strFileName)
6709  {
6710  return xnLoadSkeletonCalibrationDataFromFile(GetHandle(), user, strFileName);
6711  }
6712 
6724  inline XnStatus SaveCalibrationData(XnUserID user, XnUInt32 nSlot)
6725  {
6726  return xnSaveSkeletonCalibrationData(GetHandle(), user, nSlot);
6727  }
6728 
6735  inline XnStatus LoadCalibrationData(XnUserID user, XnUInt32 nSlot)
6736  {
6737  return xnLoadSkeletonCalibrationData(GetHandle(), user, nSlot);
6738  }
6739 
6745  inline XnStatus ClearCalibrationData(XnUInt32 nSlot)
6746  {
6747  return xnClearSkeletonCalibrationData(GetHandle(), nSlot);
6748  }
6749 
6755  inline XnBool IsCalibrationData(XnUInt32 nSlot) const
6756  {
6757  return xnIsSkeletonCalibrationData(GetHandle(), nSlot);
6758  }
6759 
6775  {
6776  return xnStartSkeletonTracking(GetHandle(), user);
6777  }
6778 
6784  {
6785  return xnStopSkeletonTracking(GetHandle(), user);
6786  }
6787 
6796  inline XnStatus Reset(XnUserID user)
6797  {
6798  return xnResetSkeleton(GetHandle(), user);
6799  }
6800 
6809  inline XnBool NeedPoseForCalibration() const
6810  {
6811  return xnNeedPoseForSkeletonCalibration(GetHandle());
6812  }
6813 
6826  inline XnStatus GetCalibrationPose(XnChar* strPose) const
6827  {
6828  return xnGetSkeletonCalibrationPose(GetHandle(), strPose);
6829  }
6830 
6843  inline XnStatus SetSmoothing(XnFloat fSmoothingFactor)
6844  {
6845  return xnSetSkeletonSmoothing(GetHandle(), fSmoothingFactor);
6846  }
6847 
6869  typedef void (XN_CALLBACK_TYPE* CalibrationStart)(SkeletonCapability& skeleton, XnUserID user, void* pCookie);
6870 
6888  typedef void (XN_CALLBACK_TYPE* CalibrationEnd)(SkeletonCapability& skeleton, XnUserID user, XnBool bSuccess, void* pCookie);
6889 
6901  inline XnStatus RegisterToCalibrationStart(CalibrationStart handler, void* pCookie, XnCallbackHandle& hCallback)
6902  {
6903  XnStatus nRetVal = XN_STATUS_OK;
6904  CalibrationStartCookie* pCalibrationCookie;
6905  XN_VALIDATE_ALLOC(pCalibrationCookie, CalibrationStartCookie);
6906  pCalibrationCookie->handler = handler;
6907  pCalibrationCookie->pUserCookie = pCookie;
6908  nRetVal = xnRegisterToCalibrationStart(GetHandle(), CalibrationStartCallback, pCalibrationCookie, &pCalibrationCookie->hCallback);
6909  if (nRetVal != XN_STATUS_OK)
6910  {
6911  xnOSFree(pCalibrationCookie);
6912  return nRetVal;
6913  }
6914  hCallback = pCalibrationCookie;
6915  return XN_STATUS_OK;
6916  }
6917 
6929  {
6930  CalibrationStartCookie* pCalibrationCookie = (CalibrationStartCookie*)hCallback;
6931  xnUnregisterFromCalibrationStart(GetHandle(), pCalibrationCookie->hCallback);
6932  xnOSFree(pCalibrationCookie);
6933  return XN_STATUS_OK;
6934  }
6935 
6957  typedef void (XN_CALLBACK_TYPE* CalibrationInProgress)(SkeletonCapability& skeleton, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie);
6958 
6968  inline XnStatus RegisterToCalibrationInProgress(CalibrationInProgress handler, void* pCookie, XnCallbackHandle& hCallback)
6969  {
6970  XnStatus nRetVal = XN_STATUS_OK;
6971 
6972  CalibrationInProgressCookie* pSkeletonCookie;
6973  XN_VALIDATE_ALLOC(pSkeletonCookie, CalibrationInProgressCookie);
6974  pSkeletonCookie->handler = handler;
6975  pSkeletonCookie->pUserCookie = pCookie;
6976 
6977  nRetVal = xnRegisterToCalibrationInProgress(GetHandle(), CalibrationInProgressCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
6978  if (nRetVal != XN_STATUS_OK)
6979  {
6980  xnOSFree(pSkeletonCookie);
6981  return (nRetVal);
6982  }
6983 
6984  hCallback = pSkeletonCookie;
6985 
6986  return (XN_STATUS_OK);
6987  }
6988 
6997  {
6998  CalibrationInProgressCookie* pSkeletonCookie = (CalibrationInProgressCookie*)hCallback;
6999  xnUnregisterFromCalibrationInProgress(GetHandle(), pSkeletonCookie->hCallback);
7000  xnOSFree(pSkeletonCookie);
7001  }
7002 
7020  typedef void (XN_CALLBACK_TYPE* CalibrationComplete)(SkeletonCapability& skeleton, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie);
7021 
7031  inline XnStatus RegisterToCalibrationComplete(CalibrationComplete handler, void* pCookie, XnCallbackHandle& hCallback)
7032  {
7033  XnStatus nRetVal = XN_STATUS_OK;
7034 
7035  CalibrationCompleteCookie* pSkeletonCookie;
7036  XN_VALIDATE_ALLOC(pSkeletonCookie, CalibrationCompleteCookie);
7037  pSkeletonCookie->handler = handler;
7038  pSkeletonCookie->pUserCookie = pCookie;
7039 
7040  nRetVal = xnRegisterToCalibrationComplete(GetHandle(), CalibrationCompleteCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
7041  if (nRetVal != XN_STATUS_OK)
7042  {
7043  xnOSFree(pSkeletonCookie);
7044  return (nRetVal);
7045  }
7046 
7047  hCallback = pSkeletonCookie;
7048 
7049  return (XN_STATUS_OK);
7050  }
7051 
7060  {
7061  CalibrationCompleteCookie* pSkeletonCookie = (CalibrationCompleteCookie*)hCallback;
7062  xnUnregisterFromCalibrationComplete(GetHandle(), pSkeletonCookie->hCallback);
7063  xnOSFree(pSkeletonCookie);
7064  }
7065 
7067  XN_API_DEPRECATED("Use the overload with one argument - the bState parameter is useless")
7068  inline XnBool IsJointActive(XnSkeletonJoint eJoint, XnBool /*bState*/) const
7069  {
7070  return xnIsJointActive(GetHandle(), eJoint);
7071  }
7072 
7073  inline XnStatus XN_API_DEPRECATED("Please use RegisterToCalibrationStart/Complete") RegisterCalibrationCallbacks(CalibrationStart CalibrationStartCB, CalibrationEnd CalibrationEndCB, void* pCookie, XnCallbackHandle& hCallback)
7074  {
7075  XnStatus nRetVal = XN_STATUS_OK;
7076 
7077  SkeletonCookie* pSkeletonCookie;
7078  XN_VALIDATE_ALLOC(pSkeletonCookie, SkeletonCookie);
7079  pSkeletonCookie->startHandler = CalibrationStartCB;
7080  pSkeletonCookie->endHandler = CalibrationEndCB;
7081  pSkeletonCookie->pUserCookie = pCookie;
7082 
7083 #pragma warning (push)
7084 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7085  nRetVal = xnRegisterCalibrationCallbacks(GetHandle(), CalibrationStartBundleCallback, CalibrationEndBundleCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
7086 #pragma warning (pop)
7087  if (nRetVal != XN_STATUS_OK)
7088  {
7089  xnOSFree(pSkeletonCookie);
7090  return (nRetVal);
7091  }
7092 
7093  hCallback = pSkeletonCookie;
7094 
7095  return (XN_STATUS_OK);
7096  }
7097 
7098  inline void XN_API_DEPRECATED("Please use UnregisterFromCalibrationStart/Complete") UnregisterCalibrationCallbacks(XnCallbackHandle hCallback)
7099  {
7100  SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)hCallback;
7101 #pragma warning (push)
7102 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7103  xnUnregisterCalibrationCallbacks(GetHandle(), pSkeletonCookie->hCallback);
7104 #pragma warning (pop)
7105  xnOSFree(pSkeletonCookie);
7106  }
7109 private:
7110  typedef struct SkeletonCookie
7111  {
7112  CalibrationStart startHandler;
7113  CalibrationEnd endHandler;
7114  void* pUserCookie;
7115  XnCallbackHandle hCallback;
7116  } SkeletonCookie;
7117 
7118  static void XN_CALLBACK_TYPE CalibrationStartBundleCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
7119  {
7120  SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)pCookie;
7121  SkeletonCapability cap(hNode);
7122  if (pSkeletonCookie->startHandler != NULL)
7123  {
7124  pSkeletonCookie->startHandler(cap, user, pSkeletonCookie->pUserCookie);
7125  }
7126  }
7127 
7128  static void XN_CALLBACK_TYPE CalibrationEndBundleCallback(XnNodeHandle hNode, XnUserID user, XnBool bSuccess, void* pCookie)
7129  {
7130  SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)pCookie;
7131  SkeletonCapability cap(hNode);
7132  if (pSkeletonCookie->endHandler != NULL)
7133  {
7134  pSkeletonCookie->endHandler(cap, user, bSuccess, pSkeletonCookie->pUserCookie);
7135  }
7136  }
7137 
7138  typedef struct CalibrationStartCookie
7139  {
7140  CalibrationStart handler;
7141  void* pUserCookie;
7142  XnCallbackHandle hCallback;
7143  } CalibrationStartCookie;
7144 
7145  static void XN_CALLBACK_TYPE CalibrationStartCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
7146  {
7147  CalibrationStartCookie* pCalibrationCookie = (CalibrationStartCookie*)pCookie;
7148  SkeletonCapability cap(hNode);
7149  if (pCalibrationCookie->handler != NULL)
7150  {
7151  pCalibrationCookie->handler(cap, user, pCalibrationCookie->pUserCookie);
7152  }
7153  }
7154 
7155  typedef struct CalibrationInProgressCookie
7156  {
7157  CalibrationInProgress handler;
7158  void* pUserCookie;
7159  XnCallbackHandle hCallback;
7160  } CalibrationInProgressCookie;
7161 
7162  static void XN_CALLBACK_TYPE CalibrationInProgressCallback(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie)
7163  {
7164  CalibrationInProgressCookie* pSkeletonCookie = (CalibrationInProgressCookie*)pCookie;
7165  SkeletonCapability cap(hNode);
7166  if (pSkeletonCookie->handler != NULL)
7167  {
7168  pSkeletonCookie->handler(cap, user, calibrationError, pSkeletonCookie->pUserCookie);
7169  }
7170  }
7171 
7172  typedef struct CalibrationCompleteCookie
7173  {
7174  CalibrationComplete handler;
7175  void* pUserCookie;
7176  XnCallbackHandle hCallback;
7177  } CalibrationCompleteCookie;
7178 
7179  static void XN_CALLBACK_TYPE CalibrationCompleteCallback(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie)
7180  {
7181  CalibrationCompleteCookie* pSkeletonCookie = (CalibrationCompleteCookie*)pCookie;
7182  SkeletonCapability cap(hNode);
7183  if (pSkeletonCookie->handler != NULL)
7184  {
7185  pSkeletonCookie->handler(cap, user, calibrationError, pSkeletonCookie->pUserCookie);
7186  }
7187  }
7188  };
7189 
7212  {
7213  public:
7221 
7235  typedef void (XN_CALLBACK_TYPE* PoseDetection)(PoseDetectionCapability& pose, const XnChar* strPose, XnUserID user, void* pCookie);
7236 
7246  inline XnUInt32 GetNumberOfPoses() const
7247  {
7248  return xnGetNumberOfPoses(GetHandle());
7249  }
7250 
7263  inline XnStatus GetAllAvailablePoses(XnChar** pstrPoses, XnUInt32 nNameLength, XnUInt32& nPoses) const
7264  {
7265  return xnGetAllAvailablePoses(GetHandle(), pstrPoses, nNameLength, &nPoses);
7266  }
7267 
7268  inline XnBool IsPoseSupported(const XnChar* strPose)
7269  {
7270  return xnIsPoseSupported(GetHandle(), strPose);
7271  }
7272 
7273  inline XnStatus GetPoseStatus(XnUserID userID, const XnChar* poseName, XnUInt64& poseTime, XnPoseDetectionStatus& eStatus, XnPoseDetectionState& eState)
7274  {
7275  return xnGetPoseStatus(GetHandle(), userID, poseName, &poseTime, &eStatus, &eState);
7276  }
7277 
7293  inline XnStatus StartPoseDetection(const XnChar* strPose, XnUserID user)
7294  {
7295  return xnStartPoseDetection(GetHandle(), strPose, user);
7296  }
7297 
7310  {
7311  return xnStopPoseDetection(GetHandle(), user);
7312  }
7313 
7317  inline XnStatus StopSinglePoseDetection(XnUserID user, const XnChar* strPose)
7318  {
7319  return xnStopSinglePoseDetection(GetHandle(), user, strPose);
7320  }
7321 
7331  inline XnStatus RegisterToPoseDetected(PoseDetection handler, void* pCookie, XnCallbackHandle& hCallback)
7332  {
7333  XnStatus nRetVal = XN_STATUS_OK;
7334  PoseDetectionCookie* pPoseCookie;
7335  XN_VALIDATE_ALLOC(pPoseCookie, PoseDetectionCookie);
7336  pPoseCookie->handler = handler;
7337  pPoseCookie->pPoseCookie = pCookie;
7338 
7339  nRetVal = xnRegisterToPoseDetected(GetHandle(), PoseDetectionCallback, pPoseCookie, &pPoseCookie->hCallback);
7340  if (nRetVal != XN_STATUS_OK)
7341  {
7342  xnOSFree(pPoseCookie);
7343  return nRetVal;
7344  }
7345  hCallback = pPoseCookie;
7346  return XN_STATUS_OK;
7347  }
7348 
7358  inline XnStatus RegisterToOutOfPose(PoseDetection handler, void* pCookie, XnCallbackHandle& hCallback)
7359  {
7360  XnStatus nRetVal = XN_STATUS_OK;
7361  PoseDetectionCookie* pPoseCookie;
7362  XN_VALIDATE_ALLOC(pPoseCookie, PoseDetectionCookie);
7363  pPoseCookie->handler = handler;
7364  pPoseCookie->pPoseCookie = pCookie;
7365 
7366  nRetVal = xnRegisterToOutOfPose(GetHandle(), PoseDetectionCallback, pPoseCookie, &pPoseCookie->hCallback);
7367  if (nRetVal != XN_STATUS_OK)
7368  {
7369  xnOSFree(pPoseCookie);
7370  return nRetVal;
7371  }
7372  hCallback = pPoseCookie;
7373  return XN_STATUS_OK;
7374  }
7383  {
7384  PoseDetectionCookie* pPoseCookie = (PoseDetectionCookie*)hCallback;
7385  xnUnregisterFromPoseDetected(GetHandle(), pPoseCookie->hCallback);
7386  xnOSFree(pPoseCookie);
7387  }
7396  {
7397  PoseDetectionCookie* pPoseCookie = (PoseDetectionCookie*)hCallback;
7398  xnUnregisterFromOutOfPose(GetHandle(), pPoseCookie->hCallback);
7399  xnOSFree(pPoseCookie);
7400  }
7401 
7424  typedef void (XN_CALLBACK_TYPE* PoseInProgress)(PoseDetectionCapability& pose, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseError, void* pCookie);
7425 
7442  inline XnStatus RegisterToPoseInProgress(PoseInProgress handler, void* pCookie, XnCallbackHandle& hCallback)
7443  {
7444  XnStatus nRetVal = XN_STATUS_OK;
7445 
7446  PoseInProgressCookie* pPoseCookie;
7447  XN_VALIDATE_ALLOC(pPoseCookie, PoseInProgressCookie);
7448  pPoseCookie->handler = handler;
7449  pPoseCookie->pPoseCookie = pCookie;
7450 
7451  nRetVal = xnRegisterToPoseDetectionInProgress(GetHandle(), PoseDetectionInProgressCallback, pPoseCookie, &pPoseCookie->hCallback);
7452  if (nRetVal != XN_STATUS_OK)
7453  {
7454  xnOSFree(pPoseCookie);
7455  return (nRetVal);
7456  }
7457 
7458  hCallback = pPoseCookie;
7459 
7460  return (XN_STATUS_OK);
7461  }
7462 
7471  {
7472  PoseInProgressCookie* pPoseCookie = (PoseInProgressCookie*)hCallback;
7473  xnUnregisterFromPoseDetectionInProgress(GetHandle(), pPoseCookie->hCallback);
7474  xnOSFree(pPoseCookie);
7475  }
7476 
7478  inline XnStatus XN_API_DEPRECATED("Use GetAllAvailablePoses() instead") GetAvailablePoses(XnChar** pstrPoses, XnUInt32& nPoses) const
7479  {
7480  return xnGetAvailablePoses(GetHandle(), pstrPoses, &nPoses);
7481  }
7482 
7483  inline XnStatus XN_API_DEPRECATED("Please use RegisterToPoseDetected/RegisterToOutOfPose instead") RegisterToPoseCallbacks(PoseDetection PoseStartCB, PoseDetection PoseEndCB, void* pCookie, XnCallbackHandle& hCallback)
7484  {
7485  XnStatus nRetVal = XN_STATUS_OK;
7486 
7487  PoseCookie* pPoseCookie;
7488  XN_VALIDATE_ALLOC(pPoseCookie, PoseCookie);
7489  pPoseCookie->startHandler = PoseStartCB;
7490  pPoseCookie->endHandler = PoseEndCB;
7491  pPoseCookie->pPoseCookie = pCookie;
7492 
7493 #pragma warning (push)
7494 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7495  nRetVal = xnRegisterToPoseCallbacks(GetHandle(), PoseDetectionStartBundleCallback, PoseDetectionStartEndBundleCallback, pPoseCookie, &pPoseCookie->hCallback);
7496 #pragma warning (pop)
7497  if (nRetVal != XN_STATUS_OK)
7498  {
7499  xnOSFree(pPoseCookie);
7500  return (nRetVal);
7501  }
7502 
7503  hCallback = pPoseCookie;
7504 
7505  return (XN_STATUS_OK);
7506  }
7507 
7508  inline void XN_API_DEPRECATED("Please use UnregisterFromPoseDetected/UnregisterFromOutOfPose instead") UnregisterFromPoseCallbacks(XnCallbackHandle hCallback)
7509  {
7510  PoseCookie* pPoseCookie = (PoseCookie*)hCallback;
7511 #pragma warning (push)
7512 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7513  xnUnregisterFromPoseCallbacks(GetHandle(), pPoseCookie->hCallback);
7514 #pragma warning (pop)
7515  xnOSFree(pPoseCookie);
7516  }
7519 private:
7520  typedef struct PoseCookie
7521  {
7522  PoseDetection startHandler;
7523  PoseDetection endHandler;
7524  void* pPoseCookie;
7525  XnCallbackHandle hCallback;
7526  } PoseCookie;
7527 
7528  static void XN_CALLBACK_TYPE PoseDetectionStartBundleCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
7529  {
7530  PoseCookie* pPoseCookie = (PoseCookie*)pCookie;
7531  PoseDetectionCapability cap(hNode);
7532  if (pPoseCookie->startHandler != NULL)
7533  {
7534  pPoseCookie->startHandler(cap, strPose, user, pPoseCookie->pPoseCookie);
7535  }
7536  }
7537 
7538  static void XN_CALLBACK_TYPE PoseDetectionStartEndBundleCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
7539  {
7540  PoseCookie* pPoseCookie = (PoseCookie*)pCookie;
7541  PoseDetectionCapability cap(hNode);
7542  if (pPoseCookie->endHandler != NULL)
7543  {
7544  pPoseCookie->endHandler(cap, strPose, user, pPoseCookie->pPoseCookie);
7545  }
7546  }
7547  typedef struct PoseDetectionCookie
7548  {
7549  PoseDetection handler;
7550  void* pPoseCookie;
7551  XnCallbackHandle hCallback;
7552  } PoseDetectionCookie;
7553  static void XN_CALLBACK_TYPE PoseDetectionCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
7554  {
7555  PoseDetectionCookie* pPoseDetectionCookie = (PoseDetectionCookie*)pCookie;
7556  PoseDetectionCapability cap(hNode);
7557  if (pPoseDetectionCookie->handler != NULL)
7558  {
7559  pPoseDetectionCookie->handler(cap, strPose, user, pPoseDetectionCookie->pPoseCookie);
7560  }
7561  }
7562 
7563  typedef struct PoseInProgressCookie
7564  {
7565  PoseInProgress handler;
7566  void* pPoseCookie;
7567  XnCallbackHandle hCallback;
7568  } PoseInProgressCookie;
7569 
7570  static void XN_CALLBACK_TYPE PoseDetectionInProgressCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseErrors, void* pCookie)
7571  {
7572  PoseInProgressCookie* pPoseCookie = (PoseInProgressCookie*)pCookie;
7573  PoseDetectionCapability cap(hNode);
7574  if (pPoseCookie->handler != NULL)
7575  {
7576  pPoseCookie->handler(cap, strPose, user, poseErrors, pPoseCookie->pPoseCookie);
7577  }
7578  }
7579  };
7580 
7692  class UserGenerator : public Generator
7693  {
7694  public:
7700  inline UserGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
7701  inline UserGenerator(const NodeWrapper& other) : Generator(other) {}
7702 
7710  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
7711 
7724  typedef void (XN_CALLBACK_TYPE* UserHandler)(UserGenerator& generator, XnUserID user, void* pCookie);
7725 
7733  inline XnUInt16 GetNumberOfUsers() const
7734  {
7735  return xnGetNumberOfUsers(GetHandle());
7736  }
7737 
7760  inline XnStatus GetUsers(XnUserID aUsers[], XnUInt16& nUsers) const
7761  {
7762  return xnGetUsers(GetHandle(), aUsers, &nUsers);
7763  }
7764 
7784  inline XnStatus GetCoM(XnUserID user, XnPoint3D& com) const
7785  {
7786  return xnGetUserCoM(GetHandle(), user, &com);
7787  }
7788 
7805  {
7806  return xnGetUserPixels(GetHandle(), user, smd.GetUnderlying());
7807  }
7808 
7819  inline XnStatus RegisterUserCallbacks(UserHandler NewUserCB, UserHandler LostUserCB, void* pCookie, XnCallbackHandle& hCallback)
7820  {
7821  XnStatus nRetVal = XN_STATUS_OK;
7822 
7823  UserCookie* pUserCookie;
7824  XN_VALIDATE_ALLOC(pUserCookie, UserCookie);
7825  pUserCookie->newHandler = NewUserCB;
7826  pUserCookie->lostHandler = LostUserCB;
7827  pUserCookie->pUserCookie = pCookie;
7828 
7829  nRetVal = xnRegisterUserCallbacks(GetHandle(), NewUserCallback, LostUserCallback, pUserCookie, &pUserCookie->hCallback);
7830  if (nRetVal != XN_STATUS_OK)
7831  {
7832  xnOSFree(pUserCookie);
7833  return (nRetVal);
7834  }
7835 
7836  hCallback = pUserCookie;
7837 
7838  return (XN_STATUS_OK);
7839  }
7840 
7849  {
7850  UserCookie* pUserCookie = (UserCookie*)hCallback;
7851  xnUnregisterUserCallbacks(GetHandle(), pUserCookie->hCallback);
7852  xnOSFree(pUserCookie);
7853  }
7854 
7866  inline const SkeletonCapability GetSkeletonCap() const
7867  {
7868  return SkeletonCapability(GetHandle());
7869  }
7870 
7883  {
7884  return SkeletonCapability(GetHandle());
7885  }
7886 
7898  {
7899  return PoseDetectionCapability(GetHandle());
7900  }
7901 
7913  {
7914  return PoseDetectionCapability(GetHandle());
7915  }
7916 
7926  inline XnStatus RegisterToUserExit(UserHandler handler, void* pCookie, XnCallbackHandle& hCallback)
7927  {
7928  XnStatus nRetVal = XN_STATUS_OK;
7929 
7930  UserSingleCookie* pUserCookie;
7931  XN_VALIDATE_ALLOC(pUserCookie, UserSingleCookie);
7932  pUserCookie->handler = handler;
7933  pUserCookie->pUserCookie = pCookie;
7934 
7935  nRetVal = xnRegisterToUserExit(GetHandle(), UserSingleCallback, pUserCookie, &pUserCookie->hCallback);
7936  if (nRetVal != XN_STATUS_OK)
7937  {
7938  xnOSFree(pUserCookie);
7939  return (nRetVal);
7940  }
7941 
7942  hCallback = pUserCookie;
7943 
7944  return (XN_STATUS_OK);
7945  }
7946 
7955  {
7956  UserSingleCookie* pUserCookie = (UserSingleCookie*)hCallback;
7957  xnUnregisterFromUserExit(GetHandle(), pUserCookie->hCallback);
7958  xnOSFree(pUserCookie);
7959  }
7960 
7970  inline XnStatus RegisterToUserReEnter(UserHandler handler, void* pCookie, XnCallbackHandle& hCallback)
7971  {
7972  XnStatus nRetVal = XN_STATUS_OK;
7973 
7974  UserSingleCookie* pUserCookie;
7975  XN_VALIDATE_ALLOC(pUserCookie, UserSingleCookie);
7976  pUserCookie->handler = handler;
7977  pUserCookie->pUserCookie = pCookie;
7978 
7979  nRetVal = xnRegisterToUserReEnter(GetHandle(), UserSingleCallback, pUserCookie, &pUserCookie->hCallback);
7980  if (nRetVal != XN_STATUS_OK)
7981  {
7982  xnOSFree(pUserCookie);
7983  return (nRetVal);
7984  }
7985 
7986  hCallback = pUserCookie;
7987 
7988  return (XN_STATUS_OK);
7989  }
7990 
7999  {
8000  UserSingleCookie* pUserCookie = (UserSingleCookie*)hCallback;
8001  xnUnregisterFromUserReEnter(GetHandle(), pUserCookie->hCallback);
8002  xnOSFree(pUserCookie);
8003  }
8004 
8005  private:
8006  typedef struct UserCookie
8007  {
8008  UserHandler newHandler;
8009  UserHandler lostHandler;
8010  void* pUserCookie;
8011  XnCallbackHandle hCallback;
8012  } UserCookie;
8013 
8014  static void XN_CALLBACK_TYPE NewUserCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
8015  {
8016  UserCookie* pUserCookie = (UserCookie*)pCookie;
8017  UserGenerator gen(hNode);
8018  if (pUserCookie->newHandler != NULL)
8019  {
8020  pUserCookie->newHandler(gen, user, pUserCookie->pUserCookie);
8021  }
8022  }
8023 
8024  static void XN_CALLBACK_TYPE LostUserCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
8025  {
8026  UserCookie* pUserCookie = (UserCookie*)pCookie;
8027  UserGenerator gen(hNode);
8028  if (pUserCookie->lostHandler != NULL)
8029  {
8030  pUserCookie->lostHandler(gen, user, pUserCookie->pUserCookie);
8031  }
8032  }
8033 
8034  typedef struct UserSingleCookie
8035  {
8036  UserHandler handler;
8037  void* pUserCookie;
8038  XnCallbackHandle hCallback;
8039  } UserSingleCookie;
8040 
8041  static void XN_CALLBACK_TYPE UserSingleCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
8042  {
8043  UserSingleCookie* pUserCookie = (UserSingleCookie*)pCookie;
8044  UserGenerator gen(hNode);
8045  if (pUserCookie->handler != NULL)
8046  {
8047  pUserCookie->handler(gen, user, pUserCookie->pUserCookie);
8048  }
8049  }
8050  };
8051 
8065  class AudioGenerator : public Generator
8066  {
8067  public:
8073  inline AudioGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
8074  inline AudioGenerator(const NodeWrapper& other) : Generator(other) {}
8075 
8083  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
8084 
8101  inline void GetMetaData(AudioMetaData& metaData) const
8102  {
8103  xnGetAudioMetaData(GetHandle(), metaData.GetUnderlying());
8104  }
8105 
8110  inline const XnUChar* GetAudioBuffer() const
8111  {
8112  return xnGetAudioBuffer(GetHandle());
8113  }
8114 
8118  inline XnUInt32 GetSupportedWaveOutputModesCount() const
8119  {
8120  return xnGetSupportedWaveOutputModesCount(GetHandle());
8121  }
8122 
8129  inline XnStatus GetSupportedWaveOutputModes(XnWaveOutputMode* aSupportedModes, XnUInt32& nCount) const
8130  {
8131  return xnGetSupportedWaveOutputModes(GetHandle(), aSupportedModes, &nCount);
8132  }
8133 
8145  inline XnStatus SetWaveOutputMode(const XnWaveOutputMode& OutputMode)
8146  {
8147  return xnSetWaveOutputMode(GetHandle(), &OutputMode);
8148  }
8149 
8161  inline XnStatus GetWaveOutputMode(XnWaveOutputMode& OutputMode) const
8162  {
8163  return xnGetWaveOutputMode(GetHandle(), &OutputMode);
8164  }
8165 
8176  {
8177  return _RegisterToStateChange(xnRegisterToWaveOutputModeChanges, GetHandle(), handler, pCookie, hCallback);
8178  }
8179 
8188  {
8189  _UnregisterFromStateChange(xnUnregisterFromWaveOutputModeChanges, GetHandle(), hCallback);
8190  }
8191  };
8192 
8198  {
8199  public:
8205  inline MockAudioGenerator(XnNodeHandle hNode = NULL) : AudioGenerator(hNode) {}
8206  inline MockAudioGenerator(const NodeWrapper& other) : AudioGenerator(other) {}
8207 
8214  XnStatus Create(Context& context, const XnChar* strName = NULL);
8215 
8223  XnStatus CreateBasedOn(AudioGenerator& other, const XnChar* strName = NULL);
8224 
8229  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8* pAudioBuffer)
8230  {
8231  return xnMockAudioSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pAudioBuffer);
8232  }
8233 
8242  inline XnStatus SetData(const AudioMetaData& audioMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
8243  {
8244  return SetData(nFrameID, nTimestamp, audioMD.DataSize(), audioMD.Data());
8245  }
8246 
8252  inline XnStatus SetData(const AudioMetaData& audioMD)
8253  {
8254  return SetData(audioMD, audioMD.FrameID(), audioMD.Timestamp());
8255  }
8256  };
8257 
8262  {
8263  public:
8264  MockRawGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
8265  MockRawGenerator(const NodeWrapper& other) : Generator(other) {}
8266 
8267  inline XnStatus Create(Context& context, const XnChar* strName = NULL);
8268 
8269  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void* pData)
8270  {
8271  return xnMockRawSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pData);
8272  }
8273 
8274  };
8275 
8280  class Codec : public ProductionNode
8281  {
8282  public:
8288  inline Codec(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
8289  inline Codec(const NodeWrapper& other) : ProductionNode(other) {}
8290 
8295  inline XnStatus Create(Context& context, XnCodecID codecID, ProductionNode& initializerNode);
8296 
8301  inline XnCodecID GetCodecID() const
8302  {
8303  return xnGetCodecID(GetHandle());
8304  }
8305 
8310  inline XnStatus EncodeData(const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) const
8311  {
8312  return xnEncodeData(GetHandle(), pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten);
8313  }
8314 
8319  inline XnStatus DecodeData(const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) const
8320  {
8321  return xnDecodeData(GetHandle(), pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten);
8322  }
8323  };
8324 
8359  {
8360  public:
8366  inline ScriptNode(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
8367  inline ScriptNode(const NodeWrapper& other) : ProductionNode(other) {}
8368 
8369  inline XnStatus Create(Context& context, const XnChar* strFormat);
8370 
8371  inline const XnChar* GetSupportedFormat()
8372  {
8373  return xnScriptNodeGetSupportedFormat(GetHandle());
8374  }
8375 
8381  inline XnStatus LoadScriptFromFile(const XnChar* strFileName)
8382  {
8383  return xnLoadScriptFromFile(GetHandle(), strFileName);
8384  }
8385 
8391  inline XnStatus LoadScriptFromString(const XnChar* strScript)
8392  {
8393  return xnLoadScriptFromString(GetHandle(), strScript);
8394  }
8395 
8407  inline XnStatus Run(EnumerationErrors* pErrors);
8408  };
8409 
8410  //---------------------------------------------------------------------------
8411  // EnumerationErrors
8412  //---------------------------------------------------------------------------
8434  {
8435  public:
8439  inline EnumerationErrors() : m_bAllocated(TRUE) { xnEnumerationErrorsAllocate(&m_pErrors); }
8440 
8448  inline EnumerationErrors(XnEnumerationErrors* pErrors, XnBool bOwn = FALSE) : m_pErrors(pErrors), m_bAllocated(bOwn) {}
8449 
8453  ~EnumerationErrors() { Free(); }
8454 
8458  class Iterator
8459  {
8460  public:
8461  friend class EnumerationErrors;
8462 
8468  XnBool operator==(const Iterator& other) const
8469  {
8470  return m_it == other.m_it;
8471  }
8472 
8478  XnBool operator!=(const Iterator& other) const
8479  {
8480  return m_it != other.m_it;
8481  }
8482 
8488  {
8489  m_it = xnEnumerationErrorsGetNext(m_it);
8490  return *this;
8491  }
8492 
8497  inline Iterator operator++(int)
8498  {
8499  return Iterator(xnEnumerationErrorsGetNext(m_it));
8500  }
8501 
8511 
8517 
8518  private:
8519  inline Iterator(XnEnumerationErrorsIterator it) : m_it(it) {}
8520 
8522  };
8523 
8532  inline Iterator Begin() const { return Iterator(xnEnumerationErrorsGetFirst(m_pErrors)); }
8533 
8542  inline Iterator End() const { return Iterator(NULL); }
8543 
8552  inline XnStatus ToString(XnChar* csBuffer, XnUInt32 nSize)
8553  {
8554  return xnEnumerationErrorsToString(m_pErrors, csBuffer, nSize);
8555  }
8556 
8561  inline void Free()
8562  {
8563  if (m_bAllocated)
8564  {
8565  xnEnumerationErrorsFree(m_pErrors);
8566  m_pErrors = NULL;
8567  m_bAllocated = FALSE;
8568  }
8569  }
8570 
8574  inline XnEnumerationErrors* GetUnderlying() { return m_pErrors; }
8575 
8576  private:
8577  XnEnumerationErrors* m_pErrors;
8578  XnBool m_bAllocated;
8579  };
8580 
8581  //---------------------------------------------------------------------------
8582  // Context
8583  //---------------------------------------------------------------------------
8584 
8620  class Context
8621  {
8622  public:
8637  typedef void (XN_CALLBACK_TYPE* NodeCreationHandler)(Context& context, ProductionNode& createdNode, void* pCookie);
8638 
8653  typedef void (XN_CALLBACK_TYPE* NodeDestructionHandler)(Context& context, const XnChar* strDestroyedNodeName, void* pCookie);
8654 
8658  inline Context() : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL) {}
8659 
8665  inline Context(XnContext* pContext) : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL)
8666  {
8667  SetHandle(pContext);
8668  }
8669 
8676  inline Context(const Context& other) : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL)
8677  {
8678  SetHandle(other.m_pContext);
8679  }
8680 
8685  {
8686  SetHandle(NULL);
8687  }
8688 
8689  inline Context& operator=(const Context& other)
8690  {
8691  SetHandle(other.m_pContext);
8692  return *this;
8693  }
8694 
8698  inline XnContext* GetUnderlyingObject() const { return m_pContext; }
8699 
8705  inline XnBool operator==(const Context& other)
8706  {
8707  return (GetUnderlyingObject() == other.GetUnderlyingObject());
8708  }
8709 
8715  inline XnBool operator!=(const Context& other)
8716  {
8717  return (GetUnderlyingObject() != other.GetUnderlyingObject());
8718  }
8719 
8734  inline XnStatus Init()
8735  {
8736  XnContext* pContext = NULL;
8737  XnStatus nRetVal = xnInit(&pContext);
8738  XN_IS_STATUS_OK(nRetVal);
8739 
8740  TakeOwnership(pContext);
8741  m_bAllocated = TRUE;
8742 
8743  return (XN_STATUS_OK);
8744  }
8745 
8761  inline XnStatus RunXmlScript(const XnChar* strScript, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
8762  {
8763  XnStatus nRetVal = XN_STATUS_OK;
8764 
8765  XnNodeHandle hScriptNode;
8766  nRetVal = xnContextRunXmlScriptEx(m_pContext, strScript, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
8767  XN_IS_STATUS_OK(nRetVal);
8768 
8769  scriptNode.TakeOwnership(hScriptNode);
8770 
8771  return (XN_STATUS_OK);
8772  }
8773 
8789  inline XnStatus RunXmlScriptFromFile(const XnChar* strFileName, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
8790  {
8791  XnStatus nRetVal = XN_STATUS_OK;
8792 
8793  XnNodeHandle hScriptNode;
8794  nRetVal = xnContextRunXmlScriptFromFileEx(m_pContext, strFileName, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
8795  XN_IS_STATUS_OK(nRetVal);
8796 
8797  scriptNode.TakeOwnership(hScriptNode);
8798 
8799  return (XN_STATUS_OK);
8800  }
8801 
8817  inline XnStatus InitFromXmlFile(const XnChar* strFileName, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
8818  {
8819  XnContext* pContext = NULL;
8820 
8821  XnNodeHandle hScriptNode;
8822  XnStatus nRetVal = xnInitFromXmlFileEx(strFileName, &pContext, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
8823  XN_IS_STATUS_OK(nRetVal);
8824 
8825  scriptNode.TakeOwnership(hScriptNode);
8826  TakeOwnership(pContext);
8827  m_bAllocated = TRUE;
8828 
8829  return (XN_STATUS_OK);
8830  }
8831 
8848  inline XnStatus OpenFileRecording(const XnChar* strFileName, ProductionNode& playerNode)
8849  {
8850  XnStatus nRetVal = XN_STATUS_OK;
8851 
8852  XnNodeHandle hPlayer;
8853  nRetVal = xnContextOpenFileRecordingEx(m_pContext, strFileName, &hPlayer);
8854  XN_IS_STATUS_OK(nRetVal);
8855 
8856  playerNode.TakeOwnership(hPlayer);
8857 
8858  return (XN_STATUS_OK);
8859  }
8860 
8865  inline XnStatus CreateMockNode(XnProductionNodeType type, const XnChar* strName, ProductionNode& mockNode)
8866  {
8867  XnStatus nRetVal = XN_STATUS_OK;
8868 
8869  XnNodeHandle hMockNode;
8870  nRetVal = xnCreateMockNode(m_pContext, type, strName, &hMockNode);
8871  XN_IS_STATUS_OK(nRetVal);
8872 
8873  mockNode.TakeOwnership(hMockNode);
8874 
8875  return (XN_STATUS_OK);
8876  }
8877 
8882  inline XnStatus CreateMockNodeBasedOn(ProductionNode& originalNode, const XnChar* strName, ProductionNode& mockNode)
8883  {
8884  XnStatus nRetVal = XN_STATUS_OK;
8885 
8886  XnNodeHandle hMockNode;
8887  nRetVal = xnCreateMockNodeBasedOn(m_pContext, originalNode, strName, &hMockNode);
8888  XN_IS_STATUS_OK(nRetVal);
8889 
8890  mockNode.TakeOwnership(hMockNode);
8891 
8892  return (XN_STATUS_OK);
8893  }
8894 
8899  inline XnStatus CreateCodec(XnCodecID codecID, ProductionNode& initializerNode, Codec& codec)
8900  {
8901  XnStatus nRetVal = XN_STATUS_OK;
8902 
8903  XnNodeHandle hCodec;
8904  nRetVal = xnCreateCodec(m_pContext, codecID, initializerNode.GetHandle(), &hCodec);
8905  XN_IS_STATUS_OK(nRetVal);
8906 
8907  codec.TakeOwnership(hCodec);
8908 
8909  return (XN_STATUS_OK);
8910  }
8911 
8916  inline XnStatus AddRef()
8917  {
8918  return xnContextAddRef(m_pContext);
8919  }
8920 
8925  inline void Release()
8926  {
8927  SetHandle(NULL);
8928  }
8929 
8930 
8935  inline XnStatus AddLicense(const XnLicense& License)
8936  {
8937  return xnAddLicense(m_pContext, &License);
8938  }
8939 
8944  inline XnStatus EnumerateLicenses(XnLicense*& aLicenses, XnUInt32& nCount) const
8945  {
8946  return xnEnumerateLicenses(m_pContext, &aLicenses, &nCount);
8947  }
8948 
8953  inline static void FreeLicensesList(XnLicense aLicenses[])
8954  {
8955  xnFreeLicensesList(aLicenses);
8956  }
8957 
8978  XnStatus EnumerateProductionTrees(XnProductionNodeType Type, const Query* pQuery, NodeInfoList& TreesList, EnumerationErrors* pErrors = NULL) const
8979  {
8980  XnStatus nRetVal = XN_STATUS_OK;
8981 
8982  const XnNodeQuery* pInternalQuery = (pQuery != NULL) ? pQuery->GetUnderlyingObject() : NULL;
8983 
8984  XnNodeInfoList* pList = NULL;
8985  nRetVal = xnEnumerateProductionTrees(m_pContext, Type, pInternalQuery, &pList, pErrors == NULL ? NULL : pErrors->GetUnderlying());
8986  XN_IS_STATUS_OK(nRetVal);
8987 
8988  TreesList.ReplaceUnderlyingObject(pList);
8989 
8990  return (XN_STATUS_OK);
8991  }
8992 
9026  {
9027  XnStatus nRetVal = XN_STATUS_OK;
9028 
9029  XnNodeQuery* pInternalQuery = (pQuery != NULL) ? pQuery->GetUnderlyingObject() : NULL;
9030 
9031  XnNodeHandle hNode;
9032  nRetVal = xnCreateAnyProductionTree(m_pContext, type, pInternalQuery, &hNode, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9033  XN_IS_STATUS_OK(nRetVal);
9034 
9035  node.TakeOwnership(hNode);
9036 
9037  return (XN_STATUS_OK);
9038  }
9039 
9057  {
9058  XnStatus nRetVal = XN_STATUS_OK;
9059 
9060  XnNodeHandle hNode;
9061  nRetVal = xnCreateProductionTree(m_pContext, Tree, &hNode);
9062  XN_IS_STATUS_OK(nRetVal);
9063 
9064  node.TakeOwnership(hNode);
9065 
9066  return (XN_STATUS_OK);
9067  }
9068 
9078  {
9079  XnNodeInfoList* pList;
9080  XnStatus nRetVal = xnEnumerateExistingNodes(m_pContext, &pList);
9081  XN_IS_STATUS_OK(nRetVal);
9082 
9083  list.ReplaceUnderlyingObject(pList);
9084 
9085  return (XN_STATUS_OK);
9086  }
9087 
9107  {
9108  XnNodeInfoList* pList;
9109  XnStatus nRetVal = xnEnumerateExistingNodesByType(m_pContext, type, &pList);
9110  XN_IS_STATUS_OK(nRetVal);
9111 
9112  list.ReplaceUnderlyingObject(pList);
9113 
9114  return (XN_STATUS_OK);
9115  }
9116 
9136  {
9137  XnStatus nRetVal = XN_STATUS_OK;
9138 
9139  XnNodeHandle hNode;
9140  nRetVal = xnFindExistingRefNodeByType(m_pContext, type, &hNode);
9141  XN_IS_STATUS_OK(nRetVal);
9142 
9143  node.TakeOwnership(hNode);
9144 
9145  return (XN_STATUS_OK);
9146  }
9147 
9152  XnStatus GetProductionNodeByName(const XnChar* strInstanceName, ProductionNode& node) const
9153  {
9154  XnStatus nRetVal = XN_STATUS_OK;
9155 
9156  XnNodeHandle hNode;
9157  nRetVal = xnGetRefNodeHandleByName(m_pContext, strInstanceName, &hNode);
9158  XN_IS_STATUS_OK(nRetVal);
9159 
9160  node.TakeOwnership(hNode);
9161 
9162  return (XN_STATUS_OK);
9163  }
9164 
9169  XnStatus GetProductionNodeInfoByName(const XnChar* strInstanceName, NodeInfo& nodeInfo) const
9170  {
9171  XnStatus nRetVal = XN_STATUS_OK;
9172 
9173  XnNodeHandle hNode;
9174  nRetVal = xnGetRefNodeHandleByName(m_pContext, strInstanceName, &hNode);
9175  XN_IS_STATUS_OK(nRetVal);
9176 
9177  xnProductionNodeRelease(hNode);
9178 
9179  nodeInfo = NodeInfo(xnGetNodeInfo(hNode));
9180 
9181  return (XN_STATUS_OK);
9182  }
9183 
9189  {
9190  return xnStartGeneratingAll(m_pContext);
9191  }
9192 
9197  {
9198  return xnStopGeneratingAll(m_pContext);
9199  }
9200 
9210  inline XnStatus SetGlobalMirror(XnBool bMirror)
9211  {
9212  return xnSetGlobalMirror(m_pContext, bMirror);
9213  }
9214 
9219  inline XnBool GetGlobalMirror()
9220  {
9221  return xnGetGlobalMirror(m_pContext);
9222  }
9223 
9229  {
9230  return xnGetGlobalErrorState(m_pContext);
9231  }
9232 
9243  {
9244  return xnRegisterToGlobalErrorStateChange(m_pContext, handler, pCookie, &hCallback);
9245  }
9246 
9255  {
9256  xnUnregisterFromGlobalErrorStateChange(m_pContext, hCallback);
9257  }
9258 
9268  inline XnStatus RegisterToNodeCreation(NodeCreationHandler handler, void* pCookie, XnCallbackHandle& hCallback)
9269  {
9270  XnStatus nRetVal = XN_STATUS_OK;
9271 
9272  NodeCreationCookie* pCreationCookie;
9273  XN_VALIDATE_ALLOC(pCreationCookie, NodeCreationCookie);
9274  pCreationCookie->pFunc = handler;
9275  pCreationCookie->pCookie = pCookie;
9276 
9277  nRetVal = xnRegisterToNodeCreation(m_pContext, NodeCreationCallback, pCreationCookie, &pCreationCookie->hUnderlyingCallback);
9278  XN_IS_STATUS_OK(nRetVal);
9279 
9280  hCallback = pCreationCookie;
9281 
9282  return XN_STATUS_OK;
9283  }
9284 
9293  {
9294  NodeCreationCookie* pCreationCookie = (NodeCreationCookie*)hCallback;
9295  xnUnregisterFromNodeCreation(m_pContext, pCreationCookie->hUnderlyingCallback);
9296  xnOSFree(pCreationCookie);
9297  }
9298 
9308  inline XnStatus RegisterToNodeDestruction(NodeDestructionHandler handler, void* pCookie, XnCallbackHandle& hCallback)
9309  {
9310  XnStatus nRetVal = XN_STATUS_OK;
9311 
9312  NodeDestructionCookie* pDestructionCookie;
9313  XN_VALIDATE_ALLOC(pDestructionCookie, NodeDestructionCookie);
9314  pDestructionCookie->pFunc = handler;
9315  pDestructionCookie->pCookie = pCookie;
9316 
9317  nRetVal = xnRegisterToNodeDestruction(m_pContext, NodeDestructionCallback, pDestructionCookie, &pDestructionCookie->hUnderlyingCallback);
9318  XN_IS_STATUS_OK(nRetVal);
9319 
9320  hCallback = pDestructionCookie;
9321 
9322  return XN_STATUS_OK;
9323  }
9324 
9333  {
9334  NodeDestructionCookie* pDestructionCookie = (NodeDestructionCookie*)hCallback;
9335  xnUnregisterFromNodeDestruction(m_pContext, pDestructionCookie->hUnderlyingCallback);
9336  xnOSFree(pDestructionCookie);
9337  }
9338 
9373  {
9374  return xnWaitAndUpdateAll(m_pContext);
9375  }
9376 
9412  {
9413  return xnWaitAnyUpdateAll(m_pContext);
9414  }
9415 
9447  {
9448  return xnWaitOneUpdateAll(m_pContext, node.GetHandle());
9449  }
9450 
9473  {
9474  return xnWaitNoneUpdateAll(m_pContext);
9475  }
9476 
9481  inline XnStatus AutoEnumerateOverSingleInput(NodeInfoList& List, XnProductionNodeDescription& description, const XnChar* strCreationInfo, XnProductionNodeType InputType, EnumerationErrors* pErrors, Query* pQuery = NULL) const
9482  {
9483  return xnAutoEnumerateOverSingleInput(m_pContext, List.GetUnderlyingObject(), &description, strCreationInfo, InputType, pErrors == NULL ? NULL : pErrors->GetUnderlying(), pQuery == NULL ? NULL : pQuery->GetUnderlyingObject());
9484  }
9485 
9489  inline void SetHandle(XnContext* pContext)
9490  {
9491  if (m_pContext == pContext)
9492  {
9493  return;
9494  }
9495 
9496  if (m_pContext != NULL)
9497  {
9498  if (m_bUsingDeprecatedAPI && m_bAllocated)
9499  {
9500  // Backwards compatibility: call shutdown instead of release, to make old programs get the
9501  // exact same behavior they used to have.
9502  xnForceShutdown(m_pContext);
9503  }
9504  else
9505  {
9506  xnContextUnregisterFromShutdown(m_pContext, m_hShuttingDownCallback);
9507  xnContextRelease(m_pContext);
9508  }
9509  }
9510 
9511  if (pContext != NULL)
9512  {
9513  XnStatus nRetVal = xnContextAddRef(pContext);
9514  XN_ASSERT(nRetVal == XN_STATUS_OK);
9515  XN_REFERENCE_VARIABLE(nRetVal);
9516 
9517  nRetVal = xnContextRegisterForShutdown(pContext, ContextShuttingDownCallback, this, &m_hShuttingDownCallback);
9518  XN_ASSERT(nRetVal == XN_STATUS_OK);
9519  }
9520 
9521  m_pContext = pContext;
9522  }
9523 
9524  inline void TakeOwnership(XnContext* pContext)
9525  {
9526  SetHandle(pContext);
9527 
9528  if (pContext != NULL)
9529  {
9530  xnContextRelease(pContext);
9531  }
9532  }
9533 
9535  inline XnStatus XN_API_DEPRECATED("Use other overload!") RunXmlScript(const XnChar* strScript, EnumerationErrors* pErrors = NULL)
9536  {
9537  m_bUsingDeprecatedAPI = TRUE;
9538  #pragma warning (push)
9539  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9540  return xnContextRunXmlScript(m_pContext, strScript, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9541  #pragma warning (pop)
9542  }
9543 
9544  inline XnStatus XN_API_DEPRECATED("Use other overload!") RunXmlScriptFromFile(const XnChar* strFileName, EnumerationErrors* pErrors = NULL)
9545  {
9546  m_bUsingDeprecatedAPI = TRUE;
9547  #pragma warning (push)
9548  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9549  return xnContextRunXmlScriptFromFile(m_pContext, strFileName, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9550  #pragma warning (pop)
9551  }
9552 
9553  inline XnStatus XN_API_DEPRECATED("Use other overload!") InitFromXmlFile(const XnChar* strFileName, EnumerationErrors* pErrors = NULL)
9554  {
9555  XnContext* pContext = NULL;
9556  m_bUsingDeprecatedAPI = TRUE;
9557 
9558  #pragma warning (push)
9559  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9560  XnStatus nRetVal = xnInitFromXmlFile(strFileName, &pContext, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9561  #pragma warning (pop)
9562  XN_IS_STATUS_OK(nRetVal);
9563 
9564  TakeOwnership(pContext);
9565  m_bAllocated = TRUE;
9566 
9567  return (XN_STATUS_OK);
9568  }
9569 
9570  inline XnStatus XN_API_DEPRECATED("Use other overload!") OpenFileRecording(const XnChar* strFileName)
9571  {
9572  m_bUsingDeprecatedAPI = TRUE;
9573  #pragma warning (push)
9574  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9575  return xnContextOpenFileRecording(m_pContext, strFileName);
9576  #pragma warning (pop)
9577  }
9578 
9579  inline void XN_API_DEPRECATED("You may use Release() instead, or count on dtor") Shutdown()
9580  {
9581  if (m_pContext != NULL)
9582  {
9583  #pragma warning (push)
9584  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9585  xnShutdown(m_pContext);
9586  #pragma warning (pop)
9587  m_pContext = NULL;
9588  }
9589  }
9590 
9591  XnStatus XN_API_DEPRECATED("Please use other overload") CreateProductionTree(NodeInfo& Tree)
9592  {
9593  XnStatus nRetVal = XN_STATUS_OK;
9594 
9595  XnNodeHandle hNode;
9596  nRetVal = xnCreateProductionTree(m_pContext, Tree, &hNode);
9597  XN_IS_STATUS_OK(nRetVal);
9598 
9599  Tree.m_bOwnerOfNode = TRUE;
9600 
9601  return (XN_STATUS_OK);
9602  }
9605  private:
9606  typedef struct NodeCreationCookie
9607  {
9608  NodeCreationHandler pFunc;
9609  void* pCookie;
9610  XnCallbackHandle hUnderlyingCallback;
9611  } NodeCreationCookie;
9612 
9613  typedef struct NodeDestructionCookie
9614  {
9615  NodeDestructionHandler pFunc;
9616  void* pCookie;
9617  XnCallbackHandle hUnderlyingCallback;
9618  } NodeDestructionCookie;
9619 
9620  static void XN_CALLBACK_TYPE NodeCreationCallback(XnContext* pContext, XnNodeHandle hCreatedNode, void* pCookie)
9621  {
9622  NodeCreationCookie* pNodeCreationCookie = (NodeCreationCookie*)pCookie;
9623  Context context(pContext);
9624  ProductionNode createdNode(hCreatedNode);
9625  pNodeCreationCookie->pFunc(context, createdNode, pNodeCreationCookie->pCookie);
9626  }
9627 
9628  static void XN_CALLBACK_TYPE NodeDestructionCallback(XnContext* pContext, const XnChar* strDestroyedNodeName, void* pCookie)
9629  {
9630  NodeDestructionCookie* pNodeCreationCookie = (NodeDestructionCookie*)pCookie;
9631  Context context(pContext);
9632  pNodeCreationCookie->pFunc(context, strDestroyedNodeName, pNodeCreationCookie->pCookie);
9633  }
9634 
9635  static void XN_CALLBACK_TYPE ContextShuttingDownCallback(XnContext* /*pContext*/, void* pCookie)
9636  {
9637  Context* pThis = (Context*)pCookie;
9638  pThis->m_pContext = NULL;
9639  }
9640 
9641  XnContext* m_pContext;
9642  XnBool m_bUsingDeprecatedAPI;
9643  XnBool m_bAllocated;
9644  XnCallbackHandle m_hShuttingDownCallback;
9645  };
9646 
9652  {
9653  public:
9659  inline Resolution(XnResolution res) : m_Res(res)
9660  {
9661  m_nXRes = xnResolutionGetXRes(res);
9662  m_nYRes = xnResolutionGetYRes(res);
9663  m_strName = xnResolutionGetName(res);
9664  }
9665 
9672  inline Resolution(XnUInt32 xRes, XnUInt32 yRes) : m_nXRes(xRes), m_nYRes(yRes)
9673  {
9674  m_Res = xnResolutionGetFromXYRes(xRes, yRes);
9675  m_strName = xnResolutionGetName(m_Res);
9676  }
9677 
9683  inline Resolution(const XnChar* strName)
9684  {
9685  m_Res = xnResolutionGetFromName(strName);
9686  m_nXRes = xnResolutionGetXRes(m_Res);
9687  m_nYRes = xnResolutionGetYRes(m_Res);
9688  m_strName = xnResolutionGetName(m_Res);
9689  }
9690 
9694  inline XnResolution GetResolution() const { return m_Res; }
9698  inline XnUInt32 GetXResolution() const { return m_nXRes; }
9702  inline XnUInt32 GetYResolution() const { return m_nYRes; }
9706  inline const XnChar* GetName() const { return m_strName; }
9707 
9708  private:
9709  XnResolution m_Res;
9710  XnUInt32 m_nXRes;
9711  XnUInt32 m_nYRes;
9712  const XnChar* m_strName;
9713  };
9714 
9715  //---------------------------------------------------------------------------
9716  // Functions Implementation
9717  //---------------------------------------------------------------------------
9719  {
9720  return xnNodeQueryFilterList(context.GetUnderlyingObject(), query.GetUnderlyingObject(), m_pList);
9721  }
9722 
9723  inline void ProductionNode::GetContext(Context& context) const
9724  {
9725  context.TakeOwnership(xnGetRefContextFromNodeHandle(GetHandle()));
9726  }
9727 
9729  {
9730  XnContext* pContext = xnGetRefContextFromNodeHandle(GetHandle());
9731  Context result(pContext);
9732  xnContextRelease(pContext);
9733  return result;
9734  }
9735 
9737  {
9738  if (m_pNeededNodes == NULL)
9739  {
9740  XnNodeInfoList* pList = xnNodeInfoGetNeededNodes(m_pInfo);
9741  m_pNeededNodes = XN_NEW(NodeInfoList, pList);
9742  }
9743 
9744  return *m_pNeededNodes;
9745  }
9746 
9747  inline void NodeInfo::SetUnderlyingObject(XnNodeInfo* pInfo)
9748  {
9749  if (m_pNeededNodes != NULL)
9750  {
9751  XN_DELETE(m_pNeededNodes);
9752  }
9753 
9754  m_bOwnerOfNode = FALSE;
9755  m_pInfo = pInfo;
9756  m_pNeededNodes = NULL;
9757  }
9758 
9760  {
9761  return xnCanFrameSyncWith(GetHandle(), other.GetHandle());
9762  }
9763 
9765  {
9766  return xnFrameSyncWith(GetHandle(), other.GetHandle());
9767  }
9768 
9770  {
9771  return xnStopFrameSyncWith(GetHandle(), other.GetHandle());
9772  }
9773 
9775  {
9776  return xnIsFrameSyncedWith(GetHandle(), other.GetHandle());
9777  }
9778 
9780  {
9781  if (m_pInfo == NULL)
9782  {
9783  return XN_STATUS_INVALID_OPERATION;
9784  }
9785 
9786  XnNodeHandle hNode = xnNodeInfoGetRefHandle(m_pInfo);
9787  node.TakeOwnership(hNode);
9788 
9789  if (m_bOwnerOfNode)
9790  {
9791  xnProductionNodeRelease(hNode);
9792  }
9793 
9794  return (XN_STATUS_OK);
9795  }
9796 
9797  //---------------------------------------------------------------------------
9798  // Node creation functions
9799  //---------------------------------------------------------------------------
9800 
9801  inline XnStatus Device::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9802  {
9803  XnNodeHandle hNode;
9804  XnStatus nRetVal = xnCreateDevice(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9805  XN_IS_STATUS_OK(nRetVal);
9806  TakeOwnership(hNode);
9807  return (XN_STATUS_OK);
9808  }
9809 
9810  inline XnStatus Recorder::Create(Context& context, const XnChar* strFormatName /*= NULL*/)
9811  {
9812  XnNodeHandle hNode;
9813  XnStatus nRetVal = xnCreateRecorder(context.GetUnderlyingObject(), strFormatName, &hNode);
9814  XN_IS_STATUS_OK(nRetVal);
9815  TakeOwnership(hNode);
9816  return (XN_STATUS_OK);
9817  }
9818 
9819  inline XnStatus Player::Create(Context& context, const XnChar* strFormatName)
9820  {
9821  XnNodeHandle hNode;
9822  XnStatus nRetVal = xnCreatePlayer(context.GetUnderlyingObject(), strFormatName, &hNode);
9823  XN_IS_STATUS_OK(nRetVal);
9824  TakeOwnership(hNode);
9825  return (XN_STATUS_OK);
9826  }
9827 
9828  inline XnStatus DepthGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9829  {
9830  XnNodeHandle hNode;
9831  XnStatus nRetVal = xnCreateDepthGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9832  XN_IS_STATUS_OK(nRetVal);
9833  TakeOwnership(hNode);
9834  return (XN_STATUS_OK);
9835  }
9836 
9837  inline XnStatus MockDepthGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9838  {
9839  XnNodeHandle hNode;
9840  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_DEPTH, strName, &hNode);
9841  XN_IS_STATUS_OK(nRetVal);
9842  TakeOwnership(hNode);
9843  return (XN_STATUS_OK);
9844  }
9845 
9846  inline XnStatus MockDepthGenerator::CreateBasedOn(DepthGenerator& other, const XnChar* strName /* = NULL */)
9847  {
9848  Context context;
9849  other.GetContext(context);
9850  XnNodeHandle hNode;
9851  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9852  XN_IS_STATUS_OK(nRetVal);
9853  TakeOwnership(hNode);
9854  return (XN_STATUS_OK);
9855  }
9856 
9857  inline XnStatus ImageGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9858  {
9859  XnNodeHandle hNode;
9860  XnStatus nRetVal = xnCreateImageGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9861  XN_IS_STATUS_OK(nRetVal);
9862  TakeOwnership(hNode);
9863  return (XN_STATUS_OK);
9864  }
9865 
9866  inline XnStatus MockImageGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9867  {
9868  XnNodeHandle hNode;
9869  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_IMAGE, strName, &hNode);
9870  XN_IS_STATUS_OK(nRetVal);
9871  TakeOwnership(hNode);
9872  return (XN_STATUS_OK);
9873  }
9874 
9875  inline XnStatus MockImageGenerator::CreateBasedOn(ImageGenerator& other, const XnChar* strName /* = NULL */)
9876  {
9877  Context context;
9878  other.GetContext(context);
9879  XnNodeHandle hNode;
9880  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9881  XN_IS_STATUS_OK(nRetVal);
9882  TakeOwnership(hNode);
9883  return (XN_STATUS_OK);
9884  }
9885 
9886  inline XnStatus IRGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9887  {
9888  XnNodeHandle hNode;
9889  XnStatus nRetVal = xnCreateIRGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9890  XN_IS_STATUS_OK(nRetVal);
9891  TakeOwnership(hNode);
9892  return (XN_STATUS_OK);
9893  }
9894 
9895  inline XnStatus MockIRGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9896  {
9897  XnNodeHandle hNode;
9898  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_IR, strName, &hNode);
9899  XN_IS_STATUS_OK(nRetVal);
9900  TakeOwnership(hNode);
9901  return (XN_STATUS_OK);
9902  }
9903 
9904  inline XnStatus MockIRGenerator::CreateBasedOn(IRGenerator& other, const XnChar* strName /* = NULL */)
9905  {
9906  Context context;
9907  other.GetContext(context);
9908  XnNodeHandle hNode;
9909  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9910  XN_IS_STATUS_OK(nRetVal);
9911  TakeOwnership(hNode);
9912  return (XN_STATUS_OK);
9913  }
9914 
9915  inline XnStatus GestureGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9916  {
9917  XnNodeHandle hNode;
9918  XnStatus nRetVal = xnCreateGestureGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9919  XN_IS_STATUS_OK(nRetVal);
9920  TakeOwnership(hNode);
9921  return (XN_STATUS_OK);
9922  }
9923 
9924  inline XnStatus SceneAnalyzer::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9925  {
9926  //You're creating a scene!
9927  XnNodeHandle hNode;
9928  XnStatus nRetVal = xnCreateSceneAnalyzer(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9929  XN_IS_STATUS_OK(nRetVal);
9930  TakeOwnership(hNode);
9931  return (XN_STATUS_OK);
9932  }
9933 
9934  inline XnStatus HandsGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9935  {
9936  XnNodeHandle hNode;
9937  XnStatus nRetVal = xnCreateHandsGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9938  XN_IS_STATUS_OK(nRetVal);
9939  TakeOwnership(hNode);
9940  return (XN_STATUS_OK);
9941  }
9942 
9943  inline XnStatus UserGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9944  {
9945  XnNodeHandle hNode;
9946  XnStatus nRetVal = xnCreateUserGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9947  XN_IS_STATUS_OK(nRetVal);
9948  TakeOwnership(hNode);
9949  return (XN_STATUS_OK);
9950  }
9951 
9952  inline XnStatus AudioGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9953  {
9954  XnNodeHandle hNode;
9955  XnStatus nRetVal = xnCreateAudioGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9956  XN_IS_STATUS_OK(nRetVal);
9957  TakeOwnership(hNode);
9958  return (XN_STATUS_OK);
9959  }
9960 
9961  inline XnStatus MockAudioGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9962  {
9963  XnNodeHandle hNode;
9964  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_AUDIO, strName, &hNode);
9965  XN_IS_STATUS_OK(nRetVal);
9966  TakeOwnership(hNode);
9967  return (XN_STATUS_OK);
9968  }
9969 
9970  inline XnStatus MockAudioGenerator::CreateBasedOn(AudioGenerator& other, const XnChar* strName /* = NULL */)
9971  {
9972  Context context;
9973  other.GetContext(context);
9974  XnNodeHandle hNode;
9975  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9976  XN_IS_STATUS_OK(nRetVal);
9977  TakeOwnership(hNode);
9978  return (XN_STATUS_OK);
9979  }
9980 
9981  inline XnStatus MockRawGenerator::Create(Context& context, const XnChar* strName /*= NULL*/)
9982  {
9983  XnNodeHandle hNode;
9984  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_GENERATOR, strName, &hNode);
9985  XN_IS_STATUS_OK(nRetVal);
9986  TakeOwnership(hNode);
9987  return (XN_STATUS_OK);
9988  }
9989 
9990  inline XnStatus Codec::Create(Context& context, XnCodecID codecID, ProductionNode& initializerNode)
9991  {
9992  XnNodeHandle hNode;
9993  XnStatus nRetVal = xnCreateCodec(context.GetUnderlyingObject(), codecID, initializerNode.GetHandle(), &hNode);
9994  XN_IS_STATUS_OK(nRetVal);
9995  TakeOwnership(hNode);
9996  return (XN_STATUS_OK);
9997  }
9998 
10000  {
10001  return xnScriptNodeRun(GetHandle(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
10002  }
10003 
10004  inline XnStatus ScriptNode::Create(Context& context, const XnChar* strFormat)
10005  {
10006  XnNodeHandle hNode;
10007  XnStatus nRetVal = xnCreateScriptNode(context.GetUnderlyingObject(), strFormat, &hNode);
10008  XN_IS_STATUS_OK(nRetVal);
10009  TakeOwnership(hNode);
10010  return (XN_STATUS_OK);
10011  }
10012 
10013  //---------------------------------------------------------------------------
10014  // Global Helper Functions
10015  //---------------------------------------------------------------------------
10016 
10017  inline void XN_API_DEPRECATED("Use xn::Version::Current() instead") GetVersion(XnVersion& Version)
10018  {
10019  xnGetVersion(&Version);
10020  }
10021 
10022  //---------------------------------------------------------------------------
10023  // Internal Helper Classes and Functions
10024  //---------------------------------------------------------------------------
10025 
10027  {
10028  public:
10029  StateChangedCallbackTranslator(StateChangedHandler handler, void* pCookie) : m_UserHandler(handler), m_pUserCookie(pCookie), m_hCallback(NULL) {}
10030 
10031  XnStatus Register(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
10032  {
10033  return xnFunc(hNode, StateChangedCallback, this, &m_hCallback);
10034  }
10035 
10036  void Unregister(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
10037  {
10038  xnFunc(hNode, m_hCallback);
10039  }
10040 
10041  static XnStatus RegisterToUnderlying(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
10042  {
10043  XnStatus nRetVal = XN_STATUS_OK;
10044 
10046  XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
10047 
10048  nRetVal = pTrans->Register(xnFunc, hNode);
10049  if (nRetVal != XN_STATUS_OK)
10050  {
10051  XN_DELETE(pTrans);
10052  return (nRetVal);
10053  }
10054 
10055  hCallback = pTrans;
10056 
10057  return (XN_STATUS_OK);
10058  }
10059 
10060  static XnStatus UnregisterFromUnderlying(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
10061  {
10063  pTrans->Unregister(xnFunc, hNode);
10064  XN_DELETE(pTrans);
10065  return XN_STATUS_OK;
10066  }
10067 
10068  private:
10069  friend class GeneralIntCapability;
10070 
10071  typedef struct StateChangeCookie
10072  {
10073  StateChangedHandler userHandler;
10074  void* pUserCookie;
10075  XnCallbackHandle hCallback;
10076  } StateChangeCookie;
10077 
10078  static void XN_CALLBACK_TYPE StateChangedCallback(XnNodeHandle hNode, void* pCookie)
10079  {
10081  ProductionNode node(hNode);
10082  pTrans->m_UserHandler(node, pTrans->m_pUserCookie);
10083  }
10084 
10085  StateChangedHandler m_UserHandler;
10086  void* m_pUserCookie;
10087  XnCallbackHandle m_hCallback;
10088  };
10089 
10090  static XnStatus _RegisterToStateChange(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
10091  {
10092  return StateChangedCallbackTranslator::RegisterToUnderlying(xnFunc, hNode, handler, pCookie, hCallback);
10093  }
10094 
10095  static void _UnregisterFromStateChange(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
10096  {
10098  }
10099 
10101  {
10102  XnStatus nRetVal = XN_STATUS_OK;
10103 
10105  XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
10106 
10107  nRetVal = xnRegisterToGeneralIntValueChange(GetHandle(), m_strCap, pTrans->StateChangedCallback, pTrans, &pTrans->m_hCallback);
10108  if (nRetVal != XN_STATUS_OK)
10109  {
10110  XN_DELETE(pTrans);
10111  return (nRetVal);
10112  }
10113 
10114  hCallback = pTrans;
10115 
10116  return (XN_STATUS_OK);
10117  }
10118 
10120  {
10122  xnUnregisterFromGeneralIntValueChange(GetHandle(), m_strCap, pTrans->m_hCallback);
10123  XN_DELETE(pTrans);
10124  }
10125 };
10126 
10127 #endif // __XN_CPP_WRAPPER_H__
XnUInt32 & FullXRes()
Definition: XnCppWrapper.h:481
Definition: XnTypes.h:506
const PoseDetectionCapability GetPoseDetectionCap() const
Gets a xn::PoseDetectionCapability object for accessing Pose Detection functionality.
Definition: XnCppWrapper.h:7897
XN_C_API XnNodeHandle XN_C_DECL xnNodeInfoGetRefHandle(XnNodeInfo *pNodeInfo)
XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptEx(XnContext *pContext, const XnChar *xmlScript, XnEnumerationErrors *pErrors, XnNodeHandle *phScriptNode)
Runs an XML script in the given context.
XN_C_API void XN_C_DECL xnNodeInfoListFree(XnNodeInfoList *pList)
Definition: XnCppWrapper.h:2149
XN_C_API XnStatus XN_C_DECL xnRegisterCalibrationCallbacks(XnNodeHandle hInstance, XnCalibrationStart CalibrationStartCB, XnCalibrationEnd CalibrationEndCB, void *pCookie, XnCallbackHandle *phCallback)
Register to calibration callbacks.
XN_C_API XnStatus XN_C_DECL xnGetVersion(XnVersion *pVersion)
XN_C_API XnStatus XN_C_DECL xnSetGeneralIntValue(XnNodeHandle hNode, const XnChar *strCap, XnInt32 nValue)
Sets the current value of this capability.
SkeletonCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:6409
XN_C_API const void *XN_C_DECL xnNodeInfoGetAdditionalData(XnNodeInfo *pNodeInfo)
XnStatus SetData(const IRMetaData &irMD)
Definition: XnCppWrapper.h:5307
Definition: XnCppWrapper.h:4189
const XnGrayscale16Pixel * Grayscale16Data() const
Gets a pointer to the first pixel of the image in Grayscale16 format. Grayscale16 represents each pix...
Definition: XnCppWrapper.h:1131
XN_C_API XnUInt32 XN_C_DECL xnGetNumberOfPoses(XnNodeHandle hInstance)
Get the number of the supported poses.
AlternativeViewPointCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:3105
XN_C_API XnUInt32 XN_C_DECL xnGetFrameID(XnNodeHandle hInstance)
Gets the frame ID of current data.
XnStatus SetData(const ImageMetaData &imageMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:5177
XnStatus RegisterToFrameSyncChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Frame Sync Change&#39; event.
Definition: XnCppWrapper.h:3270
void Unregister(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
Definition: XnCppWrapper.h:10036
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationStart(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration start callback.
XN_C_API XnBool XN_C_DECL xnCanFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Checks if this generator can frame sync to another node.
XnStatus SetWaveOutputMode(const XnWaveOutputMode &OutputMode)
Sets the current wave output mode of the AudioGenerator node. This output mode is used for generating...
Definition: XnCppWrapper.h:8145
XN_C_API XnStatus XN_C_DECL xnGetAllActiveGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt32 nNameLength, XnUInt16 *nGestures)
Get the names of the gestures that are currently active.
XN_C_API XnStatus XN_C_DECL xnRegisterToUserReEnter(XnNodeHandle hInstance, XnUserHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when a user re-enters the scene after exiting.
XN_C_API XnStatus XN_C_DECL xnLoadScriptFromFile(XnNodeHandle hScript, const XnChar *strFileName)
XnBool operator==(const Context &other)
Definition: XnCppWrapper.h:8705
Map< XnLabel > LabelMap
Definition: XnCppWrapper.h:718
#define XN_CAPABILITY_BACKLIGHT_COMPENSATION
Definition: XnTypes.h:333
XnStatus RequestCalibration(XnUserID user, XnBool bForce)
Starts the calibration process to calibrate a user.
Definition: XnCppWrapper.h:6660
Query()
Definition: XnCppWrapper.h:1978
Definition: XnCppWrapper.h:390
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetCreationInfo(XnNodeQuery *pQuery, const XnChar *strCreationInfo)
XN_C_API XnStatus XN_C_DECL xnLockedNodeStartChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Start changes request on a locked node, without releasing that lock.
SceneAnalyzer(const NodeWrapper &other)
Definition: XnCppWrapper.h:5853
XN_C_API XnBool XN_C_DECL xnIsJointAvailable(XnNodeHandle hInstance, XnSkeletonJoint eJoint)
Check if generator supports a specific joint.
XN_C_API XnStatus XN_C_DECL xnRecord(XnNodeHandle hRecorder)
Records one frame of data from each node that was added to the recorder with xnAddNodeToRecording.
XnUInt32 XnUserID
Definition: XnTypes.h:549
XnBool IsEOF() const
Returns whether the player is at the end-of-file marker.
Definition: XnCppWrapper.h:4023
XnUInt8 * m_pAllocatedData
Definition: XnCppWrapper.h:369
MockRawGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8264
XnStatus GetSkeletonJoint(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation &Joint) const
Gets all available information about a specific joint in the skeleton.
Definition: XnCppWrapper.h:6547
XN_C_API XnStatus XN_C_DECL xnWaitAnyUpdateAll(XnContext *pContext)
Updates all generators nodes in the context, once any of them have new data.
Definition: XnTypes.h:114
XnStatus GetGlobalErrorState()
Definition: XnCppWrapper.h:9228
XnStatus SetSource(XnRecordMedium sourceType, const XnChar *strSource)
Definition: XnCppWrapper.h:3867
XN_C_API XnStatus XN_C_DECL xnCreateMockNode(XnContext *pContext, XnProductionNodeType type, const XnChar *strName, XnNodeHandle *phNode)
Creates a production node which is only a mock. This node does not represent an actual node...
XnUInt32 SampleRate() const
Gets the rate at which the audio interface was sampled. This is a packet configuration setting associ...
Definition: XnCppWrapper.h:1409
SceneAnalyzer(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5852
XnStatus GetInstance(ProductionNode &node) const
Definition: XnCppWrapper.h:9779
XnStatus ClearCalibrationData(XnUInt32 nSlot)
Clears a specified slot of any saved calibration data.
Definition: XnCppWrapper.h:6745
XN_C_API XnStatus XN_C_DECL xnStopSinglePoseDetection(XnNodeHandle hInstance, XnUserID user, const XnChar *strPose)
Stop detection of a specific pose for a specific user.
XnUInt32 & FPS()
Definition: XnCppWrapper.h:499
GeneralIntCapability GetHueCap()
Definition: XnCppWrapper.h:4436
XnStatus EnumerateExistingNodes(NodeInfoList &list, XnProductionNodeType type) const
Returns a list of the context&#39;s existing created nodes filtered by type.
Definition: XnCppWrapper.h:9106
XnStatus EnumerateActiveJoints(XnSkeletonJoint *pJoints, XnUInt16 &nJoints) const
Definition: XnCppWrapper.h:6534
XnStatus SetSmoothing(XnFloat fSmoothingFactor)
Changes the smoothing factor.
Definition: XnCppWrapper.h:6276
XN_C_API XnInt32 XN_C_DECL xnVersionCompare(const XnVersion *pVersion1, const XnVersion *pVersion2)
void UnregisterHandCallbacks(XnCallbackHandle hCallback)
Unregisters event handlers for the &#39;Hand Create&#39;, &#39;Hand Update&#39; and &#39;Hand Destroy&#39; events...
Definition: XnCppWrapper.h:6201
XN_C_API XnUInt32 XN_C_DECL xnGetSupportedMapOutputModesCount(XnNodeHandle hInstance)
Gets the number of supported modes. This is useful for allocating an array that will be passed to xnG...
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetPrevious(XnNodeInfoListIterator it)
Definition: XnCppWrapper.h:8433
xn::DepthMap & WritableDepthMap()
Definition: XnCppWrapper.h:871
XnUInt16 GetNumberOfUsers() const
Gets the number of users currently identified in the scene.
Definition: XnCppWrapper.h:7733
XnStatus SetData(const ImageMetaData &imageMD)
Definition: XnCppWrapper.h:5187
CroppingCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:4123
XnStatus SetData(const AudioMetaData &audioMD)
Definition: XnCppWrapper.h:8252
Context GetContext() const
Gets the node&#39;s context.
Definition: XnCppWrapper.h:9728
Definition: XnCppWrapper.h:4268
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJoint(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation *pJoint)
Get a specific joint&#39;s full information.
XnStatus GetSkeletonJointPosition(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointPosition &Joint) const
Gets the position of one of the skeleton joints in the most recently generated user data...
Definition: XnCppWrapper.h:6573
XnStatus SetMaxVersion(const XnVersion &maxVersion)
Sets in the Query object the maximum required version allowed for the node alternative.
Definition: XnCppWrapper.h:2042
XnStatus CreateMockNode(XnProductionNodeType type, const XnChar *strName, ProductionNode &mockNode)
Definition: XnCppWrapper.h:8865
#define XN_IS_STATUS_OK(x)
Definition: XnMacros.h:59
XnStatus AddGesture(const XnChar *strGesture, XnBoundingBox3D *pArea)
Activates the GestureGenerator node to start looking for the named gesture in the FOV...
Definition: XnCppWrapper.h:5419
#define FALSE
Definition: XnPlatform.h:89
Iterator Begin() const
Gets an iterator to the first item in an enumeration errors list.
Definition: XnCppWrapper.h:8532
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a UserGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9943
NodeWrapper(XnNodeHandle hNode)
Definition: XnCppWrapper.h:1637
XN_C_API XnStatus XN_C_DECL xnStopPoseDetection(XnNodeHandle hInstance, XnUserID user)
Stop detection of poses for a specific user.
XnStatus LockForChanges(XnLockHandle *phLock)
Definition: XnCppWrapper.h:2785
XN_C_API XnStatus XN_C_DECL xnRegisterToMirrorChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to mirror changes.
AudioMetaData()
Definition: XnCppWrapper.h:1377
XN_C_API XnStatus XN_C_DECL xnSetPowerLineFrequency(XnNodeHandle hGenerator, XnPowerLineFrequency nFrequency)
Sets the power line frequency: 50 Hz, 60 Hz, or 0 to turn off anti-flicker.
xn::RGB24Map & WritableRGB24Map()
Definition: XnCppWrapper.h:1160
#define XN_CAPABILITY_GAMMA
Definition: XnTypes.h:331
GeneralIntCapability GetFocusCap()
Definition: XnCppWrapper.h:4577
const XnChar * GetSupportedFormat() const
Definition: XnCppWrapper.h:3995
const XnYUV422DoublePixel *& YUV422Data()
Gets a pointer to the first pixel of the image in YUV422 format. YUV422 is a type of compression with...
Definition: XnCppWrapper.h:1106
XnStatus FrameSyncWith(Generator &other)
Activates frame synchronization with the other generator node.
Definition: XnCppWrapper.h:9764
XnStatus TellFrame(const XnChar *strNodeName, XnUInt32 &nFrame) const
Gets the current frame number of a specific node played by a player, i.e., the number of frames passe...
Definition: XnCppWrapper.h:3974
XN_C_API XnBool XN_C_DECL xnIsGestureAvailable(XnNodeHandle hInstance, const XnChar *strGesture)
Check if a specific gesture is available in this generator.
XnOutputMetaData * GetUnderlying()
Definition: XnCppWrapper.h:276
const UserPositionCapability GetUserPositionCap() const
Definition: XnCppWrapper.h:4866
XN_C_API XnStatus XN_C_DECL xnGetNodeErrorState(XnNodeHandle hInstance)
Gets current error state of this node.
XnStatus Error()
Returns the failure error code of the failing node the iterator points to. For a string representatio...
Definition: XnCppWrapper.h:8516
XN_C_API XnStatus XN_C_DECL xnEnumerateProductionTrees(XnContext *pContext, XnProductionNodeType Type, const XnNodeQuery *pQuery, XnNodeInfoList **ppTreesList, XnEnumerationErrors *pErrors)
Enumerates all available production trees for a specific node type. The trees populated in the list s...
GeneralIntCapability GetSaturationCap()
Definition: XnCppWrapper.h:4446
void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Error State Change&#39; event.
Definition: XnCppWrapper.h:2519
struct XnEnumerationErrors XnEnumerationErrors
Definition: XnTypes.h:216
#define XN_VALIDATE_ALLOC_PTR(x)
Definition: XnOS.h:131
XN_C_API void XN_C_DECL xnUnregisterFromPoseCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose events.
XnStatus RegisterToOutOfPose(PoseDetection handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Out Of Pose&#39; event.
Definition: XnCppWrapper.h:7358
XnStatus StopTracking(XnUserID user)
Stops tracking a skeleton.
Definition: XnCppWrapper.h:6783
Resolution(XnResolution res)
Definition: XnCppWrapper.h:9659
XN_C_API XnStatus XN_C_DECL xnRegisterToCalibrationInProgress(XnNodeHandle hInstance, XnCalibrationInProgress handler, void *pCookie, XnCallbackHandle *phCallback)
Register to calibration status while calibration is in progress.
XnStatus GetErrorState() const
Gets the current error state of the holding node.
Definition: XnCppWrapper.h:2493
const XnDepthMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:903
const XnDepthPixel * Data() const
Returns the depth map.
Definition: XnCppWrapper.h:843
void UnregisterFromNodeDestruction(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Node Destruction&#39; event. see Event: &#39;Node Destruction&#39;.
Definition: XnCppWrapper.h:9332
const XnUInt8 *& Data()
Definition: XnCppWrapper.h:287
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrating(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being calibrated.
xn::Grayscale16Map & WritableGrayscale16Map()
Definition: XnCppWrapper.h:1179
XN_C_API XnNodeInfo *XN_C_DECL xnGetNodeInfo(XnNodeHandle hNode)
Gets information about a specific node, like its description, and dependent nodes.
Definition: XnTypes.h:284
XN_C_API XnStatus XN_C_DECL xnCopyImageMetaData(XnImageMetaData *pDestination, const XnImageMetaData *pSource)
Shallow-Copies an Image Meta Data object. Note that the data buffer is not copied, and that both object will point to the same buffer.
XN_C_API XnUInt64 XN_C_DECL xnGetTimestamp(XnNodeHandle hInstance)
Gets the timestamp of current data, in microseconds.
const XnChar * GetSupportedFormat()
Definition: XnCppWrapper.h:8371
GeneralIntCapability GetBrightnessCap()
Definition: XnCppWrapper.h:4416
#define XN_CAPABILITY_SHARPNESS
Definition: XnTypes.h:330
XN_C_API XnStatus XN_C_DECL xnCreateDepthGenerator(XnContext *pContext, XnNodeHandle *phDepthGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a depth generator.
XN_C_API XnStatus XN_C_DECL xnCopySceneMetaData(XnSceneMetaData *pDestination, const XnSceneMetaData *pSource)
Shallow-Copies a Scene Meta Data object. Note that the data buffer is not copied, and that both objec...
XN_C_API XnStatus XN_C_DECL xnRegisterGestureCallbacks(XnNodeHandle hInstance, XnGestureRecognized RecognizedCB, XnGestureProgress ProgressCB, void *pCookie, XnCallbackHandle *phCallback)
Register to all gesture callbacks.
Definition: XnCppWrapper.h:7211
XnBool GetGlobalMirror()
Gets the current state of the GlobalMirror flag.
Definition: XnCppWrapper.h:9219
void Release()
Definition: XnCppWrapper.h:8925
XN_C_API XnUInt32 XN_C_DECL xnGetSupportedWaveOutputModesCount(XnNodeHandle hInstance)
XnNodeInfoList * GetUnderlyingObject() const
Definition: XnCppWrapper.h:2279
XnUInt32 XnLockHandle
Definition: XnTypes.h:89
void(* XnFreeHandler)(const void *pData)
Definition: XnTypes.h:244
XN_C_API const void *XN_C_DECL xnGetData(XnNodeHandle hInstance)
Gets the current data.
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9866
XnStatus GetNumFrames(const XnChar *strNodeName, XnUInt32 &nFrames) const
Gets the total number of frames a specific node has in the recording.
Definition: XnCppWrapper.h:3986
XnStatus AddSupportedMapOutputMode(const XnMapOutputMode &MapOutputMode)
Sets in the Query object a MapOutput mode that the Node Alternative must support. ...
Definition: XnCppWrapper.h:2082
const MirrorCapability GetMirrorCap() const
Gets a MirrorCapability object for accessing Mirror functionality.
Definition: XnCppWrapper.h:3584
XN_C_API void XN_C_DECL xnUnregisterFromNewDataAvailable(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNewDataAvailable().
XnStatus StopTrackingAll()
Stops tracking all existing hands.
Definition: XnCppWrapper.h:6234
XnIRMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1355
#define XN_CAPABILITY_SATURATION
Definition: XnTypes.h:329
XnBool operator!=(const Iterator &other) const
Definition: XnCppWrapper.h:8478
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsToString(const XnEnumerationErrors *pErrors, XnChar *csBuffer, XnUInt32 nSize)
Definition: XnTypes.h:117
XN_C_API XnStatus XN_C_DECL xnGetAllAvailablePoses(XnNodeHandle hInstance, XnChar **pstrPoses, XnUInt32 nNameLength, XnUInt32 *pnPoses)
Get the names of the supported poses.
XN_C_API XnStatus XN_C_DECL xnRegisterToCroppingChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to cropping changes.
GeneralIntCapability GetAutoExposureCap()
Definition: XnCppWrapper.h:4556
Definition: XnTypes.h:516
XnStatus LoadScriptFromFile(const XnChar *strFileName)
Loads an XML script file into the ScriptNode object.
Definition: XnCppWrapper.h:8381
XN_C_API void XN_C_DECL xnUnregisterFromMapOutputModeChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToMapOutputModeChange.
XnUInt32 & FullYRes()
Definition: XnCppWrapper.h:490
XN_C_API XnStatus XN_C_DECL xnMockIRSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel *pData)
GeneralIntCapability GetGeneralIntCap(const XnChar *strCapability)
Gets an GeneralIntCapability object for accessing the capability functionality.
Definition: XnCppWrapper.h:2854
const XnDepthPixel & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:882
XnStatus SeekToFrame(const XnChar *strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin)
Moves the player to a specific frame of a specific played node, e.g., an ImageGenerator node...
Definition: XnCppWrapper.h:3947
AntiFlickerCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:4198
XN_C_API XnStatus XN_C_DECL xnSaveSkeletonCalibrationData(XnNodeHandle hInstance, XnUserID user, XnUInt32 nSlot)
Save the calibration data.
XnStatus DecodeData(const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten) const
Definition: XnCppWrapper.h:8319
GeneralIntCapability GetTiltCap()
Definition: XnCppWrapper.h:4516
Definition: XnTypes.h:164
const XnDepthPixel & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:894
Definition: XnCppWrapper.h:1215
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnUInt8 *pExternalBuffer)
Definition: XnCppWrapper.h:567
void UnregisterFromOutOfPose(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Out Of Pose&#39; event.
Definition: XnCppWrapper.h:7395
XnStatus ReadNext()
Definition: XnCppWrapper.h:3889
XnUInt8 * WritableData()
Definition: XnCppWrapper.h:292
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:1038
MockImageGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5140
const XnUChar * GetAudioBuffer() const
Definition: XnCppWrapper.h:8110
XnStatus ResetViewPoint()
Sets the viewpoint of the holding generator node to its normal viewpoint.
Definition: XnCppWrapper.h:3142
XnStatus CopyFrom(const DepthMetaData &other)
Definition: XnCppWrapper.h:802
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:1270
ErrorStateCapability GetErrorStateCap()
Gets an xn::ErrorStateCapability object for accessing the functionality of the Error State capability...
Definition: XnCppWrapper.h:2838
XN_C_API void XN_C_DECL xnNodeQueryFree(XnNodeQuery *pQuery)
#define XN_REFERENCE_VARIABLE(x)
Definition: XnMacros.h:124
HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap()
Definition: XnCppWrapper.h:6300
XN_C_API XnStatus XN_C_DECL xnRegisterToMapOutputModeChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to mode changes.
PoseDetectionCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:7220
Definition: XnCppWrapper.h:3018
XnBool CanFrameSyncWith(Generator &other) const
Returns whether the generator node holding this capability can synchronize frames with the other spec...
Definition: XnCppWrapper.h:9759
XnStatus GetVendorSpecificData(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the vendor-specific name of the device holding this capability object.
Definition: XnCppWrapper.h:2903
XN_C_API XnStatus XN_C_DECL xnRegisterToUserPositionChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to user position changes.
void Free()
Definition: XnCppWrapper.h:8561
Definition: XnCppWrapper.h:2479
Map< XnIRPixel > IRMap
Definition: XnCppWrapper.h:716
XnBool IsJointActive(XnSkeletonJoint eJoint) const
Checks if a specific joint is tracked or not.
Definition: XnCppWrapper.h:6499
XN_C_API XnStatus XN_C_DECL xnGetDepthFieldOfView(XnNodeHandle hInstance, XnFieldOfView *pFOV)
Gets the Field-Of-View of the depth generator, in radians.
bool operator<(const Version &other) const
Definition: XnCppWrapper.h:138
XnStatus RemoveGesture(const XnChar *strGesture)
Disables the GestureGenerator from looking for the named gesture in the FOV. It does this by removing...
Definition: XnCppWrapper.h:5431
XN_C_API XnStatus XN_C_DECL xnCreateSceneAnalyzer(XnContext *pContext, XnNodeHandle *phSceneAnalyzer, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an scene analyzer.
XnStatus StopTracking(XnUserID user)
Stops tracking an existing hand that you are no longer interested in.
Definition: XnCppWrapper.h:6221
Iterator & operator++()
Definition: XnCppWrapper.h:2186
ImageGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4974
XnPlayerSeekOrigin
Definition: XnTypes.h:534
XN_C_API XnStatus XN_C_DECL xnRegisterToNewDataAvailable(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to be called when new data is available.
XnBool IsGestureAvailable(const XnChar *strGesture) const
Returns whether a specific gesture is available in this generator node.
Definition: XnCppWrapper.h:5476
Iterator Begin() const
Definition: XnCppWrapper.h:2336
XnStatus Append(NodeInfoList &other)
Definition: XnCppWrapper.h:2392
XnStatus Record()
Records one frame of data from each node that was added to the recorder with AddNodeToRecording().
Definition: XnCppWrapper.h:3789
XN_C_API void XN_C_DECL xnUnregisterFromWaveOutputModeChanges(XnNodeHandle hInstance, XnCallbackHandle hCallback)
XN_C_API XnStatus XN_C_DECL xnSetPlaybackSpeed(XnNodeHandle hInstance, XnDouble dSpeed)
Sets the playback speed, as a ratio of the time passed in the recording. A value of 1...
XnUInt32 & YOffset()
Definition: XnCppWrapper.h:468
XN_C_API XnStatus XN_C_DECL xnCreateCodec(XnContext *pContext, XnCodecID codecID, XnNodeHandle hInitializerNode, XnNodeHandle *phCodec)
XN_C_API XnStatus XN_C_DECL xnGetPlayerNumFrames(XnNodeHandle hPlayer, const XnChar *strNodeName, XnUInt32 *pnFrames)
Retrieves the number of frames of a specific node played by a player.
#define XN_STATUS_OK
Definition: XnStatus.h:36
void UnregisterFromGestureChange(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Gesture Change&#39; event.
Definition: XnCppWrapper.h:5609
XnUInt32 DataSize() const
Returns the size, in bytes, of the data of the frame object saved in this object. ...
Definition: XnCppWrapper.h:245
XN_C_API void XN_C_DECL xnUnregisterFromViewPointChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToViewPointChange().
XnVersion * GetUnderlying()
Definition: XnCppWrapper.h:173
CroppingCapability GetCroppingCap()
Gets a CroppingCapability object for accessing Cropping functionality.
Definition: XnCppWrapper.h:4406
XN_C_API XnStatus XN_C_DECL xnRegisterToGestureReadyForNextIntermediateStage(XnNodeHandle hInstance, XnGestureReadyForNextIntermediateStage handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when a gesture is ready for its next stage (specific to the gesture)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetExistingNodeOnly(XnNodeQuery *pQuery, XnBool bExistingNode)
XN_C_API XnStatus XN_C_DECL xnCreateProductionTree(XnContext *pContext, XnNodeInfo *pTree, XnNodeHandle *phNode)
Creates a production node. If the tree specifies additional needed nodes, and those nodes do not exis...
XN_C_API XnBool XN_C_DECL xnIsPoseSupported(XnNodeHandle hInstance, const XnChar *strPose)
Tests if a pose is supported.
XnStatus AddSupportedCapability(const XnChar *strNeededCapability)
Sets in the Query object a capability that the Node Alternative must support.
Definition: XnCppWrapper.h:2067
XN_C_API XnStatus XN_C_DECL xnScriptNodeRun(XnNodeHandle hScript, XnEnumerationErrors *pErrors)
Device(const NodeWrapper &other)
Definition: XnCppWrapper.h:2940
const XnChar * GetName() const
Definition: XnCppWrapper.h:9706
void UnregisterFromFieldOfViewChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Field-Of-View Change&#39; event.
Definition: XnCppWrapper.h:4828
XN_C_API void XN_C_DECL xnProductionNodeRelease(XnNodeHandle hNode)
Unreference a production node, decreasing its reference count by 1. If the reference count reaches ze...
void UnregisterUserCallbacks(XnCallbackHandle hCallback)
Unregisters event handlers for the &#39;New User&#39; and &#39;Lost User&#39; events.
Definition: XnCppWrapper.h:7848
XN_C_API XnBool XN_C_DECL xnIsGenerating(XnNodeHandle hInstance)
Checks if this node is currently generating.
XnStatus EnumerateLicenses(XnLicense *&aLicenses, XnUInt32 &nCount) const
Definition: XnCppWrapper.h:8944
~EnumerationErrors()
Definition: XnCppWrapper.h:8453
Definition: XnCppWrapper.h:608
Definition: XnTypes.h:153
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsAllocate(XnEnumerationErrors **ppErrors)
GeneralIntCapability(const NodeWrapper &node, const XnChar *strCap)
Definition: XnCppWrapper.h:2540
XN_C_API XnStatus XN_C_DECL xnGetMapOutputMode(XnNodeHandle hInstance, XnMapOutputMode *pOutputMode)
Gets the current output mode.
MockIRGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5262
void UnregisterFromJointConfigurationChange(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Joint Configuration Change&#39; event.
Definition: XnCppWrapper.h:6525
XnContext * GetUnderlyingObject() const
Definition: XnCppWrapper.h:8698
XN_C_API XnStatus XN_C_DECL xnMockDepthSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel *pData)
XnUInt32 & DataSize()
Returns the size, in bytes, of the data of the frame object saved in this object. ...
Definition: XnCppWrapper.h:255
XN_C_API void XN_C_DECL xnUnregisterFromUserReEnter(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a user re-enters the scene.
Definition: XnCppWrapper.h:10026
XnUInt16 BitsPerSample() const
Gets the number of bits per channel in a sample. This is a packet configuration setting associated wi...
Definition: XnCppWrapper.h:1418
const XnYUV422DoublePixel * YUV422Data() const
Gets a pointer to the first pixel of the image in YUV422 format. YUV422 is a type of compression with...
Definition: XnCppWrapper.h:1100
XnDepthPixel ZRes() const
Definition: XnCppWrapper.h:823
Definition: XnCppWrapper.h:753
GeneralIntCapability GetExposureCap()
Definition: XnCppWrapper.h:4546
void SetHandle(XnNodeHandle hNode)
Definition: XnCppWrapper.h:1725
XnUInt8 XnGrayscale8Pixel
Definition: XnTypes.h:301
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9837
XnRecordMedium
Definition: XnTypes.h:835
XnStatus StopGeneratingAll()
Ensures all generator nodes are not generating data.
Definition: XnCppWrapper.h:9196
XnStatus RegisterToMirrorChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Mirror Change&#39; event.
Definition: XnCppWrapper.h:3052
Definition: XnTypes.h:1166
XnStatus GetUserPosition(XnUInt32 nIndex, XnBoundingBox3D &Position) const
Definition: XnCppWrapper.h:4644
Codec(const NodeWrapper &other)
Definition: XnCppWrapper.h:8289
XnStatus UnregisterFromCalibrationStart(XnCallbackHandle hCallback)
Unregisters a handler from the &#39;Calibration Start&#39; event.
Definition: XnCppWrapper.h:6928
Definition: XnCppWrapper.h:8280
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsGetCurrentError(XnEnumerationErrorsIterator it)
GeneralIntCapability GetContrastCap()
Definition: XnCppWrapper.h:4426
XnStatus Reset(XnUserID user)
Discards a skeleton&#39;s calibration.
Definition: XnCppWrapper.h:6796
XnBool IsJointAvailable(XnSkeletonJoint eJoint) const
Returns whether a specific skeleton joint is supported by the SkeletonCapability object.
Definition: XnCppWrapper.h:6416
XnEnumerationErrors * GetUnderlying()
Definition: XnCppWrapper.h:8574
XN_C_API XnStatus XN_C_DECL xnStopTrackingAll(XnNodeHandle hInstance)
Stop tracking all hands.
#define XN_CAPABILITY_EXPOSURE
Definition: XnTypes.h:339
MirrorCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:3021
Iterator End() const
Returns an iterator referring to the past-the-end element in an enumeration errors list...
Definition: XnCppWrapper.h:8542
XnPoseDetectionStatus
Definition: XnTypes.h:666
XN_C_API XnStatus XN_C_DECL xnContextOpenFileRecording(XnContext *pContext, const XnChar *strFileName)
Opens a recording file, adding all nodes in it to the context. NOTE: when using this function...
XN_C_API XnStatus XN_C_DECL xnRegisterToPoseCallbacks(XnNodeHandle hInstance, XnPoseDetectionCallback PoseDetectionStartCB, XnPoseDetectionCallback PoseDetectionEndCB, void *pCookie, XnCallbackHandle *phCallback)
Register to callbacks for pose events.
XN_C_API XnPowerLineFrequency XN_C_DECL xnGetPowerLineFrequency(XnNodeHandle hGenerator)
Gets the power line frequency.
DeviceIdentificationCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:2878
XN_C_API XnUInt16 XN_C_DECL xnGetNumberOfUsers(XnNodeHandle hInstance)
Get current number of users.
XnUInt16 Maintenance() const
Definition: XnCppWrapper.h:164
#define XN_CAPABILITY_AUTO_EXPOSURE
Definition: XnTypes.h:340
#define XN_CAPABILITY_COLOR_TEMPERATURE
Definition: XnTypes.h:332
XN_C_API XnStatus XN_C_DECL xnInitFromXmlFileEx(const XnChar *strFileName, XnContext **ppContext, XnEnumerationErrors *pErrors, XnNodeHandle *phScriptNode)
Initializes OpenNI context, and then configures it using the given file.
XnUInt16 XnGrayscale16Pixel
Definition: XnTypes.h:304
XnMapMetaData * GetUnderlying()
Definition: XnCppWrapper.h:513
xn::Grayscale8Map & WritableGrayscale8Map()
Definition: XnCppWrapper.h:1169
Definition: XnTypes.h:194
XN_C_API void XN_C_DECL xnUnregisterFromGenerationRunningChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToGenerationRunningChange().
XN_C_API XnStatus XN_C_DECL xnGetSkeletonCalibrationPose(XnNodeHandle hInstance, XnChar *strPose)
Get the pose that is required for calibration.
XN_C_API void XN_C_DECL xnGetDepthMetaData(XnNodeHandle hInstance, XnDepthMetaData *pMetaData)
Gets the current depth-map meta data.
const XnRGB24Pixel * GetRGB24ImageMap() const
Definition: XnCppWrapper.h:5008
XN_C_API void XN_C_DECL xnUnregisterFromCroppingChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToCroppingChange().
XN_C_API XnStatus XN_C_DECL xnStopSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Stop tracking a skeleton.
const xn::LabelMap & LabelMap() const
Definition: XnCppWrapper.h:1546
XnStatus AllocateData(XnUInt32 nBytes)
Allocates a writable buffer. If a previous buffer was allocated it will be freed (or reused if possib...
Definition: XnCppWrapper.h:306
XN_C_API XnDepthPixel *XN_C_DECL xnGetDepthMap(XnNodeHandle hInstance)
Gets the current depth-map. This map is updated after a call to xnWaitAndUpdateData().
bool operator>(const Version &other) const
Definition: XnCppWrapper.h:146
XN_C_API XnStatus XN_C_DECL xnRegisterToCalibrationStart(XnNodeHandle hInstance, XnCalibrationStart handler, void *pCookie, XnCallbackHandle *phCallback)
Register to calibration start callback.
AntiFlickerCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:4197
XnStatus Set(XnInt32 nValue)
Definition: XnCppWrapper.h:2566
XnStatus RegisterToUserExit(UserHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;User Exit&#39; event.
Definition: XnCppWrapper.h:7926
~Context()
Definition: XnCppWrapper.h:8684
XnUInt16 & BitsPerSample()
Gets the number of bits per channel in a sample. This is a packet configuration setting associated wi...
Definition: XnCppWrapper.h:1422
const XnGrayscale8Pixel *& Grayscale8Data()
Gets a pointer to the first pixel of the image in Grayscale8 format. Grayscale8 represents each pixel...
Definition: XnCppWrapper.h:1121
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pImageMap)
Definition: XnCppWrapper.h:5164
XN_C_API XnStatus XN_C_DECL xnWaitOneUpdateAll(XnContext *pContext, XnNodeHandle hNode)
Updates all generators nodes in the context, waiting for a specific one to have new data...
XnStatus RegisterToHandTouchingFOVEdge(HandTouchingFOVEdge handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Hand Touching FOV Edge&#39; event.
Definition: XnCppWrapper.h:5948
XnStatus AbortCalibration(XnUserID user)
Aborts an existing calibration process currently being executed for a specified user.
Definition: XnCppWrapper.h:6674
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void *pData)
Definition: XnCppWrapper.h:8269
XnUInt64 & Timestamp()
Definition: XnCppWrapper.h:223
XnDepthPixel * WritableData()
Definition: XnCppWrapper.h:862
AlternativeViewPointCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:3106
XnStatus SetData(const DepthMetaData &depthMD)
Definition: XnCppWrapper.h:4941
~NodeInfo()
Definition: XnCppWrapper.h:1827
XN_C_API XnStatus XN_C_DECL xnAddNeededNode(XnNodeHandle hInstance, XnNodeHandle hNeededNode)
Adds another node to the list of needed nodes for this node.
XN_C_API XnStatus XN_C_DECL xnSetGlobalMirror(XnContext *pContext, XnBool bMirror)
Sets the global mirror flag. This will set all current existing nodes&#39; mirror state, and also affect future created nodes. The default mirror flag is FALSE.
const ErrorStateCapability GetErrorStateCap() const
Gets an xn::ErrorStateCapability object for accessing the functionality of the Error State capability...
Definition: XnCppWrapper.h:2825
XnStatus RegisterToWaveOutputModeChanges(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Wave Output Mode Change&#39; event.
Definition: XnCppWrapper.h:8175
XnBool IsCalibrationData(XnUInt32 nSlot) const
Returns whether a specific slot already holds calibration data.
Definition: XnCppWrapper.h:6755
XN_C_API XnStatus XN_C_DECL xnFindExistingRefNodeByType(XnContext *pContext, XnProductionNodeType type, XnNodeHandle *phNode)
Returns the first found existing node of the specified type.
XN_C_API XnStatus XN_C_DECL xnLockedNodeEndChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Ends changes request on a locked node.
XnUInt8 & Major()
Definition: XnCppWrapper.h:167
Map(_pixelType *&pData, XnUInt32 &nXRes, XnUInt32 &nYRes)
Definition: XnCppWrapper.h:611
XnStatus RemoveNodeFromRecording(ProductionNode &Node)
Removes a node from the Recorder node and stops recording the node output. This function is called on...
Definition: XnCppWrapper.h:3772
XN_C_API XnStatus XN_C_DECL xnTellPlayerFrame(XnNodeHandle hPlayer, const XnChar *strNodeName, XnUInt32 *pnFrame)
Reports the current frame number of a specific node played by a player.
XN_C_API XnStatus XN_C_DECL xnGetAvailablePoses(XnNodeHandle hInstance, XnChar **pstrPoses, XnUInt32 *pnPoses)
Get the names of the supported poses.
XN_C_API XnStatus XN_C_DECL xnAddGesture(XnNodeHandle hInstance, const XnChar *strGesture, XnBoundingBox3D *pArea)
Turn on gesture. The generator will now look for this gesture.
Definition: XnCppWrapper.h:5916
XnStatus GetSource(XnRecordMedium &sourceType, XnChar *strSource, XnUInt32 nBufSize) const
Gets the player&#39;s source, that is, the type and name of the medium that the recording is played back ...
Definition: XnCppWrapper.h:3880
XnPowerLineFrequency
Definition: XnTypes.h:541
XnStatus InitFrom(const SceneMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer)
Definition: XnCppWrapper.h:1482
XnUInt32 & YRes()
Definition: XnCppWrapper.h:430
XnStatus ToString(XnChar *csBuffer, XnUInt32 nSize)
Returns a string representation of the Enumeration Errors object. The string contains a full list of ...
Definition: XnCppWrapper.h:8552
XnStatus SetPowerLineFrequency(XnPowerLineFrequency nFrequency)
Definition: XnCppWrapper.h:4204
GeneralIntCapability GetWhiteBalanceCap()
Definition: XnCppWrapper.h:4476
XN_C_API XnBool XN_C_DECL xnIsViewPointAs(XnNodeHandle hInstance, XnNodeHandle hOther)
Checks if current view point is as if coming from the other node view point.
XN_C_API XnYUV422DoublePixel *XN_C_DECL xnGetYUV422ImageMap(XnNodeHandle hInstance)
Gets the current YUV422 image-map. This map is updated after a call to xnWaitAndUpdateData(). It is assumed that the node is currently in YUV422 pixel format.
XnBool & IsDataNew()
Definition: XnCppWrapper.h:267
SkeletonCapability GetSkeletonCap()
Gets a SkeletonCapability object for accessing Skeleton functionality.
Definition: XnCppWrapper.h:7882
#define XN_CAPABILITY_FOCUS
Definition: XnTypes.h:342
XN_C_API XnStatus XN_C_DECL xnStopGeneratingAll(XnContext *pContext)
Stop all generators from generating data.
XN_C_API XnBool XN_C_DECL xnIsMirrored(XnNodeHandle hInstance)
Gets current mirroring configuration.
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a HandsGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9934
XnBool IsGenerating() const
Returns whether the node is currently in Generating state.
Definition: XnCppWrapper.h:3378
XN_C_API XnStatus XN_C_DECL xnGetUserCoM(XnNodeHandle hInstance, XnUserID user, XnPoint3D *pCoM)
Get the center of mass of a user.
XN_C_API XnStatus XN_C_DECL xnAddLicense(XnContext *pContext, const XnLicense *pLicense)
XN_C_API XnUInt32 XN_C_DECL xnGetSupportedUserPositionsCount(XnNodeHandle hInstance)
Gets the number of user positions supported by this generator.
XnStatus StartPoseDetection(const XnChar *strPose, XnUserID user)
Starts attempting to detect a pose for a specific user.
Definition: XnCppWrapper.h:7293
#define XN_VALIDATE_NEW(ptr, type,...)
Definition: XnOS.h:171
XnStatus RegisterToCroppingChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Cropping Change&#39; event.
Definition: XnCppWrapper.h:4163
Definition: XnTypes.h:592
MockIRGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5263
XN_C_API XnUInt16 XN_C_DECL xnGetNumberOfAvailableGestures(XnNodeHandle hInstance)
Get the number of all gestures available.
XnBool operator==(const NodeWrapper &other)
Definition: XnCppWrapper.h:1670
XN_C_API XnStatus xnContextRunXmlScriptFromFile(XnContext *pContext, const XnChar *strFileName, XnEnumerationErrors *pErrors)
Runs an XML script in the given context. NOTE: when using this function, the context will be the owne...
XnPixelFormat GetPixelFormat() const
Gets the current pixel color format. This is the format set using xn::ImageGenerator node::SetPixelFo...
Definition: XnCppWrapper.h:5096
XnStatus StartGeneratingAll()
Ensures all created generator nodes are generating data.
Definition: XnCppWrapper.h:9188
HandsGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:6097
AudioGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:8074
XnStatus SetMirror(XnBool bMirror)
Sets the current mirror configuration of the holder node, enabling or disabling mirroring. This configuration is used for generating the next frame.
Definition: XnCppWrapper.h:3030
XN_C_API XnRGB24Pixel *XN_C_DECL xnGetRGB24ImageMap(XnNodeHandle hInstance)
Gets the current RGB24 image-map. This map is updated after a call to xnWaitAndUpdateData(). It is assumed that the node is currently in RGB24 pixel format.
XN_C_API void XN_C_DECL xnUnregisterHandCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from hands callbacks.
XN_C_API XnStatus XN_C_DECL xnSetPlayerRepeat(XnNodeHandle hPlayer, XnBool bRepeat)
Determines whether the player will automatically rewind to the beginning of the recording when reachi...
void SetHandle(XnContext *pContext)
Definition: XnCppWrapper.h:9489
Definition: XnTypes.h:489
XnUInt32 GetDataSize() const
Gets the data size of the frame data. This method gets the data size directly from the Generator node...
Definition: XnCppWrapper.h:3536
XnStatus SetSupportedMinUserPositions(const XnUInt32 nCount)
Definition: XnCppWrapper.h:2091
MockAudioGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8205
const XnAudioMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1427
XnStatus Create(Context &context, XnCodecID codecID, ProductionNode &initializerNode)
Definition: XnCppWrapper.h:9990
XN_C_API XnStatus XN_C_DECL xnConvertProjectiveToRealWorld(XnNodeHandle hInstance, XnUInt32 nCount, const XnPoint3D *aProjective, XnPoint3D *aRealWorld)
Converts a list of points from projective coordinates to real world coordinates.
const void * GetData()
Gets the frame data from the generator node. This is the latest data that the generator node has gene...
Definition: XnCppWrapper.h:3518
XnUInt32 FPS() const
Definition: XnCppWrapper.h:495
XN_C_API XnStatus XN_C_DECL xnRegisterToGlobalErrorStateChange(XnContext *pContext, XnErrorStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to global error state changes.
XN_C_API XnStatus XN_C_DECL xnSetCropping(XnNodeHandle hInstance, const XnCropping *pCropping)
Sets the cropping.
XnBool IsMirrored() const
Gets the current mirroring configuration of the holder node. This configuration is used for generatin...
Definition: XnCppWrapper.h:3038
XN_C_API void XN_C_DECL xnContextUnregisterFromShutdown(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters from context shutting down event. This function is used for backwards compatibility and s...
XN_C_API XnStatus XN_C_DECL xnRegisterToWaveOutputModeChanges(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
XN_C_API XnStatus XN_C_DECL xnRegisterToNodeErrorStateChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to error state changes.
NodeInfoList & GetNeededNodes() const
Definition: XnCppWrapper.h:9736
XnStatus GetDeviceName(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the name of the device holding this capability object.
Definition: XnCppWrapper.h:2889
XN_C_API const XnProductionNodeDescription *XN_C_DECL xnEnumerationErrorsGetCurrentDescription(XnEnumerationErrorsIterator it)
XN_C_API const XnChar *XN_C_DECL xnGetPlayerSupportedFormat(XnNodeHandle hPlayer)
Gets the name of the format supported by a player.
XnNodeQuery * GetUnderlyingObject()
Definition: XnCppWrapper.h:1999
XN_C_API XnStatus XN_C_DECL xnSetUserPosition(XnNodeHandle hInstance, XnUInt32 nIndex, const XnBoundingBox3D *pPosition)
Sets the current user position.
XN_C_API void XN_C_DECL xnGetIRMetaData(XnNodeHandle hInstance, XnIRMetaData *pMetaData)
Gets the current IR-map meta data.
XnUInt32 & XOffset()
Definition: XnCppWrapper.h:449
XnUInt32 XnStatus
Definition: XnStatus.h:33
XN_C_API XnBool XN_C_DECL xnIsNewDataAvailable(XnNodeHandle hInstance, XnUInt64 *pnTimestamp)
Checks whether this node has new data (and so a call to xnWaitAndUpdateData() will not block)...
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a DepthGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9828
XN_C_API XnStatus XN_C_DECL xnRegisterToJointConfigurationChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Register to joint configuration changes - when joints are activated and deactivated.
Definition: XnCppWrapper.h:7692
void UnregisterFromValueChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Value Change&#39; event.
Definition: XnCppWrapper.h:10119
XnDepthPixel GetDeviceMaxDepth() const
Gets the maximum depth value that the DepthGenerator node can generate. The maximum depth value is a ...
Definition: XnCppWrapper.h:4779
XnUInt8 & Minor()
Definition: XnCppWrapper.h:168
void UnregisterFromUserExit(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;User Exit&#39; event.
Definition: XnCppWrapper.h:7954
XN_C_API XnBool XN_C_DECL xnNodeInfoListIsEmpty(XnNodeInfoList *pList)
XnStatus StartTracking(const XnPoint3D &ptPosition)
Starts tracking at the specific position where the application expects a hand.
Definition: XnCppWrapper.h:6255
xn::ImageMap & WritableImageMap()
Definition: XnCppWrapper.h:1149
XnPixelFormat & PixelFormatImpl()
Definition: XnCppWrapper.h:589
XN_C_API XnStatus XN_C_DECL xnRemoveNodeFromRecording(XnNodeHandle hRecorder, XnNodeHandle hNode)
Removes node from recording and stop recording it. This function can be called on a node that was add...
XN_C_API XnBool XN_C_DECL xnNodeInfoListIteratorIsValid(XnNodeInfoListIterator it)
XN_C_API XnStatus XN_C_DECL xnAbortSkeletonCalibration(XnNodeHandle hInstance, XnUserID user)
stop calibration
XnStatus RegisterToValueChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Value Change&#39; event.
Definition: XnCppWrapper.h:10100
Map< XnUInt8 > ImageMap
Definition: XnCppWrapper.h:708
PoseDetectionCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:7219
const HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap() const
Definition: XnCppWrapper.h:6288
Iterator REnd() const
Definition: XnCppWrapper.h:2364
const xn::RGB24Map & RGB24Map() const
Gets a light wrapper object for wrapping the image map as RGB24 format. RGB24 format represents each ...
Definition: XnCppWrapper.h:1156
const _pixelType & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:643
XN_C_API XnStatus XN_C_DECL xnLoadSkeletonCalibrationDataFromFile(XnNodeHandle hInstance, XnUserID user, const XnChar *strFileName)
Load previously saved calibration data from file.
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAppend(XnNodeInfoList *pList, XnNodeInfoList *pOther)
Definition: XnTypes.h:519
XnStatus GetGeneralProperty(const XnChar *strName, XnUInt32 nBufferSize, void *pBuffer) const
Definition: XnCppWrapper.h:2776
const AlternativeViewPointCapability GetAlternativeViewPointCap() const
Definition: XnCppWrapper.h:3612
FrameSyncCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:3227
void InitFrom(const AudioMetaData &other)
Shallow-Copies an AudioMetaData object.
Definition: XnCppWrapper.h:1392
XN_C_API void XN_C_DECL xnOSFreeAligned(const void *pMemBlock)
Definition: XnCppWrapper.h:945
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9981
UserPositionCapability GetUserPositionCap()
Definition: XnCppWrapper.h:4876
XnStatus Create(Context &context, const XnChar *strFormatName)
Creates a player node.
Definition: XnCppWrapper.h:9819
XnStatus RegisterToPowerLineFrequencyChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Power Line Frequency Change&#39; event.
Definition: XnCppWrapper.h:4227
StateChangedCallbackTranslator(StateChangedHandler handler, void *pCookie)
Definition: XnCppWrapper.h:10029
XnStatus ConvertRealWorldToProjective(XnUInt32 nCount, const XnPoint3D aRealWorld[], XnPoint3D aProjective[]) const
Converts a list of points from real world coordinates to projective coordinates.
Definition: XnCppWrapper.h:4856
MirrorCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:3022
XnUInt32 GetXResolution() const
Definition: XnCppWrapper.h:9698
const SkeletonCapability GetSkeletonCap() const
Gets a SkeletonCapability object for accessing Skeleton functionality.
Definition: XnCppWrapper.h:7866
XN_C_API void XN_C_DECL xnEnumerationErrorsFree(const XnEnumerationErrors *pErrors)
XnStatus RegisterToPixelFormatChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Pixel Format Change&#39; event.
Definition: XnCppWrapper.h:5110
#define XN_CAPABILITY_LOW_LIGHT_COMPENSATION
Definition: XnTypes.h:343
XnStatus LockedNodeStartChanges(XnLockHandle hLock)
Definition: XnCppWrapper.h:2803
~NodeWrapper()
Definition: XnCppWrapper.h:1653
NodeInfo operator*()
Definition: XnCppWrapper.h:2225
XN_C_API XnStatus XN_C_DECL xnGetPixelCoordinatesInViewPoint(XnNodeHandle hInstance, XnNodeHandle hOther, XnUInt32 x, XnUInt32 y, XnUInt32 *pAltX, XnUInt32 *pAltY)
Gets a single pixel coordinates in an alternative view point. This method uses current frame data...
XN_C_API XnStatus XN_C_DECL xnNodeQueryFilterList(XnContext *pContext, const XnNodeQuery *pQuery, XnNodeInfoList *pList)
_pixelType & operator[](XnUInt32 nIndex)
Definition: XnCppWrapper.h:659
XN_C_API void XN_C_DECL xnUnregisterFromGestureChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when gestures are added or removed.
XN_C_API XnStatus XN_C_DECL xnRegisterToDepthFieldOfViewChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to field of view changes.
Definition: XnTypes.h:603
XnBool operator==(const Iterator &other) const
Definition: XnCppWrapper.h:2166
UserGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:7700
XN_C_API XnStatus XN_C_DECL xnGetIntProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt64 *pnValue)
Gets an integer property.
Iterator operator--(int)
Definition: XnCppWrapper.h:2215
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates and initializes an ImageGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9857
XnStatus SetIntProperty(const XnChar *strName, XnUInt64 nValue)
Definition: XnCppWrapper.h:2713
XN_C_API XnStatus XN_C_DECL xnGetSupportedMapOutputModes(XnNodeHandle hInstance, XnMapOutputMode *aModes, XnUInt32 *pnCount)
Gets a list of all supported modes. The size of the array that should be passed can be obtained by ca...
XN_C_API XnStatus XN_C_DECL xnRegisterToPoseDetectionInProgress(XnNodeHandle hInstance, XnPoseDetectionInProgress handler, void *pCookie, XnCallbackHandle *phCallback)
Register to callback for status when pose is detected.
void GetMetaData(AudioMetaData &metaData) const
Gets the audio generator node&#39;s latest frame object, saving it in the xn::AudioMetaData object...
Definition: XnCppWrapper.h:8101
XnUInt32 & FrameID()
Definition: XnCppWrapper.h:235
XN_C_API XnBool XN_C_DECL xnIsFrameSyncedWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Checks if current view point is as if coming from the other node view point.
XnStatus LoadCalibrationData(XnUserID user, XnUInt32 nSlot)
Loads calibration data of a specified user. The calibration data includes the lengths of the human us...
Definition: XnCppWrapper.h:6735
XN_C_API XnStatus XN_C_DECL xnStopGenerating(XnNodeHandle hInstance)
Stops generation of the output.
XnStatus GetCoM(XnUserID user, XnPoint3D &com) const
Gets the position of a user&#39;s center of mass. This is the single point for representing the user...
Definition: XnCppWrapper.h:7784
XN_C_API XnStatus XN_C_DECL xnNodeInfoSetInstanceName(XnNodeInfo *pNodeInfo, const XnChar *strInstanceName)
Definition: XnCppWrapper.h:5844
XnStatus ConvertProjectiveToRealWorld(XnUInt32 nCount, const XnPoint3D aProjective[], XnPoint3D aRealWorld[]) const
Converts a list of points from projective coordinates to real world coordinates.
Definition: XnCppWrapper.h:4842
XN_C_API XnPixelFormat XN_C_DECL xnGetPixelFormat(XnNodeHandle hInstance)
Gets current pixel format.
const XnUInt8 * GetImageMap() const
Definition: XnCppWrapper.h:5044
Definition: XnTypes.h:1134
XnUInt16 XnDepthPixel
Definition: XnTypes.h:278
XnUInt64 Timestamp() const
Definition: XnCppWrapper.h:218
XnStatus Register(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
Definition: XnCppWrapper.h:10031
XN_C_API void XN_C_DECL xnUnregisterGestureCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from gesture callbacks.
XN_C_API XnStatus XN_C_DECL xnContextAddRef(XnContext *pContext)
Adds a reference to the context object.
XnStatus GetPixelCoordinatesInViewPoint(ProductionNode &other, XnUInt32 x, XnUInt32 y, XnUInt32 &altX, XnUInt32 &altY)
Gets a single pixel coordinates in an alternative view point. This method uses current frame data...
Definition: XnCppWrapper.h:3196
Definition: XnCppWrapper.h:6089
#define XN_VALIDATE_ALLOC(x, y)
Definition: XnOS.h:134
XnStatus GetWaveOutputMode(XnWaveOutputMode &OutputMode) const
Gets the current AudioGenerator node&#39;s wave output mode. This output mode is used for generating the ...
Definition: XnCppWrapper.h:8161
XnInt32 Get()
Definition: XnCppWrapper.h:2555
const XnIRPixel & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:1311
XnStatus CreateCodec(XnCodecID codecID, ProductionNode &initializerNode, Codec &codec)
Definition: XnCppWrapper.h:8899
XN_C_API XnStatus XN_C_DECL xnGetSerialNumber(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XnStatus GetDestination(XnRecordMedium &destType, XnChar *strDest, XnUInt32 nBufSize)
Gets the destination medium for the Recorder node to record to.
Definition: XnCppWrapper.h:3747
XN_C_API XnBool XN_C_DECL xnIsPixelFormatSupported(XnNodeHandle hInstance, XnPixelFormat Format)
Checks if a specific pixel format is supported.
Definition: XnCppWrapper.h:4886
XnUInt32 XRes() const
Definition: XnCppWrapper.h:622
XN_C_API XnStatus XN_C_DECL xnAutoEnumerateOverSingleInput(XnContext *pContext, XnNodeInfoList *pList, XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnProductionNodeType InputType, XnEnumerationErrors *pErrors, XnNodeQuery *pQuery)
EnumerationErrors(XnEnumerationErrors *pErrors, XnBool bOwn=FALSE)
Definition: XnCppWrapper.h:8448
XN_C_API void XN_C_DECL xnUnregisterFromDepthFieldOfViewChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToDepthFieldOfViewChange.
XN_C_API XnCodecID XN_C_DECL xnGetCodecID(XnNodeHandle hCodec)
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pAudioBuffer)
Definition: XnCppWrapper.h:8229
XN_C_API XnStatus XN_C_DECL xnUnlockNodeForChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Unlocks a previously locked node.
XnStatus CreateBasedOn(DepthGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9846
XN_C_API XnStatus XN_C_DECL xnSetMirror(XnNodeHandle hInstance, XnBool bMirror)
Sets current mirror configuration.
XnInt32 XnProductionNodeType
Definition: XnTypes.h:94
XnStatus EnumerateNodes(NodeInfoList &list) const
Definition: XnCppWrapper.h:4004
XnStatus SetPixelFormat(XnPixelFormat Format)
Sets the ImageGenerator node&#39;s current &#39;pixel color&#39; format. This format is used for generating the n...
Definition: XnCppWrapper.h:5081
XN_C_API XnStatus XN_C_DECL xnRegisterToNodeCreation(XnContext *pContext, XnNodeCreationHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to &#39;Node Creation&#39; event. This event is raised whenever node are create...
AntiFlickerCapability GetAntiFlickerCap()
Definition: XnCppWrapper.h:4597
XnStatus CreateProductionTree(NodeInfo &Tree, ProductionNode &node)
Creates a production node from the information supplied in a xn::NodeInfo object. ...
Definition: XnCppWrapper.h:9056
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJointOrientation(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation *pJoint)
Get a specific joint&#39;s orientation.
XN_C_API XnStatus XN_C_DECL xnSetMapOutputMode(XnNodeHandle hInstance, const XnMapOutputMode *pOutputMode)
Sets the output mode.
XN_C_API void XN_C_DECL xnUnregisterFromUserExit(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a user exits the scene.
XN_C_API XnStatus XN_C_DECL xnRegisterToEndOfFileReached(XnNodeHandle hPlayer, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to be called when end-of-file is reached.
XN_C_API XnStatus XN_C_DECL xnClearSkeletonCalibrationData(XnNodeHandle hInstance, XnUInt32 nSlot)
Clear the requested slot from any saved calibration data.
XN_C_API XnBool XN_C_DECL xnIsCapabilitySupported(XnNodeHandle hInstance, const XnChar *strCapabilityName)
Checks if a production node supports specific capability.
XN_C_API void XN_C_DECL xnGetAudioMetaData(XnNodeHandle hInstance, XnAudioMetaData *pMetaData)
Gets the current audio meta data.
void GetMetaData(IRMetaData &metaData) const
Gets the IR generator node&#39;s latest frame object, saving it in the xn::IRMetaData object...
Definition: XnCppWrapper.h:5236
MockAudioGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:8206
XN_C_API XnStatus XN_C_DECL xnRegisterToPowerLineFrequencyChange(XnNodeHandle hGenerator, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to power line frequency changes.
MockImageGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5141
XnBool IsGestureProgressSupported(const XnChar *strGesture) const
Definition: XnCppWrapper.h:5485
XnUInt32 XRes() const
Definition: XnCppWrapper.h:411
XN_C_API XnIRPixel *XN_C_DECL xnGetIRMap(XnNodeHandle hInstance)
Gets the current IR-map. This map is updated after a call to xnWaitAndUpdateData().
Recorder(const NodeWrapper &other)
Definition: XnCppWrapper.h:3714
XnStatus WaitAndUpdateData()
Updates the generator node to the latest available data, first waiting for the node to have new data ...
Definition: XnCppWrapper.h:3487
GeneralIntCapability(XnNodeHandle hNode, const XnChar *strCap)
Definition: XnCppWrapper.h:2539
Definition: XnTypes.h:468
bool operator<=(const Version &other) const
Definition: XnCppWrapper.h:142
void(* XnErrorStateChangedHandler)(XnStatus errorState, void *pCookie)
Definition: XnTypes.h:237
struct XnInternalNodeData * XnNodeHandle
Definition: XnTypes.h:84
XnStatus RegisterToGestureChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Gesture Change&#39; event.
Definition: XnCppWrapper.h:5597
XnLabel * WritableData()
Definition: XnCppWrapper.h:1541
void UnregisterFromEndOfFileReached(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;End-Of-File Reached&#39; event.
Definition: XnCppWrapper.h:4049
XN_C_API XnStatus XN_C_DECL xnMockRawSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void *pData)
void UnregisterFromHandTouchingFOVEdge(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Hand Touching FOV Edge&#39; event.
Definition: XnCppWrapper.h:5976
XnStatus GetIntProperty(const XnChar *strName, XnUInt64 &nValue) const
Definition: XnCppWrapper.h:2749
XN_C_API XnUInt8 *XN_C_DECL xnGetImageMap(XnNodeHandle hInstance)
Gets the current image-map as a byte buffer.
const XnLabel * GetLabelMap() const
Definition: XnCppWrapper.h:5893
Definition: XnCppWrapper.h:8197
void UnregisterFromCalibrationInProgress(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Calibration In Progress&#39; event.
Definition: XnCppWrapper.h:6996
Definition: XnCppWrapper.h:2434
XnUInt16 GetNumberOfAvailableGestures() const
Definition: XnCppWrapper.h:5453
Capability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:2442
const XnIRPixel * GetIRMap() const
Gets a pointer to the latest IR map.
Definition: XnCppWrapper.h:5244
XN_C_API XnBool XN_C_DECL xnIsProfileAvailable(XnNodeHandle hInstance, XnSkeletonProfile eProfile)
Check if generator supports a specific profile.
XnStatus RegisterToErrorStateChange(XnErrorStateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Global Error State Change&#39; event.
Definition: XnCppWrapper.h:9242
void(* XnStateChangedHandler)(XnNodeHandle hNode, void *pCookie)
Definition: XnTypes.h:229
XN_C_API XnStatus XN_C_DECL xnEnumerateActiveJoints(XnNodeHandle hInstance, XnSkeletonJoint *pJoints, XnUInt16 *pnJoints)
Get all active joints.
XN_C_API XnStatus XN_C_DECL xnCreateImageGenerator(XnContext *pContext, XnNodeHandle *phImageGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an image generator.
IRGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5209
NodeInfo & operator=(const NodeInfo &other)
Definition: XnCppWrapper.h:1837
Definition: XnTypes.h:1147
XnStatus GetPoseStatus(XnUserID userID, const XnChar *poseName, XnUInt64 &poseTime, XnPoseDetectionStatus &eStatus, XnPoseDetectionState &eState)
Definition: XnCppWrapper.h:7273
MockDepthGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4895
XnStatus GetFieldOfView(XnFieldOfView &FOV) const
Gets the dimensions of the field of view (FOV) of the hardware sensor.
Definition: XnCppWrapper.h:4802
XnUInt8 nMinor
Definition: XnTypes.h:156
XnStatus GetCropping(XnCropping &Cropping) const
Gets the current cropping configuration of the holder node. This configuration is that set by SetCrop...
Definition: XnCppWrapper.h:4149
XN_C_API XnBool XN_C_DECL xnIsPlayerAtEOF(XnNodeHandle hPlayer)
Checks whether the player is at the end-of-file marker.
XnStatus AddNodeToRecording(ProductionNode &Node, XnCodecID compression=XN_CODEC_NULL)
Adds a node to the recording setup, and starts recording data what the node generates. This method must be called for each node to be recorded with this recorder.
Definition: XnCppWrapper.h:3761
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a Device node from available production node alternatives.
Definition: XnCppWrapper.h:9801
XnStatus RegisterToFieldOfViewChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Field-Of-View Change&#39; event.
Definition: XnCppWrapper.h:4816
XnUInt32 & SampleRate()
Gets the rate at which the audio interface was sampled. This is a packet configuration setting associ...
Definition: XnCppWrapper.h:1413
OutputMetaData(const XnUInt8 **ppData)
Definition: XnCppWrapper.h:205
Definition: XnCppWrapper.h:8358
void(* StateChangedHandler)(ProductionNode &node, void *pCookie)
Definition: XnCppWrapper.h:100
XN_C_API void XN_C_DECL xnOSMemCopy(void *pDest, const void *pSource, XnSizeT nCount)
MockRawGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:8265
XnStatus CreateMockNodeBasedOn(ProductionNode &originalNode, const XnChar *strName, ProductionNode &mockNode)
Definition: XnCppWrapper.h:8882
struct XnYUV422DoublePixel XnYUV422DoublePixel
XN_C_API XnStatus XN_C_DECL xnConvertRealWorldToProjective(XnNodeHandle hInstance, XnUInt32 nCount, const XnPoint3D *aRealWorld, XnPoint3D *aProjective)
Converts a list of points from projective coordinates to real world coordinates.
XnUInt8 * WritableData()
Definition: XnCppWrapper.h:1078
XN_C_API XnStatus XN_C_DECL xnGetPlayerSource(XnNodeHandle hPlayer, XnRecordMedium *pSourceType, XnChar *strSource, XnUInt32 nBufSize)
Gets the player&#39;s source, i.e where the played events come from.
XnUInt32 YRes() const
Definition: XnCppWrapper.h:424
XnStatus SeekToTimeStamp(XnInt64 nTimeOffset, XnPlayerSeekOrigin origin)
Moves the player to a specific time, so that playback will continue from that point onwards...
Definition: XnCppWrapper.h:3918
XN_C_API void XN_C_DECL xnUnregisterFromUserPositionChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToUserPositionChange.
#define TRUE
Definition: XnPlatform.h:85
XN_C_API XnStatus XN_C_DECL xnNodeInfoListRemove(XnNodeInfoList *pList, XnNodeInfoListIterator it)
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetNext(XnEnumerationErrorsIterator it)
XnStatus RegisterToCalibrationComplete(CalibrationComplete handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Calibration Complete&#39; event.
Definition: XnCppWrapper.h:7031
XN_C_API XnNodeInfo *XN_C_DECL xnNodeInfoListGetCurrent(XnNodeInfoListIterator it)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetSupportedMinUserPositions(XnNodeQuery *pQuery, const XnUInt32 nCount)
struct XnNodeInfoList XnNodeInfoList
Definition: XnTypes.h:189
XnBool IsTracking(XnUserID user) const
Returns whether a user is currently being tracked.
Definition: XnCppWrapper.h:6600
#define XN_CAPABILITY_HUE
Definition: XnTypes.h:328
XN_C_API XnStatus XN_C_DECL xnCreateDevice(XnContext *pContext, XnNodeHandle *phDevice, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a device node.
const XnLabel * Data() const
Returns the scene map.
Definition: XnCppWrapper.h:1522
XnStatus TellTimestamp(XnUInt64 &nTimestamp) const
Gets the current time of a player, i.e., the time passed since the beginning of the recording...
Definition: XnCppWrapper.h:3957
XnStatus RegisterToCalibrationStart(CalibrationStart handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Calibration Start&#39; event.
Definition: XnCppWrapper.h:6901
const XnIRPixel *& Data()
Returns the IR map.
Definition: XnCppWrapper.h:1300
XN_C_API void XN_C_DECL xnGetSceneMetaData(XnNodeHandle hInstance, XnSceneMetaData *pMetaData)
Gets the current scene meta data.
XN_C_API XnStatus XN_C_DECL xnContextRunXmlScript(XnContext *pContext, const XnChar *xmlScript, XnEnumerationErrors *pErrors)
Runs an XML script in the given context. NOTE: when using this function, the context will be the owne...
const CroppingCapability GetCroppingCap() const
Gets a CroppingCapability object for accessing Cropping functionality.
Definition: XnCppWrapper.h:4393
XN_C_API const XnChar *XN_C_DECL xnResolutionGetName(XnResolution resolution)
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetLast(XnNodeInfoList *pList)
XnCodecID GetCodecID() const
Definition: XnCppWrapper.h:8301
XnStatus RegisterToPoseDetected(PoseDetection handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Pose Detected&#39; event.
Definition: XnCppWrapper.h:7331
void GetMetaData(ImageMetaData &metaData) const
Gets the image generator node&#39;s latest frame object, saving it in the xn::ImageMetaData object...
Definition: XnCppWrapper.h:4999
XN_C_API XnStatus XN_C_DECL xnGetActiveGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt16 *nGestures)
Get the names of the gestures that are currently active.
const XnChar * GetName() const
Definition: XnCppWrapper.h:1704
GeneralIntCapability GetPanCap()
Definition: XnCppWrapper.h:4506
XnStatus SetDestination(XnRecordMedium destType, const XnChar *strDest)
Specifies to where the recorder must send its recording. Typically this is a disk file of a particula...
Definition: XnCppWrapper.h:3733
XN_C_API XnStatus XN_C_DECL xnRegisterToPixelFormatChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to pixel format changes.
XnSceneMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1592
ImageGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4973
XnPoseDetectionState
Definition: XnTypes.h:678
~NodeInfoList()
Definition: XnCppWrapper.h:2271
XnBool IsCalibrated(XnUserID user) const
Returns whether a user has been calibrated. see Calibration.
Definition: XnCppWrapper.h:6615
XnStatus GetAllAvailablePoses(XnChar **pstrPoses, XnUInt32 nNameLength, XnUInt32 &nPoses) const
Gets the names of all poses supported by this capability.
Definition: XnCppWrapper.h:7263
XN_C_API XnStatus XN_C_DECL xnCopyAudioMetaData(XnAudioMetaData *pDestination, const XnAudioMetaData *pSource)
Shallow-Copies an Audio Meta Data object. Note that the data buffer is not copied, and that both object will point to the same buffer.
xn::LabelMap & WritableLabelMap()
Definition: XnCppWrapper.h:1550
void UnregisterFromViewPointChange(XnCallbackHandle hCallback)
Unregisters the event handler for the the &#39;Viewpoint Change&#39; event.
Definition: XnCppWrapper.h:3180
XnGrayscale16Pixel * WritableGrayscale16Data()
Definition: XnCppWrapper.h:1140
void InitFrom(const IRMetaData &other)
Shallow-Copies an IRMetaData object.
Definition: XnCppWrapper.h:1234
XnStatus RegisterToCalibrationInProgress(CalibrationInProgress handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Calibration In Progress&#39; event.
Definition: XnCppWrapper.h:6968
XN_C_API void XN_C_DECL xnUnregisterFromEndOfFileReached(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToEndOfFileReached().
const XnProductionNodeDescription & GetDescription() const
Gets the description of a node alternative.
Definition: XnCppWrapper.h:1874
XnUInt32 XOffset() const
Definition: XnCppWrapper.h:440
XnStatus Clear()
Definition: XnCppWrapper.h:2383
XnPowerLineFrequency GetPowerLineFrequency()
Definition: XnCppWrapper.h:4213
const XnLabel & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:1579
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:813
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAdd(XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes)
Definition: XnTypes.h:1178
HandTouchingFOVEdgeCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:5925
XN_C_API void XN_C_DECL xnOSFree(const void *pMemBlock)
void UnregisterFromUserPositionChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;User Position Change&#39; event.
Definition: XnCppWrapper.h:4670
XN_C_API XnResolution XN_C_DECL xnResolutionGetFromXYRes(XnUInt32 xRes, XnUInt32 yRes)
XnStatus RegisterUserCallbacks(UserHandler NewUserCB, UserHandler LostUserCB, void *pCookie, XnCallbackHandle &hCallback)
Registers event handlers for the &#39;New User&#39; and &#39;Lost User&#39; events.
Definition: XnCppWrapper.h:7819
Player(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:3830
Definition: XnCppWrapper.h:1801
XN_C_API XnStatus XN_C_DECL xnGetRecorderDestination(XnNodeHandle hRecorder, XnRecordMedium *pDestType, XnChar *strDest, XnUInt32 nBufSize)
Returns the recoder&#39;s destination.
#define XN_NEW(type,...)
Definition: XnOS.h:329
const XnNodeQuery * GetUnderlyingObject() const
Definition: XnCppWrapper.h:1998
XN_C_API XnStatus XN_C_DECL xnSeekPlayerToFrame(XnNodeHandle hPlayer, const XnChar *strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin)
Seeks the player to a specific frame of a specific played node, so that playing will continue from th...
Definition: XnTypes.h:435
Iterator End() const
Definition: XnCppWrapper.h:2345
XN_C_API XnStatus XN_C_DECL xnNodeQueryAllocate(XnNodeQuery **ppQuery)
DepthGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4729
void GetRange(XnInt32 &nMin, XnInt32 &nMax, XnInt32 &nStep, XnInt32 &nDefault, XnBool &bIsAutoSupported) const
Definition: XnCppWrapper.h:2546
GeneralIntCapability GetZoomCap()
Definition: XnCppWrapper.h:4536
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetFirst(const XnEnumerationErrors *pErrors)
XnPixelFormat PixelFormat() const
Definition: XnCppWrapper.h:504
XN_C_API XnStatus XN_C_DECL xnSetViewPoint(XnNodeHandle hInstance, XnNodeHandle hOther)
Sets the view point of this generator to look like as if placed at another generator location...
XN_C_API XnStatus XN_C_DECL xnCreateRecorder(XnContext *pContext, const XnChar *strFormatName, XnNodeHandle *phRecorder)
Creates a recorder.
XnUInt16 XnLabel
Definition: XnTypes.h:310
void UnregisterFromNewDataAvailable(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;New Data Available&#39; event.
Definition: XnCppWrapper.h:3451
const _pixelType & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:673
XN_C_API XnStatus XN_C_DECL xnStartPoseDetection(XnNodeHandle hInstance, const XnChar *strPose, XnUserID user)
Start detection of a specific pose for a specific user.
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddEx(XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes, const void *pAdditionalData, XnFreeHandler pFreeHandler)
XnStatus LoadCalibrationDataFromFile(XnUserID user, const XnChar *strFileName)
Loads skeleton calibration data from a file to a skeleton.
Definition: XnCppWrapper.h:6708
XnStatus SetRealProperty(const XnChar *strName, XnDouble dValue)
Definition: XnCppWrapper.h:2722
XnIRPixel * WritableData()
Definition: XnCppWrapper.h:1304
XnStatus RemoveNeededNode(ProductionNode &needed)
Definition: XnCppWrapper.h:2664
XnStatus Add(XnProductionNodeDescription &description, const XnChar *strCreationInfo, NodeInfoList *pNeededNodes)
Definition: XnCppWrapper.h:2298
XnStatus AutoEnumerateOverSingleInput(NodeInfoList &List, XnProductionNodeDescription &description, const XnChar *strCreationInfo, XnProductionNodeType InputType, EnumerationErrors *pErrors, Query *pQuery=NULL) const
Definition: XnCppWrapper.h:9481
Recorder(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:3713
const XnIRPixel & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:1323
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a gesture generator node from available production node alternatives.
Definition: XnCppWrapper.h:9915
XnGrayscale16Pixel XnIRPixel
Definition: XnTypes.h:307
CroppingCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:4122
XnStatus RegisterToViewPointChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers a handler for the &#39;Viewpoint Change&#39; event (see the above overview to this class)...
Definition: XnCppWrapper.h:3168
XN_C_API void XN_C_DECL xnUnregisterFromGlobalErrorStateChange(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToGlobalErrorStateChange().
XnStatus FilterList(Context &context, Query &query)
Definition: XnCppWrapper.h:9718
XnStatus AddRef()
Definition: XnCppWrapper.h:1710
Definition: XnCppWrapper.h:8065
XN_C_API XnStatus XN_C_DECL xnSetRealProperty(XnNodeHandle hInstance, const XnChar *strName, XnDouble dValue)
Sets a real property.
Definition: XnTypes.h:292
XnStatus AddEx(XnProductionNodeDescription &description, const XnChar *strCreationInfo, NodeInfoList *pNeededNodes, const void *pAdditionalData, XnFreeHandler pFreeHandler)
Definition: XnCppWrapper.h:2308
XN_C_API XnStatus XN_C_DECL xnCopyIRMetaData(XnIRMetaData *pDestination, const XnIRMetaData *pSource)
Shallow-Copies an IR Meta Data object. Note that the data buffer is not copied, and that both object ...
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJointPosition(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointPosition *pJoint)
Get a specific joint&#39;s position.
XnGrayscale8Pixel * WritableGrayscale8Data()
Definition: XnCppWrapper.h:1125
XnStatus InitFromXmlFile(const XnChar *strFileName, ScriptNode &scriptNode, EnumerationErrors *pErrors=NULL)
Shorthand combination of two other initialization methods - Init() and then RunXmlScriptFromFile() - ...
Definition: XnCppWrapper.h:8817
GeneralIntCapability GetGammaCap()
Definition: XnCppWrapper.h:4466
XN_C_API XnStatus XN_C_DECL xnRegisterToGenerationRunningChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to be called when generation starts or stops.
Iterator & operator++()
Definition: XnCppWrapper.h:8487
XN_C_API XnStatus XN_C_DECL xnEncodeData(XnNodeHandle hCodec, const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten)
XnStatus SetUserPosition(XnUInt32 nIndex, const XnBoundingBox3D &Position)
Definition: XnCppWrapper.h:4635
XN_C_API XnStatus XN_C_DECL xnSetPixelFormat(XnNodeHandle hInstance, XnPixelFormat Format)
Sets the pixel format of the image map.
void TakeOwnership(XnNodeHandle hNode)
Definition: XnCppWrapper.h:1760
XN_C_API XnStatus XN_C_DECL xnEnumerateAllGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt32 nNameLength, XnUInt16 *nGestures)
Get the names of all gestures available.
XnStatus SetViewPoint(ProductionNode &otherNode)
Sets the current viewpoint of the holding generator node to look as if it is placed at a different ge...
Definition: XnCppWrapper.h:3134
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel *pIRMap)
Definition: XnCppWrapper.h:5284
Definition: XnTypes.h:111
XN_C_API XnStatus XN_C_DECL xnStopTracking(XnNodeHandle hInstance, XnUserID user)
Stop tracking a specific hand.
XN_C_API XnStatus XN_C_DECL xnSetSkeletonProfile(XnNodeHandle hInstance, XnSkeletonProfile eProfile)
Set the profile. this will set some joints to be active, and others to be inactive.
XnStatus CopyFrom(const ImageMetaData &other)
Definition: XnCppWrapper.h:1021
ScriptNode(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8366
XnUInt32 GetYResolution() const
Definition: XnCppWrapper.h:9702
XN_C_API XnGrayscale8Pixel *XN_C_DECL xnGetGrayscale8ImageMap(XnNodeHandle hInstance)
Gets the current Grayscale8 image-map. This map is updated after a call to xnWaitAndUpdateData(). It is assumed that the node is currently in Grayscale8 pixel format.
XN_C_API XnStatus XN_C_DECL xnCreateGestureGenerator(XnContext *pContext, XnNodeHandle *phGestureGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a Gesture Generator.
HandsGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:6098
XnBool IsValid() const
This method checks that this object points to an actual node (that has been &#39;created&#39;) and does not p...
Definition: XnCppWrapper.h:1698
PoseDetectionCapability GetPoseDetectionCap()
Gets a xn::PoseDetectionCapability object for accessing Pose Detection functionality.
Definition: XnCppWrapper.h:7912
XnStatus EncodeData(const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten) const
Definition: XnCppWrapper.h:8310
#define XN_CAPABILITY_GAIN
Definition: XnTypes.h:334
XnNodeInfoListNode * pCurrent
Definition: XnTypes.h:196
XN_C_API XnStatus XN_C_DECL xnRegisterToGestureChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when gestures are added or removed.
XnUInt32 GetNumberOfPoses() const
Get the number of poses supported by this capability.
Definition: XnCppWrapper.h:7246
XN_C_API XnStatus XN_C_DECL xnRegisterToHandTouchingFOVEdge(XnNodeHandle hInstance, XnHandTouchingFOVEdge handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when a hand is approaching the edge of the FOV.
XN_C_API void XN_C_DECL xnUnregisterFromPoseDetectionInProgress(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose status callback.
XN_C_API XnStatus XN_C_DECL xnInit(XnContext **ppContext)
Initializes the OpenNI library.
XN_C_API XnStatus XN_C_DECL xnCreateAudioGenerator(XnContext *pContext, XnNodeHandle *phAudioGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an audio generator.
Definition: XnCppWrapper.h:1975
void Free()
Definition: XnCppWrapper.h:329
void UnregisterFromPixelFormatChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Pixel Format Change&#39; event.
Definition: XnCppWrapper.h:5122
Definition: XnCppWrapper.h:5201
Definition: XnCppWrapper.h:8620
Definition: XnTypes.h:520
XnRGB24Pixel * WritableRGB24Data()
Definition: XnCppWrapper.h:1093
void * XnCallbackHandle
Definition: XnTypes.h:270
Generator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:3348
const XnIRPixel * Data() const
Returns the IR map.
Definition: XnCppWrapper.h:1287
XnStatus RunXmlScriptFromFile(const XnChar *strFileName, ScriptNode &scriptNode, EnumerationErrors *pErrors=NULL)
Runs an XML script file to build a production graph.
Definition: XnCppWrapper.h:8789
XnCalibrationStatus
Definition: XnTypes.h:685
XN_C_API void XN_C_DECL xnShutdown(XnContext *pContext)
Shuts down an OpenNI context, destroying all its nodes. Do not call any function of this context or a...
XnStatus GetProductionNodeInfoByName(const XnChar *strInstanceName, NodeInfo &nodeInfo) const
Definition: XnCppWrapper.h:9169
Definition: XnTypes.h:480
const XnChar * GetCreationInfo() const
Gets the creation information of the node alternative.
Definition: XnCppWrapper.h:1906
~Query()
Definition: XnCppWrapper.h:1987
XnStatus SaveCalibrationDataToFile(XnUserID user, const XnChar *strFileName)
Saves the skeleton&#39;s current calibration data to a file.
Definition: XnCppWrapper.h:6697
XnStatus SetData(const DepthMetaData &depthMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:4931
XnStatus StartGenerating()
Enters the node into Generating state.
Definition: XnCppWrapper.h:3370
XN_C_API XnBool XN_C_DECL xnIsDataNew(XnNodeHandle hInstance)
Checks whether current data is new. Meaning, did the data change on the last call to xnWaitAndUpdateA...
NodeInfo(XnNodeInfo *pInfo)
Definition: XnCppWrapper.h:1809
Context & operator=(const Context &other)
Definition: XnCppWrapper.h:8689
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrated(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being calibrated.
XN_C_API const XnProductionNodeDescription *XN_C_DECL xnNodeInfoGetDescription(XnNodeInfo *pNodeInfo)
void GetMetaData(DepthMetaData &metaData) const
Gets the depth generator node&#39;s latest frame object, saving it in the xn::DepthMetaData object...
Definition: XnCppWrapper.h:4756
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a SceneAnalyzer node from available production node alternatives.
Definition: XnCppWrapper.h:9924
XN_C_API XnStatus XN_C_DECL xnWaitAndUpdateData(XnNodeHandle hInstance)
Updates the data to the latest available one. If needed, the call will block until new data is availa...
XnStatus Init()
Builds the context&#39;s general software environment.
Definition: XnCppWrapper.h:8734
XnBool IsCalibrating(XnUserID user) const
Returns whether a user is being calibrated right now. see Calibration.
Definition: XnCppWrapper.h:6631
XN_C_API XnStatus XN_C_DECL xnAddNodeToRecording(XnNodeHandle hRecorder, XnNodeHandle hNode, XnCodecID compression)
Adds a node to recording and start recording it. This function must be called on each node that is to...
XN_C_API void XN_C_DECL xnGetImageMetaData(XnNodeHandle hInstance, XnImageMetaData *pMetaData)
Gets the current image-map meta data.
XnUInt32 GetFrameID() const
Gets the frame ID of the current frame data from the Generator node.
Definition: XnCppWrapper.h:3571
Query(XnNodeQuery *pNodeQuery)
Definition: XnCppWrapper.h:1983
const XnRGB24Pixel *& RGB24Data()
Gets a pointer to the first pixel of the image in RGB24 format. RGB24 format represents each pixel as...
Definition: XnCppWrapper.h:1089
const XnIRMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1351
DeviceIdentificationCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:2877
XnDepthMetaData * GetUnderlying()
Definition: XnCppWrapper.h:907
XN_C_API XnStatus XN_C_DECL xnEnumeratePlayerNodes(XnNodeHandle hPlayer, XnNodeInfoList **ppList)
Retrieves a list of the nodes played by a player.
struct XnNodeQuery XnNodeQuery
Definition: XnTypes.h:199
#define XN_CAPABILITY_ROLL
Definition: XnTypes.h:337
XnUInt32 YRes() const
Definition: XnCppWrapper.h:630
XnStatus GetFloor(XnPlane3D &Plane) const
Gets a description of the floor, if it was found.
Definition: XnCppWrapper.h:5903
XnStatus SetName(const XnChar *strName)
Sets in the Query object the implementation name to search for. The same vendor might have more than ...
Definition: XnCppWrapper.h:2018
XnStatus RunXmlScript(const XnChar *strScript, ScriptNode &scriptNode, EnumerationErrors *pErrors=NULL)
Runs an XML script string to build a production graph.
Definition: XnCppWrapper.h:8761
Definition: XnCppWrapper.h:3102
static XnStatus UnregisterFromUnderlying(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
Definition: XnCppWrapper.h:10060
XN_C_API XnStatus XN_C_DECL xnSeekPlayerToTimeStamp(XnNodeHandle hPlayer, XnInt64 nTimeOffset, XnPlayerSeekOrigin origin)
Seeks the player to a specific timestamp, so that playing will continue from that point onwards...
XnUInt32 & Build()
Definition: XnCppWrapper.h:170
XnUInt32 XnCodecID
Definition: XnTypes.h:842
XnStatus StopSinglePoseDetection(XnUserID user, const XnChar *strPose)
Stop detection of a specific pose for a specific user. For full details and usage, see xnStopSinglePoseDetection
Definition: XnCppWrapper.h:7317
const XnLabel *& Data()
Returns the scene map.
Definition: XnCppWrapper.h:1536
void UnregisterFromMapOutputModeChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Map Output Mode Change&#39; event.
Definition: XnCppWrapper.h:4380
Map< XnGrayscale8Pixel > Grayscale8Map
Definition: XnCppWrapper.h:714
struct XnNodeInfo XnNodeInfo
Definition: XnTypes.h:179
XN_C_API XnStatus XN_C_DECL xnRemoveNeededNode(XnNodeHandle hInstance, XnNodeHandle hNeededNode)
Removes a needed node from the list of needed nodes.
XN_C_API void XN_C_DECL xnUnregisterFromFrameSyncChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToFrameSyncChange().
XN_C_API XnStatus XN_C_DECL xnCreatePlayer(XnContext *pContext, const XnChar *strFormatName, XnNodeHandle *phPlayer)
Creates a player.
XnStatus SetCreationInfo(const XnChar *strCreationInfo)
Sets the creation information field of the Query object. This relates to the creation information of ...
Definition: XnCppWrapper.h:2125
XnUInt8 Major() const
Definition: XnCppWrapper.h:162
void UnregisterFromGestureReadyForNextIntermediateStageCallbacks(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Gesture Ready For Next Intermediate Stage&#39; event.
Definition: XnCppWrapper.h:5744
Definition: XnTypes.h:517
NodeWrapper & operator=(const NodeWrapper &other)
Definition: XnCppWrapper.h:1647
XnBool IsProfileAvailable(XnSkeletonProfile eProfile) const
Returns whether a specific skeleton profile is supported by the SkeletonCapability object...
Definition: XnCppWrapper.h:6426
XN_C_API XnStatus XN_C_DECL xnNodeInfoGetTreeStringRepresentation(XnNodeInfo *pNodeInfo, XnChar *csResult, XnUInt32 nSize)
XN_C_API XnStatus XN_C_DECL xnEnumerateLicenses(XnContext *pContext, XnLicense **paLicenses, XnUInt32 *pnCount)
Definition: XnCppWrapper.h:5132
const XnUInt8 * Data() const
Definition: XnCppWrapper.h:282
const XnGrayscale16Pixel *& Grayscale16Data()
Gets a pointer to the first pixel of the image in Grayscale16 format. Grayscale16 represents each pix...
Definition: XnCppWrapper.h:1136
XnStatus SetMaxVersion(const Version &maxVersion)
Sets in the Query object the maximum required version allowed for the node alternative.
Definition: XnCppWrapper.h:2050
XnStatus SetVendor(const XnChar *strVendor)
Sets in the Query object the vendor name to search for.
Definition: XnCppWrapper.h:2005
XN_C_API XnStatus XN_C_DECL xnStartSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Start tracking a skeleton.
XnStatus RegisterToNodeCreation(NodeCreationHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Node Creation&#39; event. see Event: &#39;Node Creation&#39;.
Definition: XnCppWrapper.h:9268
XnStatus EnumerateProductionTrees(XnProductionNodeType Type, const Query *pQuery, NodeInfoList &TreesList, EnumerationErrors *pErrors=NULL) const
Enumerates all available production nodes for a specific node type (e.g., the application wants to cr...
Definition: XnCppWrapper.h:8978
XN_C_API XnStatus XN_C_DECL xnSaveSkeletonCalibrationDataToFile(XnNodeHandle hInstance, XnUserID user, const XnChar *strFileName)
Save the calibration data to file.
XN_C_API XnStatus XN_C_DECL xnStartGenerating(XnNodeHandle hInstance)
Starts generation of the output. This will also cause all dependencies to start generating.
Definition: XnTypes.h:1112
XnStatus RegisterHandCallbacks(HandCreate CreateCB, HandUpdate UpdateCB, HandDestroy DestroyCB, void *pCookie, XnCallbackHandle &hCallback)
Registers event handlers for the &#39;Hand Create&#39;, &#39;Hand Update&#39; and &#39;Hand Destroy&#39; events. Pass NULL for any event you don&#39;t want your application to receive.
Definition: XnCppWrapper.h:6171
XN_C_API XnStatus XN_C_DECL xnCreateScriptNode(XnContext *pContext, const XnChar *strFormat, XnNodeHandle *phScript)
void UnregisterFromGestureIntermediateStageCompleted(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Gesture Intermediate Stage Completed&#39; event.
Definition: XnCppWrapper.h:5680
XN_C_API XnStatus XN_C_DECL xnInitFromXmlFile(const XnChar *strFileName, XnContext **ppContext, XnEnumerationErrors *pErrors)
Initializes OpenNI context, and then configures it using the given file. NOTE: when using this functi...
ImageMetaData()
Definition: XnCppWrapper.h:948
XnStatus SetInstanceName(const XnChar *strName)
Sets the instance name of the NodeInfo object. The name can only be set before the instance is create...
Definition: XnCppWrapper.h:1856
XN_C_API XnStatus XN_C_DECL xnGetRealProperty(XnNodeHandle hInstance, const XnChar *strName, XnDouble *pdValue)
Gets a real property.
void GetVersion(XnVersion &Version)
Definition: XnCppWrapper.h:10017
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddNode(XnNodeInfoList *pList, XnNodeInfo *pNode)
XN_C_API XnStatus XN_C_DECL xnGetVendorSpecificData(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XN_C_API XnStatus XN_C_DECL xnGetCropping(XnNodeHandle hInstance, XnCropping *pCropping)
Gets current cropping configuration.
XN_C_API XnStatus XN_C_DECL xnEnumerateExistingNodesByType(XnContext *pContext, XnProductionNodeType type, XnNodeInfoList **ppList)
Gets a list of all existing node in the context. Each node that was returned increases its ref count...
void UnregisterFromMirrorChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Mirror Change&#39; event.
Definition: XnCppWrapper.h:3064
XnStatus RegisterToErrorStateChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Error State Change&#39; event.
Definition: XnCppWrapper.h:2507
XN_C_API void XN_C_DECL xnUnregisterFromMirrorChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToMirrorChange().
Definition: XnTypes.h:204
xn::IRMap & WritableIRMap()
Gets a fast, light object wrapping the writable IR map. Remarks
Definition: XnCppWrapper.h:1346
XnStatus GetMapOutputMode(XnMapOutputMode &OutputMode) const
Gets the current map output mode of the generator node. This is the map output mode that the generato...
Definition: XnCppWrapper.h:4341
const XnProductionNodeDescription & Description()
Returns the description data of the failing node the iterator points to.
Definition: XnCppWrapper.h:8510
XnUInt32 GetBytesPerPixel() const
Gets the number of bytes per pixel for the node&#39;s map data. This mode is set by SetPixelFormat() for ...
Definition: XnCppWrapper.h:4354
XN_C_API XnDouble XN_C_DECL xnGetPlaybackSpeed(XnNodeHandle hInstance)
Gets the playback speed. see xnSetPlaybackSpeed() for more details.
XN_C_API XnStatus XN_C_DECL xnCreateHandsGenerator(XnContext *pContext, XnNodeHandle *phHandsGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an hands generator.
UserGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:7701
XN_C_API XnStatus XN_C_DECL xnFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Activates frame sync with the other node.
XnBool IsFrameSyncedWith(Generator &other) const
Returns whether a frame sync has been applied between the node holding this capability and another sp...
Definition: XnCppWrapper.h:9774
static void FreeLicensesList(XnLicense aLicenses[])
Definition: XnCppWrapper.h:8953
XN_C_API XnStatus XN_C_DECL xnWaitNoneUpdateAll(XnContext *pContext)
Updates all generator nodes in the context, without any waiting. If a node has new data...
XnStatus GetSkeletonJointOrientation(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation &Joint) const
Gets the orientation of a specific skeleton joint.
Definition: XnCppWrapper.h:6585
XnStatus GetSerialNumber(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the vendor-specific name of the device holding this capability object.
Definition: XnCppWrapper.h:2917
XN_C_API XnStatus XN_C_DECL xnSetPlayerSource(XnNodeHandle hPlayer, XnRecordMedium sourceType, const XnChar *strSource)
Sets the source for the player, i.e. where the played events will come from.
XnStatus AddNode(NodeInfo &info)
Definition: XnCppWrapper.h:2318
XnStatus CopyFrom(const SceneMetaData &other)
Definition: XnCppWrapper.h:1493
XN_C_API XnBool XN_C_DECL xnIsSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being tracked.
XN_C_API XnStatus xnRegisterToOutOfPose(XnNodeHandle hInstance, XnPoseDetectionCallback handler, void *pCookie, XnCallbackHandle *phCallback)
Register to callback when a use is no longer in pose.
XN_C_API XnStatus XN_C_DECL xnGetStringProperty(XnNodeHandle hInstance, const XnChar *strName, XnChar *csValue, XnUInt32 nBufSize)
Gets a string property.
XN_C_API XnStatus XN_C_DECL xnContextRegisterForShutdown(XnContext *pContext, XnContextShuttingDownHandler pHandler, void *pCookie, XnCallbackHandle *phCallback)
Registers for context shutting down event. This function is used for backwards compatibility and shou...
XN_C_API const XnChar *XN_C_DECL xnNodeInfoGetInstanceName(XnNodeInfo *pNodeInfo)
Definition: XnCppWrapper.h:2630
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:1504
XN_C_API XnUInt32 XN_C_DECL xnResolutionGetXRes(XnResolution resolution)
XN_C_API void XN_C_DECL xnUnregisterFromHandTouchingFOVEdge(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from hand approaching the edge of the FOV.
Resolution(XnUInt32 xRes, XnUInt32 yRes)
Definition: XnCppWrapper.h:9672
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddNodeFromList(XnNodeInfoList *pList, XnNodeInfoListIterator otherListIt)
_pixelType & operator()(XnUInt32 x, XnUInt32 y)
Definition: XnCppWrapper.h:686
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationComplete(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration complete with status.
XnUInt32 YOffset() const
Definition: XnCppWrapper.h:459
XN_C_API XnStatus XN_C_DECL xnPlayerReadNext(XnNodeHandle hPlayer)
Reads the next data element from the player.
XN_C_API XnStatus XN_C_DECL xnContextOpenFileRecordingEx(XnContext *pContext, const XnChar *strFileName, XnNodeHandle *phPlayerNode)
Opens a recording file, adding all nodes in it to the context.
XN_C_API void XN_C_DECL xnOSMemSet(void *pDest, XnUInt8 nValue, XnSizeT nCount)
const XnChar * GetInstanceName() const
Gets the instance name of a node alternative.
Definition: XnCppWrapper.h:1890
Definition: XnCppWrapper.h:9651
XnStatus RegisterToJointConfigurationChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Joint Configuration Change&#39; event.
Definition: XnCppWrapper.h:6513
XN_C_API void XN_C_DECL xnUnregisterFromPixelFormatChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToPixelFormatChange.
XnDouble GetPlaybackSpeed() const
Gets the playback speed.
Definition: XnCppWrapper.h:4081
FrameSyncCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:3226
static Version Current()
Definition: XnCppWrapper.h:155
XN_C_API void xnUnregisterFromPoseDetected(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose detected callback.
Definition: XnCppWrapper.h:118
XnUInt32 & XRes()
Definition: XnCppWrapper.h:417
Context()
Definition: XnCppWrapper.h:8658
Definition: XnCppWrapper.h:4965
SceneMetaData()
Definition: XnCppWrapper.h:1452
NodeInfoList(XnNodeInfoList *pList)
Definition: XnCppWrapper.h:2269
EnumerationErrors()
Definition: XnCppWrapper.h:8439
XnDepthPixel & ZRes()
Definition: XnCppWrapper.h:829
XN_C_API XnDepthPixel XN_C_DECL xnGetDeviceMaxDepth(XnNodeHandle hInstance)
Gets the maximum depth the device can produce.
XnStatus InitFrom(const IRMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel *pExternalBuffer)
Definition: XnCppWrapper.h:1248
XnStatus WaitAndUpdateAll()
Updates all generator nodes in the context to their latest available data, first waiting for all node...
Definition: XnCppWrapper.h:9372
XnStatus SetSmoothing(XnFloat fSmoothingFactor)
Sets the smoothing factor for all users generated by this xn::UserGenerator node. ...
Definition: XnCppWrapper.h:6843
struct XnRGB24Pixel XnRGB24Pixel
const void * GetAdditionalData() const
Definition: XnCppWrapper.h:1930
Definition: XnTypes.h:142
IRMetaData()
Definition: XnCppWrapper.h:1218
XnStatus SaveCalibrationData(XnUserID user, XnUInt32 nSlot)
Saves the calibration data of a specified user. The calibration data includes the lengths of the huma...
Definition: XnCppWrapper.h:6724
#define XN_DELETE(p)
Definition: XnOS.h:339
XnBool IsPoseSupported(const XnChar *strPose)
Definition: XnCppWrapper.h:7268
XN_C_API XnNodeInfoList *XN_C_DECL xnNodeInfoGetNeededNodes(XnNodeInfo *pNodeInfo)
Definition: XnCppWrapper.h:3822
XN_C_API void XN_C_DECL xnUnregisterFromGeneralIntValueChange(XnNodeHandle hNode, const XnChar *strCap, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToGeneralIntValueChange().
XnStatus AddLicense(const XnLicense &License)
Definition: XnCppWrapper.h:8935
XN_C_API XnStatus XN_C_DECL xnWaitAndUpdateAll(XnContext *pContext)
Updates all generators nodes in the context, waiting for all to have new data.
XnStatus RegisterToGestureIntermediateStageCompleted(GestureIntermediateStageCompleted handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Gesture Intermediate Stage Completed&#39; event.
Definition: XnCppWrapper.h:5652
XnStatus Run(EnumerationErrors *pErrors)
Runs the ScriptNode object&#39;s XML script to build a production graph.
Definition: XnCppWrapper.h:9999
XnUInt16 & Maintenance()
Definition: XnCppWrapper.h:169
XnUInt32 nBuild
Definition: XnTypes.h:158
Iterator RBegin() const
Definition: XnCppWrapper.h:2355
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddNeededNode(XnNodeQuery *pQuery, const XnChar *strInstanceName)
XnUInt32 Build() const
Definition: XnCppWrapper.h:165
XN_C_API void *XN_C_DECL xnOSMallocAligned(const XnSizeT nAllocSize, const XnSizeT nAlignment)
XN_C_API XnStatus XN_C_DECL xnCreateMockNodeBasedOn(XnContext *pContext, XnNodeHandle hOriginalNode, const XnChar *strName, XnNodeHandle *phMockNode)
Creates a production node which is only a mock, base on the type and properties of another node...
Device(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:2939
Definition: XnCppWrapper.h:2869
XnBool NeedPoseForCalibration() const
Returns whether a specific pose is required for calibration. This setting is applicable to all users...
Definition: XnCppWrapper.h:6809
XN_C_API XnStatus XN_C_DECL xnStartGeneratingAll(XnContext *pContext)
Make sure all generators are generating data.
XN_C_API XnStatus XN_C_DECL xnStartTracking(XnNodeHandle hInstance, const XnPoint3D *pPosition)
Start tracking at a specific position.
bool operator!=(const Version &other) const
Definition: XnCppWrapper.h:134
const xn::Grayscale8Map & Grayscale8Map() const
Gets a light wrapper object wrapping the image map as Grayscale8 format.
Definition: XnCppWrapper.h:1165
XN_C_API XnStatus XN_C_DECL xnSetGeneralProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt32 nBufferSize, const void *pBuffer)
Sets a buffer property.
XnBool operator!=(const NodeWrapper &other)
Definition: XnCppWrapper.h:1680
Definition: XnCppWrapper.h:5380
XN_C_API XnStatus XN_C_DECL xnRegisterToCalibrationComplete(XnNodeHandle hInstance, XnCalibrationComplete handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when calibration is complete, with status.
XnUInt8 nMajor
Definition: XnTypes.h:155
XN_C_API XnStatus XN_C_DECL xnRegisterHandCallbacks(XnNodeHandle hInstance, XnHandCreate CreateCB, XnHandUpdate UpdateCB, XnHandDestroy DestroyCB, void *pCookie, XnCallbackHandle *phCallback)
Register to hands callbacks.
XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptFromFileEx(XnContext *pContext, const XnChar *strFileName, XnEnumerationErrors *pErrors, XnNodeHandle *phScriptNode)
Runs an XML script in the given context.
XnUInt16 nMaintenance
Definition: XnTypes.h:157
XN_C_API XnBool XN_C_DECL xnIsGestureProgressSupported(XnNodeHandle hInstance, const XnChar *strGesture)
Check if the specific gesture supports &#39;in progress&#39; callbacks.
const XnYUV422DoublePixel * GetYUV422ImageMap() const
Definition: XnCppWrapper.h:5017
XnStatus GetTreeStringRepresentation(XnChar *csResultBuffer, XnUInt32 nBufferSize) const
Definition: XnCppWrapper.h:1939
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetMaxVersion(XnNodeQuery *pQuery, const XnVersion *pMaxVersion)
XnStatus SetPlaybackSpeed(XnDouble dSpeed)
Sets the player&#39;s playback speed, as a ratio of the rate that the recording was made at...
Definition: XnCppWrapper.h:4072
void UnregisterFromNodeCreation(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Node Creation&#39; event. see Event: &#39;Node Creation&#39;.
Definition: XnCppWrapper.h:9292
XnUInt32 GetSupportedUserPositionsCount() const
Definition: XnCppWrapper.h:4626
XN_C_API XnStatus XN_C_DECL xnCreateIRGenerator(XnContext *pContext, XnNodeHandle *phIRGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an IR generator.
XnSkeletonJoint
Definition: XnTypes.h:614
Map< XnGrayscale16Pixel > Grayscale16Map
Definition: XnCppWrapper.h:712
void Release()
Definition: XnCppWrapper.h:1716
XnBool operator!=(const Context &other)
Definition: XnCppWrapper.h:8715
void TakeOwnership(XnContext *pContext)
Definition: XnCppWrapper.h:9524
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddSupportedCapability(XnNodeQuery *pQuery, const XnChar *strNeededCapability)
Definition: XnCppWrapper.h:3340
XnStatus Create(Context &context, const XnChar *strFormatName=NULL)
Creates a Recorder node.
Definition: XnCppWrapper.h:9810
XnStatus SetRepeat(XnBool bRepeat)
Specifies whether the player will automatically rewind to the beginning of the recording after reachi...
Definition: XnCppWrapper.h:3858
XN_C_API void XN_C_DECL xnUnregisterFromPowerLineFrequencyChange(XnNodeHandle hGenerator, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToPowerLineFrequencyChange().
XnStatus RegisterToUserReEnter(UserHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;User Reenter&#39; event.
Definition: XnCppWrapper.h:7970
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetNext(XnNodeInfoListIterator it)
XnStatus SetStringProperty(const XnChar *strName, const XnChar *strValue)
Definition: XnCppWrapper.h:2731
void UnregisterFromUserReEnter(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;User Reenter&#39; event.
Definition: XnCppWrapper.h:7998
XnStatus SetData(const AudioMetaData &audioMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:8242
GestureGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5389
XN_C_API XnStatus XN_C_DECL xnGetUserPixels(XnNodeHandle hInstance, XnUserID user, XnSceneMetaData *pScene)
Get the pixels that belong to a user.
void UnregisterFromWaveOutputModeChanges(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Wave Output Mode Change&#39; event.
Definition: XnCppWrapper.h:8187
Context(const Context &other)
Definition: XnCppWrapper.h:8676
XnStatus CreateBasedOn(IRGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9904
MapMetaData(XnPixelFormat format, const XnUInt8 **ppData)
Definition: XnCppWrapper.h:399
XnStatus CreateBasedOn(AudioGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9970
Definition: XnCppWrapper.h:8261
XN_C_API XnStatus XN_C_DECL xnRegisterToViewPointChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to view point changes.
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrationData(XnNodeHandle hInstance, XnUInt32 nSlot)
Check if a specific slot already holds calibration data.
XnImageMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1188
XnBool IsDataNew() const
Definition: XnCppWrapper.h:261
XN_C_API XnStatus XN_C_DECL xnGetUserPosition(XnNodeHandle hInstance, XnUInt32 nIndex, XnBoundingBox3D *pPosition)
Gets the current user position.
XnStatus GetCalibrationPose(XnChar *strPose) const
Gets the name of the pose that is required for calibration. The pose and its name reside in the plug-...
Definition: XnCppWrapper.h:6826
XN_C_API XnStatus XN_C_DECL xnSetStringProperty(XnNodeHandle hInstance, const XnChar *strName, const XnChar *strValue)
Sets a string property.
XN_C_API XnStatus xnGetPoseStatus(XnNodeHandle hInstance, XnUserID userID, const XnChar *poseName, XnUInt64 *poseTime, XnPoseDetectionStatus *eStatus, XnPoseDetectionState *eState)
Gets the current pose status.
Definition: XnTypes.h:576
XnStatus AddNeededNode(const XnChar *strInstanceName)
Sets in the Query object that a specified node must be a dependant of the named node type...
Definition: XnCppWrapper.h:2116
DepthMetaData()
Definition: XnCppWrapper.h:759
XnStatus SetMinVersion(const Version &minVersion)
Sets in the Query object the minimum required version allowed for the Node Alternative.
Definition: XnCppWrapper.h:2034
XnUInt32 GetSupportedMapOutputModesCount() const
Gets the number of output modes that the generator node supports.
Definition: XnCppWrapper.h:4286
XN_C_API XnStatus XN_C_DECL xnCreateAnyProductionTree(XnContext *pContext, XnProductionNodeType type, XnNodeQuery *pQuery, XnNodeHandle *phNode, XnEnumerationErrors *pErrors)
Enumerates for production trees for a specific node type, and creates the first found tree...
NodeInfoList()
Definition: XnCppWrapper.h:2257
XN_C_API XnBool XN_C_DECL xnIsJointActive(XnNodeHandle hInstance, XnSkeletonJoint eJoint)
Check if joint is currently active.
XnUInt32 GetSupportedWaveOutputModesCount() const
Gets the node&#39;s number of supported wave output modes.
Definition: XnCppWrapper.h:8118
FrameSyncCapability GetFrameSyncCap()
Definition: XnCppWrapper.h:3655
#define XN_CAPABILITY_IRIS
Definition: XnTypes.h:341
Definition: XnTypes.h:458
XnUInt32 BytesPerPixel() const
Definition: XnCppWrapper.h:518
XnBool operator==(const Iterator &other) const
Definition: XnCppWrapper.h:8468
XN_C_API XnStatus XN_C_DECL xnSetWaveOutputMode(XnNodeHandle hInstance, const XnWaveOutputMode *OutputMode)
Definition: XnCppWrapper.h:3223
Definition: XnCppWrapper.h:1373
Definition: XnTypes.h:1157
XN_C_API XnStatus XN_C_DECL xnSetSkeletonSmoothing(XnNodeHandle hInstance, XnFloat fFactor)
Set the skeleton&#39;s smoothing factor.
Iterator operator++(int)
Definition: XnCppWrapper.h:2196
XN_C_API XnStatus XN_C_DECL xnGetWaveOutputMode(XnNodeHandle hInstance, XnWaveOutputMode *OutputMode)
XnBool IsViewPointSupported(ProductionNode &otherNode) const
Checks if the generator node holding this capability can change its output to appear as if the sensor...
Definition: XnCppWrapper.h:3122
XN_C_API XnStatus XN_C_DECL xnSetIntProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt64 nValue)
Sets an integer property.
const xn::ImageMap & ImageMap() const
Gets a light object wrapping the image map.
Definition: XnCppWrapper.h:1145
XnStatus WaitAnyUpdateAll()
Updates all generator nodes in the context to their latest available data, first waiting for any of t...
Definition: XnCppWrapper.h:9411
const XnGrayscale16Pixel * GetGrayscale16ImageMap() const
Definition: XnCppWrapper.h:5035
XnStatus RegisterToGestureReadyForNextIntermediateStage(GestureReadyForNextIntermediateStage handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Gesture Ready For Next Intermediate Stage&#39; event.
Definition: XnCppWrapper.h:5716
Definition: XnCppWrapper.h:6400
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetMinVersion(XnNodeQuery *pQuery, const XnVersion *pMinVersion)
XnSkeletonProfile
Definition: XnTypes.h:647
XnNodeHandle GetHandle() const
Definition: XnCppWrapper.h:1663
GeneralIntCapability GetLowLightCompensationCap()
Definition: XnCppWrapper.h:4587
XN_C_API XnGrayscale16Pixel *XN_C_DECL xnGetGrayscale16ImageMap(XnNodeHandle hInstance)
Gets the current Grayscale16 image-map. This map is updated after a call to xnWaitAndUpdateData(). It is assumed that the node is currently in Grayscale16 pixel format.
XnStatus EnumerateAllGestures(XnChar **astrGestures, XnUInt32 nNameLength, XnUInt16 &nGestures) const
Gets the names of all active gestures in this generator node.
Definition: XnCppWrapper.h:5466
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates an IRGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9886
AudioGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8073
XN_C_API XnStatus XN_C_DECL xnRegisterUserCallbacks(XnNodeHandle hInstance, XnUserHandler NewUserCB, XnUserHandler LostUserCB, void *pCookie, XnCallbackHandle *phCallback)
Register to user callbacks.
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddSupportedMapOutputMode(XnNodeQuery *pQuery, const XnMapOutputMode *pMapOutputMode)
Player(const NodeWrapper &other)
Definition: XnCppWrapper.h:3831
XN_C_API XnUChar *XN_C_DECL xnGetAudioBuffer(XnNodeHandle hInstance)
bool operator==(const Version &other) const
Definition: XnCppWrapper.h:130
IRGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5210
XnUInt32 FrameID() const
Definition: XnCppWrapper.h:229
XN_C_API XnStatus XN_C_DECL xnLockNodeForChanges(XnNodeHandle hInstance, XnLockHandle *phLock)
Locks a node, not allowing any changes (any "set" function).
XnStatus RegisterToMapOutputModeChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Map Output Mode Change&#39; event.
Definition: XnCppWrapper.h:4368
XN_C_API void XN_C_DECL xnUnregisterFromGestureIntermediateStageCompleted(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a gesture is in progress.
XnStatus AddRef()
Definition: XnCppWrapper.h:8916
XnStatus InitFrom(const ImageMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer)
Definition: XnCppWrapper.h:986
XnStatus SetSkeletonProfile(XnSkeletonProfile eProfile)
Sets the skeleton profile. The skeleton profile specifies which joints are to be active, and which to be inactive. The UserGenerator node generates output data for the active joints only. This profile applies to all skeletons that the UserGenerator node generates.
Definition: XnCppWrapper.h:6461
XN_C_API XnStatus XN_C_DECL xnRegisterToGestureIntermediateStageCompleted(XnNodeHandle hInstance, XnGestureIntermediateStageCompleted handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when a gesture is in progress.
bool operator>=(const Version &other) const
Definition: XnCppWrapper.h:150
XnStatus MakeDataWritable()
Definition: XnCppWrapper.h:343
Codec(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8288
XN_C_API const XnChar *XN_C_DECL xnGetNodeName(XnNodeHandle hNode)
Gets the instance name of a node by its handle.
XN_C_API XnStatus XN_C_DECL xnProductionNodeAddRef(XnNodeHandle hNode)
References a production node, increasing its reference count by 1.
Definition: XnCppWrapper.h:3705
const FrameSyncCapability GetFrameSyncCap() const
Definition: XnCppWrapper.h:3641
XN_C_API XnStatus XN_C_DECL xnResetSkeleton(XnNodeHandle hInstance, XnUserID user)
Reset the skeleton - discard calibration.
void UnregisterFromCalibrationComplete(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Calibration Complete&#39; event.
Definition: XnCppWrapper.h:7059
XN_C_API XnStatus XN_C_DECL xnGetFloor(XnNodeHandle hInstance, XnPlane3D *pPlane)
Gets a description of the floor, if it was found.
Definition: XnCppWrapper.h:5254
AlternativeViewPointCapability GetAlternativeViewPointCap()
Definition: XnCppWrapper.h:3627
Definition: XnCppWrapper.h:197
XN_C_API XnStatus XN_C_DECL xnCopyDepthMetaData(XnDepthMetaData *pDestination, const XnDepthMetaData *pSource)
Shallow-Copies a Depth Meta Data object. Note that the data buffer is not copied, and that both objec...
XN_C_API void XN_C_DECL xnUnregisterFromNodeCreation(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeCreation().
XN_C_API XnStatus XN_C_DECL xnResetViewPoint(XnNodeHandle hInstance)
Sets the view point of this generator to its normal one.
XnPixelFormat
Definition: XnTypes.h:514
XnUInt8 Minor() const
Definition: XnCppWrapper.h:163
#define XN_CAPABILITY_PAN
Definition: XnTypes.h:335
XN_C_API XnStatus XN_C_DECL xnMockAudioSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pData)
Map< XnDepthPixel > DepthMap
Definition: XnCppWrapper.h:706
XN_C_API void XN_C_DECL xnUnregisterUserCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from user callbacks.
Iterator operator++(int)
Definition: XnCppWrapper.h:8497
XnUInt64 GetTimestamp() const
Gets the frame timestamp from the Generator node This method gets the timestamp directly from the Gen...
Definition: XnCppWrapper.h:3554
XnStatus LoadScriptFromString(const XnChar *strScript)
Loads an XML script string into the ScriptNode object.
Definition: XnCppWrapper.h:8391
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9895
XN_C_API void XN_C_DECL xnFreeLicensesList(XnLicense *aLicenses)
XN_C_API XnStatus XN_C_DECL xnGetGeneralIntValue(XnNodeHandle hNode, const XnChar *strCap, XnInt32 *pnValue)
Gets the current value of this capability.
XnStatus GetSupportedWaveOutputModes(XnWaveOutputMode *aSupportedModes, XnUInt32 &nCount) const
Returns a list of the wave output modes that the AudioGenerator node supports.
Definition: XnCppWrapper.h:8129
XnUInt8 & NumberOfChannels()
Gets the number of channels in each sample. This is a packet configuration setting associated with th...
Definition: XnCppWrapper.h:1404
XnBool IsEmpty()
Checks if the list NodeInfoList object is empty.
Definition: XnCppWrapper.h:2400
XN_C_API const XnChar *XN_C_DECL xnScriptNodeGetSupportedFormat(XnNodeHandle hScript)
XN_C_API const XnLabel *XN_C_DECL xnGetLabelMap(XnNodeHandle hInstance)
Gets the label map, describing the current segmentation of the scene.
void UnregisterFromFrameSyncChange(XnCallbackHandle hCallback)
Unregisters the &#39;Frame Sync Change&#39; event handler.
Definition: XnCppWrapper.h:3282
HandTouchingFOVEdgeCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:5924
ErrorStateCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:2487
XN_C_API void xnUnregisterFromOutOfPose(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from out of pose callback.
const XnDepthPixel * GetDepthMap() const
Definition: XnCppWrapper.h:4765
const XnDepthPixel *& Data()
Returns the depth map.
Definition: XnCppWrapper.h:856
XnAudioMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1431
GeneralIntCapability GetGainCap()
Definition: XnCppWrapper.h:4496
Definition: XnTypes.h:563
XnStatus GetUsers(XnUserID aUsers[], XnUInt16 &nUsers) const
Gets an array of user IDs of all the recognized users in the scene at the current time...
Definition: XnCppWrapper.h:7760
XnStatus SetGeneralProperty(const XnChar *strName, XnUInt32 nBufferSize, const void *pBuffer)
Definition: XnCppWrapper.h:2740
Context(XnContext *pContext)
Definition: XnCppWrapper.h:8665
void LockedNodeEndChanges(XnLockHandle hLock)
Definition: XnCppWrapper.h:2812
const XnGrayscale8Pixel * Grayscale8Data() const
Gets a pointer to the first pixel of the image in Grayscale8 format. Grayscale8 represents each pixel...
Definition: XnCppWrapper.h:1116
static XnStatus RegisterToUnderlying(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Definition: XnCppWrapper.h:10041
XnStatus GetRealProperty(const XnChar *strName, XnDouble &dValue) const
Definition: XnCppWrapper.h:2758
MapGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4277
const XnGrayscale8Pixel * GetGrayscale8ImageMap() const
Definition: XnCppWrapper.h:5026
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetFirst(XnNodeInfoList *pList)
XN_C_API XnStatus XN_C_DECL xnTellPlayerTimestamp(XnNodeHandle hPlayer, XnUInt64 *pnTimestamp)
Reports the current timestamp of a player, i.e. the amount of time passed since the beginning of the ...
void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Global Error State Change&#39; event.
Definition: XnCppWrapper.h:9254
XnBool IsViewPointAs(ProductionNode &otherNode) const
Returns whether the holder node&#39;s viewpoint is the same viewpoint as that of another specified node...
Definition: XnCppWrapper.h:3154
XnStatus InitFrom(const DepthMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer)
Definition: XnCppWrapper.h:790
GestureGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5388
XnStatus SetJointActive(XnSkeletonJoint eJoint, XnBool bState)
Changes the state of a specific skeleton joint to be active or inactive. The xn::UserGenerator node g...
Definition: XnCppWrapper.h:6489
XN_C_API XnStatus XN_C_DECL xnSetJointActive(XnNodeHandle hInstance, XnSkeletonJoint eJoint, XnBool bState)
Change the state of a specific joint, to be active or inactive.
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates an AudioGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9952
Definition: XnCppWrapper.h:2143
XN_C_API XnStatus XN_C_DECL xnGetGeneralIntRange(XnNodeHandle hNode, const XnChar *strCap, XnInt32 *pnMin, XnInt32 *pnMax, XnInt32 *pnStep, XnInt32 *pnDefault, XnBool *pbIsAutoSupported)
Gets the range of this capability values.
GeneralIntCapability GetBacklightCompensationCap()
Definition: XnCppWrapper.h:4486
XN_C_API XnStatus XN_C_DECL xnStopFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Stops frame sync with the other node.
ErrorStateCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:2488
void InitFrom(const ImageMetaData &other)
Shallow-copies an ImageMetaData object.
Definition: XnCppWrapper.h:970
NodeInfo GetInfo() const
Gets information about the node.
Definition: XnCppWrapper.h:2649
GeneralIntCapability GetSharpnessCap()
Definition: XnCppWrapper.h:4456
SkeletonCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:6408
XN_C_API XnStatus XN_C_DECL xnEnumerateGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt16 *nGestures)
Get the names of all gestures available.
void UnregisterFromCroppingChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Cropping Change&#39; event.
Definition: XnCppWrapper.h:4175
XN_C_API XnStatus XN_C_DECL xnGetGlobalErrorState(XnContext *pContext)
Gets the global error state of the context. If one of the nodes in the context is in error state...
XnDirection
Definition: XnTypes.h:701
Iterator & operator--()
Definition: XnCppWrapper.h:2206
XN_C_API XnStatus XN_C_DECL xnGetSupportedWaveOutputModes(XnNodeHandle hInstance, XnWaveOutputMode *aSupportedModes, XnUInt32 *pnCount)
Definition: XnCppWrapper.h:4114
XN_C_API XnStatus XN_C_DECL xnNodeInfoListClear(XnNodeInfoList *pList)
XnStatus StartTracking(XnUserID user)
Starts tracking a skeleton.
Definition: XnCppWrapper.h:6774
XnBool IsNewDataAvailable(XnUInt64 *pnTimestamp=NULL) const
Returns whether the node has new data available. The new data is available for updating, but can not yet be accessed by the application. The application needs to call &#39;Update Data&#39; to gain access to that new data.
Definition: XnCppWrapper.h:3464
XN_PRAGMA_STOP_DISABLED_WARNING_SECTION
Definition: XnCppWrapper.h:1383
XnYUV422DoublePixel * WritableYUV422Data()
Definition: XnCppWrapper.h:1110
XN_C_API XnStatus XN_C_DECL xnMockImageSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pData)
XN_C_API XnStatus XN_C_DECL xnEnumerateExistingNodes(XnContext *pContext, XnNodeInfoList **ppList)
Gets a list of all existing node in the context. Each node that was returned increases its ref count...
const XnVersion * GetUnderlying() const
Definition: XnCppWrapper.h:172
XN_C_API XnStatus xnRegisterToPoseDetected(XnNodeHandle hInstance, XnPoseDetectionCallback handler, void *pCookie, XnCallbackHandle *phCallback)
Register to callback when a user is in pose.
XnPixelFormat PixelFormat() const
Gets the frame&#39;s pixel color format used in this image map. This is the format of the frame object sa...
Definition: XnCppWrapper.h:1063
XnStatus RegisterGestureCallbacks(GestureRecognized RecognizedCB, GestureProgress ProgressCB, void *pCookie, XnCallbackHandle &hCallback)
Registers event handlers for the &#39;Gesture Recognized&#39; and &#39;Gesture Progress&#39; events. Pass NULL for any event the application does not need to receive.
Definition: XnCppWrapper.h:5552
ScriptNode(const NodeWrapper &other)
Definition: XnCppWrapper.h:8367
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel *pDepthMap)
Definition: XnCppWrapper.h:4918
Definition: XnTypes.h:518
Resolution(const XnChar *strName)
Definition: XnCppWrapper.h:9683
Generator(const NodeWrapper &other)
Definition: XnCppWrapper.h:3349
XnStatus RegisterToUserPositionChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;User Position Change&#39; event.
Definition: XnCppWrapper.h:4658
XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes)
Definition: XnCppWrapper.h:544
XnStatus SetCropping(const XnCropping &Cropping)
Sets the holder node&#39;s current cropping configuration. This configuration is used for generating the ...
Definition: XnCppWrapper.h:4134
XnPixelFormat & PixelFormat()
Gets the frame&#39;s pixel color format used in this image map. This is the format of the frame object sa...
Definition: XnCppWrapper.h:1073
struct XnContext XnContext
Definition: XnTypes.h:79
NodeWrapper(const NodeWrapper &other)
Definition: XnCppWrapper.h:1642
XnStatus GetAllActiveGestures(XnChar **astrGestures, XnUInt32 nNameLength, XnUInt16 &nGestures) const
Get the names of all gestures that are currently active in this generator node.
Definition: XnCppWrapper.h:5444
UserPositionCapability(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4619
DeviceIdentificationCapability GetIdentificationCap()
Definition: XnCppWrapper.h:2965
#define XN_CODEC_NULL
Definition: XnCodecIDs.h:26
XnStatus Remove(Iterator &it)
Definition: XnCppWrapper.h:2374
Definition: XnCppWrapper.h:1449
XN_C_API const XnChar *XN_C_DECL xnNodeInfoGetCreationInfo(XnNodeInfo *pNodeInfo)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetName(XnNodeQuery *pQuery, const XnChar *strName)
XN_C_API XnBool XN_C_DECL xnNeedPoseForSkeletonCalibration(XnNodeHandle hInstance)
Check if a specific pose is required for calibration.
XN_C_API XnUInt32 XN_C_DECL xnGetDataSize(XnNodeHandle hInstance)
Gets the size of current data, in bytes.
XnStatus SetMinVersion(const XnVersion &minVersion)
Sets in the Query object the minimum required version allowed for the Node Alternative.
Definition: XnCppWrapper.h:2026
XN_C_API void XN_C_DECL xnUnregisterCalibrationCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration callbacks.
Definition: XnTypes.h:108
Definition: XnCppWrapper.h:4720
XnBool IsDataNew() const
Definition: XnCppWrapper.h:3496
XnStatus OpenFileRecording(const XnChar *strFileName, ProductionNode &playerNode)
Recreates a production graph from a recorded ONI file and then replays the data generation exactly as...
Definition: XnCppWrapper.h:8848
XnStatus AddNeededNode(ProductionNode &needed)
Definition: XnCppWrapper.h:2655
struct XnModuleError * XnEnumerationErrorsIterator
Definition: XnEnumerationErrors.h:56
XN_C_API XnStatus XN_C_DECL xnGetGeneralProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt32 nBufferSize, void *pBuffer)
Gets a buffer property.
Version(const XnVersion &version)
Definition: XnCppWrapper.h:121
GeneralIntCapability GetIrisCap()
Definition: XnCppWrapper.h:4567
const XnLabel & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:1562
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9961
XN_C_API XnBool XN_C_DECL xnIsViewPointSupported(XnNodeHandle hInstance, XnNodeHandle hOther)
Checks if this generator can change its output to look like it was taken from a different location...
#define XN_CAPABILITY_CONTRAST
Definition: XnTypes.h:327
XnStatus SetMapOutputMode(const XnMapOutputMode &OutputMode)
Sets the current map output mode of the generator node.
Definition: XnCppWrapper.h:4319
XN_C_API void XN_C_DECL xnUnregisterFromNodeDestruction(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeDestruction().
XnStatus RegisterToPoseInProgress(PoseInProgress handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Pose In Progress&#39; event.
Definition: XnCppWrapper.h:7442
XN_C_API XnStatus XN_C_DECL xnGetUsers(XnNodeHandle hInstance, XnUserID *pUsers, XnUInt16 *pnUsers)
Get the current users.
Definition: XnCppWrapper.h:4611
Definition: XnCppWrapper.h:1627
XN_C_API XnStatus XN_C_DECL xnSetTrackingSmoothing(XnNodeHandle hInstance, XnFloat fFactor)
Change smoothing factor.
void UnregisterGestureCallbacks(XnCallbackHandle hCallback)
Unregisters the event handlers for the &#39;Gesture Recognized&#39; and &#39;Gesture Progress&#39; events...
Definition: XnCppWrapper.h:5581
XN_C_API XnResolution XN_C_DECL xnResolutionGetFromName(const XnChar *strName)
#define XN_CAPABILITY_BRIGHTNESS
Definition: XnTypes.h:326
XnStatus GetUserPixels(XnUserID user, SceneMetaData &smd) const
Gets the pixel map of the specified user in the scene and saves it in the xn::SceneMetaData object...
Definition: XnCppWrapper.h:7804
void InitFrom(const SceneMetaData &other)
Shallow-Copies an SceneMetaData object.
Definition: XnCppWrapper.h:1468
Definition: XnCppWrapper.h:2936
const xn::IRMap & IRMap() const
Gets a fast, light object wrapping the IR map. Remarks
Definition: XnCppWrapper.h:1337
XN_C_API void XN_C_DECL xnUnregisterFromGestureReadyForNextIntermediateStage(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a gesture is ready for its next stage.
Definition: XnCppWrapper.h:33
XN_C_API void XN_C_DECL xnUnregisterFromJointConfigurationChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from joint configuration changes.
XnResolution
Definition: XnTypes.h:410
XN_C_API XnStatus XN_C_DECL xnRegisterToNodeDestruction(XnContext *pContext, XnNodeDestructionHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to &#39;Node Destruction&#39; event. This event is raised whenever a node is de...
const XnSceneMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1588
XnBool IsCapabilitySupported(const XnChar *strCapabilityName) const
Returns whether a production node supports a specific capability.
Definition: XnCppWrapper.h:2704
Version(XnUInt8 nMajor, XnUInt8 nMinor, XnUInt16 nMaintenance, XnUInt32 nBuild)
Definition: XnCppWrapper.h:122
void UnregisterFromPoseInProgress(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Pose In Progress&#39; event.
Definition: XnCppWrapper.h:7470
XnStatus GetProductionNodeByName(const XnChar *strInstanceName, ProductionNode &node) const
Definition: XnCppWrapper.h:9152
Definition: XnCppWrapper.h:2530
XnStatus SetExistingNodeOnly(XnBool bExistingNode)
Sets in the Query object that the query will return only existing nodes, i.e., nodes that have been c...
Definition: XnCppWrapper.h:2107
ProductionNode(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:2638
Definition: XnCppWrapper.h:8458
XnBool IsPixelFormatSupported(XnPixelFormat Format) const
Returns whether the ImageGenerator node supports a specific pixel color format for the image map...
Definition: XnCppWrapper.h:5059
XnResolution GetResolution() const
Definition: XnCppWrapper.h:9694
UserPositionCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:4620
XN_C_API XnStatus XN_C_DECL xnGetRefNodeHandleByName(XnContext *pContext, const XnChar *strInstanceName, XnNodeHandle *phNode)
Gets a handle to an existing production node instance using that instance name.
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetVendor(XnNodeQuery *pQuery, const XnChar *strVendor)
void UnregisterFromPowerLineFrequencyChange(XnCallbackHandle hCallback)
Unregisters the event handler for the &#39;Power Line Frequency Change&#39; event.
Definition: XnCppWrapper.h:4239
XN_C_API XnStatus XN_C_DECL xnDecodeData(XnNodeHandle hCodec, const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten)
XnStatus RegisterToNewDataAvailable(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;New Data Available&#39; event.
Definition: XnCppWrapper.h:3439
XnStatus GetSupportedMapOutputModes(XnMapOutputMode *aModes, XnUInt32 &nCount) const
Gets a list of all the output modes that the generator node supports.
Definition: XnCppWrapper.h:4301
XnUInt32 FullXRes() const
Definition: XnCppWrapper.h:474
XnBool operator!=(const Iterator &other) const
Definition: XnCppWrapper.h:2177
ProductionNode(const NodeWrapper &other)
Definition: XnCppWrapper.h:2639
void UnregisterFromGenerationRunningChange(XnCallbackHandle hCallback)
Unregisters the &#39;Generation State Change&#39; event handler.
Definition: XnCppWrapper.h:3421
XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format)
Definition: XnCppWrapper.h:1002
XnStatus CopyFrom(const IRMetaData &other)
Definition: XnCppWrapper.h:1259
XnStatus RegisterToNodeDestruction(NodeDestructionHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Node Destruction&#39; event. see Event: &#39;Node Destruction&#39;.
Definition: XnCppWrapper.h:9308
void ReplaceUnderlyingObject(XnNodeInfoList *pList)
Definition: XnCppWrapper.h:2287
XN_C_API XnContext *XN_C_DECL xnGetRefContextFromNodeHandle(XnNodeHandle hNode)
Gets the context a node belongs to. The context ref count is increased. The user is responsible for r...
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAllocate(XnNodeInfoList **ppList)
NodeInfo(const NodeInfo &other)
Definition: XnCppWrapper.h:1819
XN_C_API XnUInt32 XN_C_DECL xnGetBytesPerPixel(XnNodeHandle hInstance)
Gets the number of bytes per pixel for this map generator.
XN_C_API XnStatus XN_C_DECL xnRemoveGesture(XnNodeHandle hInstance, const XnChar *strGesture)
Turn off gesture. The generator will no longer look for this gesture.
void GetMetaData(SceneMetaData &metaData) const
Gets the scene analyzer node&#39;s latest frame object, saving it in the xn::SceneMetaData object...
Definition: XnCppWrapper.h:5884
Map< XnRGB24Pixel > RGB24Map
Definition: XnCppWrapper.h:710
XnStatus EnumerateExistingNodes(NodeInfoList &list) const
Returns a list of all the context&#39;s existing created nodes.
Definition: XnCppWrapper.h:9077
void UnlockForChanges(XnLockHandle hLock)
Definition: XnCppWrapper.h:2794
XN_C_API XnUInt32 XN_C_DECL xnResolutionGetYRes(XnResolution resolution)
const XnImageMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1184
MapGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4276
Capability(const NodeWrapper &node)
Definition: XnCppWrapper.h:2443
DepthGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4728
XN_C_API XnStatus XN_C_DECL xnLoadSkeletonCalibrationData(XnNodeHandle hInstance, XnUserID user, XnUInt32 nSlot)
Load previously saved calibration data.
GeneralIntCapability GetRollCap()
Definition: XnCppWrapper.h:4526
const XnRGB24Pixel * RGB24Data() const
Gets a pointer to the first pixel of the image in RGB24 format. RGB24 format represents each pixel as...
Definition: XnCppWrapper.h:1084
const XnOutputMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:272
void InitFrom(const DepthMetaData &other)
Shallow-Copies a DepthMetaData object.
Definition: XnCppWrapper.h:775
XN_C_API XnStatus XN_C_DECL xnRegisterToFrameSyncChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to view point changes.
#define XN_CAPABILITY_TILT
Definition: XnTypes.h:336
XnStatus CreateBasedOn(ImageGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9875
XnUInt8 NumberOfChannels() const
Gets the number of channels in each sample. This is a packet configuration setting associated with th...
Definition: XnCppWrapper.h:1400
XN_C_API XnStatus XN_C_DECL xnRequestSkeletonCalibration(XnNodeHandle hInstance, XnUserID user, XnBool bForce)
Request calibration when possible.
XnStatus RegisterToGenerationRunningChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;Generation State Change&#39; event.
Definition: XnCppWrapper.h:3409
XnStatus Create(Context &context, const XnChar *strFormat)
Definition: XnCppWrapper.h:10004
XN_C_API XnStatus XN_C_DECL xnSetRecorderDestination(XnNodeHandle hRecorder, XnRecordMedium destType, const XnChar *strDest)
Tells the recorder where to record.
const xn::DepthMap & DepthMap() const
Definition: XnCppWrapper.h:867
XnStatus RegisterToEndOfFileReached(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the &#39;End-Of-File Reached&#39; event.
Definition: XnCppWrapper.h:4037
const XnMapMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:509
void UnregisterFromPoseDetected(XnCallbackHandle hCallback)
Unregisters an event handler for the &#39;Pose Detected&#39; event.
Definition: XnCppWrapper.h:7382
XnStatus WaitOneUpdateAll(ProductionNode &node)
Updates all generator nodes in the context to their latest available data, first waiting for a specif...
Definition: XnCppWrapper.h:9446
XnStatus GetStringProperty(const XnChar *strName, XnChar *csValue, XnUInt32 nBufSize) const
Definition: XnCppWrapper.h:2767
virtual ~OutputMetaData()
Definition: XnCppWrapper.h:213
XN_C_API XnBool XN_C_DECL xnGetGlobalMirror(XnContext *pContext)
Gets the global mirror flag.
void GetContext(Context &context) const
Gets the node&#39;s context.
Definition: XnCppWrapper.h:9723
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationInProgress(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration status while in progress.
XN_C_API XnStatus XN_C_DECL xnLoadScriptFromString(XnNodeHandle hScript, const XnChar *strScript)
XnStatus FindExistingNode(XnProductionNodeType type, ProductionNode &node) const
Searches for an existing created node of a specified type and returns a reference to it...
Definition: XnCppWrapper.h:9135
#define XN_CAPABILITY_ZOOM
Definition: XnTypes.h:338
XN_C_API XnStatus XN_C_DECL xnGetDeviceName(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XN_C_API XnStatus XN_C_DECL xnRegisterToGeneralIntValueChange(XnNodeHandle hNode, const XnChar *strCap, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to values changes.
XnStatus StopPoseDetection(XnUserID user)
Stops attempting to detect a pose (for a specific user).
Definition: XnCppWrapper.h:7309
XnStatus CreateAnyProductionTree(XnProductionNodeType type, Query *pQuery, ProductionNode &node, EnumerationErrors *pErrors=NULL)
Enumerates for production nodes of a specific node type, and creates the first production node found ...
Definition: XnCppWrapper.h:9025
XnUInt32 FullYRes() const
Definition: XnCppWrapper.h:486
XN_C_API void XN_C_DECL xnForceShutdown(XnContext *pContext)
Forces a context to shutdown, destroying all nodes. This function is used for backwards compatibility...
XnStatus SetGlobalMirror(XnBool bMirror)
Enables/disables the GlobalMirror flag.
Definition: XnCppWrapper.h:9210
MockDepthGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4894
XnStatus AddNodeFromAnotherList(Iterator &it)
Definition: XnCppWrapper.h:2327
MirrorCapability GetMirrorCap()
Gets a MirrorCapability object for accessing Mirror functionality.
Definition: XnCppWrapper.h:3597
XnStatus StopGenerating()
Makes the node leave Generating state (enters Non-Generating state).
Definition: XnCppWrapper.h:3391
Definition: XnTypes.h:1095
XN_C_API XnStatus XN_C_DECL xnRegisterToUserExit(XnNodeHandle hInstance, XnUserHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when the user exits the scene (but not lost yet)
XN_C_API XnStatus XN_C_DECL xnCreateUserGenerator(XnContext *pContext, XnNodeHandle *phUserGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a user generator.
XnStatus SetData(const IRMetaData &irMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:5297
XN_C_API void XN_C_DECL xnContextRelease(XnContext *pContext)
Releases a context object, decreasing its ref count by 1. If reference count has reached 0...
XN_C_API void XN_C_DECL xnUnregisterFromNodeErrorStateChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeErrorStateChange().
const xn::Grayscale16Map & Grayscale16Map() const
Gets a light wrapper object wrapping the frame&#39;s image map as Grayscale16 format. ...
Definition: XnCppWrapper.h:1175
XnStatus StopFrameSyncWith(Generator &other)
Removes the frame sync between the node holding this capability and the specified other node...
Definition: XnCppWrapper.h:9769
XnStatus WaitNoneUpdateAll()
Immediately updates all generator nodes in the context to their latest available data, without waiting for notification that any node has new data available.
Definition: XnCppWrapper.h:9472