OpenNI 1.5.4
XnCppWrapper.h
Go to the documentation of this file.
1 /****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2011 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * OpenNI is free software: you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published *
10 * by the Free Software Foundation, either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * OpenNI is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
20 * *
21 ****************************************************************************/
22 #ifndef __XN_CPP_WRAPPER_H__
23 #define __XN_CPP_WRAPPER_H__
24 
25 //---------------------------------------------------------------------------
26 // Includes
27 //---------------------------------------------------------------------------
28 #include <XnOpenNI.h>
29 #include <XnCodecIDs.h>
30 
31 //---------------------------------------------------------------------------
32 // Types
33 //---------------------------------------------------------------------------
34 namespace xn
35 {
36  //---------------------------------------------------------------------------
37  // Forward Declarations
38  //---------------------------------------------------------------------------
39  class ProductionNode;
40  class EnumerationErrors;
41  class NodeInfo;
42  class NodeInfoList;
43  class Context;
44  class Query;
45  class Generator;
46 
72  //---------------------------------------------------------------------------
73  // Types
74  //---------------------------------------------------------------------------
75 
101  typedef void (XN_CALLBACK_TYPE* StateChangedHandler)(ProductionNode& node, void* pCookie);
102 
103  //---------------------------------------------------------------------------
104  // Internal stuff
105  //---------------------------------------------------------------------------
106  typedef XnStatus (*_XnRegisterStateChangeFuncPtr)(XnNodeHandle hNode, XnStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback);
107  typedef void (*_XnUnregisterStateChangeFuncPtr)(XnNodeHandle hNode, XnCallbackHandle hCallback);
108 
109  static XnStatus _RegisterToStateChange(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
110  static void _UnregisterFromStateChange(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback);
111 
112  //---------------------------------------------------------------------------
113  // Some Utilities
114  //---------------------------------------------------------------------------
119  class Version
120  {
121  public:
122  Version(const XnVersion& version) : m_version(version) {}
123  Version(XnUInt8 nMajor, XnUInt8 nMinor, XnUInt16 nMaintenance, XnUInt32 nBuild)
124  {
125  m_version.nMajor = nMajor;
126  m_version.nMinor = nMinor;
127  m_version.nMaintenance = nMaintenance;
128  m_version.nBuild = nBuild;
129  }
130 
131  bool operator==(const Version& other) const
132  {
133  return (xnVersionCompare(&m_version, &other.m_version) == 0);
134  }
135  bool operator!=(const Version& other) const
136  {
137  return (xnVersionCompare(&m_version, &other.m_version) != 0);
138  }
139  bool operator<(const Version& other) const
140  {
141  return (xnVersionCompare(&m_version, &other.m_version) < 0);
142  }
143  bool operator<=(const Version& other) const
144  {
145  return (xnVersionCompare(&m_version, &other.m_version) <= 0);
146  }
147  bool operator>(const Version& other) const
148  {
149  return (xnVersionCompare(&m_version, &other.m_version) > 0);
150  }
151  bool operator>=(const Version& other) const
152  {
153  return (xnVersionCompare(&m_version, &other.m_version) >= 0);
154  }
155 
156  static Version Current()
157  {
158  XnVersion version;
159  xnGetVersion(&version);
160  return Version(version);
161  }
162 
163  XnUInt8 Major() const { return m_version.nMajor; }
164  XnUInt8 Minor() const { return m_version.nMinor; }
165  XnUInt16 Maintenance() const { return m_version.nMaintenance; }
166  XnUInt32 Build() const { return m_version.nBuild; }
167 
168  XnUInt8& Major() { return m_version.nMajor; }
169  XnUInt8& Minor() { return m_version.nMinor; }
170  XnUInt16& Maintenance() { return m_version.nMaintenance; }
171  XnUInt32& Build() { return m_version.nBuild; }
172 
173  const XnVersion* GetUnderlying() const { return &m_version; }
174  XnVersion* GetUnderlying() { return &m_version; }
175 
176  private:
177  XnVersion m_version;
178  };
179 
180  //---------------------------------------------------------------------------
181  // Meta Data
182  //---------------------------------------------------------------------------
183 
199  {
200  public:
206  inline OutputMetaData(const XnUInt8** ppData) : m_ppData(ppData), m_nAllocatedSize(0), m_pAllocatedData(NULL)
207  {
208  xnOSMemSet(&m_output, 0, sizeof(XnOutputMetaData));
209  }
210 
214  virtual ~OutputMetaData() { Free(); }
215 
219  inline XnUInt64 Timestamp() const { return m_output.nTimestamp; }
220 
224  inline XnUInt64& Timestamp() { return m_output.nTimestamp; }
225 
230  inline XnUInt32 FrameID() const { return m_output.nFrameID; }
231 
236  inline XnUInt32& FrameID() { return m_output.nFrameID; }
237 
246  inline XnUInt32 DataSize() const { return m_output.nDataSize; }
247 
256  inline XnUInt32& DataSize() { return m_output.nDataSize; }
257 
262  inline XnBool IsDataNew() const { return m_output.bIsNew; }
263 
268  inline XnBool& IsDataNew() { return m_output.bIsNew; }
269 
273  inline const XnOutputMetaData* GetUnderlying() const { return &m_output; }
277  inline XnOutputMetaData* GetUnderlying() { return &m_output; }
278 
283  inline const XnUInt8* Data() const { return *m_ppData; }
288  inline const XnUInt8*& Data() { return *m_ppData; }
289 
293  inline XnUInt8* WritableData()
294  {
296  return m_pAllocatedData;
297  }
298 
307  XnStatus AllocateData(XnUInt32 nBytes)
308  {
309  if (nBytes > m_nAllocatedSize)
310  {
311  // reallocate
312  XnUInt8* pData = (XnUInt8*)xnOSMallocAligned(nBytes, XN_DEFAULT_MEM_ALIGN);
313  XN_VALIDATE_ALLOC_PTR(pData);
314 
315  // allocation succeeded, replace
316  Free();
317  m_pAllocatedData = pData;
318  m_nAllocatedSize = nBytes;
319  }
320 
321  DataSize() = nBytes;
322  *m_ppData = m_pAllocatedData;
323 
324  return XN_STATUS_OK;
325  }
326 
330  void Free()
331  {
332  if (m_nAllocatedSize != 0)
333  {
335  m_pAllocatedData = NULL;
336  m_nAllocatedSize = 0;
337  }
338  }
339 
345  {
346  XnStatus nRetVal = XN_STATUS_OK;
347 
348  // check data isn't already writable
349  if (Data() != m_pAllocatedData || DataSize() > m_nAllocatedSize)
350  {
351  const XnUInt8* pOrigData = *m_ppData;
352 
353  nRetVal = AllocateData(DataSize());
354  XN_IS_STATUS_OK(nRetVal);
355 
356  if (pOrigData != NULL)
357  {
358  xnOSMemCopy(m_pAllocatedData, pOrigData, DataSize());
359  }
360  else
361  {
363  }
364  }
365 
366  return (XN_STATUS_OK);
367  }
368 
369  protected:
371 
372  private:
373  XnOutputMetaData m_output;
374 
375  const XnUInt8** m_ppData;
376  XnUInt32 m_nAllocatedSize;
377  };
378 
392  {
393  public:
400  inline MapMetaData(XnPixelFormat format, const XnUInt8** ppData) : OutputMetaData(ppData)
401  {
402  xnOSMemSet(&m_map, 0, sizeof(XnMapMetaData));
404  m_map.PixelFormat = format;
405  }
406 
412  inline XnUInt32 XRes() const { return m_map.Res.X; }
418  inline XnUInt32& XRes() { return m_map.Res.X; }
419 
425  inline XnUInt32 YRes() const { return m_map.Res.Y; }
431  inline XnUInt32& YRes() { return m_map.Res.Y; }
432 
441  inline XnUInt32 XOffset() const { return m_map.Offset.X; }
450  inline XnUInt32& XOffset() { return m_map.Offset.X; }
451 
460  inline XnUInt32 YOffset() const { return m_map.Offset.Y; }
469  inline XnUInt32& YOffset() { return m_map.Offset.Y; }
470 
475  inline XnUInt32 FullXRes() const { return m_map.FullRes.X; }
476 
477 
482  inline XnUInt32& FullXRes() { return m_map.FullRes.X; }
483 
487  inline XnUInt32 FullYRes() const { return m_map.FullRes.Y; }
491  inline XnUInt32& FullYRes() { return m_map.FullRes.Y; }
492 
496  inline XnUInt32 FPS() const { return m_map.nFPS; }
500  inline XnUInt32& FPS() { return m_map.nFPS; }
501 
505  inline XnPixelFormat PixelFormat() const { return m_map.PixelFormat; }
506 
510  inline const XnMapMetaData* GetUnderlying() const { return &m_map; }
514  inline XnMapMetaData* GetUnderlying() { return &m_map; }
515 
519  inline XnUInt32 BytesPerPixel() const
520  {
521  switch (PixelFormat())
522  {
524  return sizeof(XnRGB24Pixel);
526  return sizeof(XnYUV422DoublePixel)/2;
528  return sizeof(XnGrayscale8Pixel);
530  return sizeof(XnGrayscale16Pixel);
532  return 2;
533  default:
534  XN_ASSERT(FALSE);
535  return 0;
536  }
537  }
538 
545  XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes)
546  {
547  XnStatus nRetVal = XN_STATUS_OK;
548 
549  XnUInt32 nSize = nXRes * nYRes * BytesPerPixel();
550  nRetVal = OutputMetaData::AllocateData(nSize);
551  XN_IS_STATUS_OK(nRetVal);
552 
553  FullXRes() = XRes() = nXRes;
554  FullYRes() = YRes() = nYRes;
555  XOffset() = YOffset() = 0;
556 
557  return (XN_STATUS_OK);
558  }
559 
568  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnUInt8* pExternalBuffer)
569  {
570  XnStatus nRetVal = XN_STATUS_OK;
571 
572  if (pExternalBuffer == NULL)
573  {
574  nRetVal = AllocateData(nXRes, nYRes);
575  XN_IS_STATUS_OK(nRetVal);
576  }
577  else
578  {
579  FullXRes() = XRes() = nXRes;
580  FullYRes() = YRes() = nYRes;
581  XOffset() = YOffset() = 0;
582  Data() = pExternalBuffer;
583  DataSize() = nXRes * nYRes * BytesPerPixel();
584  }
585 
586  return (XN_STATUS_OK);
587  }
588 
589  protected:
591 
592  private:
593  // block copy ctor and assignment operator
594  MapMetaData& operator=(const MapMetaData&);
595  inline MapMetaData(const MapMetaData& other);
596 
597  // Members
598  XnMapMetaData m_map;
599  };
600 
608  template<class _pixelType>
609  class Map
610  {
611  public:
612  inline Map(_pixelType*& pData, XnUInt32& nXRes, XnUInt32 &nYRes) :
613  m_pData(pData), m_nXRes(nXRes), m_nYRes(nYRes)
614  {}
615 
623  inline XnUInt32 XRes() const { return m_nXRes; }
631  inline XnUInt32 YRes() const { return m_nYRes; }
632 
644  inline const _pixelType& operator[](XnUInt32 nIndex) const
645  {
646  XN_ASSERT(nIndex < (m_nXRes * m_nYRes));
647  return m_pData[nIndex];
648  }
660  inline _pixelType& operator[](XnUInt32 nIndex)
661  {
662  XN_ASSERT(nIndex < (m_nXRes *m_nYRes));
663  return m_pData[nIndex];
664  }
665 
674  inline const _pixelType& operator()(XnUInt32 x, XnUInt32 y) const
675  {
676  XN_ASSERT(x < m_nXRes && y < m_nYRes);
677  return m_pData[y*m_nXRes + x];
678  }
687  inline _pixelType& operator()(XnUInt32 x, XnUInt32 y)
688  {
689  XN_ASSERT(x < m_nXRes && y < m_nYRes);
690  return m_pData[y*m_nXRes + x];
691  }
692 
693  private:
694  /* block copy ctor and assignment operator */
695  Map(const Map& other);
696  Map& operator=(const Map&);
697 
698  _pixelType*& m_pData;
699  XnUInt32& m_nXRes;
700  XnUInt32& m_nYRes;
701  };
702 
754  class DepthMetaData : public MapMetaData
755  {
756  public:
760  inline DepthMetaData() :
761  MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_depth.pData),
762  m_depthMap(const_cast<XnDepthPixel*&>(m_depth.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
763  m_writableDepthMap((XnDepthPixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
764  {
765  xnOSMemSet(&m_depth, 0, sizeof(XnDepthMetaData));
766  m_depth.pMap = MapMetaData::GetUnderlying();
767  }
768 
776  inline void InitFrom(const DepthMetaData& other)
777  {
778  xnCopyDepthMetaData(&m_depth, &other.m_depth);
779  }
780 
791  inline XnStatus InitFrom(const DepthMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel* pExternalBuffer)
792  {
793  InitFrom(other);
794  return ReAdjust(nXRes, nYRes, pExternalBuffer);
795  }
796 
804  {
805  // copy props
806  InitFrom(other);
807  // and make a copy of the data (this will allocate and copy data)
808  return MakeDataWritable();
809  }
810 
814  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel* pExternalBuffer = NULL)
815  {
816  return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
817  }
818 
824  inline XnDepthPixel ZRes() const { return m_depth.nZRes; }
830  inline XnDepthPixel& ZRes() { return m_depth.nZRes; }
831 
844  inline const XnDepthPixel* Data() const { return (const XnDepthPixel*)MapMetaData::Data(); }
857  inline const XnDepthPixel*& Data() { return (const XnDepthPixel*&)MapMetaData::Data(); }
858 
859 
864 
868  inline const xn::DepthMap& DepthMap() const { return m_depthMap; }
873  {
875  return m_writableDepthMap;
876  }
877 
883  inline const XnDepthPixel& operator[](XnUInt32 nIndex) const
884  {
885  XN_ASSERT(nIndex < (XRes()*YRes()));
886  return Data()[nIndex];
887  }
888 
895  inline const XnDepthPixel& operator()(XnUInt32 x, XnUInt32 y) const
896  {
897  XN_ASSERT(x < XRes() && y < YRes());
898  return Data()[y*XRes() + x];
899  }
900 
904  inline const XnDepthMetaData* GetUnderlying() const { return &m_depth; }
908  inline XnDepthMetaData* GetUnderlying() { return &m_depth; }
909 
910  private:
911  // block copy ctor and assignment operator (because we can't return errors in those)
912  DepthMetaData(const DepthMetaData& other);
913  DepthMetaData& operator=(const DepthMetaData&);
914 
915  XnDepthMetaData m_depth;
916  const xn::DepthMap m_depthMap;
917  xn::DepthMap m_writableDepthMap;
918  };
919 
946  class ImageMetaData : public MapMetaData
947  {
948  public:
949  inline ImageMetaData() :
950  MapMetaData(XN_PIXEL_FORMAT_RGB24, &m_image.pData),
951  m_imageMap(const_cast<XnUInt8*&>(m_image.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
952  m_writableImageMap((XnUInt8*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
953  m_rgb24Map((XnRGB24Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
954  m_writableRgb24Map((XnRGB24Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
955  m_gray16Map((XnGrayscale16Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
956  m_writableGray16Map((XnGrayscale16Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
957  m_gray8Map((XnGrayscale8Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
958  m_writableGray8Map((XnGrayscale8Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
959  {
960  xnOSMemSet(&m_image, 0, sizeof(XnImageMetaData));
961  m_image.pMap = MapMetaData::GetUnderlying();
962  }
963 
971  inline void InitFrom(const ImageMetaData& other)
972  {
973  xnCopyImageMetaData(&m_image, &other.m_image);
974  }
975 
987  inline XnStatus InitFrom(const ImageMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8* pExternalBuffer)
988  {
989  InitFrom(other);
990  XnStatus nRetVal = ReAdjust(nXRes, nYRes, format, pExternalBuffer);
991  XN_IS_STATUS_OK(nRetVal);
992  PixelFormat() = format;
993  return XN_STATUS_OK;
994  }
995 
1003  inline XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format)
1004  {
1005  XnPixelFormat origFormat = PixelFormat();
1006  PixelFormat() = format;
1007  XnStatus nRetVal = MapMetaData::AllocateData(nXRes, nYRes);
1008  if (nRetVal != XN_STATUS_OK)
1009  {
1010  PixelFormat() = origFormat;
1011  return (nRetVal);
1012  }
1013 
1014  return XN_STATUS_OK;
1015  }
1016 
1022  inline XnStatus CopyFrom(const ImageMetaData& other)
1023  {
1024  // copy props
1025  xnCopyImageMetaData(&m_image, &other.m_image);
1026  // and make a copy of the data (this will allocate and copy data)
1027  return MakeDataWritable();
1028  }
1029 
1039  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8* pExternalBuffer = NULL)
1040  {
1041  XnPixelFormat origFormat = PixelFormat();
1042  PixelFormat() = format;
1043  XnStatus nRetVal = MapMetaData::ReAdjust(nXRes, nYRes, pExternalBuffer);
1044  if (nRetVal != XN_STATUS_OK)
1045  {
1046  PixelFormat() = origFormat;
1047  return (nRetVal);
1048  }
1049 
1050  return XN_STATUS_OK;
1051  }
1052 
1075 
1079  inline XnUInt8* WritableData() { return MapMetaData::WritableData(); }
1080 
1085  inline const XnRGB24Pixel* RGB24Data() const { return (const XnRGB24Pixel*)MapMetaData::Data(); }
1090  inline const XnRGB24Pixel*& RGB24Data() { return (const XnRGB24Pixel*&)MapMetaData::Data(); }
1095 
1101  inline const XnYUV422DoublePixel* YUV422Data() const { return (const XnYUV422DoublePixel*)MapMetaData::Data(); }
1112 
1117  inline const XnGrayscale8Pixel* Grayscale8Data() const { return (const XnGrayscale8Pixel*)MapMetaData::Data(); }
1127 
1132  inline const XnGrayscale16Pixel* Grayscale16Data() const { return (const XnGrayscale16Pixel*)MapMetaData::Data(); }
1142 
1146  inline const xn::ImageMap& ImageMap() const { return m_imageMap; }
1150  inline xn::ImageMap& WritableImageMap() { MakeDataWritable(); return m_writableImageMap; }
1151 
1157  inline const xn::RGB24Map& RGB24Map() const { return m_rgb24Map; }
1161  inline xn::RGB24Map& WritableRGB24Map() { MakeDataWritable(); return m_writableRgb24Map; }
1162 
1166  inline const xn::Grayscale8Map& Grayscale8Map() const { return m_gray8Map; }
1170  inline xn::Grayscale8Map& WritableGrayscale8Map() { MakeDataWritable(); return m_writableGray8Map; }
1171 
1176  inline const xn::Grayscale16Map& Grayscale16Map() const { return m_gray16Map; }
1180  inline xn::Grayscale16Map& WritableGrayscale16Map() { MakeDataWritable(); return m_writableGray16Map; }
1181 
1185  inline const XnImageMetaData* GetUnderlying() const { return &m_image; }
1189  inline XnImageMetaData* GetUnderlying() { return &m_image; }
1190 
1191  private:
1192  // block copy ctor and assignment operator
1193  ImageMetaData(const ImageMetaData& other);
1194  ImageMetaData& operator=(const ImageMetaData&);
1195 
1196  XnImageMetaData m_image;
1197  const xn::ImageMap m_imageMap;
1198  xn::ImageMap m_writableImageMap;
1199  const xn::RGB24Map m_rgb24Map;
1200  xn::RGB24Map m_writableRgb24Map;
1201  const xn::Grayscale16Map m_gray16Map;
1202  xn::Grayscale16Map m_writableGray16Map;
1203  const xn::Grayscale8Map m_gray8Map;
1204  xn::Grayscale8Map m_writableGray8Map;
1205  };
1206 
1216  class IRMetaData : public MapMetaData
1217  {
1218  public:
1219  inline IRMetaData() :
1220  MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_ir.pData),
1221  m_irMap(const_cast<XnIRPixel*&>(m_ir.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
1222  m_writableIRMap((XnIRPixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
1223  {
1224  xnOSMemSet(&m_ir, 0, sizeof(XnIRMetaData));
1226  }
1227 
1235  inline void InitFrom(const IRMetaData& other)
1236  {
1237  xnCopyIRMetaData(&m_ir, &other.m_ir);
1238  }
1239 
1249  inline XnStatus InitFrom(const IRMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel* pExternalBuffer)
1250  {
1251  InitFrom(other);
1252  return ReAdjust(nXRes, nYRes, pExternalBuffer);
1253  }
1254 
1261  {
1262  // copy props
1263  xnCopyIRMetaData(&m_ir, &other.m_ir);
1264  // and make a copy of the data (this will allocate and copy data)
1265  return MakeDataWritable();
1266  }
1267 
1271  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel* pExternalBuffer = NULL)
1272  {
1273  return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
1274  }
1275 
1288  inline const XnIRPixel* Data() const { return (const XnIRPixel*)MapMetaData::Data(); }
1301  inline const XnIRPixel*& Data() { return (const XnIRPixel*&)MapMetaData::Data(); }
1306 
1312  inline const XnIRPixel& operator[](XnUInt32 nIndex) const
1313  {
1314  XN_ASSERT(nIndex < (XRes()*YRes()));
1315  return Data()[nIndex];
1316  }
1317 
1324  inline const XnIRPixel& operator()(XnUInt32 x, XnUInt32 y) const
1325  {
1326  XN_ASSERT(x < XRes() && y < YRes());
1327  return Data()[y*XRes() + x];
1328  }
1329 
1338  inline const xn::IRMap& IRMap() const { return m_irMap; }
1347  inline xn::IRMap& WritableIRMap() { MakeDataWritable(); return m_writableIRMap; }
1348 
1352  inline const XnIRMetaData* GetUnderlying() const { return &m_ir; }
1356  inline XnIRMetaData* GetUnderlying() { return &m_ir; }
1357 
1358  private:
1359  // block copy ctor and assignment operator
1360  IRMetaData(const IRMetaData& other);
1361  IRMetaData& operator=(const IRMetaData&);
1362 
1363  XnIRMetaData m_ir;
1364  const xn::IRMap m_irMap;
1365  xn::IRMap m_writableIRMap;
1366  };
1367 
1375  {
1376  public:
1377  XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_UNALIGNED_ADDRESS_WARNING_ID);
1378  inline AudioMetaData() : OutputMetaData(&m_audio.pData)
1379  {
1380  xnOSMemSet(&m_audio, 0, sizeof(XnAudioMetaData));
1382  }
1383 
1385 
1393  inline void InitFrom(const AudioMetaData& other)
1394  {
1395  xnCopyAudioMetaData(&m_audio, &other.m_audio);
1396  }
1397 
1401  inline XnUInt8 NumberOfChannels() const { return m_audio.Wave.nChannels; }
1405  inline XnUInt8& NumberOfChannels() { return m_audio.Wave.nChannels; }
1406 
1410  inline XnUInt32 SampleRate() const { return m_audio.Wave.nSampleRate; }
1414  inline XnUInt32& SampleRate() { return m_audio.Wave.nSampleRate; }
1415 
1419  inline XnUInt16 BitsPerSample() const { return m_audio.Wave.nBitsPerSample; }
1423  inline XnUInt16& BitsPerSample() { return m_audio.Wave.nBitsPerSample; }
1424 
1428  inline const XnAudioMetaData* GetUnderlying() const { return &m_audio; }
1432  inline XnAudioMetaData* GetUnderlying() { return &m_audio; }
1433 
1434  private:
1435  // block copy ctor and assignment operator
1436  AudioMetaData(const AudioMetaData& other);
1437  AudioMetaData& operator=(const AudioMetaData&);
1438 
1439  XnAudioMetaData m_audio;
1440  };
1441 
1451  {
1452  public:
1453  inline SceneMetaData() :
1454  MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_scene.pData),
1455  m_labelMap(const_cast<XnLabel*&>(m_scene.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
1456  m_writableLabelMap((XnLabel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
1457  {
1458  xnOSMemSet(&m_scene, 0, sizeof(XnSceneMetaData));
1459  m_scene.pMap = MapMetaData::GetUnderlying();
1460  }
1461 
1469  inline void InitFrom(const SceneMetaData& other)
1470  {
1471  xnCopySceneMetaData(&m_scene, &other.m_scene);
1472  }
1473 
1483  inline XnStatus InitFrom(const SceneMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel* pExternalBuffer)
1484  {
1485  InitFrom(other);
1486  return ReAdjust(nXRes, nYRes, pExternalBuffer);
1487  }
1488 
1495  {
1496  // copy props
1497  xnCopySceneMetaData(&m_scene, &other.m_scene);
1498  // and make a copy of the data (this will allocate and copy data)
1499  return MakeDataWritable();
1500  }
1501 
1505  XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel* pExternalBuffer = NULL)
1506  {
1507  return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
1508  }
1509 
1523  inline const XnLabel* Data() const { return (const XnLabel*)MapMetaData::Data(); }
1537  inline const XnLabel*& Data() { return (const XnLabel*&)MapMetaData::Data(); }
1538 
1543 
1547  inline const xn::LabelMap& LabelMap() const { return m_labelMap; }
1551  inline xn::LabelMap& WritableLabelMap() { MakeDataWritable(); return m_writableLabelMap; }
1552 
1563  inline const XnLabel& operator[](XnUInt32 nIndex) const
1564  {
1565  XN_ASSERT(nIndex < (XRes()*YRes()));
1566  return Data()[nIndex];
1567  }
1568 
1580  inline const XnLabel& operator()(XnUInt32 x, XnUInt32 y) const
1581  {
1582  XN_ASSERT(x < XRes() && y < YRes());
1583  return (*this)[y*XRes() + x];
1584  }
1585 
1589  inline const XnSceneMetaData* GetUnderlying() const { return &m_scene; }
1593  inline XnSceneMetaData* GetUnderlying() { return &m_scene; }
1594 
1595  private:
1596  // block copy ctor and assignment operator
1597  SceneMetaData(const SceneMetaData& other);
1598  SceneMetaData& operator=(const SceneMetaData&);
1599 
1600  XnSceneMetaData m_scene;
1601  const xn::LabelMap m_labelMap;
1602  xn::LabelMap m_writableLabelMap;
1603  };
1604 
1605  //---------------------------------------------------------------------------
1606  // NodeWrapper
1607  //---------------------------------------------------------------------------
1608 
1629  {
1630  public:
1631  friend class Context;
1632 
1638  inline NodeWrapper(XnNodeHandle hNode) : m_hNode(NULL), m_hShuttingDownCallback(NULL)
1639  {
1640  SetHandle(hNode);
1641  }
1642 
1643  inline NodeWrapper(const NodeWrapper& other) : m_hNode(NULL), m_hShuttingDownCallback(NULL)
1644  {
1645  SetHandle(other.GetHandle());
1646  }
1647 
1648  inline NodeWrapper& operator=(const NodeWrapper& other)
1649  {
1650  SetHandle(other.GetHandle());
1651  return *this;
1652  }
1653 
1654  inline ~NodeWrapper()
1655  {
1656  SetHandle(NULL);
1657  }
1658 
1659  inline operator XnNodeHandle() const { return GetHandle(); }
1660 
1664  inline XnNodeHandle GetHandle() const { return m_hNode; }
1665 
1671  inline XnBool operator==(const NodeWrapper& other)
1672  {
1673  return (GetHandle() == other.GetHandle());
1674  }
1675 
1681  inline XnBool operator!=(const NodeWrapper& other)
1682  {
1683  return (GetHandle() != other.GetHandle());
1684  }
1685 
1699  inline XnBool IsValid() const { return (GetHandle() != NULL); }
1700 
1701  /*
1702  * @brief Gets the instance name of a node. Unless the application made a specific
1703  * request for a specific name, the name will be of the form: "Depth1", "Image2", etc.
1704  */
1705  const XnChar* GetName() const {return xnGetNodeName(GetHandle()); }
1706 
1712 
1717  inline void Release()
1718  {
1719  SetHandle(NULL);
1720  }
1721 
1722 
1726  inline void SetHandle(XnNodeHandle hNode)
1727  {
1728  if (m_hNode == hNode)
1729  {
1730  // Optimization: do nothing
1731  return;
1732  }
1733 
1734  // check currently held node. If we're holding a node, release it
1735  if (m_hNode != NULL)
1736  {
1737  XnContext* pContext = xnGetRefContextFromNodeHandle(m_hNode);
1738  xnContextUnregisterFromShutdown(pContext, m_hShuttingDownCallback);
1739  xnContextRelease(pContext);
1740  xnProductionNodeRelease(m_hNode);
1741  }
1742 
1743  // check new node handle, if it points to a node, add ref to it
1744  if (hNode != NULL)
1745  {
1746  XnStatus nRetVal = xnProductionNodeAddRef(hNode);
1747  XN_ASSERT(nRetVal == XN_STATUS_OK);
1748  XN_REFERENCE_VARIABLE(nRetVal);
1749 
1750  XnContext* pContext = xnGetRefContextFromNodeHandle(hNode);
1751 
1752  nRetVal = xnContextRegisterForShutdown(pContext, ContextShuttingDownCallback, this, &m_hShuttingDownCallback);
1753  XN_ASSERT(nRetVal == XN_STATUS_OK);
1754 
1755  xnContextRelease(pContext);
1756  }
1757 
1758  m_hNode = hNode;
1759  }
1760 
1761  inline void TakeOwnership(XnNodeHandle hNode)
1762  {
1763  SetHandle(hNode);
1764 
1765  if (hNode != NULL)
1766  {
1767  xnProductionNodeRelease(hNode);
1768  }
1769  }
1770 
1772  inline XnStatus XN_API_DEPRECATED("Please use AddRef() instead.") Ref() { return AddRef(); }
1773  inline void XN_API_DEPRECATED("Please use Release() instead.") Unref() { Release(); }
1776  private:
1777  XnNodeHandle m_hNode;
1778  XnCallbackHandle m_hShuttingDownCallback;
1779 
1780  static void XN_CALLBACK_TYPE ContextShuttingDownCallback(XnContext* /*pContext*/, void* pCookie)
1781  {
1782  NodeWrapper* pThis = (NodeWrapper*)pCookie;
1783  pThis->m_hNode = NULL;
1784  }
1785  };
1786 
1787  //---------------------------------------------------------------------------
1788  // Node Info
1789  //---------------------------------------------------------------------------
1790 
1802  class NodeInfo
1803  {
1804  public:
1810  NodeInfo(XnNodeInfo* pInfo) : m_pNeededNodes(NULL), m_bOwnerOfNode(FALSE)
1811  {
1812  SetUnderlyingObject(pInfo);
1813  }
1814 
1820  NodeInfo(const NodeInfo& other) : m_pNeededNodes(NULL), m_bOwnerOfNode(FALSE)
1821  {
1822  SetUnderlyingObject(other.m_pInfo);
1823  }
1824 
1829  {
1830  SetUnderlyingObject(NULL);
1831  }
1832 
1838  inline NodeInfo& operator=(const NodeInfo& other)
1839  {
1840  SetUnderlyingObject(other.m_pInfo);
1841  return *this;
1842  }
1843 
1847  inline operator XnNodeInfo*()
1848  {
1849  return m_pInfo;
1850  }
1851 
1857  inline XnStatus SetInstanceName(const XnChar* strName)
1858  {
1859  return xnNodeInfoSetInstanceName(m_pInfo, strName);
1860  }
1861 
1876  {
1877  return *xnNodeInfoGetDescription(m_pInfo);
1878  }
1879 
1891  inline const XnChar* GetInstanceName() const
1892  {
1893  return xnNodeInfoGetInstanceName(m_pInfo);
1894  }
1895 
1907  inline const XnChar* GetCreationInfo() const
1908  {
1909  return xnNodeInfoGetCreationInfo(m_pInfo);
1910  }
1911 
1912  /*
1913  * @brief Gets the list of dependant nodes for this node alternative.
1914  * These are any other node alternatives that the node is dependant on.
1915  */
1916  inline NodeInfoList& GetNeededNodes() const;
1917 
1925  inline XnStatus GetInstance(ProductionNode& node) const;
1926 
1931  inline const void* GetAdditionalData() const
1932  {
1933  return xnNodeInfoGetAdditionalData(m_pInfo);
1934  }
1935 
1940  inline XnStatus GetTreeStringRepresentation(XnChar* csResultBuffer, XnUInt32 nBufferSize) const
1941  {
1942  return xnNodeInfoGetTreeStringRepresentation(m_pInfo, csResultBuffer, nBufferSize);
1943  }
1944 
1945  private:
1946  inline void SetUnderlyingObject(XnNodeInfo* pInfo);
1947 
1948  XnNodeInfo* m_pInfo;
1949  mutable NodeInfoList* m_pNeededNodes;
1950  XnBool m_bOwnerOfNode; // backwards compatibility
1951  friend class Context;
1952  };
1953 
1954  //---------------------------------------------------------------------------
1955  // Query
1956  //---------------------------------------------------------------------------
1957 
1976  class Query
1977  {
1978  public:
1979  inline Query() : m_bAllocated(TRUE)
1980  {
1981  xnNodeQueryAllocate(&m_pQuery);
1982  }
1983 
1984  inline Query(XnNodeQuery* pNodeQuery) : m_bAllocated(FALSE), m_pQuery(pNodeQuery)
1985  {
1986  }
1987 
1989  {
1990  if (m_bAllocated)
1991  {
1992  xnNodeQueryFree(m_pQuery);
1993  }
1994  }
1995 
1999  inline const XnNodeQuery* GetUnderlyingObject() const { return m_pQuery; }
2000  inline XnNodeQuery* GetUnderlyingObject() { return m_pQuery; }
2001 
2006  inline XnStatus SetVendor(const XnChar* strVendor)
2007  {
2008  return xnNodeQuerySetVendor(m_pQuery, strVendor);
2009  }
2010 
2019  inline XnStatus SetName(const XnChar* strName)
2020  {
2021  return xnNodeQuerySetName(m_pQuery, strName);
2022  }
2023 
2027  inline XnStatus SetMinVersion(const XnVersion& minVersion)
2028  {
2029  return xnNodeQuerySetMinVersion(m_pQuery, &minVersion);
2030  }
2031 
2035  inline XnStatus SetMinVersion(const Version& minVersion)
2036  {
2037  return xnNodeQuerySetMinVersion(m_pQuery, minVersion.GetUnderlying());
2038  }
2039 
2043  inline XnStatus SetMaxVersion(const XnVersion& maxVersion)
2044  {
2045  return xnNodeQuerySetMaxVersion(m_pQuery, &maxVersion);
2046  }
2047 
2051  inline XnStatus SetMaxVersion(const Version& maxVersion)
2052  {
2053  return xnNodeQuerySetMaxVersion(m_pQuery, maxVersion.GetUnderlying());
2054  }
2055 
2068  inline XnStatus AddSupportedCapability(const XnChar* strNeededCapability)
2069  {
2070  return xnNodeQueryAddSupportedCapability(m_pQuery, strNeededCapability);
2071  }
2072 
2084  {
2085  return xnNodeQueryAddSupportedMapOutputMode(m_pQuery, &MapOutputMode);
2086  }
2087 
2092  inline XnStatus SetSupportedMinUserPositions(const XnUInt32 nCount)
2093  {
2094  return xnNodeQuerySetSupportedMinUserPositions(m_pQuery, nCount);
2095  }
2096 
2108  inline XnStatus SetExistingNodeOnly(XnBool bExistingNode)
2109  {
2110  return xnNodeQuerySetExistingNodeOnly(m_pQuery, bExistingNode);
2111  }
2112 
2117  inline XnStatus AddNeededNode(const XnChar* strInstanceName)
2118  {
2119  return xnNodeQueryAddNeededNode(m_pQuery, strInstanceName);
2120  }
2121 
2126  inline XnStatus SetCreationInfo(const XnChar* strCreationInfo)
2127  {
2128  return xnNodeQuerySetCreationInfo(m_pQuery, strCreationInfo);
2129  }
2130 
2131  private:
2132  XnNodeQuery* m_pQuery;
2133  XnBool m_bAllocated;
2134  };
2135 
2136  //---------------------------------------------------------------------------
2137  // Node Info List
2138  //---------------------------------------------------------------------------
2139 
2145  {
2146  public:
2150  class Iterator
2151  {
2152  public:
2153  friend class NodeInfoList;
2154 
2167  XnBool operator==(const Iterator& other) const
2168  {
2169  return m_it.pCurrent == other.m_it.pCurrent;
2170  }
2171 
2178  XnBool operator!=(const Iterator& other) const
2179  {
2180  return m_it.pCurrent != other.m_it.pCurrent;
2181  }
2182 
2188  {
2189  UpdateInternalObject(xnNodeInfoListGetNext(m_it));
2190  return *this;
2191  }
2192 
2197  inline Iterator operator++(int)
2198  {
2199  XnNodeInfoListIterator curr = m_it;
2200  UpdateInternalObject(xnNodeInfoListGetNext(m_it));
2201  return Iterator(curr);
2202  }
2203 
2208  {
2209  UpdateInternalObject(xnNodeInfoListGetPrevious(m_it));
2210  return *this;
2211  }
2212 
2216  inline Iterator operator--(int)
2217  {
2218  XnNodeInfoListIterator curr = m_it;
2219  UpdateInternalObject(xnNodeInfoListGetPrevious(m_it));
2220  return Iterator(curr);
2221  }
2222 
2227  {
2228  return m_Info;
2229  }
2230 
2231  private:
2232  inline Iterator(XnNodeInfoListIterator it) : m_Info(NULL)
2233  {
2234  UpdateInternalObject(it);
2235  }
2236 
2237  inline void UpdateInternalObject(XnNodeInfoListIterator it)
2238  {
2239  m_it = it;
2241  {
2242  XnNodeInfo* pInfo = xnNodeInfoListGetCurrent(it);
2243  m_Info = NodeInfo(pInfo);
2244  }
2245  else
2246  {
2247  m_Info = NodeInfo(NULL);
2248  }
2249  }
2250 
2251  NodeInfo m_Info;
2253  };
2254 
2258  inline NodeInfoList()
2259  {
2260  xnNodeInfoListAllocate(&m_pList);
2261  m_bAllocated = TRUE;
2262  }
2263 
2270  inline NodeInfoList(XnNodeInfoList* pList) : m_pList(pList), m_bAllocated(FALSE) {}
2271 
2272  inline ~NodeInfoList()
2273  {
2274  FreeImpl();
2275  }
2276 
2280  inline XnNodeInfoList* GetUnderlyingObject() const { return m_pList; }
2281 
2289  {
2290  FreeImpl();
2291  m_pList = pList;
2292  m_bAllocated = TRUE;
2293  }
2294 
2299  inline XnStatus Add(XnProductionNodeDescription& description, const XnChar* strCreationInfo, NodeInfoList* pNeededNodes)
2300  {
2301  XnNodeInfoList* pList = (pNeededNodes == NULL) ? NULL : pNeededNodes->GetUnderlyingObject();
2302  return xnNodeInfoListAdd(m_pList, &description, strCreationInfo, pList);
2303  }
2304 
2309  inline XnStatus AddEx(XnProductionNodeDescription& description, const XnChar* strCreationInfo, NodeInfoList* pNeededNodes, const void* pAdditionalData, XnFreeHandler pFreeHandler)
2310  {
2311  XnNodeInfoList* pList = (pNeededNodes == NULL) ? NULL : pNeededNodes->GetUnderlyingObject();
2312  return xnNodeInfoListAddEx(m_pList, &description, strCreationInfo, pList, pAdditionalData, pFreeHandler);
2313  }
2314 
2319  inline XnStatus AddNode(NodeInfo& info)
2320  {
2321  return xnNodeInfoListAddNode(m_pList, info);
2322  }
2323 
2329  {
2330  return xnNodeInfoListAddNodeFromList(m_pList, it.m_it);
2331  }
2332 
2337  inline Iterator Begin() const
2338  {
2339  return Iterator(xnNodeInfoListGetFirst(m_pList));
2340  }
2341 
2346  inline Iterator End() const
2347  {
2348  XnNodeInfoListIterator it = { NULL };
2349  return Iterator(it);
2350  }
2351 
2356  inline Iterator RBegin() const
2357  {
2358  return Iterator(xnNodeInfoListGetLast(m_pList));
2359  }
2360 
2365  inline Iterator REnd() const
2366  {
2367  XnNodeInfoListIterator it = { NULL };
2368  return Iterator(it);
2369  }
2370 
2376  {
2377  return xnNodeInfoListRemove(m_pList, it.m_it);
2378  }
2379 
2384  inline XnStatus Clear()
2385  {
2386  return xnNodeInfoListClear(m_pList);
2387  }
2388 
2394  {
2395  return xnNodeInfoListAppend(m_pList, other.GetUnderlyingObject());
2396  }
2397 
2401  inline XnBool IsEmpty()
2402  {
2403  return xnNodeInfoListIsEmpty(m_pList);
2404  }
2405 
2410  inline XnStatus FilterList(Context& context, Query& query);
2411 
2412  private:
2413  inline void FreeImpl()
2414  {
2415  if (m_bAllocated)
2416  {
2417  xnNodeInfoListFree(m_pList);
2418  m_bAllocated = FALSE;
2419  m_pList = NULL;
2420  }
2421  }
2422 
2423  XnNodeInfoList* m_pList;
2424  XnBool m_bAllocated;
2425  };
2426 
2427  //---------------------------------------------------------------------------
2428  // Production Nodes Functionality
2429  //---------------------------------------------------------------------------
2430 
2435  class Capability : public NodeWrapper
2436  {
2437  public:
2444  Capability(const NodeWrapper& node) : NodeWrapper(node) {}
2445  };
2446 
2481  {
2482  public:
2490 
2494  inline XnStatus GetErrorState() const
2495  {
2496  return xnGetNodeErrorState(GetHandle());
2497  }
2498 
2509  {
2510  return _RegisterToStateChange(xnRegisterToNodeErrorStateChange, GetHandle(), handler, pCookie, hCallback);
2511  }
2512 
2521  {
2522  _UnregisterFromStateChange(xnUnregisterFromNodeErrorStateChange, GetHandle(), hCallback);
2523  }
2524  };
2525 
2532  {
2533  public:
2540  GeneralIntCapability(XnNodeHandle hNode, const XnChar* strCap) : Capability(hNode), m_strCap(strCap) {}
2541  GeneralIntCapability(const NodeWrapper& node, const XnChar* strCap) : Capability(node), m_strCap(strCap) {}
2542 
2547  inline void GetRange(XnInt32& nMin, XnInt32& nMax, XnInt32& nStep, XnInt32& nDefault, XnBool& bIsAutoSupported) const
2548  {
2549  xnGetGeneralIntRange(GetHandle(), m_strCap, &nMin, &nMax, &nStep, &nDefault, &bIsAutoSupported);
2550  }
2551 
2556  inline XnInt32 Get()
2557  {
2558  XnInt32 nValue;
2559  xnGetGeneralIntValue(GetHandle(), m_strCap, &nValue);
2560  return nValue;
2561  }
2562 
2567  inline XnStatus Set(XnInt32 nValue)
2568  {
2569  return xnSetGeneralIntValue(GetHandle(), m_strCap, nValue);
2570  }
2571 
2581  XnStatus RegisterToValueChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
2582 
2591 
2592  private:
2593  const XnChar* m_strCap;
2594  };
2595 
2632  {
2633  public:
2639  inline ProductionNode(XnNodeHandle hNode = NULL) : NodeWrapper(hNode) {}
2640  inline ProductionNode(const NodeWrapper& other) : NodeWrapper(other) {}
2641 
2650  inline NodeInfo GetInfo() const { return NodeInfo(xnGetNodeInfo(GetHandle())); }
2651 
2657  {
2658  return xnAddNeededNode(GetHandle(), needed.GetHandle());
2659  }
2660 
2666  {
2667  return xnRemoveNeededNode(GetHandle(), needed.GetHandle());
2668  }
2669 
2681  inline void GetContext(Context& context) const;
2682 
2692  inline Context GetContext() const;
2693 
2705  inline XnBool IsCapabilitySupported(const XnChar* strCapabilityName) const
2706  {
2707  return xnIsCapabilitySupported(GetHandle(), strCapabilityName);
2708  }
2709 
2714  inline XnStatus SetIntProperty(const XnChar* strName, XnUInt64 nValue)
2715  {
2716  return xnSetIntProperty(GetHandle(), strName, nValue);
2717  }
2718 
2723  inline XnStatus SetRealProperty(const XnChar* strName, XnDouble dValue)
2724  {
2725  return xnSetRealProperty(GetHandle(), strName, dValue);
2726  }
2727 
2732  inline XnStatus SetStringProperty(const XnChar* strName, const XnChar* strValue)
2733  {
2734  return xnSetStringProperty(GetHandle(), strName, strValue);
2735  }
2736 
2741  inline XnStatus SetGeneralProperty(const XnChar* strName, XnUInt32 nBufferSize, const void* pBuffer)
2742  {
2743  return xnSetGeneralProperty(GetHandle(), strName, nBufferSize, pBuffer);
2744  }
2745 
2750  inline XnStatus GetIntProperty(const XnChar* strName, XnUInt64& nValue) const
2751  {
2752  return xnGetIntProperty(GetHandle(), strName, &nValue);
2753  }
2754 
2759  inline XnStatus GetRealProperty(const XnChar* strName, XnDouble &dValue) const
2760  {
2761  return xnGetRealProperty(GetHandle(), strName, &dValue);
2762  }
2763 
2768  inline XnStatus GetStringProperty(const XnChar* strName, XnChar* csValue, XnUInt32 nBufSize) const
2769  {
2770  return xnGetStringProperty(GetHandle(), strName, csValue, nBufSize);
2771  }
2772 
2777  inline XnStatus GetGeneralProperty(const XnChar* strName, XnUInt32 nBufferSize, void* pBuffer) const
2778  {
2779  return xnGetGeneralProperty(GetHandle(), strName, nBufferSize, pBuffer);
2780  }
2781 
2787  {
2788  return xnLockNodeForChanges(GetHandle(), phLock);
2789  }
2790 
2795  inline void UnlockForChanges(XnLockHandle hLock)
2796  {
2798  }
2799 
2805  {
2806  return xnLockedNodeStartChanges(GetHandle(), hLock);
2807  }
2808 
2814  {
2816  }
2817 
2827  {
2828  return ErrorStateCapability(GetHandle());
2829  }
2830 
2840  {
2841  return ErrorStateCapability(GetHandle());
2842  }
2843 
2855  inline GeneralIntCapability GetGeneralIntCap(const XnChar* strCapability)
2856  {
2857  return GeneralIntCapability(GetHandle(), strCapability);
2858  }
2859  };
2860 
2871  {
2872  public:
2880 
2890  inline XnStatus GetDeviceName(XnChar* strBuffer, XnUInt32 nBufferSize)
2891  {
2892  return xnGetDeviceName(GetHandle(), strBuffer, &nBufferSize);
2893  }
2894 
2904  inline XnStatus GetVendorSpecificData(XnChar* strBuffer, XnUInt32 nBufferSize)
2905  {
2906  return xnGetVendorSpecificData(GetHandle(), strBuffer, &nBufferSize);
2907  }
2908 
2918  inline XnStatus GetSerialNumber(XnChar* strBuffer, XnUInt32 nBufferSize)
2919  {
2920  return xnGetSerialNumber(GetHandle(), strBuffer, &nBufferSize);
2921  }
2922  };
2923 
2937  class Device : public ProductionNode
2938  {
2939  public:
2940  inline Device(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
2941  inline Device(const NodeWrapper& other) : ProductionNode(other) {}
2942 
2951  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
2952 
2967  {
2969  }
2970  };
2971 
3020  {
3021  public:
3022  inline MirrorCapability(XnNodeHandle hNode) : Capability(hNode) {}
3023  MirrorCapability(const NodeWrapper& node) : Capability(node) {}
3024 
3031  inline XnStatus SetMirror(XnBool bMirror)
3032  {
3033  return xnSetMirror(GetHandle(), bMirror);
3034  }
3035 
3039  inline XnBool IsMirrored() const
3040  {
3041  return xnIsMirrored(GetHandle());
3042  }
3043 
3053  inline XnStatus RegisterToMirrorChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
3054  {
3055  return _RegisterToStateChange(xnRegisterToMirrorChange, GetHandle(), handler, pCookie, hCallback);
3056  }
3057 
3066  {
3067  _UnregisterFromStateChange(xnUnregisterFromMirrorChange, GetHandle(), hCallback);
3068  }
3069  };
3070 
3104  {
3105  public:
3108 
3123  inline XnBool IsViewPointSupported(ProductionNode& otherNode) const
3124  {
3125  return xnIsViewPointSupported(GetHandle(), otherNode.GetHandle());
3126  }
3127 
3136  {
3137  return xnSetViewPoint(GetHandle(), otherNode.GetHandle());
3138  }
3139 
3144  {
3145  return xnResetViewPoint(GetHandle());
3146  }
3147 
3155  inline XnBool IsViewPointAs(ProductionNode& otherNode) const
3156  {
3157  return xnIsViewPointAs(GetHandle(), otherNode.GetHandle());
3158  }
3159 
3169  inline XnStatus RegisterToViewPointChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
3170  {
3171  return _RegisterToStateChange(xnRegisterToViewPointChange, GetHandle(), handler, pCookie, hCallback);
3172  }
3173 
3182  {
3183  _UnregisterFromStateChange(xnUnregisterFromViewPointChange, GetHandle(), hCallback);
3184  }
3185  };
3186 
3209  {
3210  public:
3211  inline FrameSyncCapability(XnNodeHandle hNode) : Capability(hNode) {}
3213 
3222  inline XnBool CanFrameSyncWith(Generator& other) const;
3223 
3230  inline XnStatus FrameSyncWith(Generator& other);
3231 
3236  inline XnStatus StopFrameSyncWith(Generator& other);
3237 
3244  inline XnBool IsFrameSyncedWith(Generator& other) const;
3245 
3255  inline XnStatus RegisterToFrameSyncChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
3256  {
3257  return _RegisterToStateChange(xnRegisterToFrameSyncChange, GetHandle(), handler, pCookie, hCallback);
3258  }
3259 
3268  {
3269  _UnregisterFromStateChange(xnUnregisterFromFrameSyncChange, GetHandle(), hCallback);
3270  }
3271  };
3272 
3325  class Generator : public ProductionNode
3326  {
3327  public:
3333  inline Generator(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
3334  inline Generator(const NodeWrapper& other) : ProductionNode(other) {}
3335 
3356  {
3357  return xnStartGenerating(GetHandle());
3358  }
3359 
3363  inline XnBool IsGenerating() const
3364  {
3365  return xnIsGenerating(GetHandle());
3366  }
3367 
3377  {
3378  return xnStopGenerating(GetHandle());
3379  }
3380 
3395  {
3396  return _RegisterToStateChange(xnRegisterToGenerationRunningChange, GetHandle(), handler, pCookie, hCallback);
3397  }
3398 
3407  {
3408  _UnregisterFromStateChange(xnUnregisterFromGenerationRunningChange, GetHandle(), hCallback);
3409  }
3410 
3425  {
3426  return _RegisterToStateChange(xnRegisterToNewDataAvailable, GetHandle(), handler, pCookie, hCallback);
3427  }
3428 
3437  {
3438  _UnregisterFromStateChange(xnUnregisterFromNewDataAvailable, GetHandle(), hCallback);
3439  }
3440 
3449  inline XnBool IsNewDataAvailable(XnUInt64* pnTimestamp = NULL) const
3450  {
3451  return xnIsNewDataAvailable(GetHandle(), pnTimestamp);
3452  }
3453 
3473  {
3474  return xnWaitAndUpdateData(GetHandle());
3475  }
3476 
3481  inline XnBool IsDataNew() const
3482  {
3483  return xnIsDataNew(GetHandle());
3484  }
3485 
3503  inline const void* GetData()
3504  {
3505  return xnGetData(GetHandle());
3506  }
3507 
3521  inline XnUInt32 GetDataSize() const
3522  {
3523  return xnGetDataSize(GetHandle());
3524  }
3525 
3539  inline XnUInt64 GetTimestamp() const
3540  {
3541  return xnGetTimestamp(GetHandle());
3542  }
3543 
3556  inline XnUInt32 GetFrameID() const
3557  {
3558  return xnGetFrameID(GetHandle());
3559  }
3560 
3569  inline const MirrorCapability GetMirrorCap() const
3570  {
3571  return MirrorCapability(GetHandle());
3572  }
3573 
3583  {
3584  return MirrorCapability(GetHandle());
3585  }
3586 
3598  {
3600  }
3601 
3613  {
3615  }
3616 
3627  {
3628  return FrameSyncCapability(GetHandle());
3629  }
3630 
3641  {
3642  return FrameSyncCapability(GetHandle());
3643  }
3644  };
3645 
3690  class Recorder : public ProductionNode
3691  {
3692  public:
3698  inline Recorder(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
3699  inline Recorder(const NodeWrapper& other) : ProductionNode(other) {}
3700 
3708  inline XnStatus Create(Context& context, const XnChar* strFormatName = NULL);
3709 
3718  inline XnStatus SetDestination(XnRecordMedium destType, const XnChar* strDest)
3719  {
3720  return xnSetRecorderDestination(GetHandle(), destType, strDest);
3721  }
3722 
3732  inline XnStatus GetDestination(XnRecordMedium& destType, XnChar* strDest, XnUInt32 nBufSize)
3733  {
3734  return xnGetRecorderDestination(GetHandle(), &destType, strDest, nBufSize);
3735  }
3736 
3747  {
3748  return xnAddNodeToRecording(GetHandle(), Node.GetHandle(), compression);
3749  }
3750 
3758  {
3759  return xnRemoveNodeFromRecording(GetHandle(), Node.GetHandle());
3760  }
3761 
3774  inline XnStatus Record()
3775  {
3776  return xnRecord(GetHandle());
3777  }
3778  };
3779 
3807  class Player : public ProductionNode
3808  {
3809  public:
3815  inline Player(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
3816  inline Player(const NodeWrapper& other) : ProductionNode(other) {}
3817 
3826  inline XnStatus Create(Context& context, const XnChar* strFormatName);
3827 
3828 
3843  inline XnStatus SetRepeat(XnBool bRepeat)
3844  {
3845  return xnSetPlayerRepeat(GetHandle(), bRepeat);
3846  }
3847 
3852  inline XnStatus SetSource(XnRecordMedium sourceType, const XnChar* strSource)
3853  {
3854  return xnSetPlayerSource(GetHandle(), sourceType, strSource);
3855  }
3856 
3865  inline XnStatus GetSource(XnRecordMedium &sourceType, XnChar* strSource, XnUInt32 nBufSize) const
3866  {
3867  return xnGetPlayerSource(GetHandle(), &sourceType, strSource, nBufSize);
3868  }
3869 
3875  {
3876  return xnPlayerReadNext(GetHandle());
3877  }
3878 
3903  inline XnStatus SeekToTimeStamp(XnInt64 nTimeOffset, XnPlayerSeekOrigin origin)
3904  {
3905  return xnSeekPlayerToTimeStamp(GetHandle(), nTimeOffset, origin);
3906  }
3907 
3932  inline XnStatus SeekToFrame(const XnChar* strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin)
3933  {
3934  return xnSeekPlayerToFrame(GetHandle(), strNodeName, nFrameOffset, origin);
3935  }
3936 
3942  inline XnStatus TellTimestamp(XnUInt64& nTimestamp) const
3943  {
3944  return xnTellPlayerTimestamp(GetHandle(), &nTimestamp);
3945  }
3946 
3959  inline XnStatus TellFrame(const XnChar* strNodeName, XnUInt32& nFrame) const
3960  {
3961  return xnTellPlayerFrame(GetHandle(), strNodeName, &nFrame);
3962  }
3963 
3971  inline XnStatus GetNumFrames(const XnChar* strNodeName, XnUInt32& nFrames) const
3972  {
3973  return xnGetPlayerNumFrames(GetHandle(), strNodeName, &nFrames);
3974  }
3975 
3980  inline const XnChar* GetSupportedFormat() const
3981  {
3983  }
3984 
3990  {
3991  XnNodeInfoList* pList;
3992  XnStatus nRetVal = xnEnumeratePlayerNodes(GetHandle(), &pList);
3993  XN_IS_STATUS_OK(nRetVal);
3994 
3995  list.ReplaceUnderlyingObject(pList);
3996 
3997  return (XN_STATUS_OK);
3998  }
3999 
4008  inline XnBool IsEOF() const
4009  {
4010  return xnIsPlayerAtEOF(GetHandle());
4011  }
4012 
4023  {
4024  return _RegisterToStateChange(xnRegisterToEndOfFileReached, GetHandle(), handler, pCookie, hCallback);
4025  }
4026 
4035  {
4036  _UnregisterFromStateChange(xnUnregisterFromEndOfFileReached, GetHandle(), hCallback);
4037  }
4038 
4057  inline XnStatus SetPlaybackSpeed(XnDouble dSpeed)
4058  {
4059  return xnSetPlaybackSpeed(GetHandle(), dSpeed);
4060  }
4061 
4066  inline XnDouble GetPlaybackSpeed() const
4067  {
4068  return xnGetPlaybackSpeed(GetHandle());
4069  }
4070  };
4071 
4100  {
4101  public:
4107  inline CroppingCapability(XnNodeHandle hNode) : Capability(hNode) {}
4109 
4119  inline XnStatus SetCropping(const XnCropping& Cropping)
4120  {
4121  return xnSetCropping(GetHandle(), &Cropping);
4122  }
4123 
4134  inline XnStatus GetCropping(XnCropping& Cropping) const
4135  {
4136  return xnGetCropping(GetHandle(), &Cropping);
4137  }
4138 
4148  inline XnStatus RegisterToCroppingChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
4149  {
4150  return _RegisterToStateChange(xnRegisterToCroppingChange, GetHandle(), handler, pCookie, hCallback);
4151  }
4152 
4161  {
4162  _UnregisterFromStateChange(xnUnregisterFromCroppingChange, GetHandle(), hCallback);
4163  }
4164  };
4165 
4175  {
4176  public:
4184 
4190  {
4191  return xnSetPowerLineFrequency(GetHandle(), nFrequency);
4192  }
4193 
4199  {
4201  }
4202 
4213  {
4214  return _RegisterToStateChange(xnRegisterToPowerLineFrequencyChange, GetHandle(), handler, pCookie, hCallback);
4215  }
4216 
4225  {
4226  _UnregisterFromStateChange(xnUnregisterFromPowerLineFrequencyChange, GetHandle(), hCallback);
4227  }
4228  };
4229 
4253  class MapGenerator : public Generator
4254  {
4255  public:
4261  inline MapGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
4262  inline MapGenerator(const NodeWrapper& other) : Generator(other) {}
4263 
4271  inline XnUInt32 GetSupportedMapOutputModesCount() const
4272  {
4274  }
4275 
4286  inline XnStatus GetSupportedMapOutputModes(XnMapOutputMode* aModes, XnUInt32& nCount) const
4287  {
4288  return xnGetSupportedMapOutputModes(GetHandle(), aModes, &nCount);
4289  }
4290 
4304  inline XnStatus SetMapOutputMode(const XnMapOutputMode& OutputMode)
4305  {
4306  return xnSetMapOutputMode(GetHandle(), &OutputMode);
4307  }
4308 
4326  inline XnStatus GetMapOutputMode(XnMapOutputMode &OutputMode) const
4327  {
4328  return xnGetMapOutputMode(GetHandle(), &OutputMode);
4329  }
4330 
4339  inline XnUInt32 GetBytesPerPixel() const
4340  {
4341  return xnGetBytesPerPixel(GetHandle());
4342  }
4343 
4354  {
4355  return _RegisterToStateChange(xnRegisterToMapOutputModeChange, GetHandle(), handler, pCookie, hCallback);
4356  }
4357 
4366  {
4367  _UnregisterFromStateChange(xnUnregisterFromMapOutputModeChange, GetHandle(), hCallback);
4368  }
4369 
4378  inline const CroppingCapability GetCroppingCap() const
4379  {
4380  return CroppingCapability(GetHandle());
4381  }
4382 
4392  {
4393  return CroppingCapability(GetHandle());
4394  }
4395 
4402  {
4404  }
4405 
4412  {
4414  }
4415 
4422  {
4424  }
4425 
4432  {
4434  }
4435 
4442  {
4444  }
4445 
4452  {
4454  }
4455 
4462  {
4464  }
4465 
4472  {
4474  }
4475 
4482  {
4484  }
4485 
4492  {
4494  }
4495 
4502  {
4504  }
4505 
4512  {
4514  }
4515 
4522  {
4524  }
4525 
4532  {
4534  }
4535 
4542  {
4544  }
4545 
4552  {
4554  }
4555 
4562  {
4564  }
4565 
4572  {
4573  return AntiFlickerCapability(GetHandle());
4574  }
4575  };
4576 
4586  {
4587  public:
4593  inline UserPositionCapability(XnNodeHandle hNode = NULL) : Capability(hNode) {}
4595 
4600  inline XnUInt32 GetSupportedUserPositionsCount() const
4601  {
4603  }
4604 
4609  inline XnStatus SetUserPosition(XnUInt32 nIndex, const XnBoundingBox3D& Position)
4610  {
4611  return xnSetUserPosition(GetHandle(), nIndex, &Position);
4612  }
4613 
4618  inline XnStatus GetUserPosition(XnUInt32 nIndex, XnBoundingBox3D& Position) const
4619  {
4620  return xnGetUserPosition(GetHandle(), nIndex, &Position);
4621  }
4622 
4633  {
4634  return _RegisterToStateChange(xnRegisterToUserPositionChange, GetHandle(), handler, pCookie, hCallback);
4635  }
4636 
4645  {
4646  _UnregisterFromStateChange(xnUnregisterFromUserPositionChange, GetHandle(), hCallback);
4647  }
4648  };
4649 
4695  {
4696  public:
4702  inline DepthGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
4703  inline DepthGenerator(const NodeWrapper& other) : MapGenerator(other) {}
4704 
4712  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
4713 
4730  inline void GetMetaData(DepthMetaData& metaData) const
4731  {
4733  }
4734 
4739  inline const XnDepthPixel* GetDepthMap() const
4740  {
4741  return xnGetDepthMap(GetHandle());
4742  }
4743 
4754  {
4755  return xnGetDeviceMaxDepth(GetHandle());
4756  }
4757 
4777  {
4778  return xnGetDepthFieldOfView(GetHandle(), &FOV);
4779  }
4780 
4791  {
4792  return _RegisterToStateChange(xnRegisterToDepthFieldOfViewChange, GetHandle(), handler, pCookie, hCallback);
4793  }
4794 
4803  {
4804  _UnregisterFromStateChange(xnUnregisterFromDepthFieldOfViewChange, GetHandle(), hCallback);
4805  }
4806 
4816  inline XnStatus ConvertProjectiveToRealWorld(XnUInt32 nCount, const XnPoint3D aProjective[], XnPoint3D aRealWorld[]) const
4817  {
4818  return xnConvertProjectiveToRealWorld(GetHandle(), nCount, aProjective, aRealWorld);
4819  }
4820 
4830  inline XnStatus ConvertRealWorldToProjective(XnUInt32 nCount, const XnPoint3D aRealWorld[], XnPoint3D aProjective[]) const
4831  {
4832  return xnConvertRealWorldToProjective(GetHandle(), nCount, aRealWorld, aProjective);
4833  }
4834 
4841  {
4843  }
4844 
4851  {
4853  }
4854  };
4855 
4861  {
4862  public:
4868  inline MockDepthGenerator(XnNodeHandle hNode = NULL) : DepthGenerator(hNode) {}
4869  inline MockDepthGenerator(const NodeWrapper& other) : DepthGenerator(other) {}
4870 
4877  XnStatus Create(Context& context, const XnChar* strName = NULL);
4878 
4886  XnStatus CreateBasedOn(DepthGenerator& other, const XnChar* strName = NULL);
4887 
4892  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel* pDepthMap)
4893  {
4894  return xnMockDepthSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pDepthMap);
4895  }
4896 
4905  inline XnStatus SetData(const DepthMetaData& depthMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
4906  {
4907  return SetData(nFrameID, nTimestamp, depthMD.DataSize(), depthMD.Data());
4908  }
4909 
4915  inline XnStatus SetData(const DepthMetaData& depthMD)
4916  {
4917  return SetData(depthMD, depthMD.FrameID(), depthMD.Timestamp());
4918  }
4919  };
4920 
4940  {
4941  public:
4947  inline ImageGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
4948  inline ImageGenerator(const NodeWrapper& other) : MapGenerator(other) {}
4949 
4955  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
4956 
4973  inline void GetMetaData(ImageMetaData& metaData) const
4974  {
4976  }
4977 
4982  inline const XnRGB24Pixel* GetRGB24ImageMap() const
4983  {
4984  return xnGetRGB24ImageMap(GetHandle());
4985  }
4986 
4992  {
4993  return xnGetYUV422ImageMap(GetHandle());
4994  }
4995 
5001  {
5003  }
5004 
5010  {
5012  }
5013 
5018  inline const XnUInt8* GetImageMap() const
5019  {
5020  return xnGetImageMap(GetHandle());
5021  }
5022 
5033  inline XnBool IsPixelFormatSupported(XnPixelFormat Format) const
5034  {
5035  return xnIsPixelFormatSupported(GetHandle(), Format);
5036  }
5037 
5056  {
5057  return xnSetPixelFormat(GetHandle(), Format);
5058  }
5059 
5071  {
5072  return xnGetPixelFormat(GetHandle());
5073  }
5074 
5085  {
5086  return _RegisterToStateChange(xnRegisterToPixelFormatChange, GetHandle(), handler, pCookie, hCallback);
5087  }
5088 
5097  {
5098  _UnregisterFromStateChange(xnUnregisterFromPixelFormatChange, GetHandle(), hCallback);
5099  }
5100  };
5101 
5107  {
5108  public:
5114  inline MockImageGenerator(XnNodeHandle hNode = NULL) : ImageGenerator(hNode) {}
5115  inline MockImageGenerator(const NodeWrapper& other) : ImageGenerator(other) {}
5116 
5123  XnStatus Create(Context& context, const XnChar* strName = NULL);
5124 
5132  XnStatus CreateBasedOn(ImageGenerator& other, const XnChar* strName = NULL);
5133 
5138  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8* pImageMap)
5139  {
5140  return xnMockImageSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pImageMap);
5141  }
5142 
5151  inline XnStatus SetData(const ImageMetaData& imageMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
5152  {
5153  return SetData(nFrameID, nTimestamp, imageMD.DataSize(), imageMD.Data());
5154  }
5155 
5161  inline XnStatus SetData(const ImageMetaData& imageMD)
5162  {
5163  return SetData(imageMD, imageMD.FrameID(), imageMD.Timestamp());
5164  }
5165  };
5166 
5175  class IRGenerator : public MapGenerator
5176  {
5177  public:
5183  inline IRGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
5184  inline IRGenerator(const NodeWrapper& other) : MapGenerator(other) {}
5185 
5192  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
5193 
5210  inline void GetMetaData(IRMetaData& metaData) const
5211  {
5212  xnGetIRMetaData(GetHandle(), metaData.GetUnderlying());
5213  }
5214 
5218  inline const XnIRPixel* GetIRMap() const
5219  {
5220  return xnGetIRMap(GetHandle());
5221  }
5222  };
5223 
5229  {
5230  public:
5236  inline MockIRGenerator(XnNodeHandle hNode = NULL) : IRGenerator(hNode) {}
5237  inline MockIRGenerator(const NodeWrapper& other) : IRGenerator(other) {}
5238 
5245  XnStatus Create(Context& context, const XnChar* strName = NULL);
5252  XnStatus CreateBasedOn(IRGenerator& other, const XnChar* strName = NULL);
5253 
5258  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel* pIRMap)
5259  {
5260  return xnMockIRSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pIRMap);
5261  }
5262 
5271  inline XnStatus SetData(const IRMetaData& irMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
5272  {
5273  return SetData(nFrameID, nTimestamp, irMD.DataSize(), irMD.Data());
5274  }
5275 
5281  inline XnStatus SetData(const IRMetaData& irMD)
5282  {
5283  return SetData(irMD, irMD.FrameID(), irMD.Timestamp());
5284  }
5285  };
5286 
5355  {
5356  public:
5362  inline GestureGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
5363  inline GestureGenerator(const NodeWrapper& other) : Generator(other) {}
5364 
5378  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
5379 
5393  inline XnStatus AddGesture(const XnChar* strGesture, XnBoundingBox3D* pArea)
5394  {
5395  return xnAddGesture(GetHandle(), strGesture, pArea);
5396  }
5397 
5405  inline XnStatus RemoveGesture(const XnChar* strGesture)
5406  {
5407  return xnRemoveGesture(GetHandle(), strGesture);
5408  }
5409 
5418  inline XnStatus GetAllActiveGestures(XnChar** astrGestures, XnUInt32 nNameLength, XnUInt16& nGestures) const
5419  {
5420  return xnGetAllActiveGestures(GetHandle(), astrGestures, nNameLength, &nGestures);
5421  }
5422 
5427  inline XnUInt16 GetNumberOfAvailableGestures() const
5428  {
5430  }
5431 
5440  inline XnStatus EnumerateAllGestures(XnChar** astrGestures, XnUInt32 nNameLength, XnUInt16& nGestures) const
5441  {
5442  return xnEnumerateAllGestures(GetHandle(), astrGestures, nNameLength, &nGestures);
5443  }
5444 
5450  inline XnBool IsGestureAvailable(const XnChar* strGesture) const
5451  {
5452  return xnIsGestureAvailable(GetHandle(), strGesture);
5453  }
5454 
5459  inline XnBool IsGestureProgressSupported(const XnChar* strGesture) const
5460  {
5461  return xnIsGestureProgressSupported(GetHandle(), strGesture);
5462  }
5463 
5485  typedef void (XN_CALLBACK_TYPE* GestureRecognized)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie);
5486 
5513  typedef void (XN_CALLBACK_TYPE* GestureProgress)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie);
5514 
5526  XnStatus RegisterGestureCallbacks(GestureRecognized RecognizedCB, GestureProgress ProgressCB, void* pCookie, XnCallbackHandle& hCallback)
5527  {
5528  XnStatus nRetVal = XN_STATUS_OK;
5529 
5530  GestureCookie* pGestureCookie;
5531  XN_VALIDATE_ALLOC(pGestureCookie, GestureCookie);
5532  pGestureCookie->recognizedHandler = RecognizedCB;
5533  pGestureCookie->progressHandler = ProgressCB;
5534  pGestureCookie->pUserCookie = pCookie;
5535 
5536  nRetVal = xnRegisterGestureCallbacks(GetHandle(), GestureRecognizedCallback, GestureProgressCallback, pGestureCookie, &pGestureCookie->hCallback);
5537  if (nRetVal != XN_STATUS_OK)
5538  {
5539  xnOSFree(pGestureCookie);
5540  return (nRetVal);
5541  }
5542 
5543  hCallback = pGestureCookie;
5544 
5545  return (XN_STATUS_OK);
5546  }
5547 
5556  {
5557  GestureCookie* pGestureCookie = (GestureCookie*)hCallback;
5558  xnUnregisterGestureCallbacks(GetHandle(), pGestureCookie->hCallback);
5559  xnOSFree(pGestureCookie);
5560  }
5561 
5571  inline XnStatus RegisterToGestureChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
5572  {
5573  return _RegisterToStateChange(xnRegisterToGestureChange, GetHandle(), handler, pCookie, hCallback);
5574  }
5575 
5584  {
5585  _UnregisterFromStateChange(xnUnregisterFromGestureChange, GetHandle(), hCallback);
5586  }
5587 
5615  typedef void (XN_CALLBACK_TYPE* GestureIntermediateStageCompleted)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie);
5616 
5627  {
5628  XnStatus nRetVal = XN_STATUS_OK;
5629 
5630  GestureIntermediateStageCompletedCookie* pGestureCookie;
5631  XN_VALIDATE_ALLOC(pGestureCookie, GestureIntermediateStageCompletedCookie);
5632  pGestureCookie->handler = handler;
5633  pGestureCookie->pUserCookie = pCookie;
5634 
5635  nRetVal = xnRegisterToGestureIntermediateStageCompleted(GetHandle(), GestureIntermediateStageCompletedCallback, pGestureCookie, &pGestureCookie->hCallback);
5636  if (nRetVal != XN_STATUS_OK)
5637  {
5638  xnOSFree(pGestureCookie);
5639  return (nRetVal);
5640  }
5641 
5642  hCallback = pGestureCookie;
5643 
5644  return (XN_STATUS_OK);
5645  }
5646 
5655  {
5656  GestureIntermediateStageCompletedCookie* pGestureCookie = (GestureIntermediateStageCompletedCookie*)hCallback;
5657  xnUnregisterFromGestureIntermediateStageCompleted(GetHandle(), pGestureCookie->hCallback);
5658  xnOSFree(pGestureCookie);
5659  }
5660 
5679  typedef void (XN_CALLBACK_TYPE* GestureReadyForNextIntermediateStage)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie);
5680 
5691  {
5692  XnStatus nRetVal = XN_STATUS_OK;
5693 
5694  GestureReadyForNextIntermediateStageCookie* pGestureCookie;
5695  XN_VALIDATE_ALLOC(pGestureCookie, GestureReadyForNextIntermediateStageCookie);
5696  pGestureCookie->handler = handler;
5697  pGestureCookie->pUserCookie = pCookie;
5698 
5699  nRetVal = xnRegisterToGestureReadyForNextIntermediateStage(GetHandle(), GestureReadyForNextIntermediateStageCallback, pGestureCookie, &pGestureCookie->hCallback);
5700  if (nRetVal != XN_STATUS_OK)
5701  {
5702  xnOSFree(pGestureCookie);
5703  return (nRetVal);
5704  }
5705 
5706  hCallback = pGestureCookie;
5707 
5708  return (XN_STATUS_OK);
5709  }
5710 
5719  {
5720  GestureReadyForNextIntermediateStageCookie* pGestureCookie = (GestureReadyForNextIntermediateStageCookie*)hCallback;
5722  xnOSFree(pGestureCookie);
5723  }
5724 
5726  inline XnStatus XN_API_DEPRECATED("Use GetAllActiveGestures() instead") GetActiveGestures(XnChar*& astrGestures, XnUInt16& nGestures) const
5727  {
5728  return xnGetActiveGestures(GetHandle(), &astrGestures, &nGestures);
5729  }
5730  inline XnStatus XN_API_DEPRECATED("Use EnumerateAllGestures() instead") EnumerateGestures(XnChar*& astrGestures, XnUInt16& nGestures) const
5731  {
5732  return xnEnumerateGestures(GetHandle(), &astrGestures, &nGestures);
5733  }
5736  private:
5737  typedef struct GestureCookie
5738  {
5739  GestureRecognized recognizedHandler;
5740  GestureProgress progressHandler;
5741  void* pUserCookie;
5742  XnCallbackHandle hCallback;
5743  } GestureCookie;
5744 
5745  static void XN_CALLBACK_TYPE GestureRecognizedCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie)
5746  {
5747  GestureCookie* pGestureCookie = (GestureCookie*)pCookie;
5748  GestureGenerator gen(hNode);
5749  if (pGestureCookie->recognizedHandler != NULL)
5750  {
5751  pGestureCookie->recognizedHandler(gen, strGesture, pIDPosition, pEndPosition, pGestureCookie->pUserCookie);
5752  }
5753  }
5754 
5755  static void XN_CALLBACK_TYPE GestureProgressCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie)
5756  {
5757  GestureCookie* pGestureCookie = (GestureCookie*)pCookie;
5758  GestureGenerator gen(hNode);
5759  if (pGestureCookie->progressHandler != NULL)
5760  {
5761  pGestureCookie->progressHandler(gen, strGesture, pPosition, fProgress, pGestureCookie->pUserCookie);
5762  }
5763  }
5764 
5765  typedef struct GestureIntermediateStageCompletedCookie
5766  {
5768  void* pUserCookie;
5769  XnCallbackHandle hCallback;
5770  } GestureIntermediateStageCompletedCookie;
5771 
5772  static void XN_CALLBACK_TYPE GestureIntermediateStageCompletedCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie)
5773  {
5774  GestureIntermediateStageCompletedCookie* pGestureCookie = (GestureIntermediateStageCompletedCookie*)pCookie;
5775  GestureGenerator gen(hNode);
5776  if (pGestureCookie->handler != NULL)
5777  {
5778  pGestureCookie->handler(gen, strGesture, pPosition, pGestureCookie->pUserCookie);
5779  }
5780  }
5781 
5782  typedef struct GestureReadyForNextIntermediateStageCookie
5783  {
5785  void* pUserCookie;
5786  XnCallbackHandle hCallback;
5787  } GestureReadyForNextIntermediateStageCookie;
5788 
5789  static void XN_CALLBACK_TYPE GestureReadyForNextIntermediateStageCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie)
5790  {
5791  GestureReadyForNextIntermediateStageCookie* pGestureCookie = (GestureReadyForNextIntermediateStageCookie*)pCookie;
5792  GestureGenerator gen(hNode);
5793  if (pGestureCookie->handler != NULL)
5794  {
5795  pGestureCookie->handler(gen, strGesture, pPosition, pGestureCookie->pUserCookie);
5796  }
5797  }
5798  };
5799 
5819  {
5820  public:
5826  inline SceneAnalyzer(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
5827  inline SceneAnalyzer(const NodeWrapper& other) : MapGenerator(other) {}
5828 
5836  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
5837 
5838 
5858  inline void GetMetaData(SceneMetaData& metaData) const
5859  {
5861  }
5862 
5867  inline const XnLabel* GetLabelMap() const
5868  {
5869  return xnGetLabelMap(GetHandle());
5870  }
5871 
5877  inline XnStatus GetFloor(XnPlane3D& Plane) const
5878  {
5879  return xnGetFloor(GetHandle(), &Plane);
5880  }
5881  };
5882 
5891  {
5892  public:
5900 
5911  typedef void (XN_CALLBACK_TYPE* HandTouchingFOVEdge)(HandTouchingFOVEdgeCapability& touchingfov, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie);
5912 
5923  {
5924  XnStatus nRetVal = XN_STATUS_OK;
5925 
5926  HandTouchingFOVEdgeCookie* pHandCookie;
5927  XN_VALIDATE_ALLOC(pHandCookie, HandTouchingFOVEdgeCookie);
5928  pHandCookie->handler = handler;
5929  pHandCookie->pUserCookie = pCookie;
5930 
5931  nRetVal = xnRegisterToHandTouchingFOVEdge(GetHandle(), HandTouchingFOVEdgeCB, pHandCookie, &pHandCookie->hCallback);
5932  if (nRetVal != XN_STATUS_OK)
5933  {
5934  xnOSFree(pHandCookie);
5935  return (nRetVal);
5936  }
5937 
5938  hCallback = pHandCookie;
5939 
5940  return (XN_STATUS_OK);
5941  }
5942 
5951  {
5952  HandTouchingFOVEdgeCookie* pHandCookie = (HandTouchingFOVEdgeCookie*)hCallback;
5953  xnUnregisterFromHandTouchingFOVEdge(GetHandle(), pHandCookie->hCallback);
5954  xnOSFree(pHandCookie);
5955  }
5956  private:
5957  typedef struct HandTouchingFOVEdgeCookie
5958  {
5959  HandTouchingFOVEdge handler;
5960  void* pUserCookie;
5961  XnCallbackHandle hCallback;
5962  } HandTouchingFOVEdgeCookie;
5963 
5964  static void XN_CALLBACK_TYPE HandTouchingFOVEdgeCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie)
5965  {
5966  HandTouchingFOVEdgeCookie* pHandCookie = (HandTouchingFOVEdgeCookie*)pCookie;
5967  HandTouchingFOVEdgeCapability cap(hNode);
5968  if (pHandCookie->handler != NULL)
5969  {
5970  pHandCookie->handler(cap, user, pPosition, fTime, eDir, pHandCookie->pUserCookie);
5971  }
5972  }
5973 
5974  };
5975 
6063  class HandsGenerator : public Generator
6064  {
6065  public:
6071  inline HandsGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
6072  inline HandsGenerator(const NodeWrapper& other) : Generator(other) {}
6073 
6081  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
6082 
6098  typedef void (XN_CALLBACK_TYPE* HandCreate)(HandsGenerator& generator, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie);
6099 
6116  typedef void (XN_CALLBACK_TYPE* HandUpdate)(HandsGenerator& generator, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie);
6117 
6131  typedef void (XN_CALLBACK_TYPE* HandDestroy)(HandsGenerator& generator, XnUserID user, XnFloat fTime, void* pCookie);
6132 
6145  inline XnStatus RegisterHandCallbacks(HandCreate CreateCB, HandUpdate UpdateCB, HandDestroy DestroyCB, void* pCookie, XnCallbackHandle& hCallback)
6146  {
6147  XnStatus nRetVal = XN_STATUS_OK;
6148 
6149  HandCookie* pHandCookie;
6150  XN_VALIDATE_ALLOC(pHandCookie, HandCookie);
6151  pHandCookie->createHandler = CreateCB;
6152  pHandCookie->updateHandler = UpdateCB;
6153  pHandCookie->destroyHandler = DestroyCB;
6154  pHandCookie->pUserCookie = pCookie;
6155 
6156  nRetVal = xnRegisterHandCallbacks(GetHandle(), HandCreateCB, HandUpdateCB, HandDestroyCB, pHandCookie, &pHandCookie->hCallback);
6157  if (nRetVal != XN_STATUS_OK)
6158  {
6159  xnOSFree(pHandCookie);
6160  return (nRetVal);
6161  }
6162 
6163  hCallback = pHandCookie;
6164 
6165  return (XN_STATUS_OK);
6166  }
6167 
6176  {
6177  HandCookie* pHandCookie = (HandCookie*)hCallback;
6178  xnUnregisterHandCallbacks(GetHandle(), pHandCookie->hCallback);
6179  xnOSFree(pHandCookie);
6180  }
6181 
6196  {
6197  return xnStopTracking(GetHandle(), user);
6198  }
6199 
6209  {
6210  return xnStopTrackingAll(GetHandle());
6211  }
6212 
6229  inline XnStatus StartTracking(const XnPoint3D& ptPosition)
6230  {
6231  return xnStartTracking(GetHandle(), &ptPosition);
6232  }
6233 
6250  inline XnStatus SetSmoothing(XnFloat fSmoothingFactor)
6251  {
6252  return xnSetTrackingSmoothing(GetHandle(), fSmoothingFactor);
6253  }
6254 
6263  {
6265  }
6266 
6275  {
6277  }
6278 
6279  private:
6280  typedef struct HandCookie
6281  {
6282  HandCreate createHandler;
6283  HandUpdate updateHandler;
6284  HandDestroy destroyHandler;
6285  void* pUserCookie;
6286  XnCallbackHandle hCallback;
6287  } HandCookie;
6288 
6289  static void XN_CALLBACK_TYPE HandCreateCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie)
6290  {
6291  HandCookie* pHandCookie = (HandCookie*)pCookie;
6292  HandsGenerator gen(hNode);
6293  if (pHandCookie->createHandler != NULL)
6294  {
6295  pHandCookie->createHandler(gen, user, pPosition, fTime, pHandCookie->pUserCookie);
6296  }
6297  }
6298  static void XN_CALLBACK_TYPE HandUpdateCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie)
6299  {
6300  HandCookie* pHandCookie = (HandCookie*)pCookie;
6301  HandsGenerator gen(hNode);
6302  if (pHandCookie->updateHandler != NULL)
6303  {
6304  pHandCookie->updateHandler(gen, user, pPosition, fTime, pHandCookie->pUserCookie);
6305  }
6306  }
6307  static void XN_CALLBACK_TYPE HandDestroyCB(XnNodeHandle hNode, XnUserID user, XnFloat fTime, void* pCookie)
6308  {
6309  HandCookie* pHandCookie = (HandCookie*)pCookie;
6310  HandsGenerator gen(hNode);
6311  if (pHandCookie->destroyHandler != NULL)
6312  {
6313  pHandCookie->destroyHandler(gen, user, fTime, pHandCookie->pUserCookie);
6314  }
6315  }
6316  };
6317 
6375  {
6376  public:
6382  inline SkeletonCapability(XnNodeHandle hNode) : Capability(hNode) {}
6384 
6390  inline XnBool IsJointAvailable(XnSkeletonJoint eJoint) const
6391  {
6392  return xnIsJointAvailable(GetHandle(), eJoint);
6393  }
6394 
6400  inline XnBool IsProfileAvailable(XnSkeletonProfile eProfile) const
6401  {
6402  return xnIsProfileAvailable(GetHandle(), eProfile);
6403  }
6404 
6436  {
6437  return xnSetSkeletonProfile(GetHandle(), eProfile);
6438  }
6439 
6463  inline XnStatus SetJointActive(XnSkeletonJoint eJoint, XnBool bState)
6464  {
6465  return xnSetJointActive(GetHandle(), eJoint, bState);
6466  }
6467 
6473  inline XnBool IsJointActive(XnSkeletonJoint eJoint) const
6474  {
6475  return xnIsJointActive(GetHandle(), eJoint);
6476  }
6477 
6488  {
6489  return _RegisterToStateChange(xnRegisterToJointConfigurationChange, GetHandle(), handler, pCookie, hCallback);
6490  }
6491 
6500  {
6501  _UnregisterFromStateChange(xnUnregisterFromJointConfigurationChange, GetHandle(), hCallback);
6502  }
6503 
6508  inline XnStatus EnumerateActiveJoints(XnSkeletonJoint* pJoints, XnUInt16& nJoints) const
6509  {
6510  return xnEnumerateActiveJoints(GetHandle(), pJoints, &nJoints);
6511  }
6512 
6522  {
6523  return xnGetSkeletonJoint(GetHandle(), user, eJoint, &Joint);
6524  }
6525 
6548  {
6549  return xnGetSkeletonJointPosition(GetHandle(), user, eJoint, &Joint);
6550  }
6551 
6560  {
6561  return xnGetSkeletonJointOrientation(GetHandle(), user, eJoint, &Joint);
6562  }
6563 
6574  inline XnBool IsTracking(XnUserID user) const
6575  {
6576  return xnIsSkeletonTracking(GetHandle(), user);
6577  }
6578 
6589  inline XnBool IsCalibrated(XnUserID user) const
6590  {
6591  return xnIsSkeletonCalibrated(GetHandle(), user);
6592  }
6593 
6604  inline XnBool IsCalibrating(XnUserID user) const
6605  {
6606  return xnIsSkeletonCalibrating(GetHandle(), user);
6607  }
6608 
6633  inline XnStatus RequestCalibration(XnUserID user, XnBool bForce)
6634  {
6635  return xnRequestSkeletonCalibration(GetHandle(), user, bForce);
6636  }
6637 
6648  {
6649  return xnAbortSkeletonCalibration(GetHandle(), user);
6650  }
6651 
6670  inline XnStatus SaveCalibrationDataToFile(XnUserID user, const XnChar* strFileName)
6671  {
6672  return xnSaveSkeletonCalibrationDataToFile(GetHandle(), user, strFileName);
6673  }
6674 
6681  inline XnStatus LoadCalibrationDataFromFile(XnUserID user, const XnChar* strFileName)
6682  {
6683  return xnLoadSkeletonCalibrationDataFromFile(GetHandle(), user, strFileName);
6684  }
6685 
6697  inline XnStatus SaveCalibrationData(XnUserID user, XnUInt32 nSlot)
6698  {
6699  return xnSaveSkeletonCalibrationData(GetHandle(), user, nSlot);
6700  }
6701 
6708  inline XnStatus LoadCalibrationData(XnUserID user, XnUInt32 nSlot)
6709  {
6710  return xnLoadSkeletonCalibrationData(GetHandle(), user, nSlot);
6711  }
6712 
6718  inline XnStatus ClearCalibrationData(XnUInt32 nSlot)
6719  {
6720  return xnClearSkeletonCalibrationData(GetHandle(), nSlot);
6721  }
6722 
6728  inline XnBool IsCalibrationData(XnUInt32 nSlot) const
6729  {
6730  return xnIsSkeletonCalibrationData(GetHandle(), nSlot);
6731  }
6732 
6748  {
6749  return xnStartSkeletonTracking(GetHandle(), user);
6750  }
6751 
6757  {
6758  return xnStopSkeletonTracking(GetHandle(), user);
6759  }
6760 
6769  inline XnStatus Reset(XnUserID user)
6770  {
6771  return xnResetSkeleton(GetHandle(), user);
6772  }
6773 
6782  inline XnBool NeedPoseForCalibration() const
6783  {
6785  }
6786 
6799  inline XnStatus GetCalibrationPose(XnChar* strPose) const
6800  {
6801  return xnGetSkeletonCalibrationPose(GetHandle(), strPose);
6802  }
6803 
6816  inline XnStatus SetSmoothing(XnFloat fSmoothingFactor)
6817  {
6818  return xnSetSkeletonSmoothing(GetHandle(), fSmoothingFactor);
6819  }
6820 
6842  typedef void (XN_CALLBACK_TYPE* CalibrationStart)(SkeletonCapability& skeleton, XnUserID user, void* pCookie);
6843 
6861  typedef void (XN_CALLBACK_TYPE* CalibrationEnd)(SkeletonCapability& skeleton, XnUserID user, XnBool bSuccess, void* pCookie);
6862 
6874  inline XnStatus RegisterToCalibrationStart(CalibrationStart handler, void* pCookie, XnCallbackHandle& hCallback)
6875  {
6876  XnStatus nRetVal = XN_STATUS_OK;
6877  CalibrationStartCookie* pCalibrationCookie;
6878  XN_VALIDATE_ALLOC(pCalibrationCookie, CalibrationStartCookie);
6879  pCalibrationCookie->handler = handler;
6880  pCalibrationCookie->pUserCookie = pCookie;
6881  nRetVal = xnRegisterToCalibrationStart(GetHandle(), CalibrationStartCallback, pCalibrationCookie, &pCalibrationCookie->hCallback);
6882  if (nRetVal != XN_STATUS_OK)
6883  {
6884  xnOSFree(pCalibrationCookie);
6885  return nRetVal;
6886  }
6887  hCallback = pCalibrationCookie;
6888  return XN_STATUS_OK;
6889  }
6890 
6902  {
6903  CalibrationStartCookie* pCalibrationCookie = (CalibrationStartCookie*)hCallback;
6904  xnUnregisterFromCalibrationStart(GetHandle(), pCalibrationCookie->hCallback);
6905  xnOSFree(pCalibrationCookie);
6906  return XN_STATUS_OK;
6907  }
6908 
6930  typedef void (XN_CALLBACK_TYPE* CalibrationInProgress)(SkeletonCapability& skeleton, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie);
6931 
6942  {
6943  XnStatus nRetVal = XN_STATUS_OK;
6944 
6945  CalibrationInProgressCookie* pSkeletonCookie;
6946  XN_VALIDATE_ALLOC(pSkeletonCookie, CalibrationInProgressCookie);
6947  pSkeletonCookie->handler = handler;
6948  pSkeletonCookie->pUserCookie = pCookie;
6949 
6950  nRetVal = xnRegisterToCalibrationInProgress(GetHandle(), CalibrationInProgressCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
6951  if (nRetVal != XN_STATUS_OK)
6952  {
6953  xnOSFree(pSkeletonCookie);
6954  return (nRetVal);
6955  }
6956 
6957  hCallback = pSkeletonCookie;
6958 
6959  return (XN_STATUS_OK);
6960  }
6961 
6970  {
6971  CalibrationInProgressCookie* pSkeletonCookie = (CalibrationInProgressCookie*)hCallback;
6972  xnUnregisterFromCalibrationInProgress(GetHandle(), pSkeletonCookie->hCallback);
6973  xnOSFree(pSkeletonCookie);
6974  }
6975 
6993  typedef void (XN_CALLBACK_TYPE* CalibrationComplete)(SkeletonCapability& skeleton, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie);
6994 
7005  {
7006  XnStatus nRetVal = XN_STATUS_OK;
7007 
7008  CalibrationCompleteCookie* pSkeletonCookie;
7009  XN_VALIDATE_ALLOC(pSkeletonCookie, CalibrationCompleteCookie);
7010  pSkeletonCookie->handler = handler;
7011  pSkeletonCookie->pUserCookie = pCookie;
7012 
7013  nRetVal = xnRegisterToCalibrationComplete(GetHandle(), CalibrationCompleteCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
7014  if (nRetVal != XN_STATUS_OK)
7015  {
7016  xnOSFree(pSkeletonCookie);
7017  return (nRetVal);
7018  }
7019 
7020  hCallback = pSkeletonCookie;
7021 
7022  return (XN_STATUS_OK);
7023  }
7024 
7033  {
7034  CalibrationCompleteCookie* pSkeletonCookie = (CalibrationCompleteCookie*)hCallback;
7035  xnUnregisterFromCalibrationComplete(GetHandle(), pSkeletonCookie->hCallback);
7036  xnOSFree(pSkeletonCookie);
7037  }
7038 
7040  XN_API_DEPRECATED("Use the overload with one argument - the bState parameter is useless")
7041  inline XnBool IsJointActive(XnSkeletonJoint eJoint, XnBool /*bState*/) const
7042  {
7043  return xnIsJointActive(GetHandle(), eJoint);
7044  }
7045 
7046  inline XnStatus XN_API_DEPRECATED("Please use RegisterToCalibrationStart/Complete") RegisterCalibrationCallbacks(CalibrationStart CalibrationStartCB, CalibrationEnd CalibrationEndCB, void* pCookie, XnCallbackHandle& hCallback)
7047  {
7048  XnStatus nRetVal = XN_STATUS_OK;
7049 
7050  SkeletonCookie* pSkeletonCookie;
7051  XN_VALIDATE_ALLOC(pSkeletonCookie, SkeletonCookie);
7052  pSkeletonCookie->startHandler = CalibrationStartCB;
7053  pSkeletonCookie->endHandler = CalibrationEndCB;
7054  pSkeletonCookie->pUserCookie = pCookie;
7055 
7056 #pragma warning (push)
7057 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7058  nRetVal = xnRegisterCalibrationCallbacks(GetHandle(), CalibrationStartBundleCallback, CalibrationEndBundleCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
7059 #pragma warning (pop)
7060  if (nRetVal != XN_STATUS_OK)
7061  {
7062  xnOSFree(pSkeletonCookie);
7063  return (nRetVal);
7064  }
7065 
7066  hCallback = pSkeletonCookie;
7067 
7068  return (XN_STATUS_OK);
7069  }
7070 
7071  inline void XN_API_DEPRECATED("Please use UnregisterFromCalibrationStart/Complete") UnregisterCalibrationCallbacks(XnCallbackHandle hCallback)
7072  {
7073  SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)hCallback;
7074 #pragma warning (push)
7075 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7076  xnUnregisterCalibrationCallbacks(GetHandle(), pSkeletonCookie->hCallback);
7077 #pragma warning (pop)
7078  xnOSFree(pSkeletonCookie);
7079  }
7082 private:
7083  typedef struct SkeletonCookie
7084  {
7085  CalibrationStart startHandler;
7086  CalibrationEnd endHandler;
7087  void* pUserCookie;
7088  XnCallbackHandle hCallback;
7089  } SkeletonCookie;
7090 
7091  static void XN_CALLBACK_TYPE CalibrationStartBundleCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
7092  {
7093  SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)pCookie;
7094  SkeletonCapability cap(hNode);
7095  if (pSkeletonCookie->startHandler != NULL)
7096  {
7097  pSkeletonCookie->startHandler(cap, user, pSkeletonCookie->pUserCookie);
7098  }
7099  }
7100 
7101  static void XN_CALLBACK_TYPE CalibrationEndBundleCallback(XnNodeHandle hNode, XnUserID user, XnBool bSuccess, void* pCookie)
7102  {
7103  SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)pCookie;
7104  SkeletonCapability cap(hNode);
7105  if (pSkeletonCookie->endHandler != NULL)
7106  {
7107  pSkeletonCookie->endHandler(cap, user, bSuccess, pSkeletonCookie->pUserCookie);
7108  }
7109  }
7110 
7111  typedef struct CalibrationStartCookie
7112  {
7113  CalibrationStart handler;
7114  void* pUserCookie;
7115  XnCallbackHandle hCallback;
7116  } CalibrationStartCookie;
7117 
7118  static void XN_CALLBACK_TYPE CalibrationStartCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
7119  {
7120  CalibrationStartCookie* pCalibrationCookie = (CalibrationStartCookie*)pCookie;
7121  SkeletonCapability cap(hNode);
7122  if (pCalibrationCookie->handler != NULL)
7123  {
7124  pCalibrationCookie->handler(cap, user, pCalibrationCookie->pUserCookie);
7125  }
7126  }
7127 
7128  typedef struct CalibrationInProgressCookie
7129  {
7130  CalibrationInProgress handler;
7131  void* pUserCookie;
7132  XnCallbackHandle hCallback;
7133  } CalibrationInProgressCookie;
7134 
7135  static void XN_CALLBACK_TYPE CalibrationInProgressCallback(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie)
7136  {
7137  CalibrationInProgressCookie* pSkeletonCookie = (CalibrationInProgressCookie*)pCookie;
7138  SkeletonCapability cap(hNode);
7139  if (pSkeletonCookie->handler != NULL)
7140  {
7141  pSkeletonCookie->handler(cap, user, calibrationError, pSkeletonCookie->pUserCookie);
7142  }
7143  }
7144 
7145  typedef struct CalibrationCompleteCookie
7146  {
7147  CalibrationComplete handler;
7148  void* pUserCookie;
7149  XnCallbackHandle hCallback;
7150  } CalibrationCompleteCookie;
7151 
7152  static void XN_CALLBACK_TYPE CalibrationCompleteCallback(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie)
7153  {
7154  CalibrationCompleteCookie* pSkeletonCookie = (CalibrationCompleteCookie*)pCookie;
7155  SkeletonCapability cap(hNode);
7156  if (pSkeletonCookie->handler != NULL)
7157  {
7158  pSkeletonCookie->handler(cap, user, calibrationError, pSkeletonCookie->pUserCookie);
7159  }
7160  }
7161  };
7162 
7185  {
7186  public:
7194 
7208  typedef void (XN_CALLBACK_TYPE* PoseDetection)(PoseDetectionCapability& pose, const XnChar* strPose, XnUserID user, void* pCookie);
7209 
7219  inline XnUInt32 GetNumberOfPoses() const
7220  {
7221  return xnGetNumberOfPoses(GetHandle());
7222  }
7223 
7236  inline XnStatus GetAllAvailablePoses(XnChar** pstrPoses, XnUInt32 nNameLength, XnUInt32& nPoses) const
7237  {
7238  return xnGetAllAvailablePoses(GetHandle(), pstrPoses, nNameLength, &nPoses);
7239  }
7240 
7241  inline XnBool IsPoseSupported(const XnChar* strPose)
7242  {
7243  return xnIsPoseSupported(GetHandle(), strPose);
7244  }
7245 
7246  inline XnStatus GetPoseStatus(XnUserID userID, const XnChar* poseName, XnUInt64& poseTime, XnPoseDetectionStatus& eStatus, XnPoseDetectionState& eState)
7247  {
7248  return xnGetPoseStatus(GetHandle(), userID, poseName, &poseTime, &eStatus, &eState);
7249  }
7250 
7266  inline XnStatus StartPoseDetection(const XnChar* strPose, XnUserID user)
7267  {
7268  return xnStartPoseDetection(GetHandle(), strPose, user);
7269  }
7270 
7283  {
7284  return xnStopPoseDetection(GetHandle(), user);
7285  }
7286 
7290  inline XnStatus StopSinglePoseDetection(XnUserID user, const XnChar* strPose)
7291  {
7292  return xnStopSinglePoseDetection(GetHandle(), user, strPose);
7293  }
7294 
7304  inline XnStatus RegisterToPoseDetected(PoseDetection handler, void* pCookie, XnCallbackHandle& hCallback)
7305  {
7306  XnStatus nRetVal = XN_STATUS_OK;
7307  PoseDetectionCookie* pPoseCookie;
7308  XN_VALIDATE_ALLOC(pPoseCookie, PoseDetectionCookie);
7309  pPoseCookie->handler = handler;
7310  pPoseCookie->pPoseCookie = pCookie;
7311 
7312  nRetVal = xnRegisterToPoseDetected(GetHandle(), PoseDetectionCallback, pPoseCookie, &pPoseCookie->hCallback);
7313  if (nRetVal != XN_STATUS_OK)
7314  {
7315  xnOSFree(pPoseCookie);
7316  return nRetVal;
7317  }
7318  hCallback = pPoseCookie;
7319  return XN_STATUS_OK;
7320  }
7321 
7331  inline XnStatus RegisterToOutOfPose(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 = xnRegisterToOutOfPose(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  }
7356  {
7357  PoseDetectionCookie* pPoseCookie = (PoseDetectionCookie*)hCallback;
7358  xnUnregisterFromPoseDetected(GetHandle(), pPoseCookie->hCallback);
7359  xnOSFree(pPoseCookie);
7360  }
7369  {
7370  PoseDetectionCookie* pPoseCookie = (PoseDetectionCookie*)hCallback;
7371  xnUnregisterFromOutOfPose(GetHandle(), pPoseCookie->hCallback);
7372  xnOSFree(pPoseCookie);
7373  }
7374 
7397  typedef void (XN_CALLBACK_TYPE* PoseInProgress)(PoseDetectionCapability& pose, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseError, void* pCookie);
7398 
7415  inline XnStatus RegisterToPoseInProgress(PoseInProgress handler, void* pCookie, XnCallbackHandle& hCallback)
7416  {
7417  XnStatus nRetVal = XN_STATUS_OK;
7418 
7419  PoseInProgressCookie* pPoseCookie;
7420  XN_VALIDATE_ALLOC(pPoseCookie, PoseInProgressCookie);
7421  pPoseCookie->handler = handler;
7422  pPoseCookie->pPoseCookie = pCookie;
7423 
7424  nRetVal = xnRegisterToPoseDetectionInProgress(GetHandle(), PoseDetectionInProgressCallback, pPoseCookie, &pPoseCookie->hCallback);
7425  if (nRetVal != XN_STATUS_OK)
7426  {
7427  xnOSFree(pPoseCookie);
7428  return (nRetVal);
7429  }
7430 
7431  hCallback = pPoseCookie;
7432 
7433  return (XN_STATUS_OK);
7434  }
7435 
7444  {
7445  PoseInProgressCookie* pPoseCookie = (PoseInProgressCookie*)hCallback;
7446  xnUnregisterFromPoseDetectionInProgress(GetHandle(), pPoseCookie->hCallback);
7447  xnOSFree(pPoseCookie);
7448  }
7449 
7451  inline XnStatus XN_API_DEPRECATED("Use GetAllAvailablePoses() instead") GetAvailablePoses(XnChar** pstrPoses, XnUInt32& nPoses) const
7452  {
7453  return xnGetAvailablePoses(GetHandle(), pstrPoses, &nPoses);
7454  }
7455 
7456  inline XnStatus XN_API_DEPRECATED("Please use RegisterToPoseDetected/RegisterToOutOfPose instead") RegisterToPoseCallbacks(PoseDetection PoseStartCB, PoseDetection PoseEndCB, void* pCookie, XnCallbackHandle& hCallback)
7457  {
7458  XnStatus nRetVal = XN_STATUS_OK;
7459 
7460  PoseCookie* pPoseCookie;
7461  XN_VALIDATE_ALLOC(pPoseCookie, PoseCookie);
7462  pPoseCookie->startHandler = PoseStartCB;
7463  pPoseCookie->endHandler = PoseEndCB;
7464  pPoseCookie->pPoseCookie = pCookie;
7465 
7466 #pragma warning (push)
7467 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7468  nRetVal = xnRegisterToPoseCallbacks(GetHandle(), PoseDetectionStartBundleCallback, PoseDetectionStartEndBundleCallback, pPoseCookie, &pPoseCookie->hCallback);
7469 #pragma warning (pop)
7470  if (nRetVal != XN_STATUS_OK)
7471  {
7472  xnOSFree(pPoseCookie);
7473  return (nRetVal);
7474  }
7475 
7476  hCallback = pPoseCookie;
7477 
7478  return (XN_STATUS_OK);
7479  }
7480 
7481  inline void XN_API_DEPRECATED("Please use UnregisterFromPoseDetected/UnregisterFromOutOfPose instead") UnregisterFromPoseCallbacks(XnCallbackHandle hCallback)
7482  {
7483  PoseCookie* pPoseCookie = (PoseCookie*)hCallback;
7484 #pragma warning (push)
7485 #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
7486  xnUnregisterFromPoseCallbacks(GetHandle(), pPoseCookie->hCallback);
7487 #pragma warning (pop)
7488  xnOSFree(pPoseCookie);
7489  }
7492 private:
7493  typedef struct PoseCookie
7494  {
7495  PoseDetection startHandler;
7496  PoseDetection endHandler;
7497  void* pPoseCookie;
7498  XnCallbackHandle hCallback;
7499  } PoseCookie;
7500 
7501  static void XN_CALLBACK_TYPE PoseDetectionStartBundleCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
7502  {
7503  PoseCookie* pPoseCookie = (PoseCookie*)pCookie;
7504  PoseDetectionCapability cap(hNode);
7505  if (pPoseCookie->startHandler != NULL)
7506  {
7507  pPoseCookie->startHandler(cap, strPose, user, pPoseCookie->pPoseCookie);
7508  }
7509  }
7510 
7511  static void XN_CALLBACK_TYPE PoseDetectionStartEndBundleCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
7512  {
7513  PoseCookie* pPoseCookie = (PoseCookie*)pCookie;
7514  PoseDetectionCapability cap(hNode);
7515  if (pPoseCookie->endHandler != NULL)
7516  {
7517  pPoseCookie->endHandler(cap, strPose, user, pPoseCookie->pPoseCookie);
7518  }
7519  }
7520  typedef struct PoseDetectionCookie
7521  {
7522  PoseDetection handler;
7523  void* pPoseCookie;
7524  XnCallbackHandle hCallback;
7525  } PoseDetectionCookie;
7526  static void XN_CALLBACK_TYPE PoseDetectionCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
7527  {
7528  PoseDetectionCookie* pPoseDetectionCookie = (PoseDetectionCookie*)pCookie;
7529  PoseDetectionCapability cap(hNode);
7530  if (pPoseDetectionCookie->handler != NULL)
7531  {
7532  pPoseDetectionCookie->handler(cap, strPose, user, pPoseDetectionCookie->pPoseCookie);
7533  }
7534  }
7535 
7536  typedef struct PoseInProgressCookie
7537  {
7538  PoseInProgress handler;
7539  void* pPoseCookie;
7540  XnCallbackHandle hCallback;
7541  } PoseInProgressCookie;
7542 
7543  static void XN_CALLBACK_TYPE PoseDetectionInProgressCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseErrors, void* pCookie)
7544  {
7545  PoseInProgressCookie* pPoseCookie = (PoseInProgressCookie*)pCookie;
7546  PoseDetectionCapability cap(hNode);
7547  if (pPoseCookie->handler != NULL)
7548  {
7549  pPoseCookie->handler(cap, strPose, user, poseErrors, pPoseCookie->pPoseCookie);
7550  }
7551  }
7552  };
7553 
7665  class UserGenerator : public Generator
7666  {
7667  public:
7673  inline UserGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
7674  inline UserGenerator(const NodeWrapper& other) : Generator(other) {}
7675 
7683  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
7684 
7697  typedef void (XN_CALLBACK_TYPE* UserHandler)(UserGenerator& generator, XnUserID user, void* pCookie);
7698 
7706  inline XnUInt16 GetNumberOfUsers() const
7707  {
7708  return xnGetNumberOfUsers(GetHandle());
7709  }
7710 
7733  inline XnStatus GetUsers(XnUserID aUsers[], XnUInt16& nUsers) const
7734  {
7735  return xnGetUsers(GetHandle(), aUsers, &nUsers);
7736  }
7737 
7757  inline XnStatus GetCoM(XnUserID user, XnPoint3D& com) const
7758  {
7759  return xnGetUserCoM(GetHandle(), user, &com);
7760  }
7761 
7778  {
7779  return xnGetUserPixels(GetHandle(), user, smd.GetUnderlying());
7780  }
7781 
7792  inline XnStatus RegisterUserCallbacks(UserHandler NewUserCB, UserHandler LostUserCB, void* pCookie, XnCallbackHandle& hCallback)
7793  {
7794  XnStatus nRetVal = XN_STATUS_OK;
7795 
7796  UserCookie* pUserCookie;
7797  XN_VALIDATE_ALLOC(pUserCookie, UserCookie);
7798  pUserCookie->newHandler = NewUserCB;
7799  pUserCookie->lostHandler = LostUserCB;
7800  pUserCookie->pUserCookie = pCookie;
7801 
7802  nRetVal = xnRegisterUserCallbacks(GetHandle(), NewUserCallback, LostUserCallback, pUserCookie, &pUserCookie->hCallback);
7803  if (nRetVal != XN_STATUS_OK)
7804  {
7805  xnOSFree(pUserCookie);
7806  return (nRetVal);
7807  }
7808 
7809  hCallback = pUserCookie;
7810 
7811  return (XN_STATUS_OK);
7812  }
7813 
7822  {
7823  UserCookie* pUserCookie = (UserCookie*)hCallback;
7824  xnUnregisterUserCallbacks(GetHandle(), pUserCookie->hCallback);
7825  xnOSFree(pUserCookie);
7826  }
7827 
7839  inline const SkeletonCapability GetSkeletonCap() const
7840  {
7841  return SkeletonCapability(GetHandle());
7842  }
7843 
7856  {
7857  return SkeletonCapability(GetHandle());
7858  }
7859 
7871  {
7873  }
7874 
7886  {
7888  }
7889 
7899  inline XnStatus RegisterToUserExit(UserHandler handler, void* pCookie, XnCallbackHandle& hCallback)
7900  {
7901  XnStatus nRetVal = XN_STATUS_OK;
7902 
7903  UserSingleCookie* pUserCookie;
7904  XN_VALIDATE_ALLOC(pUserCookie, UserSingleCookie);
7905  pUserCookie->handler = handler;
7906  pUserCookie->pUserCookie = pCookie;
7907 
7908  nRetVal = xnRegisterToUserExit(GetHandle(), UserSingleCallback, pUserCookie, &pUserCookie->hCallback);
7909  if (nRetVal != XN_STATUS_OK)
7910  {
7911  xnOSFree(pUserCookie);
7912  return (nRetVal);
7913  }
7914 
7915  hCallback = pUserCookie;
7916 
7917  return (XN_STATUS_OK);
7918  }
7919 
7928  {
7929  UserSingleCookie* pUserCookie = (UserSingleCookie*)hCallback;
7930  xnUnregisterFromUserExit(GetHandle(), pUserCookie->hCallback);
7931  xnOSFree(pUserCookie);
7932  }
7933 
7943  inline XnStatus RegisterToUserReEnter(UserHandler handler, void* pCookie, XnCallbackHandle& hCallback)
7944  {
7945  XnStatus nRetVal = XN_STATUS_OK;
7946 
7947  UserSingleCookie* pUserCookie;
7948  XN_VALIDATE_ALLOC(pUserCookie, UserSingleCookie);
7949  pUserCookie->handler = handler;
7950  pUserCookie->pUserCookie = pCookie;
7951 
7952  nRetVal = xnRegisterToUserReEnter(GetHandle(), UserSingleCallback, pUserCookie, &pUserCookie->hCallback);
7953  if (nRetVal != XN_STATUS_OK)
7954  {
7955  xnOSFree(pUserCookie);
7956  return (nRetVal);
7957  }
7958 
7959  hCallback = pUserCookie;
7960 
7961  return (XN_STATUS_OK);
7962  }
7963 
7972  {
7973  UserSingleCookie* pUserCookie = (UserSingleCookie*)hCallback;
7974  xnUnregisterFromUserReEnter(GetHandle(), pUserCookie->hCallback);
7975  xnOSFree(pUserCookie);
7976  }
7977 
7978  private:
7979  typedef struct UserCookie
7980  {
7981  UserHandler newHandler;
7982  UserHandler lostHandler;
7983  void* pUserCookie;
7984  XnCallbackHandle hCallback;
7985  } UserCookie;
7986 
7987  static void XN_CALLBACK_TYPE NewUserCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
7988  {
7989  UserCookie* pUserCookie = (UserCookie*)pCookie;
7990  UserGenerator gen(hNode);
7991  if (pUserCookie->newHandler != NULL)
7992  {
7993  pUserCookie->newHandler(gen, user, pUserCookie->pUserCookie);
7994  }
7995  }
7996 
7997  static void XN_CALLBACK_TYPE LostUserCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
7998  {
7999  UserCookie* pUserCookie = (UserCookie*)pCookie;
8000  UserGenerator gen(hNode);
8001  if (pUserCookie->lostHandler != NULL)
8002  {
8003  pUserCookie->lostHandler(gen, user, pUserCookie->pUserCookie);
8004  }
8005  }
8006 
8007  typedef struct UserSingleCookie
8008  {
8009  UserHandler handler;
8010  void* pUserCookie;
8011  XnCallbackHandle hCallback;
8012  } UserSingleCookie;
8013 
8014  static void XN_CALLBACK_TYPE UserSingleCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
8015  {
8016  UserSingleCookie* pUserCookie = (UserSingleCookie*)pCookie;
8017  UserGenerator gen(hNode);
8018  if (pUserCookie->handler != NULL)
8019  {
8020  pUserCookie->handler(gen, user, pUserCookie->pUserCookie);
8021  }
8022  }
8023  };
8024 
8038  class AudioGenerator : public Generator
8039  {
8040  public:
8046  inline AudioGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
8047  inline AudioGenerator(const NodeWrapper& other) : Generator(other) {}
8048 
8056  inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
8057 
8074  inline void GetMetaData(AudioMetaData& metaData) const
8075  {
8077  }
8078 
8083  inline const XnUChar* GetAudioBuffer() const
8084  {
8085  return xnGetAudioBuffer(GetHandle());
8086  }
8087 
8091  inline XnUInt32 GetSupportedWaveOutputModesCount() const
8092  {
8094  }
8095 
8102  inline XnStatus GetSupportedWaveOutputModes(XnWaveOutputMode* aSupportedModes, XnUInt32& nCount) const
8103  {
8104  return xnGetSupportedWaveOutputModes(GetHandle(), aSupportedModes, &nCount);
8105  }
8106 
8118  inline XnStatus SetWaveOutputMode(const XnWaveOutputMode& OutputMode)
8119  {
8120  return xnSetWaveOutputMode(GetHandle(), &OutputMode);
8121  }
8122 
8134  inline XnStatus GetWaveOutputMode(XnWaveOutputMode& OutputMode) const
8135  {
8136  return xnGetWaveOutputMode(GetHandle(), &OutputMode);
8137  }
8138 
8149  {
8150  return _RegisterToStateChange(xnRegisterToWaveOutputModeChanges, GetHandle(), handler, pCookie, hCallback);
8151  }
8152 
8161  {
8162  _UnregisterFromStateChange(xnUnregisterFromWaveOutputModeChanges, GetHandle(), hCallback);
8163  }
8164  };
8165 
8171  {
8172  public:
8178  inline MockAudioGenerator(XnNodeHandle hNode = NULL) : AudioGenerator(hNode) {}
8179  inline MockAudioGenerator(const NodeWrapper& other) : AudioGenerator(other) {}
8180 
8187  XnStatus Create(Context& context, const XnChar* strName = NULL);
8188 
8196  XnStatus CreateBasedOn(AudioGenerator& other, const XnChar* strName = NULL);
8197 
8202  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8* pAudioBuffer)
8203  {
8204  return xnMockAudioSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pAudioBuffer);
8205  }
8206 
8215  inline XnStatus SetData(const AudioMetaData& audioMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
8216  {
8217  return SetData(nFrameID, nTimestamp, audioMD.DataSize(), audioMD.Data());
8218  }
8219 
8225  inline XnStatus SetData(const AudioMetaData& audioMD)
8226  {
8227  return SetData(audioMD, audioMD.FrameID(), audioMD.Timestamp());
8228  }
8229  };
8230 
8235  {
8236  public:
8237  MockRawGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
8238  MockRawGenerator(const NodeWrapper& other) : Generator(other) {}
8239 
8240  inline XnStatus Create(Context& context, const XnChar* strName = NULL);
8241 
8242  inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void* pData)
8243  {
8244  return xnMockRawSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pData);
8245  }
8246 
8247  };
8248 
8253  class Codec : public ProductionNode
8254  {
8255  public:
8261  inline Codec(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
8262  inline Codec(const NodeWrapper& other) : ProductionNode(other) {}
8263 
8268  inline XnStatus Create(Context& context, XnCodecID codecID, ProductionNode& initializerNode);
8269 
8274  inline XnCodecID GetCodecID() const
8275  {
8276  return xnGetCodecID(GetHandle());
8277  }
8278 
8283  inline XnStatus EncodeData(const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) const
8284  {
8285  return xnEncodeData(GetHandle(), pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten);
8286  }
8287 
8292  inline XnStatus DecodeData(const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) const
8293  {
8294  return xnDecodeData(GetHandle(), pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten);
8295  }
8296  };
8297 
8332  {
8333  public:
8339  inline ScriptNode(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
8340  inline ScriptNode(const NodeWrapper& other) : ProductionNode(other) {}
8341 
8342  inline XnStatus Create(Context& context, const XnChar* strFormat);
8343 
8344  inline const XnChar* GetSupportedFormat()
8345  {
8347  }
8348 
8354  inline XnStatus LoadScriptFromFile(const XnChar* strFileName)
8355  {
8356  return xnLoadScriptFromFile(GetHandle(), strFileName);
8357  }
8358 
8364  inline XnStatus LoadScriptFromString(const XnChar* strScript)
8365  {
8366  return xnLoadScriptFromString(GetHandle(), strScript);
8367  }
8368 
8380  inline XnStatus Run(EnumerationErrors* pErrors);
8381  };
8382 
8383  //---------------------------------------------------------------------------
8384  // EnumerationErrors
8385  //---------------------------------------------------------------------------
8407  {
8408  public:
8412  inline EnumerationErrors() : m_bAllocated(TRUE), m_pErrors(NULL) { xnEnumerationErrorsAllocate(&m_pErrors); }
8413 
8421  inline EnumerationErrors(XnEnumerationErrors* pErrors, XnBool bOwn = FALSE) : m_bAllocated(bOwn), m_pErrors(pErrors) {}
8422 
8427 
8431  class Iterator
8432  {
8433  public:
8434  friend class EnumerationErrors;
8435 
8441  XnBool operator==(const Iterator& other) const
8442  {
8443  return m_it == other.m_it;
8444  }
8445 
8451  XnBool operator!=(const Iterator& other) const
8452  {
8453  return m_it != other.m_it;
8454  }
8455 
8461  {
8462  m_it = xnEnumerationErrorsGetNext(m_it);
8463  return *this;
8464  }
8465 
8470  inline Iterator operator++(int)
8471  {
8472  return Iterator(xnEnumerationErrorsGetNext(m_it));
8473  }
8474 
8484 
8490 
8491  private:
8492  inline Iterator(XnEnumerationErrorsIterator it) : m_it(it) {}
8493 
8495  };
8496 
8505  inline Iterator Begin() const { return Iterator(xnEnumerationErrorsGetFirst(m_pErrors)); }
8506 
8515  inline Iterator End() const { return Iterator(NULL); }
8516 
8525  inline XnStatus ToString(XnChar* csBuffer, XnUInt32 nSize)
8526  {
8527  return xnEnumerationErrorsToString(m_pErrors, csBuffer, nSize);
8528  }
8529 
8534  inline void Free()
8535  {
8536  if (m_bAllocated)
8537  {
8538  xnEnumerationErrorsFree(m_pErrors);
8539  m_pErrors = NULL;
8540  m_bAllocated = FALSE;
8541  }
8542  }
8543 
8547  inline XnEnumerationErrors* GetUnderlying() { return m_pErrors; }
8548 
8549  private:
8550  XnEnumerationErrors* m_pErrors;
8551  XnBool m_bAllocated;
8552  };
8553 
8554  //---------------------------------------------------------------------------
8555  // Context
8556  //---------------------------------------------------------------------------
8557 
8593  class Context
8594  {
8595  public:
8610  typedef void (XN_CALLBACK_TYPE* NodeCreationHandler)(Context& context, ProductionNode& createdNode, void* pCookie);
8611 
8626  typedef void (XN_CALLBACK_TYPE* NodeDestructionHandler)(Context& context, const XnChar* strDestroyedNodeName, void* pCookie);
8627 
8631  inline Context() : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL) {}
8632 
8638  inline Context(XnContext* pContext) : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL)
8639  {
8640  SetHandle(pContext);
8641  }
8642 
8649  inline Context(const Context& other) : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL)
8650  {
8651  SetHandle(other.m_pContext);
8652  }
8653 
8658  {
8659  SetHandle(NULL);
8660  }
8661 
8662  inline Context& operator=(const Context& other)
8663  {
8664  SetHandle(other.m_pContext);
8665  return *this;
8666  }
8667 
8671  inline XnContext* GetUnderlyingObject() const { return m_pContext; }
8672 
8678  inline XnBool operator==(const Context& other)
8679  {
8680  return (GetUnderlyingObject() == other.GetUnderlyingObject());
8681  }
8682 
8688  inline XnBool operator!=(const Context& other)
8689  {
8690  return (GetUnderlyingObject() != other.GetUnderlyingObject());
8691  }
8692 
8707  inline XnStatus Init()
8708  {
8709  XnContext* pContext = NULL;
8710  XnStatus nRetVal = xnInit(&pContext);
8711  XN_IS_STATUS_OK(nRetVal);
8712 
8713  TakeOwnership(pContext);
8714  m_bAllocated = TRUE;
8715 
8716  return (XN_STATUS_OK);
8717  }
8718 
8734  inline XnStatus RunXmlScript(const XnChar* strScript, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
8735  {
8736  XnStatus nRetVal = XN_STATUS_OK;
8737 
8738  XnNodeHandle hScriptNode;
8739  nRetVal = xnContextRunXmlScriptEx(m_pContext, strScript, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
8740  XN_IS_STATUS_OK(nRetVal);
8741 
8742  scriptNode.TakeOwnership(hScriptNode);
8743 
8744  return (XN_STATUS_OK);
8745  }
8746 
8762  inline XnStatus RunXmlScriptFromFile(const XnChar* strFileName, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
8763  {
8764  XnStatus nRetVal = XN_STATUS_OK;
8765 
8766  XnNodeHandle hScriptNode;
8767  nRetVal = xnContextRunXmlScriptFromFileEx(m_pContext, strFileName, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
8768  XN_IS_STATUS_OK(nRetVal);
8769 
8770  scriptNode.TakeOwnership(hScriptNode);
8771 
8772  return (XN_STATUS_OK);
8773  }
8774 
8790  inline XnStatus InitFromXmlFile(const XnChar* strFileName, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
8791  {
8792  XnContext* pContext = NULL;
8793 
8794  XnNodeHandle hScriptNode;
8795  XnStatus nRetVal = xnInitFromXmlFileEx(strFileName, &pContext, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
8796  XN_IS_STATUS_OK(nRetVal);
8797 
8798  scriptNode.TakeOwnership(hScriptNode);
8799  TakeOwnership(pContext);
8800  m_bAllocated = TRUE;
8801 
8802  return (XN_STATUS_OK);
8803  }
8804 
8821  inline XnStatus OpenFileRecording(const XnChar* strFileName, ProductionNode& playerNode)
8822  {
8823  XnStatus nRetVal = XN_STATUS_OK;
8824 
8825  XnNodeHandle hPlayer;
8826  nRetVal = xnContextOpenFileRecordingEx(m_pContext, strFileName, &hPlayer);
8827  XN_IS_STATUS_OK(nRetVal);
8828 
8829  playerNode.TakeOwnership(hPlayer);
8830 
8831  return (XN_STATUS_OK);
8832  }
8833 
8838  inline XnStatus CreateMockNode(XnProductionNodeType type, const XnChar* strName, ProductionNode& mockNode)
8839  {
8840  XnStatus nRetVal = XN_STATUS_OK;
8841 
8842  XnNodeHandle hMockNode;
8843  nRetVal = xnCreateMockNode(m_pContext, type, strName, &hMockNode);
8844  XN_IS_STATUS_OK(nRetVal);
8845 
8846  mockNode.TakeOwnership(hMockNode);
8847 
8848  return (XN_STATUS_OK);
8849  }
8850 
8855  inline XnStatus CreateMockNodeBasedOn(ProductionNode& originalNode, const XnChar* strName, ProductionNode& mockNode)
8856  {
8857  XnStatus nRetVal = XN_STATUS_OK;
8858 
8859  XnNodeHandle hMockNode;
8860  nRetVal = xnCreateMockNodeBasedOn(m_pContext, originalNode, strName, &hMockNode);
8861  XN_IS_STATUS_OK(nRetVal);
8862 
8863  mockNode.TakeOwnership(hMockNode);
8864 
8865  return (XN_STATUS_OK);
8866  }
8867 
8872  inline XnStatus CreateCodec(XnCodecID codecID, ProductionNode& initializerNode, Codec& codec)
8873  {
8874  XnStatus nRetVal = XN_STATUS_OK;
8875 
8876  XnNodeHandle hCodec;
8877  nRetVal = xnCreateCodec(m_pContext, codecID, initializerNode.GetHandle(), &hCodec);
8878  XN_IS_STATUS_OK(nRetVal);
8879 
8880  codec.TakeOwnership(hCodec);
8881 
8882  return (XN_STATUS_OK);
8883  }
8884 
8889  inline XnStatus AddRef()
8890  {
8891  return xnContextAddRef(m_pContext);
8892  }
8893 
8898  inline void Release()
8899  {
8900  SetHandle(NULL);
8901  }
8902 
8903 
8908  inline XnStatus AddLicense(const XnLicense& License)
8909  {
8910  return xnAddLicense(m_pContext, &License);
8911  }
8912 
8917  inline XnStatus EnumerateLicenses(XnLicense*& aLicenses, XnUInt32& nCount) const
8918  {
8919  return xnEnumerateLicenses(m_pContext, &aLicenses, &nCount);
8920  }
8921 
8926  inline static void FreeLicensesList(XnLicense aLicenses[])
8927  {
8928  xnFreeLicensesList(aLicenses);
8929  }
8930 
8951  XnStatus EnumerateProductionTrees(XnProductionNodeType Type, const Query* pQuery, NodeInfoList& TreesList, EnumerationErrors* pErrors = NULL) const
8952  {
8953  XnStatus nRetVal = XN_STATUS_OK;
8954 
8955  const XnNodeQuery* pInternalQuery = (pQuery != NULL) ? pQuery->GetUnderlyingObject() : NULL;
8956 
8957  XnNodeInfoList* pList = NULL;
8958  nRetVal = xnEnumerateProductionTrees(m_pContext, Type, pInternalQuery, &pList, pErrors == NULL ? NULL : pErrors->GetUnderlying());
8959  XN_IS_STATUS_OK(nRetVal);
8960 
8961  TreesList.ReplaceUnderlyingObject(pList);
8962 
8963  return (XN_STATUS_OK);
8964  }
8965 
8999  {
9000  XnStatus nRetVal = XN_STATUS_OK;
9001 
9002  XnNodeQuery* pInternalQuery = (pQuery != NULL) ? pQuery->GetUnderlyingObject() : NULL;
9003 
9004  XnNodeHandle hNode;
9005  nRetVal = xnCreateAnyProductionTree(m_pContext, type, pInternalQuery, &hNode, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9006  XN_IS_STATUS_OK(nRetVal);
9007 
9008  node.TakeOwnership(hNode);
9009 
9010  return (XN_STATUS_OK);
9011  }
9012 
9030  {
9031  XnStatus nRetVal = XN_STATUS_OK;
9032 
9033  XnNodeHandle hNode;
9034  nRetVal = xnCreateProductionTree(m_pContext, Tree, &hNode);
9035  XN_IS_STATUS_OK(nRetVal);
9036 
9037  node.TakeOwnership(hNode);
9038 
9039  return (XN_STATUS_OK);
9040  }
9041 
9051  {
9052  XnNodeInfoList* pList;
9053  XnStatus nRetVal = xnEnumerateExistingNodes(m_pContext, &pList);
9054  XN_IS_STATUS_OK(nRetVal);
9055 
9056  list.ReplaceUnderlyingObject(pList);
9057 
9058  return (XN_STATUS_OK);
9059  }
9060 
9080  {
9081  XnNodeInfoList* pList;
9082  XnStatus nRetVal = xnEnumerateExistingNodesByType(m_pContext, type, &pList);
9083  XN_IS_STATUS_OK(nRetVal);
9084 
9085  list.ReplaceUnderlyingObject(pList);
9086 
9087  return (XN_STATUS_OK);
9088  }
9089 
9109  {
9110  XnStatus nRetVal = XN_STATUS_OK;
9111 
9112  XnNodeHandle hNode;
9113  nRetVal = xnFindExistingRefNodeByType(m_pContext, type, &hNode);
9114  XN_IS_STATUS_OK(nRetVal);
9115 
9116  node.TakeOwnership(hNode);
9117 
9118  return (XN_STATUS_OK);
9119  }
9120 
9125  XnStatus GetProductionNodeByName(const XnChar* strInstanceName, ProductionNode& node) const
9126  {
9127  XnStatus nRetVal = XN_STATUS_OK;
9128 
9129  XnNodeHandle hNode;
9130  nRetVal = xnGetRefNodeHandleByName(m_pContext, strInstanceName, &hNode);
9131  XN_IS_STATUS_OK(nRetVal);
9132 
9133  node.TakeOwnership(hNode);
9134 
9135  return (XN_STATUS_OK);
9136  }
9137 
9142  XnStatus GetProductionNodeInfoByName(const XnChar* strInstanceName, NodeInfo& nodeInfo) const
9143  {
9144  XnStatus nRetVal = XN_STATUS_OK;
9145 
9146  XnNodeHandle hNode;
9147  nRetVal = xnGetRefNodeHandleByName(m_pContext, strInstanceName, &hNode);
9148  XN_IS_STATUS_OK(nRetVal);
9149 
9150  xnProductionNodeRelease(hNode);
9151 
9152  nodeInfo = NodeInfo(xnGetNodeInfo(hNode));
9153 
9154  return (XN_STATUS_OK);
9155  }
9156 
9162  {
9163  return xnStartGeneratingAll(m_pContext);
9164  }
9165 
9170  {
9171  return xnStopGeneratingAll(m_pContext);
9172  }
9173 
9183  inline XnStatus SetGlobalMirror(XnBool bMirror)
9184  {
9185  return xnSetGlobalMirror(m_pContext, bMirror);
9186  }
9187 
9192  inline XnBool GetGlobalMirror()
9193  {
9194  return xnGetGlobalMirror(m_pContext);
9195  }
9196 
9202  {
9203  return xnGetGlobalErrorState(m_pContext);
9204  }
9205 
9216  {
9217  return xnRegisterToGlobalErrorStateChange(m_pContext, handler, pCookie, &hCallback);
9218  }
9219 
9228  {
9229  xnUnregisterFromGlobalErrorStateChange(m_pContext, hCallback);
9230  }
9231 
9241  inline XnStatus RegisterToNodeCreation(NodeCreationHandler handler, void* pCookie, XnCallbackHandle& hCallback)
9242  {
9243  XnStatus nRetVal = XN_STATUS_OK;
9244 
9245  NodeCreationCookie* pCreationCookie;
9246  XN_VALIDATE_ALLOC(pCreationCookie, NodeCreationCookie);
9247  pCreationCookie->pFunc = handler;
9248  pCreationCookie->pCookie = pCookie;
9249 
9250  nRetVal = xnRegisterToNodeCreation(m_pContext, NodeCreationCallback, pCreationCookie, &pCreationCookie->hUnderlyingCallback);
9251  XN_IS_STATUS_OK(nRetVal);
9252 
9253  hCallback = pCreationCookie;
9254 
9255  return XN_STATUS_OK;
9256  }
9257 
9266  {
9267  NodeCreationCookie* pCreationCookie = (NodeCreationCookie*)hCallback;
9268  xnUnregisterFromNodeCreation(m_pContext, pCreationCookie->hUnderlyingCallback);
9269  xnOSFree(pCreationCookie);
9270  }
9271 
9282  {
9283  XnStatus nRetVal = XN_STATUS_OK;
9284 
9285  NodeDestructionCookie* pDestructionCookie;
9286  XN_VALIDATE_ALLOC(pDestructionCookie, NodeDestructionCookie);
9287  pDestructionCookie->pFunc = handler;
9288  pDestructionCookie->pCookie = pCookie;
9289 
9290  nRetVal = xnRegisterToNodeDestruction(m_pContext, NodeDestructionCallback, pDestructionCookie, &pDestructionCookie->hUnderlyingCallback);
9291  XN_IS_STATUS_OK(nRetVal);
9292 
9293  hCallback = pDestructionCookie;
9294 
9295  return XN_STATUS_OK;
9296  }
9297 
9306  {
9307  NodeDestructionCookie* pDestructionCookie = (NodeDestructionCookie*)hCallback;
9308  xnUnregisterFromNodeDestruction(m_pContext, pDestructionCookie->hUnderlyingCallback);
9309  xnOSFree(pDestructionCookie);
9310  }
9311 
9346  {
9347  return xnWaitAndUpdateAll(m_pContext);
9348  }
9349 
9385  {
9386  return xnWaitAnyUpdateAll(m_pContext);
9387  }
9388 
9420  {
9421  return xnWaitOneUpdateAll(m_pContext, node.GetHandle());
9422  }
9423 
9446  {
9447  return xnWaitNoneUpdateAll(m_pContext);
9448  }
9449 
9454  inline XnStatus AutoEnumerateOverSingleInput(NodeInfoList& List, XnProductionNodeDescription& description, const XnChar* strCreationInfo, XnProductionNodeType InputType, EnumerationErrors* pErrors, Query* pQuery = NULL) const
9455  {
9456  return xnAutoEnumerateOverSingleInput(m_pContext, List.GetUnderlyingObject(), &description, strCreationInfo, InputType, pErrors == NULL ? NULL : pErrors->GetUnderlying(), pQuery == NULL ? NULL : pQuery->GetUnderlyingObject());
9457  }
9458 
9462  inline void SetHandle(XnContext* pContext)
9463  {
9464  if (m_pContext == pContext)
9465  {
9466  return;
9467  }
9468 
9469  if (m_pContext != NULL)
9470  {
9471  if (m_bUsingDeprecatedAPI && m_bAllocated)
9472  {
9473  // Backwards compatibility: call shutdown instead of release, to make old programs get the
9474  // exact same behavior they used to have.
9475  xnForceShutdown(m_pContext);
9476  }
9477  else
9478  {
9479  xnContextUnregisterFromShutdown(m_pContext, m_hShuttingDownCallback);
9480  xnContextRelease(m_pContext);
9481  }
9482  }
9483 
9484  if (pContext != NULL)
9485  {
9486  XnStatus nRetVal = xnContextAddRef(pContext);
9487  XN_ASSERT(nRetVal == XN_STATUS_OK);
9488  XN_REFERENCE_VARIABLE(nRetVal);
9489 
9490  nRetVal = xnContextRegisterForShutdown(pContext, ContextShuttingDownCallback, this, &m_hShuttingDownCallback);
9491  XN_ASSERT(nRetVal == XN_STATUS_OK);
9492  }
9493 
9494  m_pContext = pContext;
9495  }
9496 
9497  inline void TakeOwnership(XnContext* pContext)
9498  {
9499  SetHandle(pContext);
9500 
9501  if (pContext != NULL)
9502  {
9503  xnContextRelease(pContext);
9504  }
9505  }
9506 
9508  inline XnStatus XN_API_DEPRECATED("Use other overload!") RunXmlScript(const XnChar* strScript, EnumerationErrors* pErrors = NULL)
9509  {
9510  m_bUsingDeprecatedAPI = TRUE;
9511  #pragma warning (push)
9512  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9513  return xnContextRunXmlScript(m_pContext, strScript, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9514  #pragma warning (pop)
9515  }
9516 
9517  inline XnStatus XN_API_DEPRECATED("Use other overload!") RunXmlScriptFromFile(const XnChar* strFileName, EnumerationErrors* pErrors = NULL)
9518  {
9519  m_bUsingDeprecatedAPI = TRUE;
9520  #pragma warning (push)
9521  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9522  return xnContextRunXmlScriptFromFile(m_pContext, strFileName, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9523  #pragma warning (pop)
9524  }
9525 
9526  inline XnStatus XN_API_DEPRECATED("Use other overload!") InitFromXmlFile(const XnChar* strFileName, EnumerationErrors* pErrors = NULL)
9527  {
9528  XnContext* pContext = NULL;
9529  m_bUsingDeprecatedAPI = TRUE;
9530 
9531  #pragma warning (push)
9532  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9533  XnStatus nRetVal = xnInitFromXmlFile(strFileName, &pContext, pErrors == NULL ? NULL : pErrors->GetUnderlying());
9534  #pragma warning (pop)
9535  XN_IS_STATUS_OK(nRetVal);
9536 
9537  TakeOwnership(pContext);
9538  m_bAllocated = TRUE;
9539 
9540  return (XN_STATUS_OK);
9541  }
9542 
9543  inline XnStatus XN_API_DEPRECATED("Use other overload!") OpenFileRecording(const XnChar* strFileName)
9544  {
9545  m_bUsingDeprecatedAPI = TRUE;
9546  #pragma warning (push)
9547  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9548  return xnContextOpenFileRecording(m_pContext, strFileName);
9549  #pragma warning (pop)
9550  }
9551 
9552  inline void XN_API_DEPRECATED("You may use Release() instead, or count on dtor") Shutdown()
9553  {
9554  if (m_pContext != NULL)
9555  {
9556  #pragma warning (push)
9557  #pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
9558  xnShutdown(m_pContext);
9559  #pragma warning (pop)
9560  m_pContext = NULL;
9561  }
9562  }
9563 
9564  XnStatus XN_API_DEPRECATED("Please use other overload") CreateProductionTree(NodeInfo& Tree)
9565  {
9566  XnStatus nRetVal = XN_STATUS_OK;
9567 
9568  XnNodeHandle hNode;
9569  nRetVal = xnCreateProductionTree(m_pContext, Tree, &hNode);
9570  XN_IS_STATUS_OK(nRetVal);
9571 
9572  Tree.m_bOwnerOfNode = TRUE;
9573 
9574  return (XN_STATUS_OK);
9575  }
9578  private:
9579  typedef struct NodeCreationCookie
9580  {
9581  NodeCreationHandler pFunc;
9582  void* pCookie;
9583  XnCallbackHandle hUnderlyingCallback;
9584  } NodeCreationCookie;
9585 
9586  typedef struct NodeDestructionCookie
9587  {
9588  NodeDestructionHandler pFunc;
9589  void* pCookie;
9590  XnCallbackHandle hUnderlyingCallback;
9591  } NodeDestructionCookie;
9592 
9593  static void XN_CALLBACK_TYPE NodeCreationCallback(XnContext* pContext, XnNodeHandle hCreatedNode, void* pCookie)
9594  {
9595  NodeCreationCookie* pNodeCreationCookie = (NodeCreationCookie*)pCookie;
9596  Context context(pContext);
9597  ProductionNode createdNode(hCreatedNode);
9598  pNodeCreationCookie->pFunc(context, createdNode, pNodeCreationCookie->pCookie);
9599  }
9600 
9601  static void XN_CALLBACK_TYPE NodeDestructionCallback(XnContext* pContext, const XnChar* strDestroyedNodeName, void* pCookie)
9602  {
9603  NodeDestructionCookie* pNodeCreationCookie = (NodeDestructionCookie*)pCookie;
9604  Context context(pContext);
9605  pNodeCreationCookie->pFunc(context, strDestroyedNodeName, pNodeCreationCookie->pCookie);
9606  }
9607 
9608  static void XN_CALLBACK_TYPE ContextShuttingDownCallback(XnContext* /*pContext*/, void* pCookie)
9609  {
9610  Context* pThis = (Context*)pCookie;
9611  pThis->m_pContext = NULL;
9612  }
9613 
9614  XnContext* m_pContext;
9615  XnBool m_bUsingDeprecatedAPI;
9616  XnBool m_bAllocated;
9617  XnCallbackHandle m_hShuttingDownCallback;
9618  };
9619 
9625  {
9626  public:
9632  inline Resolution(XnResolution res) : m_Res(res)
9633  {
9634  m_nXRes = xnResolutionGetXRes(res);
9635  m_nYRes = xnResolutionGetYRes(res);
9636  m_strName = xnResolutionGetName(res);
9637  }
9638 
9645  inline Resolution(XnUInt32 xRes, XnUInt32 yRes) : m_nXRes(xRes), m_nYRes(yRes)
9646  {
9647  m_Res = xnResolutionGetFromXYRes(xRes, yRes);
9648  m_strName = xnResolutionGetName(m_Res);
9649  }
9650 
9656  inline Resolution(const XnChar* strName)
9657  {
9658  m_Res = xnResolutionGetFromName(strName);
9659  m_nXRes = xnResolutionGetXRes(m_Res);
9660  m_nYRes = xnResolutionGetYRes(m_Res);
9661  m_strName = xnResolutionGetName(m_Res);
9662  }
9663 
9667  inline XnResolution GetResolution() const { return m_Res; }
9671  inline XnUInt32 GetXResolution() const { return m_nXRes; }
9675  inline XnUInt32 GetYResolution() const { return m_nYRes; }
9679  inline const XnChar* GetName() const { return m_strName; }
9680 
9681  private:
9682  XnResolution m_Res;
9683  XnUInt32 m_nXRes;
9684  XnUInt32 m_nYRes;
9685  const XnChar* m_strName;
9686  };
9687 
9688  //---------------------------------------------------------------------------
9689  // Functions Implementation
9690  //---------------------------------------------------------------------------
9692  {
9693  return xnNodeQueryFilterList(context.GetUnderlyingObject(), query.GetUnderlyingObject(), m_pList);
9694  }
9695 
9696  inline void ProductionNode::GetContext(Context& context) const
9697  {
9699  }
9700 
9702  {
9704  Context result(pContext);
9705  xnContextRelease(pContext);
9706  return result;
9707  }
9708 
9710  {
9711  if (m_pNeededNodes == NULL)
9712  {
9713  XnNodeInfoList* pList = xnNodeInfoGetNeededNodes(m_pInfo);
9714  m_pNeededNodes = XN_NEW(NodeInfoList, pList);
9715  }
9716 
9717  return *m_pNeededNodes;
9718  }
9719 
9720  inline void NodeInfo::SetUnderlyingObject(XnNodeInfo* pInfo)
9721  {
9722  if (m_pNeededNodes != NULL)
9723  {
9724  XN_DELETE(m_pNeededNodes);
9725  }
9726 
9727  m_bOwnerOfNode = FALSE;
9728  m_pInfo = pInfo;
9729  m_pNeededNodes = NULL;
9730  }
9731 
9733  {
9734  return xnCanFrameSyncWith(GetHandle(), other.GetHandle());
9735  }
9736 
9738  {
9739  return xnFrameSyncWith(GetHandle(), other.GetHandle());
9740  }
9741 
9743  {
9744  return xnStopFrameSyncWith(GetHandle(), other.GetHandle());
9745  }
9746 
9748  {
9749  return xnIsFrameSyncedWith(GetHandle(), other.GetHandle());
9750  }
9751 
9753  {
9754  if (m_pInfo == NULL)
9755  {
9756  return XN_STATUS_INVALID_OPERATION;
9757  }
9758 
9759  XnNodeHandle hNode = xnNodeInfoGetRefHandle(m_pInfo);
9760  node.TakeOwnership(hNode);
9761 
9762  if (m_bOwnerOfNode)
9763  {
9764  xnProductionNodeRelease(hNode);
9765  }
9766 
9767  return (XN_STATUS_OK);
9768  }
9769 
9770  //---------------------------------------------------------------------------
9771  // Node creation functions
9772  //---------------------------------------------------------------------------
9773 
9774  inline XnStatus Device::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9775  {
9776  XnNodeHandle hNode;
9777  XnStatus nRetVal = xnCreateDevice(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9778  XN_IS_STATUS_OK(nRetVal);
9779  TakeOwnership(hNode);
9780  return (XN_STATUS_OK);
9781  }
9782 
9783  inline XnStatus Recorder::Create(Context& context, const XnChar* strFormatName /*= NULL*/)
9784  {
9785  XnNodeHandle hNode;
9786  XnStatus nRetVal = xnCreateRecorder(context.GetUnderlyingObject(), strFormatName, &hNode);
9787  XN_IS_STATUS_OK(nRetVal);
9788  TakeOwnership(hNode);
9789  return (XN_STATUS_OK);
9790  }
9791 
9792  inline XnStatus Player::Create(Context& context, const XnChar* strFormatName)
9793  {
9794  XnNodeHandle hNode;
9795  XnStatus nRetVal = xnCreatePlayer(context.GetUnderlyingObject(), strFormatName, &hNode);
9796  XN_IS_STATUS_OK(nRetVal);
9797  TakeOwnership(hNode);
9798  return (XN_STATUS_OK);
9799  }
9800 
9801  inline XnStatus DepthGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9802  {
9803  XnNodeHandle hNode;
9804  XnStatus nRetVal = xnCreateDepthGenerator(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 MockDepthGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9811  {
9812  XnNodeHandle hNode;
9813  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_DEPTH, strName, &hNode);
9814  XN_IS_STATUS_OK(nRetVal);
9815  TakeOwnership(hNode);
9816  return (XN_STATUS_OK);
9817  }
9818 
9819  inline XnStatus MockDepthGenerator::CreateBasedOn(DepthGenerator& other, const XnChar* strName /* = NULL */)
9820  {
9821  Context context;
9822  other.GetContext(context);
9823  XnNodeHandle hNode;
9824  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9825  XN_IS_STATUS_OK(nRetVal);
9826  TakeOwnership(hNode);
9827  return (XN_STATUS_OK);
9828  }
9829 
9830  inline XnStatus ImageGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9831  {
9832  XnNodeHandle hNode;
9833  XnStatus nRetVal = xnCreateImageGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9834  XN_IS_STATUS_OK(nRetVal);
9835  TakeOwnership(hNode);
9836  return (XN_STATUS_OK);
9837  }
9838 
9839  inline XnStatus MockImageGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9840  {
9841  XnNodeHandle hNode;
9842  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_IMAGE, strName, &hNode);
9843  XN_IS_STATUS_OK(nRetVal);
9844  TakeOwnership(hNode);
9845  return (XN_STATUS_OK);
9846  }
9847 
9848  inline XnStatus MockImageGenerator::CreateBasedOn(ImageGenerator& other, const XnChar* strName /* = NULL */)
9849  {
9850  Context context;
9851  other.GetContext(context);
9852  XnNodeHandle hNode;
9853  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9854  XN_IS_STATUS_OK(nRetVal);
9855  TakeOwnership(hNode);
9856  return (XN_STATUS_OK);
9857  }
9858 
9859  inline XnStatus IRGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9860  {
9861  XnNodeHandle hNode;
9862  XnStatus nRetVal = xnCreateIRGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9863  XN_IS_STATUS_OK(nRetVal);
9864  TakeOwnership(hNode);
9865  return (XN_STATUS_OK);
9866  }
9867 
9868  inline XnStatus MockIRGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9869  {
9870  XnNodeHandle hNode;
9871  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_IR, strName, &hNode);
9872  XN_IS_STATUS_OK(nRetVal);
9873  TakeOwnership(hNode);
9874  return (XN_STATUS_OK);
9875  }
9876 
9877  inline XnStatus MockIRGenerator::CreateBasedOn(IRGenerator& other, const XnChar* strName /* = NULL */)
9878  {
9879  Context context;
9880  other.GetContext(context);
9881  XnNodeHandle hNode;
9882  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9883  XN_IS_STATUS_OK(nRetVal);
9884  TakeOwnership(hNode);
9885  return (XN_STATUS_OK);
9886  }
9887 
9888  inline XnStatus GestureGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9889  {
9890  XnNodeHandle hNode;
9891  XnStatus nRetVal = xnCreateGestureGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9892  XN_IS_STATUS_OK(nRetVal);
9893  TakeOwnership(hNode);
9894  return (XN_STATUS_OK);
9895  }
9896 
9897  inline XnStatus SceneAnalyzer::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9898  {
9899  //You're creating a scene!
9900  XnNodeHandle hNode;
9901  XnStatus nRetVal = xnCreateSceneAnalyzer(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9902  XN_IS_STATUS_OK(nRetVal);
9903  TakeOwnership(hNode);
9904  return (XN_STATUS_OK);
9905  }
9906 
9907  inline XnStatus HandsGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9908  {
9909  XnNodeHandle hNode;
9910  XnStatus nRetVal = xnCreateHandsGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9911  XN_IS_STATUS_OK(nRetVal);
9912  TakeOwnership(hNode);
9913  return (XN_STATUS_OK);
9914  }
9915 
9916  inline XnStatus UserGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9917  {
9918  XnNodeHandle hNode;
9919  XnStatus nRetVal = xnCreateUserGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9920  XN_IS_STATUS_OK(nRetVal);
9921  TakeOwnership(hNode);
9922  return (XN_STATUS_OK);
9923  }
9924 
9925  inline XnStatus AudioGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
9926  {
9927  XnNodeHandle hNode;
9928  XnStatus nRetVal = xnCreateAudioGenerator(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 MockAudioGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
9935  {
9936  XnNodeHandle hNode;
9937  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_AUDIO, strName, &hNode);
9938  XN_IS_STATUS_OK(nRetVal);
9939  TakeOwnership(hNode);
9940  return (XN_STATUS_OK);
9941  }
9942 
9943  inline XnStatus MockAudioGenerator::CreateBasedOn(AudioGenerator& other, const XnChar* strName /* = NULL */)
9944  {
9945  Context context;
9946  other.GetContext(context);
9947  XnNodeHandle hNode;
9948  XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
9949  XN_IS_STATUS_OK(nRetVal);
9950  TakeOwnership(hNode);
9951  return (XN_STATUS_OK);
9952  }
9953 
9954  inline XnStatus MockRawGenerator::Create(Context& context, const XnChar* strName /*= NULL*/)
9955  {
9956  XnNodeHandle hNode;
9957  XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_GENERATOR, strName, &hNode);
9958  XN_IS_STATUS_OK(nRetVal);
9959  TakeOwnership(hNode);
9960  return (XN_STATUS_OK);
9961  }
9962 
9963  inline XnStatus Codec::Create(Context& context, XnCodecID codecID, ProductionNode& initializerNode)
9964  {
9965  XnNodeHandle hNode;
9966  XnStatus nRetVal = xnCreateCodec(context.GetUnderlyingObject(), codecID, initializerNode.GetHandle(), &hNode);
9967  XN_IS_STATUS_OK(nRetVal);
9968  TakeOwnership(hNode);
9969  return (XN_STATUS_OK);
9970  }
9971 
9973  {
9974  return xnScriptNodeRun(GetHandle(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
9975  }
9976 
9977  inline XnStatus ScriptNode::Create(Context& context, const XnChar* strFormat)
9978  {
9979  XnNodeHandle hNode;
9980  XnStatus nRetVal = xnCreateScriptNode(context.GetUnderlyingObject(), strFormat, &hNode);
9981  XN_IS_STATUS_OK(nRetVal);
9982  TakeOwnership(hNode);
9983  return (XN_STATUS_OK);
9984  }
9985 
9986  //---------------------------------------------------------------------------
9987  // Global Helper Functions
9988  //---------------------------------------------------------------------------
9989 
9990  inline void XN_API_DEPRECATED("Use xn::Version::Current() instead") GetVersion(XnVersion& Version)
9991  {
9993  }
9994 
9995  //---------------------------------------------------------------------------
9996  // Internal Helper Classes and Functions
9997  //---------------------------------------------------------------------------
9998 
10000  {
10001  public:
10002  StateChangedCallbackTranslator(StateChangedHandler handler, void* pCookie) : m_UserHandler(handler), m_pUserCookie(pCookie), m_hCallback(NULL) {}
10003 
10004  XnStatus Register(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
10005  {
10006  return xnFunc(hNode, StateChangedCallback, this, &m_hCallback);
10007  }
10008 
10009  void Unregister(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
10010  {
10011  xnFunc(hNode, m_hCallback);
10012  }
10013 
10014  static XnStatus RegisterToUnderlying(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
10015  {
10016  XnStatus nRetVal = XN_STATUS_OK;
10017 
10019  XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
10020 
10021  nRetVal = pTrans->Register(xnFunc, hNode);
10022  if (nRetVal != XN_STATUS_OK)
10023  {
10024  XN_DELETE(pTrans);
10025  return (nRetVal);
10026  }
10027 
10028  hCallback = pTrans;
10029 
10030  return (XN_STATUS_OK);
10031  }
10032 
10033  static XnStatus UnregisterFromUnderlying(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
10034  {
10036  pTrans->Unregister(xnFunc, hNode);
10037  XN_DELETE(pTrans);
10038  return XN_STATUS_OK;
10039  }
10040 
10041  private:
10042  friend class GeneralIntCapability;
10043 
10044  typedef struct StateChangeCookie
10045  {
10046  StateChangedHandler userHandler;
10047  void* pUserCookie;
10048  XnCallbackHandle hCallback;
10049  } StateChangeCookie;
10050 
10051  static void XN_CALLBACK_TYPE StateChangedCallback(XnNodeHandle hNode, void* pCookie)
10052  {
10054  ProductionNode node(hNode);
10055  pTrans->m_UserHandler(node, pTrans->m_pUserCookie);
10056  }
10057 
10058  StateChangedHandler m_UserHandler;
10059  void* m_pUserCookie;
10060  XnCallbackHandle m_hCallback;
10061  };
10062 
10063  static XnStatus _RegisterToStateChange(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
10064  {
10065  return StateChangedCallbackTranslator::RegisterToUnderlying(xnFunc, hNode, handler, pCookie, hCallback);
10066  }
10067 
10068  static void _UnregisterFromStateChange(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
10069  {
10071  }
10072 
10074  {
10075  XnStatus nRetVal = XN_STATUS_OK;
10076 
10078  XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
10079 
10080  nRetVal = xnRegisterToGeneralIntValueChange(GetHandle(), m_strCap, pTrans->StateChangedCallback, pTrans, &pTrans->m_hCallback);
10081  if (nRetVal != XN_STATUS_OK)
10082  {
10083  XN_DELETE(pTrans);
10084  return (nRetVal);
10085  }
10086 
10087  hCallback = pTrans;
10088 
10089  return (XN_STATUS_OK);
10090  }
10091 
10093  {
10095  xnUnregisterFromGeneralIntValueChange(GetHandle(), m_strCap, pTrans->m_hCallback);
10096  XN_DELETE(pTrans);
10097  }
10098 };
10099 
10100 #endif // __XN_CPP_WRAPPER_H__
#define XN_CODEC_NULL
Definition: XnCodecIDs.h:27
#define XN_IS_STATUS_OK(x)
Definition: XnMacros.h:60
#define XN_REFERENCE_VARIABLE(x)
Definition: XnMacros.h:125
#define XN_VALIDATE_ALLOC_PTR(x)
Definition: XnOS.h:128
#define XN_VALIDATE_ALLOC(x, y)
Definition: XnOS.h:131
#define XN_DELETE(p)
Definition: XnOS.h:336
#define XN_NEW(type,...)
Definition: XnOS.h:326
#define XN_VALIDATE_NEW(ptr, type,...)
Definition: XnOS.h:168
XN_C_API void XN_C_DECL xnOSFreeAligned(const void *pMemBlock)
XN_C_API void XN_C_DECL xnOSMemCopy(void *pDest, const void *pSource, XnSizeT nCount)
XN_C_API void *XN_C_DECL xnOSMallocAligned(const XnSizeT nAllocSize, const XnSizeT nAlignment)
XN_C_API void XN_C_DECL xnOSMemSet(void *pDest, XnUInt8 nValue, XnSizeT nCount)
XN_C_API void XN_C_DECL xnOSFree(const void *pMemBlock)
#define TRUE
Definition: XnPlatform.h:93
#define FALSE
Definition: XnPlatform.h:97
XnUInt32 XnStatus
Definition: XnStatus.h:34
#define XN_STATUS_OK
Definition: XnStatus.h:37
#define XN_CAPABILITY_BACKLIGHT_COMPENSATION
Definition: XnTypes.h:331
XnUInt32 XnCodecID
Definition: XnTypes.h:839
XnUInt8 XnGrayscale8Pixel
Definition: XnTypes.h:299
#define XN_CAPABILITY_CONTRAST
Definition: XnTypes.h:325
XnPixelFormat
Definition: XnTypes.h:512
@ XN_PIXEL_FORMAT_YUV422
Definition: XnTypes.h:514
@ XN_PIXEL_FORMAT_MJPEG
Definition: XnTypes.h:517
@ XN_PIXEL_FORMAT_GRAYSCALE_16_BIT
Definition: XnTypes.h:516
@ XN_PIXEL_FORMAT_GRAYSCALE_8_BIT
Definition: XnTypes.h:515
@ XN_PIXEL_FORMAT_RGB24
Definition: XnTypes.h:513
XnResolution
Definition: XnTypes.h:408
#define XN_CAPABILITY_GAMMA
Definition: XnTypes.h:329
#define XN_CAPABILITY_GAIN
Definition: XnTypes.h:332
XnSkeletonProfile
Definition: XnTypes.h:645
XnPoseDetectionStatus
Definition: XnTypes.h:664
#define XN_CAPABILITY_SATURATION
Definition: XnTypes.h:327
#define XN_CAPABILITY_TILT
Definition: XnTypes.h:334
XnPowerLineFrequency
Definition: XnTypes.h:539
XnUInt16 XnGrayscale16Pixel
Definition: XnTypes.h:302
#define XN_CAPABILITY_EXPOSURE
Definition: XnTypes.h:337
XnPlayerSeekOrigin
Definition: XnTypes.h:532
void * XnCallbackHandle
Definition: XnTypes.h:268
#define XN_CAPABILITY_COLOR_TEMPERATURE
Definition: XnTypes.h:330
#define XN_CAPABILITY_HUE
Definition: XnTypes.h:326
void(* XnFreeHandler)(const void *pData)
Definition: XnTypes.h:242
#define XN_CAPABILITY_ROLL
Definition: XnTypes.h:335
XnUInt32 XnLockHandle
Definition: XnTypes.h:87
XnGrayscale16Pixel XnIRPixel
Definition: XnTypes.h:305
struct XnNodeInfoList XnNodeInfoList
Definition: XnTypes.h:187
XnUInt32 XnUserID
Definition: XnTypes.h:546
#define XN_CAPABILITY_IRIS
Definition: XnTypes.h:338
#define XN_CAPABILITY_PAN
Definition: XnTypes.h:333
struct XnRGB24Pixel XnRGB24Pixel
void(* XnErrorStateChangedHandler)(XnStatus errorState, void *pCookie)
Definition: XnTypes.h:235
#define XN_CAPABILITY_FOCUS
Definition: XnTypes.h:339
struct XnNodeInfo XnNodeInfo
Definition: XnTypes.h:177
#define XN_CAPABILITY_LOW_LIGHT_COMPENSATION
Definition: XnTypes.h:340
#define XN_CAPABILITY_SHARPNESS
Definition: XnTypes.h:328
#define XN_CAPABILITY_ZOOM
Definition: XnTypes.h:336
XnInt32 XnProductionNodeType
Definition: XnTypes.h:92
XnDirection
Definition: XnTypes.h:699
XnSkeletonJoint
Definition: XnTypes.h:612
XnPoseDetectionState
Definition: XnTypes.h:676
struct XnNodeQuery XnNodeQuery
Definition: XnTypes.h:197
struct XnYUV422DoublePixel XnYUV422DoublePixel
XnCalibrationStatus
Definition: XnTypes.h:683
@ XN_NODE_TYPE_DEPTH
Definition: XnTypes.h:106
@ XN_NODE_TYPE_IR
Definition: XnTypes.h:115
@ XN_NODE_TYPE_IMAGE
Definition: XnTypes.h:109
@ XN_NODE_TYPE_AUDIO
Definition: XnTypes.h:112
@ XN_NODE_TYPE_GENERATOR
Definition: XnTypes.h:140
void(* XnStateChangedHandler)(XnNodeHandle hNode, void *pCookie)
Definition: XnTypes.h:227
XnUInt16 XnDepthPixel
Definition: XnTypes.h:276
#define XN_CAPABILITY_BRIGHTNESS
Definition: XnTypes.h:324
struct XnInternalNodeData * XnNodeHandle
Definition: XnTypes.h:82
XnUInt16 XnLabel
Definition: XnTypes.h:308
struct XnContext XnContext
Definition: XnTypes.h:77
Definition: XnCppWrapper.h:3104
void UnregisterFromViewPointChange(XnCallbackHandle hCallback)
Unregisters the event handler for the the 'Viewpoint Change' event.
Definition: XnCppWrapper.h:3181
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:3135
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:3123
XnStatus ResetViewPoint()
Sets the viewpoint of the holding generator node to its normal viewpoint.
Definition: XnCppWrapper.h:3143
XnStatus RegisterToViewPointChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers a handler for the 'Viewpoint Change' event (see the above overview to this class).
Definition: XnCppWrapper.h:3169
AlternativeViewPointCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:3106
AlternativeViewPointCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:3107
XnBool IsViewPointAs(ProductionNode &otherNode) const
Returns whether the holder node's viewpoint is the same viewpoint as that of another specified node....
Definition: XnCppWrapper.h:3155
Definition: XnCppWrapper.h:4175
XnStatus SetPowerLineFrequency(XnPowerLineFrequency nFrequency)
Sets the power line frequency: 50 Hz, 60 Hz, or 0 to turn off anti-flicker. For full details and usag...
Definition: XnCppWrapper.h:4189
void UnregisterFromPowerLineFrequencyChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Power Line Frequency Change' event.
Definition: XnCppWrapper.h:4224
AntiFlickerCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:4183
XnStatus RegisterToPowerLineFrequencyChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Power Line Frequency Change' event.
Definition: XnCppWrapper.h:4212
XnPowerLineFrequency GetPowerLineFrequency()
Gets the power line frequency. For full details and usage, see xnGetPowerLineFrequency
Definition: XnCppWrapper.h:4198
AntiFlickerCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:4182
Definition: XnCppWrapper.h:8039
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates an AudioGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9925
void GetMetaData(AudioMetaData &metaData) const
Gets the audio generator node's latest frame object, saving it in the xn::AudioMetaData object....
Definition: XnCppWrapper.h:8074
AudioGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:8047
void UnregisterFromWaveOutputModeChanges(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Wave Output Mode Change' event.
Definition: XnCppWrapper.h:8160
XnStatus RegisterToWaveOutputModeChanges(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Wave Output Mode Change' event.
Definition: XnCppWrapper.h:8148
XnStatus GetWaveOutputMode(XnWaveOutputMode &OutputMode) const
Gets the current AudioGenerator node's wave output mode. This output mode is used for generating the ...
Definition: XnCppWrapper.h:8134
AudioGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8046
XnUInt32 GetSupportedWaveOutputModesCount() const
Gets the node's number of supported wave output modes.
Definition: XnCppWrapper.h:8091
const XnUChar * GetAudioBuffer() const
For full details and usage, see xnGetAudioBuffer
Definition: XnCppWrapper.h:8083
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:8118
XnStatus GetSupportedWaveOutputModes(XnWaveOutputMode *aSupportedModes, XnUInt32 &nCount) const
Returns a list of the wave output modes that the AudioGenerator node supports.
Definition: XnCppWrapper.h:8102
Definition: XnCppWrapper.h:1375
XnAudioMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1432
XnUInt32 SampleRate() const
Gets the rate at which the audio interface was sampled. This is a packet configuration setting associ...
Definition: XnCppWrapper.h:1410
XnUInt8 & NumberOfChannels()
Gets the number of channels in each sample. This is a packet configuration setting associated with th...
Definition: XnCppWrapper.h:1405
XnUInt16 BitsPerSample() const
Gets the number of bits per channel in a sample. This is a packet configuration setting associated wi...
Definition: XnCppWrapper.h:1419
XN_PRAGMA_STOP_DISABLED_WARNING_SECTION
Definition: XnCppWrapper.h:1384
XnUInt8 NumberOfChannels() const
Gets the number of channels in each sample. This is a packet configuration setting associated with th...
Definition: XnCppWrapper.h:1401
XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_UNALIGNED_ADDRESS_WARNING_ID)
const XnAudioMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1428
XnUInt32 & SampleRate()
Gets the rate at which the audio interface was sampled. This is a packet configuration setting associ...
Definition: XnCppWrapper.h:1414
XnUInt16 & BitsPerSample()
Gets the number of bits per channel in a sample. This is a packet configuration setting associated wi...
Definition: XnCppWrapper.h:1423
void InitFrom(const AudioMetaData &other)
Shallow-Copies an AudioMetaData object.
Definition: XnCppWrapper.h:1393
AudioMetaData()
Definition: XnCppWrapper.h:1378
Definition: XnCppWrapper.h:2436
Capability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:2443
Capability(const NodeWrapper &node)
Definition: XnCppWrapper.h:2444
Definition: XnCppWrapper.h:8254
XnStatus EncodeData(const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten) const
For full details and usage, see xnEncodeData
Definition: XnCppWrapper.h:8283
XnStatus Create(Context &context, XnCodecID codecID, ProductionNode &initializerNode)
For full details and usage, see xnCreateCodec
Definition: XnCppWrapper.h:9963
XnCodecID GetCodecID() const
For full details and usage, see xnGetCodecID
Definition: XnCppWrapper.h:8274
XnStatus DecodeData(const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten) const
For full details and usage, see xnDecodeData
Definition: XnCppWrapper.h:8292
Codec(const NodeWrapper &other)
Definition: XnCppWrapper.h:8262
Codec(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8261
Definition: XnCppWrapper.h:8594
XnStatus RunXmlScriptFromFile(const XnChar *strFileName, ScriptNode &scriptNode, EnumerationErrors *pErrors=NULL)
Runs an XML script file to build a production graph.
Definition: XnCppWrapper.h:8762
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:9108
XnStatus WaitAnyUpdateAll()
Updates all generator nodes in the context to their latest available data, first waiting for any of t...
Definition: XnCppWrapper.h:9384
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:8951
XnContext * GetUnderlyingObject() const
Definition: XnCppWrapper.h:8671
~Context()
Definition: XnCppWrapper.h:8657
void UnregisterFromNodeCreation(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Node Creation' event. see Event: 'Node Creation'.
Definition: XnCppWrapper.h:9265
XnStatus CreateCodec(XnCodecID codecID, ProductionNode &initializerNode, Codec &codec)
For full details and usage, see xnCreateCodec
Definition: XnCppWrapper.h:8872
XnStatus EnumerateLicenses(XnLicense *&aLicenses, XnUInt32 &nCount) const
For full details and usage, see xnEnumerateLicenses
Definition: XnCppWrapper.h:8917
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:8821
Context()
Definition: XnCppWrapper.h:8631
XnStatus RunXmlScript(const XnChar *strScript, ScriptNode &scriptNode, EnumerationErrors *pErrors=NULL)
Runs an XML script string to build a production graph.
Definition: XnCppWrapper.h:8734
XnStatus RegisterToErrorStateChange(XnErrorStateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Global Error State Change' event.
Definition: XnCppWrapper.h:9215
Context(XnContext *pContext)
Definition: XnCppWrapper.h:8638
void Release()
Releases a context object, decreasing its ref count by 1. If reference count has reached 0,...
Definition: XnCppWrapper.h:8898
void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Global Error State Change' event.
Definition: XnCppWrapper.h:9227
Context & operator=(const Context &other)
Definition: XnCppWrapper.h:8662
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:8998
XnStatus GetProductionNodeInfoByName(const XnChar *strInstanceName, NodeInfo &nodeInfo) const
For full details and usage, see xnGetNodeHandleByName
Definition: XnCppWrapper.h:9142
XnStatus WaitAndUpdateAll()
Updates all generator nodes in the context to their latest available data, first waiting for all node...
Definition: XnCppWrapper.h:9345
XnBool GetGlobalMirror()
Gets the current state of the GlobalMirror flag.
Definition: XnCppWrapper.h:9192
XnStatus AutoEnumerateOverSingleInput(NodeInfoList &List, XnProductionNodeDescription &description, const XnChar *strCreationInfo, XnProductionNodeType InputType, EnumerationErrors *pErrors, Query *pQuery=NULL) const
For full details and usage, see xnAutoEnumerateOverSingleInput
Definition: XnCppWrapper.h:9454
XnBool operator==(const Context &other)
Definition: XnCppWrapper.h:8678
XnBool operator!=(const Context &other)
Definition: XnCppWrapper.h:8688
XnStatus CreateMockNode(XnProductionNodeType type, const XnChar *strName, ProductionNode &mockNode)
Creates a production node which is only a mock. This node does not represent an actual node,...
Definition: XnCppWrapper.h:8838
XnStatus AddRef()
Adds a reference to the context object. For full details and usage, see xnContextAddRef
Definition: XnCppWrapper.h:8889
Context(const Context &other)
Definition: XnCppWrapper.h:8649
XnStatus GetGlobalErrorState()
Gets the global error state of the context. If one of the nodes in the context is in error state,...
Definition: XnCppWrapper.h:9201
XnStatus InitFromXmlFile(const XnChar *strFileName, ScriptNode &scriptNode, EnumerationErrors *pErrors=NULL)
Shorthand combination of two other initialization methods - Init() and then RunXmlScriptFromFile() - ...
Definition: XnCppWrapper.h:8790
void UnregisterFromNodeDestruction(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Node Destruction' event. see Event: 'Node Destruction'.
Definition: XnCppWrapper.h:9305
XnStatus GetProductionNodeByName(const XnChar *strInstanceName, ProductionNode &node) const
For full details and usage, see xnGetNodeHandleByName
Definition: XnCppWrapper.h:9125
XnStatus EnumerateExistingNodes(NodeInfoList &list) const
Returns a list of all the context's existing created nodes.
Definition: XnCppWrapper.h:9050
XnStatus RegisterToNodeCreation(NodeCreationHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Node Creation' event. see Event: 'Node Creation'.
Definition: XnCppWrapper.h:9241
void TakeOwnership(XnContext *pContext)
Definition: XnCppWrapper.h:9497
XnStatus RegisterToNodeDestruction(NodeDestructionHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Node Destruction' event. see Event: 'Node Destruction'.
Definition: XnCppWrapper.h:9281
XnStatus EnumerateExistingNodes(NodeInfoList &list, XnProductionNodeType type) const
Returns a list of the context's existing created nodes filtered by type.
Definition: XnCppWrapper.h:9079
void(* NodeDestructionHandler)(Context &context, const XnChar *strDestroyedNodeName, void *pCookie)
Definition: XnCppWrapper.h:8626
XnStatus CreateMockNodeBasedOn(ProductionNode &originalNode, const XnChar *strName, ProductionNode &mockNode)
Creates a production node which is only a mock, base on the type and properties of another node....
Definition: XnCppWrapper.h:8855
XnStatus WaitOneUpdateAll(ProductionNode &node)
Updates all generator nodes in the context to their latest available data, first waiting for a specif...
Definition: XnCppWrapper.h:9419
static void FreeLicensesList(XnLicense aLicenses[])
For full details and usage, see xnFreeLicensesList
Definition: XnCppWrapper.h:8926
XnStatus CreateProductionTree(NodeInfo &Tree, ProductionNode &node)
Creates a production node from the information supplied in a xn::NodeInfo object.
Definition: XnCppWrapper.h:9029
void(* NodeCreationHandler)(Context &context, ProductionNode &createdNode, void *pCookie)
Definition: XnCppWrapper.h:8610
XnStatus SetGlobalMirror(XnBool bMirror)
Enables/disables the GlobalMirror flag.
Definition: XnCppWrapper.h:9183
XnStatus Init()
Builds the context's general software environment.
Definition: XnCppWrapper.h:8707
XnStatus WaitNoneUpdateAll()
Immediately updates all generator nodes in the context to their latest available data,...
Definition: XnCppWrapper.h:9445
void SetHandle(XnContext *pContext)
Definition: XnCppWrapper.h:9462
XnStatus StopGeneratingAll()
Ensures all generator nodes are not generating data.
Definition: XnCppWrapper.h:9169
XnStatus AddLicense(const XnLicense &License)
For full details and usage, see xnAddLicense
Definition: XnCppWrapper.h:8908
XnStatus StartGeneratingAll()
Ensures all created generator nodes are generating data.
Definition: XnCppWrapper.h:9161
Definition: XnCppWrapper.h:4100
CroppingCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:4108
CroppingCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:4107
XnStatus SetCropping(const XnCropping &Cropping)
Sets the holder node's current cropping configuration. This configuration is used for generating the ...
Definition: XnCppWrapper.h:4119
XnStatus RegisterToCroppingChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Cropping Change' event.
Definition: XnCppWrapper.h:4148
void UnregisterFromCroppingChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Cropping Change' event.
Definition: XnCppWrapper.h:4160
XnStatus GetCropping(XnCropping &Cropping) const
Gets the current cropping configuration of the holder node. This configuration is that set by SetCrop...
Definition: XnCppWrapper.h:4134
Definition: XnCppWrapper.h:4695
const UserPositionCapability GetUserPositionCap() const
Definition: XnCppWrapper.h:4840
XnDepthPixel GetDeviceMaxDepth() const
Gets the maximum depth value that the DepthGenerator node can generate. The maximum depth value is a ...
Definition: XnCppWrapper.h:4753
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:4830
const XnDepthPixel * GetDepthMap() const
Gets the current depth-map. This map is updated after a call to xnWaitAndUpdateData()....
Definition: XnCppWrapper.h:4739
void GetMetaData(DepthMetaData &metaData) const
Gets the depth generator node's latest frame object, saving it in the xn::DepthMetaData object....
Definition: XnCppWrapper.h:4730
UserPositionCapability GetUserPositionCap()
Definition: XnCppWrapper.h:4850
DepthGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4703
XnStatus GetFieldOfView(XnFieldOfView &FOV) const
Gets the dimensions of the field of view (FOV) of the hardware sensor.
Definition: XnCppWrapper.h:4776
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a DepthGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9801
void UnregisterFromFieldOfViewChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Field-Of-View Change' event.
Definition: XnCppWrapper.h:4802
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:4816
DepthGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4702
XnStatus RegisterToFieldOfViewChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Field-Of-View Change' event.
Definition: XnCppWrapper.h:4790
Definition: XnCppWrapper.h:755
xn::DepthMap & WritableDepthMap()
Definition: XnCppWrapper.h:872
XnStatus CopyFrom(const DepthMetaData &other)
Definition: XnCppWrapper.h:803
XnStatus InitFrom(const DepthMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer)
Definition: XnCppWrapper.h:791
const XnDepthPixel & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:883
const XnDepthPixel *& Data()
Returns the depth map.
Definition: XnCppWrapper.h:857
XnDepthPixel & ZRes()
Definition: XnCppWrapper.h:830
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:814
const xn::DepthMap & DepthMap() const
Definition: XnCppWrapper.h:868
XnDepthPixel * WritableData()
Definition: XnCppWrapper.h:863
DepthMetaData()
Definition: XnCppWrapper.h:760
const XnDepthPixel & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:895
XnDepthPixel ZRes() const
Definition: XnCppWrapper.h:824
XnDepthMetaData * GetUnderlying()
Definition: XnCppWrapper.h:908
const XnDepthMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:904
void InitFrom(const DepthMetaData &other)
Shallow-Copies a DepthMetaData object.
Definition: XnCppWrapper.h:776
const XnDepthPixel * Data() const
Returns the depth map.
Definition: XnCppWrapper.h:844
Definition: XnCppWrapper.h:2938
Device(const NodeWrapper &other)
Definition: XnCppWrapper.h:2941
Device(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:2940
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a Device node from available production node alternatives.
Definition: XnCppWrapper.h:9774
DeviceIdentificationCapability GetIdentificationCap()
Definition: XnCppWrapper.h:2966
Definition: XnCppWrapper.h:2871
DeviceIdentificationCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:2879
XnStatus GetVendorSpecificData(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the vendor-specific name of the device holding this capability object.
Definition: XnCppWrapper.h:2904
DeviceIdentificationCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:2878
XnStatus GetDeviceName(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the name of the device holding this capability object.
Definition: XnCppWrapper.h:2890
XnStatus GetSerialNumber(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the vendor-specific name of the device holding this capability object.
Definition: XnCppWrapper.h:2918
Definition: XnCppWrapper.h:8432
XnBool operator!=(const Iterator &other) const
Definition: XnCppWrapper.h:8451
Iterator operator++(int)
Definition: XnCppWrapper.h:8470
Iterator & operator++()
Definition: XnCppWrapper.h:8460
XnBool operator==(const Iterator &other) const
Definition: XnCppWrapper.h:8441
const XnProductionNodeDescription & Description()
Returns the description data of the failing node the iterator points to.
Definition: XnCppWrapper.h:8483
XnStatus Error()
Returns the failure error code of the failing node the iterator points to. For a string representatio...
Definition: XnCppWrapper.h:8489
Definition: XnCppWrapper.h:8407
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:8525
XnEnumerationErrors * GetUnderlying()
Definition: XnCppWrapper.h:8547
Iterator Begin() const
Gets an iterator to the first item in an enumeration errors list.
Definition: XnCppWrapper.h:8505
EnumerationErrors()
Definition: XnCppWrapper.h:8412
EnumerationErrors(XnEnumerationErrors *pErrors, XnBool bOwn=FALSE)
Definition: XnCppWrapper.h:8421
~EnumerationErrors()
Definition: XnCppWrapper.h:8426
Iterator End() const
Returns an iterator referring to the past-the-end element in an enumeration errors list....
Definition: XnCppWrapper.h:8515
void Free()
For full details and usage, see xnEnumerationErrorsFree
Definition: XnCppWrapper.h:8534
Definition: XnCppWrapper.h:2481
XnStatus RegisterToErrorStateChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Error State Change' event.
Definition: XnCppWrapper.h:2508
void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Error State Change' event.
Definition: XnCppWrapper.h:2520
ErrorStateCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:2489
ErrorStateCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:2488
XnStatus GetErrorState() const
Gets the current error state of the holding node.
Definition: XnCppWrapper.h:2494
Definition: XnCppWrapper.h:3209
XnStatus FrameSyncWith(Generator &other)
Activates frame synchronization with the other generator node.
Definition: XnCppWrapper.h:9737
FrameSyncCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:3212
XnStatus RegisterToFrameSyncChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Frame Sync Change' event.
Definition: XnCppWrapper.h:3255
FrameSyncCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:3211
XnStatus StopFrameSyncWith(Generator &other)
Removes the frame sync between the node holding this capability and the specified other node.
Definition: XnCppWrapper.h:9742
void UnregisterFromFrameSyncChange(XnCallbackHandle hCallback)
Unregisters the 'Frame Sync Change' event handler.
Definition: XnCppWrapper.h:3267
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:9747
XnBool CanFrameSyncWith(Generator &other) const
Returns whether the generator node holding this capability can synchronize frames with the other spec...
Definition: XnCppWrapper.h:9732
Definition: XnCppWrapper.h:2532
XnStatus Set(XnInt32 nValue)
Sets the current value of this capability. For full details and usage, see xnSetGeneralIntValue
Definition: XnCppWrapper.h:2567
void GetRange(XnInt32 &nMin, XnInt32 &nMax, XnInt32 &nStep, XnInt32 &nDefault, XnBool &bIsAutoSupported) const
Gets the range of this capability values. For full details and usage, see xnGetGeneralIntRange
Definition: XnCppWrapper.h:2547
XnInt32 Get()
Gets the current value of this capability. For full details and usage, see xnGetGeneralIntValue
Definition: XnCppWrapper.h:2556
GeneralIntCapability(XnNodeHandle hNode, const XnChar *strCap)
Definition: XnCppWrapper.h:2540
void UnregisterFromValueChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Value Change' event.
Definition: XnCppWrapper.h:10092
XnStatus RegisterToValueChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Value Change' event.
Definition: XnCppWrapper.h:10073
GeneralIntCapability(const NodeWrapper &node, const XnChar *strCap)
Definition: XnCppWrapper.h:2541
Definition: XnCppWrapper.h:3326
const FrameSyncCapability GetFrameSyncCap() const
Definition: XnCppWrapper.h:3626
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:3503
Generator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:3333
FrameSyncCapability GetFrameSyncCap()
Definition: XnCppWrapper.h:3640
void UnregisterFromGenerationRunningChange(XnCallbackHandle hCallback)
Unregisters the 'Generation State Change' event handler.
Definition: XnCppWrapper.h:3406
XnStatus StartGenerating()
Enters the node into Generating state.
Definition: XnCppWrapper.h:3355
XnStatus RegisterToGenerationRunningChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Generation State Change' event.
Definition: XnCppWrapper.h:3394
XnBool IsNewDataAvailable(XnUInt64 *pnTimestamp=NULL) const
Returns whether the node has new data available. The new data is available for updating,...
Definition: XnCppWrapper.h:3449
MirrorCapability GetMirrorCap()
Gets a MirrorCapability object for accessing Mirror functionality.
Definition: XnCppWrapper.h:3582
const AlternativeViewPointCapability GetAlternativeViewPointCap() const
Definition: XnCppWrapper.h:3597
XnStatus RegisterToNewDataAvailable(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'New Data Available' event.
Definition: XnCppWrapper.h:3424
XnBool IsDataNew() const
Definition: XnCppWrapper.h:3481
Generator(const NodeWrapper &other)
Definition: XnCppWrapper.h:3334
void UnregisterFromNewDataAvailable(XnCallbackHandle hCallback)
Unregisters the event handler for the 'New Data Available' event.
Definition: XnCppWrapper.h:3436
XnUInt64 GetTimestamp() const
Gets the frame timestamp from the Generator node This method gets the timestamp directly from the Gen...
Definition: XnCppWrapper.h:3539
const MirrorCapability GetMirrorCap() const
Gets a MirrorCapability object for accessing Mirror functionality.
Definition: XnCppWrapper.h:3569
XnStatus WaitAndUpdateData()
Updates the generator node to the latest available data, first waiting for the node to have new data ...
Definition: XnCppWrapper.h:3472
XnStatus StopGenerating()
Makes the node leave Generating state (enters Non-Generating state).
Definition: XnCppWrapper.h:3376
AlternativeViewPointCapability GetAlternativeViewPointCap()
Definition: XnCppWrapper.h:3612
XnUInt32 GetFrameID() const
Gets the frame ID of the current frame data from the Generator node.
Definition: XnCppWrapper.h:3556
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:3521
XnBool IsGenerating() const
Returns whether the node is currently in Generating state.
Definition: XnCppWrapper.h:3363
Definition: XnCppWrapper.h:5355
void UnregisterFromGestureChange(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Gesture Change' event.
Definition: XnCppWrapper.h:5583
XnStatus AddGesture(const XnChar *strGesture, XnBoundingBox3D *pArea)
Activates the GestureGenerator node to start looking for the named gesture in the FOV....
Definition: XnCppWrapper.h:5393
XnStatus RegisterToGestureChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Gesture Change' event.
Definition: XnCppWrapper.h:5571
void(* GestureRecognized)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pIDPosition, const XnPoint3D *pEndPosition, void *pCookie)
Definition: XnCppWrapper.h:5485
XnStatus EnumerateAllGestures(XnChar **astrGestures, XnUInt32 nNameLength, XnUInt16 &nGestures) const
Gets the names of all active gestures in this generator node.
Definition: XnCppWrapper.h:5440
void(* GestureReadyForNextIntermediateStage)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pPosition, void *pCookie)
Definition: XnCppWrapper.h:5679
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:5418
void(* GestureProgress)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pPosition, XnFloat fProgress, void *pCookie)
Definition: XnCppWrapper.h:5513
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a gesture generator node from available production node alternatives.
Definition: XnCppWrapper.h:9888
XnStatus RegisterGestureCallbacks(GestureRecognized RecognizedCB, GestureProgress ProgressCB, void *pCookie, XnCallbackHandle &hCallback)
Registers event handlers for the 'Gesture Recognized' and 'Gesture Progress' events....
Definition: XnCppWrapper.h:5526
GestureGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5363
XnBool IsGestureAvailable(const XnChar *strGesture) const
Returns whether a specific gesture is available in this generator node.
Definition: XnCppWrapper.h:5450
void(* GestureIntermediateStageCompleted)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pPosition, void *pCookie)
Definition: XnCppWrapper.h:5615
void UnregisterGestureCallbacks(XnCallbackHandle hCallback)
Unregisters the event handlers for the 'Gesture Recognized' and 'Gesture Progress' events.
Definition: XnCppWrapper.h:5555
XnBool IsGestureProgressSupported(const XnChar *strGesture) const
Check if the specific gesture supports 'in progress' callbacks. For full details and usage,...
Definition: XnCppWrapper.h:5459
XnStatus RegisterToGestureIntermediateStageCompleted(GestureIntermediateStageCompleted handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Gesture Intermediate Stage Completed' event.
Definition: XnCppWrapper.h:5626
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:5405
XnUInt16 GetNumberOfAvailableGestures() const
Get the number of all gestures available. For full details and usage, see xnGetNumberOfAvailableGestu...
Definition: XnCppWrapper.h:5427
GestureGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5362
void UnregisterFromGestureIntermediateStageCompleted(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Gesture Intermediate Stage Completed' event.
Definition: XnCppWrapper.h:5654
XnStatus RegisterToGestureReadyForNextIntermediateStage(GestureReadyForNextIntermediateStage handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Gesture Ready For Next Intermediate Stage' event.
Definition: XnCppWrapper.h:5690
void UnregisterFromGestureReadyForNextIntermediateStageCallbacks(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Gesture Ready For Next Intermediate Stage' event.
Definition: XnCppWrapper.h:5718
Definition: XnCppWrapper.h:5891
HandTouchingFOVEdgeCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:5899
void UnregisterFromHandTouchingFOVEdge(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Hand Touching FOV Edge' event.
Definition: XnCppWrapper.h:5950
XnStatus RegisterToHandTouchingFOVEdge(HandTouchingFOVEdge handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Hand Touching FOV Edge' event.
Definition: XnCppWrapper.h:5922
void(* HandTouchingFOVEdge)(HandTouchingFOVEdgeCapability &touchingfov, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, XnDirection eDir, void *pCookie)
Definition: XnCppWrapper.h:5911
HandTouchingFOVEdgeCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:5898
Definition: XnCppWrapper.h:6064
XnStatus SetSmoothing(XnFloat fSmoothingFactor)
Changes the smoothing factor.
Definition: XnCppWrapper.h:6250
void(* HandCreate)(HandsGenerator &generator, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, void *pCookie)
Definition: XnCppWrapper.h:6098
XnStatus StopTracking(XnUserID user)
Stops tracking an existing hand that you are no longer interested in.
Definition: XnCppWrapper.h:6195
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a HandsGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9907
XnStatus StopTrackingAll()
Stops tracking all existing hands.
Definition: XnCppWrapper.h:6208
HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap()
Definition: XnCppWrapper.h:6274
void(* HandDestroy)(HandsGenerator &generator, XnUserID user, XnFloat fTime, void *pCookie)
Definition: XnCppWrapper.h:6131
void UnregisterHandCallbacks(XnCallbackHandle hCallback)
Unregisters event handlers for the 'Hand Create', 'Hand Update' and 'Hand Destroy' events.
Definition: XnCppWrapper.h:6175
const HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap() const
Definition: XnCppWrapper.h:6262
HandsGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:6072
void(* HandUpdate)(HandsGenerator &generator, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, void *pCookie)
Definition: XnCppWrapper.h:6116
XnStatus RegisterHandCallbacks(HandCreate CreateCB, HandUpdate UpdateCB, HandDestroy DestroyCB, void *pCookie, XnCallbackHandle &hCallback)
Registers event handlers for the 'Hand Create', 'Hand Update' and 'Hand Destroy' events....
Definition: XnCppWrapper.h:6145
XnStatus StartTracking(const XnPoint3D &ptPosition)
Starts tracking at the specific position where the application expects a hand.
Definition: XnCppWrapper.h:6229
HandsGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:6071
Definition: XnCppWrapper.h:5176
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates an IRGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9859
IRGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5184
IRGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5183
void GetMetaData(IRMetaData &metaData) const
Gets the IR generator node's latest frame object, saving it in the xn::IRMetaData object....
Definition: XnCppWrapper.h:5210
const XnIRPixel * GetIRMap() const
Gets a pointer to the latest IR map.
Definition: XnCppWrapper.h:5218
Definition: XnCppWrapper.h:1217
XnIRPixel * WritableData()
Definition: XnCppWrapper.h:1305
const xn::IRMap & IRMap() const
Gets a fast, light object wrapping the IR map. Remarks
Definition: XnCppWrapper.h:1338
XnIRMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1356
const XnIRMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1352
XnStatus CopyFrom(const IRMetaData &other)
Definition: XnCppWrapper.h:1260
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:1271
const XnIRPixel *& Data()
Returns the IR map.
Definition: XnCppWrapper.h:1301
xn::IRMap & WritableIRMap()
Gets a fast, light object wrapping the writable IR map. Remarks
Definition: XnCppWrapper.h:1347
IRMetaData()
Definition: XnCppWrapper.h:1219
const XnIRPixel * Data() const
Returns the IR map.
Definition: XnCppWrapper.h:1288
void InitFrom(const IRMetaData &other)
Shallow-Copies an IRMetaData object.
Definition: XnCppWrapper.h:1235
const XnIRPixel & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:1312
XnStatus InitFrom(const IRMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel *pExternalBuffer)
Definition: XnCppWrapper.h:1249
const XnIRPixel & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:1324
Definition: XnCppWrapper.h:4940
void UnregisterFromPixelFormatChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Pixel Format Change' event.
Definition: XnCppWrapper.h:5096
XnStatus RegisterToPixelFormatChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Pixel Format Change' event.
Definition: XnCppWrapper.h:5084
XnPixelFormat GetPixelFormat() const
Gets the current pixel color format. This is the format set using xn::ImageGenerator node::SetPixelFo...
Definition: XnCppWrapper.h:5070
XnStatus SetPixelFormat(XnPixelFormat Format)
Sets the ImageGenerator node's current 'pixel color' format. This format is used for generating the n...
Definition: XnCppWrapper.h:5055
const XnGrayscale8Pixel * GetGrayscale8ImageMap() const
Gets the current Grayscale8 image-map. This map is updated after a call to xnWaitAndUpdateData()....
Definition: XnCppWrapper.h:5000
ImageGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4947
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates and initializes an ImageGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9830
ImageGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4948
void GetMetaData(ImageMetaData &metaData) const
Gets the image generator node's latest frame object, saving it in the xn::ImageMetaData object....
Definition: XnCppWrapper.h:4973
XnBool IsPixelFormatSupported(XnPixelFormat Format) const
Returns whether the ImageGenerator node supports a specific pixel color format for the image map.
Definition: XnCppWrapper.h:5033
const XnGrayscale16Pixel * GetGrayscale16ImageMap() const
Gets the current Grayscale16 image-map. This map is updated after a call to xnWaitAndUpdateData()....
Definition: XnCppWrapper.h:5009
const XnYUV422DoublePixel * GetYUV422ImageMap() const
Gets the current YUV422 image-map. This map is updated after a call to xnWaitAndUpdateData()....
Definition: XnCppWrapper.h:4991
const XnRGB24Pixel * GetRGB24ImageMap() const
Gets the current RGB24 image-map. This map is updated after a call to xnWaitAndUpdateData()....
Definition: XnCppWrapper.h:4982
const XnUInt8 * GetImageMap() const
Gets the current image-map as a byte buffer. For full details, see xnGetImageMap().
Definition: XnCppWrapper.h:5018
Definition: XnCppWrapper.h:947
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:1090
ImageMetaData()
Definition: XnCppWrapper.h:949
XnStatus InitFrom(const ImageMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer)
Definition: XnCppWrapper.h:987
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:1085
XnYUV422DoublePixel * WritableYUV422Data()
Definition: XnCppWrapper.h:1111
XnPixelFormat PixelFormat() const
Gets the frame's pixel color format used in this image map. This is the format of the frame object sa...
Definition: XnCppWrapper.h:1064
XnStatus CopyFrom(const ImageMetaData &other)
Definition: XnCppWrapper.h:1022
XnGrayscale16Pixel * WritableGrayscale16Data()
Definition: XnCppWrapper.h:1141
XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format)
Allocates a writable buffer. If a previous buffer was allocated it will be freed (or reused if possib...
Definition: XnCppWrapper.h:1003
xn::RGB24Map & WritableRGB24Map()
Definition: XnCppWrapper.h:1161
XnUInt8 * WritableData()
Definition: XnCppWrapper.h:1079
const xn::Grayscale16Map & Grayscale16Map() const
Gets a light wrapper object wrapping the frame's image map as Grayscale16 format.
Definition: XnCppWrapper.h:1176
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:1107
XnGrayscale8Pixel * WritableGrayscale8Data()
Definition: XnCppWrapper.h:1126
XnPixelFormat & PixelFormat()
Gets the frame's pixel color format used in this image map. This is the format of the frame object sa...
Definition: XnCppWrapper.h:1074
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:1039
const xn::Grayscale8Map & Grayscale8Map() const
Gets a light wrapper object wrapping the image map as Grayscale8 format.
Definition: XnCppWrapper.h:1166
xn::Grayscale16Map & WritableGrayscale16Map()
Definition: XnCppWrapper.h:1180
const XnGrayscale16Pixel * Grayscale16Data() const
Gets a pointer to the first pixel of the image in Grayscale16 format. Grayscale16 represents each pix...
Definition: XnCppWrapper.h:1132
xn::ImageMap & WritableImageMap()
Definition: XnCppWrapper.h:1150
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:1157
XnImageMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1189
XnRGB24Pixel * WritableRGB24Data()
Definition: XnCppWrapper.h:1094
const XnGrayscale8Pixel *& Grayscale8Data()
Gets a pointer to the first pixel of the image in Grayscale8 format. Grayscale8 represents each pixel...
Definition: XnCppWrapper.h:1122
const XnImageMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1185
const xn::ImageMap & ImageMap() const
Gets a light object wrapping the image map.
Definition: XnCppWrapper.h:1146
const XnGrayscale8Pixel * Grayscale8Data() const
Gets a pointer to the first pixel of the image in Grayscale8 format. Grayscale8 represents each pixel...
Definition: XnCppWrapper.h:1117
const XnGrayscale16Pixel *& Grayscale16Data()
Gets a pointer to the first pixel of the image in Grayscale16 format. Grayscale16 represents each pix...
Definition: XnCppWrapper.h:1137
void InitFrom(const ImageMetaData &other)
Shallow-copies an ImageMetaData object.
Definition: XnCppWrapper.h:971
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:1101
xn::Grayscale8Map & WritableGrayscale8Map()
Definition: XnCppWrapper.h:1170
Definition: XnCppWrapper.h:4254
CroppingCapability GetCroppingCap()
Gets a CroppingCapability object for accessing Cropping functionality.
Definition: XnCppWrapper.h:4391
GeneralIntCapability GetExposureCap()
Definition: XnCppWrapper.h:4531
XnStatus RegisterToMapOutputModeChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Map Output Mode Change' event.
Definition: XnCppWrapper.h:4353
GeneralIntCapability GetIrisCap()
Definition: XnCppWrapper.h:4541
GeneralIntCapability GetTiltCap()
Definition: XnCppWrapper.h:4501
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:4326
GeneralIntCapability GetZoomCap()
Definition: XnCppWrapper.h:4521
XnStatus GetSupportedMapOutputModes(XnMapOutputMode *aModes, XnUInt32 &nCount) const
Gets a list of all the output modes that the generator node supports.
Definition: XnCppWrapper.h:4286
void UnregisterFromMapOutputModeChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Map Output Mode Change' event.
Definition: XnCppWrapper.h:4365
GeneralIntCapability GetPanCap()
Definition: XnCppWrapper.h:4491
GeneralIntCapability GetFocusCap()
Definition: XnCppWrapper.h:4551
XnUInt32 GetBytesPerPixel() const
Gets the number of bytes per pixel for the node's map data. This mode is set by SetPixelFormat() for ...
Definition: XnCppWrapper.h:4339
GeneralIntCapability GetSaturationCap()
Definition: XnCppWrapper.h:4431
GeneralIntCapability GetLowLightCompensationCap()
Definition: XnCppWrapper.h:4561
XnUInt32 GetSupportedMapOutputModesCount() const
Gets the number of output modes that the generator node supports.
Definition: XnCppWrapper.h:4271
GeneralIntCapability GetBacklightCompensationCap()
Definition: XnCppWrapper.h:4471
const CroppingCapability GetCroppingCap() const
Gets a CroppingCapability object for accessing Cropping functionality.
Definition: XnCppWrapper.h:4378
GeneralIntCapability GetRollCap()
Definition: XnCppWrapper.h:4511
GeneralIntCapability GetHueCap()
Definition: XnCppWrapper.h:4421
AntiFlickerCapability GetAntiFlickerCap()
Definition: XnCppWrapper.h:4571
MapGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4262
MapGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4261
GeneralIntCapability GetSharpnessCap()
Definition: XnCppWrapper.h:4441
GeneralIntCapability GetWhiteBalanceCap()
Definition: XnCppWrapper.h:4461
GeneralIntCapability GetGainCap()
Definition: XnCppWrapper.h:4481
GeneralIntCapability GetBrightnessCap()
Definition: XnCppWrapper.h:4401
GeneralIntCapability GetContrastCap()
Definition: XnCppWrapper.h:4411
GeneralIntCapability GetGammaCap()
Definition: XnCppWrapper.h:4451
XnStatus SetMapOutputMode(const XnMapOutputMode &OutputMode)
Sets the current map output mode of the generator node.
Definition: XnCppWrapper.h:4304
Definition: XnCppWrapper.h:610
const _pixelType & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:674
XnUInt32 YRes() const
Definition: XnCppWrapper.h:631
_pixelType & operator()(XnUInt32 x, XnUInt32 y)
Definition: XnCppWrapper.h:687
const _pixelType & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:644
Map(_pixelType *&pData, XnUInt32 &nXRes, XnUInt32 &nYRes)
Definition: XnCppWrapper.h:612
XnUInt32 XRes() const
Definition: XnCppWrapper.h:623
_pixelType & operator[](XnUInt32 nIndex)
Definition: XnCppWrapper.h:660
Definition: XnCppWrapper.h:392
XnPixelFormat PixelFormat() const
Definition: XnCppWrapper.h:505
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnUInt8 *pExternalBuffer)
Definition: XnCppWrapper.h:568
XnUInt32 FullYRes() const
Definition: XnCppWrapper.h:487
XnUInt32 XOffset() const
Definition: XnCppWrapper.h:441
XnUInt32 & FPS()
Definition: XnCppWrapper.h:500
XnUInt32 & YRes()
Definition: XnCppWrapper.h:431
XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes)
Allocates a writable buffer. If a previous buffer was allocated it will be freed (or reused if possib...
Definition: XnCppWrapper.h:545
XnUInt32 FPS() const
Definition: XnCppWrapper.h:496
XnUInt32 BytesPerPixel() const
Definition: XnCppWrapper.h:519
XnUInt32 & XRes()
Definition: XnCppWrapper.h:418
const XnMapMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:510
XnMapMetaData * GetUnderlying()
Definition: XnCppWrapper.h:514
XnUInt32 & XOffset()
Definition: XnCppWrapper.h:450
XnUInt32 & FullXRes()
Definition: XnCppWrapper.h:482
XnUInt32 YRes() const
Definition: XnCppWrapper.h:425
XnUInt32 & YOffset()
Definition: XnCppWrapper.h:469
XnUInt32 XRes() const
Definition: XnCppWrapper.h:412
MapMetaData(XnPixelFormat format, const XnUInt8 **ppData)
Definition: XnCppWrapper.h:400
XnUInt32 YOffset() const
Definition: XnCppWrapper.h:460
XnUInt32 & FullYRes()
Definition: XnCppWrapper.h:491
XnUInt32 FullXRes() const
Definition: XnCppWrapper.h:475
XnPixelFormat & PixelFormatImpl()
Definition: XnCppWrapper.h:590
Definition: XnCppWrapper.h:3020
MirrorCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:3022
XnBool IsMirrored() const
Gets the current mirroring configuration of the holder node. This configuration is used for generatin...
Definition: XnCppWrapper.h:3039
XnStatus RegisterToMirrorChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Mirror Change' event.
Definition: XnCppWrapper.h:3053
XnStatus SetMirror(XnBool bMirror)
Sets the current mirror configuration of the holder node, enabling or disabling mirroring....
Definition: XnCppWrapper.h:3031
void UnregisterFromMirrorChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Mirror Change' event.
Definition: XnCppWrapper.h:3065
MirrorCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:3023
Definition: XnCppWrapper.h:8171
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9934
XnStatus SetData(const AudioMetaData &audioMD)
Definition: XnCppWrapper.h:8225
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pAudioBuffer)
For full details and usage, see xnMockAudioSetData
Definition: XnCppWrapper.h:8202
XnStatus CreateBasedOn(AudioGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9943
MockAudioGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:8179
MockAudioGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8178
XnStatus SetData(const AudioMetaData &audioMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:8215
Definition: XnCppWrapper.h:4861
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel *pDepthMap)
For full details and usage, see xnMockDepthSetData
Definition: XnCppWrapper.h:4892
MockDepthGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4868
XnStatus SetData(const DepthMetaData &depthMD)
Definition: XnCppWrapper.h:4915
XnStatus CreateBasedOn(DepthGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9819
XnStatus SetData(const DepthMetaData &depthMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:4905
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9810
MockDepthGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:4869
Definition: XnCppWrapper.h:5229
MockIRGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5237
XnStatus SetData(const IRMetaData &irMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:5271
XnStatus CreateBasedOn(IRGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9877
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9868
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel *pIRMap)
For full details and usage, see xnMockIRSetData
Definition: XnCppWrapper.h:5258
XnStatus SetData(const IRMetaData &irMD)
Definition: XnCppWrapper.h:5281
MockIRGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5236
Definition: XnCppWrapper.h:5107
MockImageGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:5115
XnStatus SetData(const ImageMetaData &imageMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition: XnCppWrapper.h:5151
XnStatus SetData(const ImageMetaData &imageMD)
Definition: XnCppWrapper.h:5161
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pImageMap)
For full details and usage, see xnMockImageSetData
Definition: XnCppWrapper.h:5138
XnStatus CreateBasedOn(ImageGenerator &other, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9848
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9839
MockImageGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5114
Definition: XnCppWrapper.h:8235
MockRawGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:8238
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition: XnCppWrapper.h:9954
MockRawGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8237
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void *pData)
Definition: XnCppWrapper.h:8242
Definition: XnCppWrapper.h:1803
const void * GetAdditionalData() const
For full details and usage, see xnNodeInfoGetAdditionalData
Definition: XnCppWrapper.h:1931
XnStatus GetInstance(ProductionNode &node) const
Definition: XnCppWrapper.h:9752
NodeInfo(XnNodeInfo *pInfo)
Definition: XnCppWrapper.h:1810
const XnChar * GetInstanceName() const
Gets the instance name of a node alternative.
Definition: XnCppWrapper.h:1891
NodeInfoList & GetNeededNodes() const
Definition: XnCppWrapper.h:9709
~NodeInfo()
Definition: XnCppWrapper.h:1828
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:1857
NodeInfo & operator=(const NodeInfo &other)
Definition: XnCppWrapper.h:1838
const XnChar * GetCreationInfo() const
Gets the creation information of the node alternative.
Definition: XnCppWrapper.h:1907
const XnProductionNodeDescription & GetDescription() const
Gets the description of a node alternative.
Definition: XnCppWrapper.h:1875
NodeInfo(const NodeInfo &other)
Definition: XnCppWrapper.h:1820
XnStatus GetTreeStringRepresentation(XnChar *csResultBuffer, XnUInt32 nBufferSize) const
For full details and usage, see xnNodeInfoGetTreeStringRepresentation
Definition: XnCppWrapper.h:1940
Definition: XnCppWrapper.h:2151
Iterator & operator++()
Definition: XnCppWrapper.h:2187
XnBool operator==(const Iterator &other) const
Definition: XnCppWrapper.h:2167
NodeInfo operator*()
Definition: XnCppWrapper.h:2226
Iterator operator--(int)
Definition: XnCppWrapper.h:2216
Iterator operator++(int)
Definition: XnCppWrapper.h:2197
XnBool operator!=(const Iterator &other) const
Definition: XnCppWrapper.h:2178
Iterator & operator--()
Definition: XnCppWrapper.h:2207
Definition: XnCppWrapper.h:2145
~NodeInfoList()
Definition: XnCppWrapper.h:2272
NodeInfoList()
Definition: XnCppWrapper.h:2258
XnNodeInfoList * GetUnderlyingObject() const
Definition: XnCppWrapper.h:2280
XnStatus Remove(Iterator &it)
For full details and usage, see xnNodeInfoListRemove
Definition: XnCppWrapper.h:2375
Iterator RBegin() const
Definition: XnCppWrapper.h:2356
void ReplaceUnderlyingObject(XnNodeInfoList *pList)
Definition: XnCppWrapper.h:2288
XnStatus Clear()
For full details and usage, see xnNodeInfoListClear
Definition: XnCppWrapper.h:2384
XnStatus Add(XnProductionNodeDescription &description, const XnChar *strCreationInfo, NodeInfoList *pNeededNodes)
For full details and usage, see xnNodeInfoListAdd
Definition: XnCppWrapper.h:2299
XnStatus Append(NodeInfoList &other)
For full details and usage, see xnNodeInfoListAppend
Definition: XnCppWrapper.h:2393
Iterator End() const
Definition: XnCppWrapper.h:2346
Iterator REnd() const
Definition: XnCppWrapper.h:2365
XnStatus FilterList(Context &context, Query &query)
For full details and usage, see xnNodeQueryFilterList
Definition: XnCppWrapper.h:9691
XnStatus AddNodeFromAnotherList(Iterator &it)
For full details and usage, see xnNodeInfoListAddNodeFromList
Definition: XnCppWrapper.h:2328
Iterator Begin() const
Definition: XnCppWrapper.h:2337
XnBool IsEmpty()
Checks if the list NodeInfoList object is empty.
Definition: XnCppWrapper.h:2401
XnStatus AddNode(NodeInfo &info)
For full details and usage, see xnNodeInfoListAddNode
Definition: XnCppWrapper.h:2319
XnStatus AddEx(XnProductionNodeDescription &description, const XnChar *strCreationInfo, NodeInfoList *pNeededNodes, const void *pAdditionalData, XnFreeHandler pFreeHandler)
For full details and usage, see xnNodeInfoListAddEx
Definition: XnCppWrapper.h:2309
NodeInfoList(XnNodeInfoList *pList)
Definition: XnCppWrapper.h:2270
Definition: XnCppWrapper.h:1629
const XnChar * GetName() const
Definition: XnCppWrapper.h:1705
~NodeWrapper()
Definition: XnCppWrapper.h:1654
XnBool IsValid() const
This method checks that this object points to an actual node (that has been 'created') and does not p...
Definition: XnCppWrapper.h:1699
NodeWrapper(const NodeWrapper &other)
Definition: XnCppWrapper.h:1643
NodeWrapper(XnNodeHandle hNode)
Definition: XnCppWrapper.h:1638
NodeWrapper & operator=(const NodeWrapper &other)
Definition: XnCppWrapper.h:1648
void TakeOwnership(XnNodeHandle hNode)
Definition: XnCppWrapper.h:1761
void Release()
Definition: XnCppWrapper.h:1717
XnBool operator!=(const NodeWrapper &other)
Definition: XnCppWrapper.h:1681
XnStatus AddRef()
References a production node, increasing its reference count by 1. For full details and usage,...
Definition: XnCppWrapper.h:1711
XnBool operator==(const NodeWrapper &other)
Definition: XnCppWrapper.h:1671
void SetHandle(XnNodeHandle hNode)
Definition: XnCppWrapper.h:1726
XnNodeHandle GetHandle() const
Definition: XnCppWrapper.h:1664
Definition: XnCppWrapper.h:199
XnUInt8 * m_pAllocatedData
Definition: XnCppWrapper.h:370
void Free()
Definition: XnCppWrapper.h:330
XnOutputMetaData * GetUnderlying()
Definition: XnCppWrapper.h:277
const XnUInt8 * Data() const
Definition: XnCppWrapper.h:283
XnUInt64 & Timestamp()
Definition: XnCppWrapper.h:224
XnUInt64 Timestamp() const
Definition: XnCppWrapper.h:219
virtual ~OutputMetaData()
Definition: XnCppWrapper.h:214
const XnUInt8 *& Data()
Definition: XnCppWrapper.h:288
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:307
XnUInt32 & DataSize()
Returns the size, in bytes, of the data of the frame object saved in this object.
Definition: XnCppWrapper.h:256
XnBool IsDataNew() const
Definition: XnCppWrapper.h:262
XnStatus MakeDataWritable()
Definition: XnCppWrapper.h:344
OutputMetaData(const XnUInt8 **ppData)
Definition: XnCppWrapper.h:206
XnUInt8 * WritableData()
Definition: XnCppWrapper.h:293
XnUInt32 & FrameID()
Definition: XnCppWrapper.h:236
XnUInt32 DataSize() const
Returns the size, in bytes, of the data of the frame object saved in this object.
Definition: XnCppWrapper.h:246
XnUInt32 FrameID() const
Definition: XnCppWrapper.h:230
XnBool & IsDataNew()
Definition: XnCppWrapper.h:268
const XnOutputMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:273
Definition: XnCppWrapper.h:3808
XnStatus GetSource(XnRecordMedium &sourceType, XnChar *strSource, XnUInt32 nBufSize) const
Gets the player's source, that is, the type and name of the medium that the recording is played back ...
Definition: XnCppWrapper.h:3865
XnStatus EnumerateNodes(NodeInfoList &list) const
Retrieves a list of the nodes played by a player. For full details and usage, see xnEnumeratePlayerNo...
Definition: XnCppWrapper.h:3989
XnStatus Create(Context &context, const XnChar *strFormatName)
Creates a player node.
Definition: XnCppWrapper.h:9792
XnStatus SetRepeat(XnBool bRepeat)
Specifies whether the player will automatically rewind to the beginning of the recording after reachi...
Definition: XnCppWrapper.h:3843
Player(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:3815
XnStatus GetNumFrames(const XnChar *strNodeName, XnUInt32 &nFrames) const
Gets the total number of frames a specific node has in the recording.
Definition: XnCppWrapper.h:3971
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:3903
XnDouble GetPlaybackSpeed() const
Gets the playback speed.
Definition: XnCppWrapper.h:4066
XnStatus ReadNext()
Reads the next data element from the player. For full details and usage, see xnPlayerReadNext
Definition: XnCppWrapper.h:3874
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:3942
XnStatus SetPlaybackSpeed(XnDouble dSpeed)
Sets the player's playback speed, as a ratio of the rate that the recording was made at.
Definition: XnCppWrapper.h:4057
XnStatus SetSource(XnRecordMedium sourceType, const XnChar *strSource)
Sets the source for the player, i.e. where the played events will come from. For full details and usa...
Definition: XnCppWrapper.h:3852
const XnChar * GetSupportedFormat() const
Gets the name of the format supported by a player. For full details and usage, see xnGetPlayerSupport...
Definition: XnCppWrapper.h:3980
XnBool IsEOF() const
Returns whether the player is at the end-of-file marker.
Definition: XnCppWrapper.h:4008
XnStatus RegisterToEndOfFileReached(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'End-Of-File Reached' event.
Definition: XnCppWrapper.h:4022
void UnregisterFromEndOfFileReached(XnCallbackHandle hCallback)
Unregisters the event handler for the 'End-Of-File Reached' event.
Definition: XnCppWrapper.h:4034
Player(const NodeWrapper &other)
Definition: XnCppWrapper.h:3816
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:3932
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:3959
Definition: XnCppWrapper.h:7185
XnStatus GetPoseStatus(XnUserID userID, const XnChar *poseName, XnUInt64 &poseTime, XnPoseDetectionStatus &eStatus, XnPoseDetectionState &eState)
Definition: XnCppWrapper.h:7246
XnStatus RegisterToPoseInProgress(PoseInProgress handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Pose In Progress' event.
Definition: XnCppWrapper.h:7415
XnUInt32 GetNumberOfPoses() const
Get the number of poses supported by this capability.
Definition: XnCppWrapper.h:7219
void UnregisterFromOutOfPose(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Out Of Pose' event.
Definition: XnCppWrapper.h:7368
XnStatus GetAllAvailablePoses(XnChar **pstrPoses, XnUInt32 nNameLength, XnUInt32 &nPoses) const
Gets the names of all poses supported by this capability.
Definition: XnCppWrapper.h:7236
XnStatus RegisterToPoseDetected(PoseDetection handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Pose Detected' event.
Definition: XnCppWrapper.h:7304
XnStatus StopPoseDetection(XnUserID user)
Stops attempting to detect a pose (for a specific user).
Definition: XnCppWrapper.h:7282
PoseDetectionCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:7192
XnStatus StopSinglePoseDetection(XnUserID user, const XnChar *strPose)
Stop detection of a specific pose for a specific user. For full details and usage,...
Definition: XnCppWrapper.h:7290
XnStatus StartPoseDetection(const XnChar *strPose, XnUserID user)
Starts attempting to detect a pose for a specific user.
Definition: XnCppWrapper.h:7266
void UnregisterFromPoseInProgress(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Pose In Progress' event.
Definition: XnCppWrapper.h:7443
XnBool IsPoseSupported(const XnChar *strPose)
Definition: XnCppWrapper.h:7241
void(* PoseInProgress)(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, XnPoseDetectionStatus poseError, void *pCookie)
Definition: XnCppWrapper.h:7397
PoseDetectionCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:7193
XnStatus RegisterToOutOfPose(PoseDetection handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Out Of Pose' event.
Definition: XnCppWrapper.h:7331
void(* PoseDetection)(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, void *pCookie)
Definition: XnCppWrapper.h:7208
void UnregisterFromPoseDetected(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Pose Detected' event.
Definition: XnCppWrapper.h:7355
Definition: XnCppWrapper.h:2632
XnStatus GetIntProperty(const XnChar *strName, XnUInt64 &nValue) const
Gets an integer property. For full details and usage, see xnGetIntProperty
Definition: XnCppWrapper.h:2750
XnStatus SetRealProperty(const XnChar *strName, XnDouble dValue)
Sets a real property. For full details and usage, see xnSetRealProperty
Definition: XnCppWrapper.h:2723
XnStatus GetStringProperty(const XnChar *strName, XnChar *csValue, XnUInt32 nBufSize) const
Gets a string property. For full details and usage, see xnGetStringProperty
Definition: XnCppWrapper.h:2768
ProductionNode(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:2639
XnStatus LockedNodeStartChanges(XnLockHandle hLock)
Start changes request on a locked node, without releasing that lock. For full details and usage,...
Definition: XnCppWrapper.h:2804
XnStatus RemoveNeededNode(ProductionNode &needed)
Removes a needed node from the list of needed nodes. For full details and usage, see xnRemoveNeededNo...
Definition: XnCppWrapper.h:2665
XnStatus GetRealProperty(const XnChar *strName, XnDouble &dValue) const
Gets a real property. For full details and usage, see xnGetRealProperty
Definition: XnCppWrapper.h:2759
XnStatus SetStringProperty(const XnChar *strName, const XnChar *strValue)
Sets a string property. For full details and usage, see xnSetStringProperty
Definition: XnCppWrapper.h:2732
void LockedNodeEndChanges(XnLockHandle hLock)
Ends changes request on a locked node. For full details and usage, see xnLockedNodeEndChanges
Definition: XnCppWrapper.h:2813
XnStatus SetGeneralProperty(const XnChar *strName, XnUInt32 nBufferSize, const void *pBuffer)
Sets a buffer property. For full details and usage, see xnSetGeneralProperty
Definition: XnCppWrapper.h:2741
GeneralIntCapability GetGeneralIntCap(const XnChar *strCapability)
Gets an GeneralIntCapability object for accessing the capability functionality.
Definition: XnCppWrapper.h:2855
Context GetContext() const
Gets the node's context.
Definition: XnCppWrapper.h:9701
void UnlockForChanges(XnLockHandle hLock)
Unlocks a previously locked node. For full details and usage, see xnUnlockNodeForChanges
Definition: XnCppWrapper.h:2795
XnStatus SetIntProperty(const XnChar *strName, XnUInt64 nValue)
Sets an integer property. For full details and usage, see xnSetIntProperty
Definition: XnCppWrapper.h:2714
XnStatus AddNeededNode(ProductionNode &needed)
Adds another node to the list of needed nodes for this node. For full details and usage,...
Definition: XnCppWrapper.h:2656
void GetContext(Context &context) const
Gets the node's context.
Definition: XnCppWrapper.h:9696
ProductionNode(const NodeWrapper &other)
Definition: XnCppWrapper.h:2640
XnBool IsCapabilitySupported(const XnChar *strCapabilityName) const
Returns whether a production node supports a specific capability.
Definition: XnCppWrapper.h:2705
XnStatus LockForChanges(XnLockHandle *phLock)
Locks a node, not allowing any changes (any "set" function). For full details and usage,...
Definition: XnCppWrapper.h:2786
NodeInfo GetInfo() const
Gets information about the node.
Definition: XnCppWrapper.h:2650
const ErrorStateCapability GetErrorStateCap() const
Gets an xn::ErrorStateCapability object for accessing the functionality of the Error State capability...
Definition: XnCppWrapper.h:2826
XnStatus GetGeneralProperty(const XnChar *strName, XnUInt32 nBufferSize, void *pBuffer) const
Gets a buffer property. For full details and usage, see xnGetGeneralProperty
Definition: XnCppWrapper.h:2777
ErrorStateCapability GetErrorStateCap()
Gets an xn::ErrorStateCapability object for accessing the functionality of the Error State capability...
Definition: XnCppWrapper.h:2839
Definition: XnCppWrapper.h:1977
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:2019
~Query()
Definition: XnCppWrapper.h:1988
XnStatus SetSupportedMinUserPositions(const XnUInt32 nCount)
For full details and usage, see xnNodeQuerySetSupportedMinUserPositions
Definition: XnCppWrapper.h:2092
XnStatus SetMinVersion(const XnVersion &minVersion)
Sets in the Query object the minimum required version allowed for the Node Alternative.
Definition: XnCppWrapper.h:2027
XnNodeQuery * GetUnderlyingObject()
Definition: XnCppWrapper.h:2000
const XnNodeQuery * GetUnderlyingObject() const
Definition: XnCppWrapper.h:1999
Query()
Definition: XnCppWrapper.h:1979
XnStatus AddSupportedMapOutputMode(const XnMapOutputMode &MapOutputMode)
Sets in the Query object a MapOutput mode that the Node Alternative must support.
Definition: XnCppWrapper.h:2083
XnStatus SetCreationInfo(const XnChar *strCreationInfo)
Sets the creation information field of the Query object. This relates to the creation information of ...
Definition: XnCppWrapper.h:2126
XnStatus SetMaxVersion(const Version &maxVersion)
Sets in the Query object the maximum required version allowed for the node alternative.
Definition: XnCppWrapper.h:2051
XnStatus SetMinVersion(const Version &minVersion)
Sets in the Query object the minimum required version allowed for the Node Alternative.
Definition: XnCppWrapper.h:2035
XnStatus SetVendor(const XnChar *strVendor)
Sets in the Query object the vendor name to search for.
Definition: XnCppWrapper.h:2006
Query(XnNodeQuery *pNodeQuery)
Definition: XnCppWrapper.h:1984
XnStatus AddSupportedCapability(const XnChar *strNeededCapability)
Sets in the Query object a capability that the Node Alternative must support.
Definition: XnCppWrapper.h:2068
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:2117
XnStatus SetMaxVersion(const XnVersion &maxVersion)
Sets in the Query object the maximum required version allowed for the node alternative.
Definition: XnCppWrapper.h:2043
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:2108
Definition: XnCppWrapper.h:3691
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:3757
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:3718
XnStatus GetDestination(XnRecordMedium &destType, XnChar *strDest, XnUInt32 nBufSize)
Gets the destination medium for the Recorder node to record to.
Definition: XnCppWrapper.h:3732
XnStatus Create(Context &context, const XnChar *strFormatName=NULL)
Creates a Recorder node.
Definition: XnCppWrapper.h:9783
XnStatus Record()
Records one frame of data from each node that was added to the recorder with AddNodeToRecording().
Definition: XnCppWrapper.h:3774
XnStatus AddNodeToRecording(ProductionNode &Node, XnCodecID compression=XN_CODEC_NULL)
Adds a node to the recording setup, and starts recording data what the node generates....
Definition: XnCppWrapper.h:3746
Recorder(const NodeWrapper &other)
Definition: XnCppWrapper.h:3699
Recorder(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:3698
Definition: XnCppWrapper.h:9625
XnUInt32 GetXResolution() const
Definition: XnCppWrapper.h:9671
const XnChar * GetName() const
Definition: XnCppWrapper.h:9679
XnResolution GetResolution() const
Definition: XnCppWrapper.h:9667
XnUInt32 GetYResolution() const
Definition: XnCppWrapper.h:9675
Resolution(XnResolution res)
Definition: XnCppWrapper.h:9632
Resolution(const XnChar *strName)
Definition: XnCppWrapper.h:9656
Resolution(XnUInt32 xRes, XnUInt32 yRes)
Definition: XnCppWrapper.h:9645
Definition: XnCppWrapper.h:5819
XnStatus GetFloor(XnPlane3D &Plane) const
Gets a description of the floor, if it was found.
Definition: XnCppWrapper.h:5877
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a SceneAnalyzer node from available production node alternatives.
Definition: XnCppWrapper.h:9897
void GetMetaData(SceneMetaData &metaData) const
Gets the scene analyzer node's latest frame object, saving it in the xn::SceneMetaData object....
Definition: XnCppWrapper.h:5858
const XnLabel * GetLabelMap() const
Gets the label map, describing the current segmentation of the scene. For full details and usage,...
Definition: XnCppWrapper.h:5867
SceneAnalyzer(const NodeWrapper &other)
Definition: XnCppWrapper.h:5827
SceneAnalyzer(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:5826
Definition: XnCppWrapper.h:1451
const XnSceneMetaData * GetUnderlying() const
Definition: XnCppWrapper.h:1589
XnStatus InitFrom(const SceneMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer)
Definition: XnCppWrapper.h:1483
XnLabel * WritableData()
Definition: XnCppWrapper.h:1542
void InitFrom(const SceneMetaData &other)
Shallow-Copies an SceneMetaData object.
Definition: XnCppWrapper.h:1469
const XnLabel & operator[](XnUInt32 nIndex) const
Definition: XnCppWrapper.h:1563
const XnLabel *& Data()
Returns the scene map.
Definition: XnCppWrapper.h:1537
SceneMetaData()
Definition: XnCppWrapper.h:1453
XnSceneMetaData * GetUnderlying()
Definition: XnCppWrapper.h:1593
const XnLabel * Data() const
Returns the scene map.
Definition: XnCppWrapper.h:1523
const xn::LabelMap & LabelMap() const
Definition: XnCppWrapper.h:1547
const XnLabel & operator()(XnUInt32 x, XnUInt32 y) const
Definition: XnCppWrapper.h:1580
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer=NULL)
Definition: XnCppWrapper.h:1505
XnStatus CopyFrom(const SceneMetaData &other)
Definition: XnCppWrapper.h:1494
xn::LabelMap & WritableLabelMap()
Definition: XnCppWrapper.h:1551
Definition: XnCppWrapper.h:8332
XnStatus LoadScriptFromString(const XnChar *strScript)
Loads an XML script string into the ScriptNode object.
Definition: XnCppWrapper.h:8364
XnStatus LoadScriptFromFile(const XnChar *strFileName)
Loads an XML script file into the ScriptNode object.
Definition: XnCppWrapper.h:8354
const XnChar * GetSupportedFormat()
Definition: XnCppWrapper.h:8344
ScriptNode(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:8339
XnStatus Create(Context &context, const XnChar *strFormat)
Definition: XnCppWrapper.h:9977
XnStatus Run(EnumerationErrors *pErrors)
Runs the ScriptNode object's XML script to build a production graph.
Definition: XnCppWrapper.h:9972
ScriptNode(const NodeWrapper &other)
Definition: XnCppWrapper.h:8340
Definition: XnCppWrapper.h:6375
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:6799
XnBool IsJointAvailable(XnSkeletonJoint eJoint) const
Returns whether a specific skeleton joint is supported by the SkeletonCapability object.
Definition: XnCppWrapper.h:6390
XnStatus GetSkeletonJointOrientation(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation &Joint) const
Gets the orientation of a specific skeleton joint.
Definition: XnCppWrapper.h:6559
XnBool IsProfileAvailable(XnSkeletonProfile eProfile) const
Returns whether a specific skeleton profile is supported by the SkeletonCapability object.
Definition: XnCppWrapper.h:6400
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:6708
XnStatus AbortCalibration(XnUserID user)
Aborts an existing calibration process currently being executed for a specified user.
Definition: XnCppWrapper.h:6647
XnStatus RegisterToCalibrationStart(CalibrationStart handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Calibration Start' event.
Definition: XnCppWrapper.h:6874
void UnregisterFromJointConfigurationChange(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Joint Configuration Change' event.
Definition: XnCppWrapper.h:6499
XnStatus SaveCalibrationDataToFile(XnUserID user, const XnChar *strFileName)
Saves the skeleton's current calibration data to a file.
Definition: XnCppWrapper.h:6670
XnStatus RequestCalibration(XnUserID user, XnBool bForce)
Starts the calibration process to calibrate a user.
Definition: XnCppWrapper.h:6633
XnStatus RegisterToJointConfigurationChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Joint Configuration Change' event.
Definition: XnCppWrapper.h:6487
XnStatus StopTracking(XnUserID user)
Stops tracking a skeleton.
Definition: XnCppWrapper.h:6756
XnBool IsCalibrating(XnUserID user) const
Returns whether a user is being calibrated right now. see Calibration.
Definition: XnCppWrapper.h:6604
XnStatus LoadCalibrationDataFromFile(XnUserID user, const XnChar *strFileName)
Loads skeleton calibration data from a file to a skeleton.
Definition: XnCppWrapper.h:6681
XnBool NeedPoseForCalibration() const
Returns whether a specific pose is required for calibration. This setting is applicable to all users.
Definition: XnCppWrapper.h:6782
SkeletonCapability(XnNodeHandle hNode)
Definition: XnCppWrapper.h:6382
void UnregisterFromCalibrationComplete(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Calibration Complete' event.
Definition: XnCppWrapper.h:7032
XnStatus RegisterToCalibrationInProgress(CalibrationInProgress handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Calibration In Progress' event.
Definition: XnCppWrapper.h:6941
void(* CalibrationStart)(SkeletonCapability &skeleton, XnUserID user, void *pCookie)
Definition: XnCppWrapper.h:6842
XnBool IsCalibrated(XnUserID user) const
Returns whether a user has been calibrated. see Calibration.
Definition: XnCppWrapper.h:6589
void(* CalibrationComplete)(SkeletonCapability &skeleton, XnUserID user, XnCalibrationStatus calibrationError, void *pCookie)
Signals that a specific user's skeleton has now completed the calibration process,...
Definition: XnCppWrapper.h:6993
XnStatus StartTracking(XnUserID user)
Starts tracking a skeleton.
Definition: XnCppWrapper.h:6747
XnStatus UnregisterFromCalibrationStart(XnCallbackHandle hCallback)
Unregisters a handler from the 'Calibration Start' event.
Definition: XnCppWrapper.h:6901
XnBool IsCalibrationData(XnUInt32 nSlot) const
Returns whether a specific slot already holds calibration data.
Definition: XnCppWrapper.h:6728
XnStatus ClearCalibrationData(XnUInt32 nSlot)
Clears a specified slot of any saved calibration data.
Definition: XnCppWrapper.h:6718
XnStatus SetSkeletonProfile(XnSkeletonProfile eProfile)
Sets the skeleton profile. The skeleton profile specifies which joints are to be active,...
Definition: XnCppWrapper.h:6435
XnStatus EnumerateActiveJoints(XnSkeletonJoint *pJoints, XnUInt16 &nJoints) const
Get all active joints. For full details and usage, see xnEnumerateActiveJoints
Definition: XnCppWrapper.h:6508
SkeletonCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:6383
XnStatus RegisterToCalibrationComplete(CalibrationComplete handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Calibration Complete' event.
Definition: XnCppWrapper.h:7004
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:6697
XnBool IsJointActive(XnSkeletonJoint eJoint) const
Checks if a specific joint is tracked or not.
Definition: XnCppWrapper.h:6473
void UnregisterFromCalibrationInProgress(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Calibration In Progress' event.
Definition: XnCppWrapper.h:6969
XnBool IsTracking(XnUserID user) const
Returns whether a user is currently being tracked.
Definition: XnCppWrapper.h:6574
XnStatus GetSkeletonJoint(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation &Joint) const
Gets all available information about a specific joint in the skeleton.
Definition: XnCppWrapper.h:6521
XnStatus Reset(XnUserID user)
Discards a skeleton's calibration.
Definition: XnCppWrapper.h:6769
void(* CalibrationEnd)(SkeletonCapability &skeleton, XnUserID user, XnBool bSuccess, void *pCookie)
Definition: XnCppWrapper.h:6861
XnStatus SetSmoothing(XnFloat fSmoothingFactor)
Sets the smoothing factor for all users generated by this xn::UserGenerator node.
Definition: XnCppWrapper.h:6816
void(* CalibrationInProgress)(SkeletonCapability &skeleton, XnUserID user, XnCalibrationStatus calibrationError, void *pCookie)
Definition: XnCppWrapper.h:6930
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:6463
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:6547
Definition: XnCppWrapper.h:10000
void Unregister(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
Definition: XnCppWrapper.h:10009
StateChangedCallbackTranslator(StateChangedHandler handler, void *pCookie)
Definition: XnCppWrapper.h:10002
XnStatus Register(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
Definition: XnCppWrapper.h:10004
static XnStatus RegisterToUnderlying(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Definition: XnCppWrapper.h:10014
static XnStatus UnregisterFromUnderlying(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
Definition: XnCppWrapper.h:10033
Definition: XnCppWrapper.h:7666
XnStatus RegisterToUserReEnter(UserHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'User Reenter' event.
Definition: XnCppWrapper.h:7943
PoseDetectionCapability GetPoseDetectionCap()
Gets a xn::PoseDetectionCapability object for accessing Pose Detection functionality.
Definition: XnCppWrapper.h:7885
XnStatus GetCoM(XnUserID user, XnPoint3D &com) const
Gets the position of a user's center of mass. This is the single point for representing the user.
Definition: XnCppWrapper.h:7757
void UnregisterUserCallbacks(XnCallbackHandle hCallback)
Unregisters event handlers for the 'New User' and 'Lost User' events.
Definition: XnCppWrapper.h:7821
UserGenerator(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:7673
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:7777
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a UserGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9916
void(* UserHandler)(UserGenerator &generator, XnUserID user, void *pCookie)
Event handler signature for all UserGenerator events.
Definition: XnCppWrapper.h:7697
void UnregisterFromUserReEnter(XnCallbackHandle hCallback)
Unregisters an event handler for the 'User Reenter' event.
Definition: XnCppWrapper.h:7971
void UnregisterFromUserExit(XnCallbackHandle hCallback)
Unregisters an event handler for the 'User Exit' event.
Definition: XnCppWrapper.h:7927
XnStatus RegisterUserCallbacks(UserHandler NewUserCB, UserHandler LostUserCB, void *pCookie, XnCallbackHandle &hCallback)
Registers event handlers for the 'New User' and 'Lost User' events.
Definition: XnCppWrapper.h:7792
XnStatus RegisterToUserExit(UserHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'User Exit' event.
Definition: XnCppWrapper.h:7899
const PoseDetectionCapability GetPoseDetectionCap() const
Gets a xn::PoseDetectionCapability object for accessing Pose Detection functionality.
Definition: XnCppWrapper.h:7870
const SkeletonCapability GetSkeletonCap() const
Gets a SkeletonCapability object for accessing Skeleton functionality.
Definition: XnCppWrapper.h:7839
UserGenerator(const NodeWrapper &other)
Definition: XnCppWrapper.h:7674
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:7733
SkeletonCapability GetSkeletonCap()
Gets a SkeletonCapability object for accessing Skeleton functionality.
Definition: XnCppWrapper.h:7855
XnUInt16 GetNumberOfUsers() const
Gets the number of users currently identified in the scene.
Definition: XnCppWrapper.h:7706
Definition: XnCppWrapper.h:4586
XnStatus GetUserPosition(XnUInt32 nIndex, XnBoundingBox3D &Position) const
Gets the current user position. For full details and usage, see xnGetUserPosition
Definition: XnCppWrapper.h:4618
void UnregisterFromUserPositionChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'User Position Change' event.
Definition: XnCppWrapper.h:4644
UserPositionCapability(const NodeWrapper &node)
Definition: XnCppWrapper.h:4594
XnStatus SetUserPosition(XnUInt32 nIndex, const XnBoundingBox3D &Position)
Sets the current user position. For full details and usage, see xnSetUserPosition
Definition: XnCppWrapper.h:4609
UserPositionCapability(XnNodeHandle hNode=NULL)
Definition: XnCppWrapper.h:4593
XnStatus RegisterToUserPositionChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'User Position Change' event.
Definition: XnCppWrapper.h:4632
XnUInt32 GetSupportedUserPositionsCount() const
Gets the number of user positions supported by this generator. For full details and usage,...
Definition: XnCppWrapper.h:4600
Definition: XnCppWrapper.h:120
bool operator<=(const Version &other) const
Definition: XnCppWrapper.h:143
bool operator!=(const Version &other) const
Definition: XnCppWrapper.h:135
const XnVersion * GetUnderlying() const
Definition: XnCppWrapper.h:173
XnUInt16 Maintenance() const
Definition: XnCppWrapper.h:165
Version(XnUInt8 nMajor, XnUInt8 nMinor, XnUInt16 nMaintenance, XnUInt32 nBuild)
Definition: XnCppWrapper.h:123
static Version Current()
Definition: XnCppWrapper.h:156
bool operator>=(const Version &other) const
Definition: XnCppWrapper.h:151
XnUInt16 & Maintenance()
Definition: XnCppWrapper.h:170
XnUInt8 Minor() const
Definition: XnCppWrapper.h:164
bool operator>(const Version &other) const
Definition: XnCppWrapper.h:147
XnUInt32 Build() const
Definition: XnCppWrapper.h:166
bool operator==(const Version &other) const
Definition: XnCppWrapper.h:131
XnUInt8 & Major()
Definition: XnCppWrapper.h:168
XnVersion * GetUnderlying()
Definition: XnCppWrapper.h:174
XnUInt8 & Minor()
Definition: XnCppWrapper.h:169
XnUInt32 & Build()
Definition: XnCppWrapper.h:171
Version(const XnVersion &version)
Definition: XnCppWrapper.h:122
XnUInt8 Major() const
Definition: XnCppWrapper.h:163
bool operator<(const Version &other) const
Definition: XnCppWrapper.h:139
XN_C_API XnStatus XN_C_DECL xnResetViewPoint(XnNodeHandle hInstance)
Sets the view point of this generator to its normal one.
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 void XN_C_DECL xnUnregisterFromViewPointChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToViewPointChange().
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,...
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 xnIsViewPointAs(XnNodeHandle hInstance, XnNodeHandle hOther)
Checks if current view point is as if coming from the other node view point.
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_C_API void XN_C_DECL xnUnregisterFromPowerLineFrequencyChange(XnNodeHandle hGenerator, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToPowerLineFrequencyChange().
XN_C_API XnPowerLineFrequency XN_C_DECL xnGetPowerLineFrequency(XnNodeHandle hGenerator)
Gets the power line frequency.
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.
XN_C_API XnStatus XN_C_DECL xnRegisterToWaveOutputModeChanges(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
XN_C_API XnUChar *XN_C_DECL xnGetAudioBuffer(XnNodeHandle hInstance)
XN_C_API XnStatus XN_C_DECL xnSetWaveOutputMode(XnNodeHandle hInstance, const XnWaveOutputMode *OutputMode)
XN_C_API void XN_C_DECL xnGetAudioMetaData(XnNodeHandle hInstance, XnAudioMetaData *pMetaData)
Gets the current audio meta data.
XN_C_API XnStatus XN_C_DECL xnGetWaveOutputMode(XnNodeHandle hInstance, XnWaveOutputMode *OutputMode)
XN_C_API void XN_C_DECL xnUnregisterFromWaveOutputModeChanges(XnNodeHandle hInstance, XnCallbackHandle hCallback)
XN_C_API XnStatus XN_C_DECL xnGetSupportedWaveOutputModes(XnNodeHandle hInstance, XnWaveOutputMode *aSupportedModes, XnUInt32 *pnCount)
XN_C_API XnUInt32 XN_C_DECL xnGetSupportedWaveOutputModesCount(XnNodeHandle hInstance)
XN_C_API XnStatus XN_C_DECL xnCreateAudioGenerator(XnContext *pContext, XnNodeHandle *phAudioGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an audio generator.
XN_C_API XnStatus XN_C_DECL xnCreateCodec(XnContext *pContext, XnCodecID codecID, XnNodeHandle hInitializerNode, XnNodeHandle *phCodec)
XN_C_API XnCodecID XN_C_DECL xnGetCodecID(XnNodeHandle hCodec)
XN_C_API XnStatus XN_C_DECL xnEncodeData(XnNodeHandle hCodec, const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten)
XN_C_API XnStatus XN_C_DECL xnDecodeData(XnNodeHandle hCodec, const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten)
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 xnRegisterToNodeCreation(XnContext *pContext, XnNodeCreationHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to 'Node Creation' event. This event is raised whenever node are create...
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....
XN_C_API XnStatus XN_C_DECL xnWaitAndUpdateAll(XnContext *pContext)
Updates all generators nodes in the context, waiting for all to have new 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...
XN_C_API XnStatus XN_C_DECL xnInit(XnContext **ppContext)
Initializes the OpenNI library.
XN_C_API XnStatus XN_C_DECL xnWaitAnyUpdateAll(XnContext *pContext)
Updates all generators nodes in the context, once any of them have new data.
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 void XN_C_DECL xnUnregisterFromGlobalErrorStateChange(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToGlobalErrorStateChange().
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 XnStatus XN_C_DECL xnWaitNoneUpdateAll(XnContext *pContext)
Updates all generator nodes in the context, without any waiting. If a node has new data,...
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...
XN_C_API XnStatus XN_C_DECL xnStartGeneratingAll(XnContext *pContext)
Make sure all generators are generating data.
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...
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,...
XN_C_API XnStatus XN_C_DECL xnContextAddRef(XnContext *pContext)
Adds a reference to the context object.
XN_C_API XnBool XN_C_DECL xnGetGlobalMirror(XnContext *pContext)
Gets the global mirror flag.
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.
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 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 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 xnContextRunXmlScriptEx(XnContext *pContext, const XnChar *xmlScript, XnEnumerationErrors *pErrors, XnNodeHandle *phScriptNode)
Runs an XML script in the given context.
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....
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 xnStopGeneratingAll(XnContext *pContext)
Stop all generators from generating data.
XN_C_API void XN_C_DECL xnUnregisterFromNodeDestruction(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeDestruction().
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.
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...
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...
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....
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 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...
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,...
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...
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 xnRegisterToNodeDestruction(XnContext *pContext, XnNodeDestructionHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to 'Node Destruction' event. This event is raised whenever a node is de...
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 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.
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....
XN_C_API XnStatus XN_C_DECL xnProductionNodeAddRef(XnNodeHandle hNode)
References a production node, increasing its reference count by 1.
XN_C_API XnStatus XN_C_DECL xnSetGlobalMirror(XnContext *pContext, XnBool bMirror)
Sets the global mirror flag. This will set all current existing nodes' mirror state,...
void(* StateChangedHandler)(ProductionNode &node, void *pCookie)
Definition: XnCppWrapper.h:101
Map< XnDepthPixel > DepthMap
Definition: XnCppWrapper.h:707
Map< XnLabel > LabelMap
Definition: XnCppWrapper.h:719
Map< XnIRPixel > IRMap
Definition: XnCppWrapper.h:717
Map< XnUInt8 > ImageMap
Definition: XnCppWrapper.h:709
Map< XnRGB24Pixel > RGB24Map
Definition: XnCppWrapper.h:711
Map< XnGrayscale8Pixel > Grayscale8Map
Definition: XnCppWrapper.h:715
Map< XnGrayscale16Pixel > Grayscale16Map
Definition: XnCppWrapper.h:713
XN_C_API XnStatus XN_C_DECL xnGetCropping(XnNodeHandle hInstance, XnCropping *pCropping)
Gets current cropping configuration.
XN_C_API XnStatus XN_C_DECL xnSetCropping(XnNodeHandle hInstance, const XnCropping *pCropping)
Sets the cropping.
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 xnRegisterToCroppingChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to cropping changes.
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.
XN_C_API void XN_C_DECL xnGetDepthMetaData(XnNodeHandle hInstance, XnDepthMetaData *pMetaData)
Gets the current depth-map meta data.
XN_C_API XnDepthPixel *XN_C_DECL xnGetDepthMap(XnNodeHandle hInstance)
Gets the current depth-map. This map is updated after a call to xnWaitAndUpdateData().
XN_C_API void XN_C_DECL xnUnregisterFromDepthFieldOfViewChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToDepthFieldOfViewChange.
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.
XN_C_API XnStatus XN_C_DECL xnCreateDepthGenerator(XnContext *pContext, XnNodeHandle *phDepthGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a depth generator.
XN_C_API XnDepthPixel XN_C_DECL xnGetDeviceMaxDepth(XnNodeHandle hInstance)
Gets the maximum depth the device can produce.
XN_C_API XnStatus XN_C_DECL xnGetDepthFieldOfView(XnNodeHandle hInstance, XnFieldOfView *pFOV)
Gets the Field-Of-View of the depth generator, in radians.
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.
XN_C_API XnStatus XN_C_DECL xnGetSerialNumber(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XN_C_API XnStatus XN_C_DECL xnGetVendorSpecificData(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XN_C_API XnStatus XN_C_DECL xnGetDeviceName(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XN_C_API XnStatus XN_C_DECL xnCreateDevice(XnContext *pContext, XnNodeHandle *phDevice, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a device node.
struct XnEnumerationErrors XnEnumerationErrors
Definition: XnTypes.h:214
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetNext(XnEnumerationErrorsIterator it)
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsAllocate(XnEnumerationErrors **ppErrors)
struct XnModuleError * XnEnumerationErrorsIterator
Definition: XnEnumerationErrors.h:57
XN_C_API void XN_C_DECL xnEnumerationErrorsFree(const XnEnumerationErrors *pErrors)
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsGetCurrentError(XnEnumerationErrorsIterator it)
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetFirst(const XnEnumerationErrors *pErrors)
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsToString(const XnEnumerationErrors *pErrors, XnChar *csBuffer, XnUInt32 nSize)
XN_C_API const XnProductionNodeDescription *XN_C_DECL xnEnumerationErrorsGetCurrentDescription(XnEnumerationErrorsIterator it)
XN_C_API XnStatus XN_C_DECL xnGetNodeErrorState(XnNodeHandle hInstance)
Gets current error state of this node.
XN_C_API void XN_C_DECL xnUnregisterFromNodeErrorStateChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeErrorStateChange().
XN_C_API XnStatus XN_C_DECL xnRegisterToNodeErrorStateChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to error state changes.
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.
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 xnStopFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Stops frame sync with the other node.
XN_C_API XnStatus XN_C_DECL xnRegisterToFrameSyncChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to view point changes.
XN_C_API XnBool XN_C_DECL xnCanFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Checks if this generator can frame sync to another node.
XN_C_API XnStatus XN_C_DECL xnFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Activates frame sync with the other node.
XN_C_API XnStatus XN_C_DECL xnSetGeneralIntValue(XnNodeHandle hNode, const XnChar *strCap, XnInt32 nValue)
Sets the current value of this capability.
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.
XN_C_API XnStatus XN_C_DECL xnGetGeneralIntValue(XnNodeHandle hNode, const XnChar *strCap, XnInt32 *pnValue)
Gets the current value of this capability.
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.
XN_C_API void XN_C_DECL xnUnregisterFromGeneralIntValueChange(XnNodeHandle hNode, const XnChar *strCap, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToGeneralIntValueChange().
XN_C_API XnUInt32 XN_C_DECL xnGetDataSize(XnNodeHandle hInstance)
Gets the size of current data, in bytes.
XN_C_API XnBool XN_C_DECL xnIsGenerating(XnNodeHandle hInstance)
Checks if this node is currently generating.
XN_C_API void XN_C_DECL xnUnregisterFromNewDataAvailable(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNewDataAvailable().
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...
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).
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...
XN_C_API const void *XN_C_DECL xnGetData(XnNodeHandle hInstance)
Gets the current data.
XN_C_API XnUInt32 XN_C_DECL xnGetFrameID(XnNodeHandle hInstance)
Gets the frame ID of current data.
XN_C_API XnUInt64 XN_C_DECL xnGetTimestamp(XnNodeHandle hInstance)
Gets the timestamp of current data, in microseconds.
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.
XN_C_API XnStatus XN_C_DECL xnStartGenerating(XnNodeHandle hInstance)
Starts generation of the output. This will also cause all dependencies to start generating.
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.
XN_C_API XnStatus XN_C_DECL xnStopGenerating(XnNodeHandle hInstance)
Stops generation of the output.
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 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 xnRegisterGestureCallbacks(XnNodeHandle hInstance, XnGestureRecognized RecognizedCB, XnGestureProgress ProgressCB, void *pCookie, XnCallbackHandle *phCallback)
Register to all gesture callbacks.
XN_C_API XnStatus XN_C_DECL xnEnumerateGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt16 *nGestures)
Get the names of all gestures available.
XN_C_API void XN_C_DECL xnUnregisterFromGestureReadyForNextIntermediateStage(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a gesture is ready for its next stage.
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 void XN_C_DECL xnUnregisterFromGestureIntermediateStageCompleted(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a gesture is in progress.
XN_C_API XnStatus XN_C_DECL xnCreateGestureGenerator(XnContext *pContext, XnNodeHandle *phGestureGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a Gesture 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.
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.
XN_C_API XnStatus XN_C_DECL xnRegisterToGestureIntermediateStageCompleted(XnNodeHandle hInstance, XnGestureIntermediateStageCompleted handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when a gesture is in progress.
XN_C_API XnStatus XN_C_DECL xnRegisterToGestureChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when gestures are added or removed.
XN_C_API XnStatus XN_C_DECL xnGetActiveGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt16 *nGestures)
Get the names of the gestures that are currently active.
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 xnEnumerateAllGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt32 nNameLength, XnUInt16 *nGestures)
Get the names of all gestures available.
XN_C_API XnBool XN_C_DECL xnIsGestureProgressSupported(XnNodeHandle hInstance, const XnChar *strGesture)
Check if the specific gesture supports 'in progress' callbacks.
XN_C_API void XN_C_DECL xnUnregisterGestureCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from gesture callbacks.
XN_C_API XnUInt16 XN_C_DECL xnGetNumberOfAvailableGestures(XnNodeHandle hInstance)
Get the number of all gestures available.
XN_C_API XnBool XN_C_DECL xnIsGestureAvailable(XnNodeHandle hInstance, const XnChar *strGesture)
Check if a specific gesture is available in this generator.
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 xnCreateHandsGenerator(XnContext *pContext, XnNodeHandle *phHandsGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an hands generator.
XN_C_API XnStatus XN_C_DECL xnStopTrackingAll(XnNodeHandle hInstance)
Stop tracking all hands.
XN_C_API XnStatus XN_C_DECL xnStopTracking(XnNodeHandle hInstance, XnUserID user)
Stop tracking a specific hand.
XN_C_API XnStatus XN_C_DECL xnSetTrackingSmoothing(XnNodeHandle hInstance, XnFloat fFactor)
Change smoothing factor.
XN_C_API XnStatus XN_C_DECL xnStartTracking(XnNodeHandle hInstance, const XnPoint3D *pPosition)
Start tracking at a specific position.
XN_C_API void XN_C_DECL xnUnregisterHandCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from hands callbacks.
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()....
XN_C_API void XN_C_DECL xnUnregisterFromPixelFormatChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToPixelFormatChange.
XN_C_API XnBool XN_C_DECL xnIsPixelFormatSupported(XnNodeHandle hInstance, XnPixelFormat Format)
Checks if a specific pixel format is supported.
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()....
XN_C_API void XN_C_DECL xnGetImageMetaData(XnNodeHandle hInstance, XnImageMetaData *pMetaData)
Gets the current image-map meta data.
XN_C_API XnStatus XN_C_DECL xnSetPixelFormat(XnNodeHandle hInstance, XnPixelFormat Format)
Sets the pixel format of the image map.
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()....
XN_C_API XnStatus XN_C_DECL xnCreateImageGenerator(XnContext *pContext, XnNodeHandle *phImageGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an image generator.
XN_C_API XnPixelFormat XN_C_DECL xnGetPixelFormat(XnNodeHandle hInstance)
Gets current pixel format.
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()....
XN_C_API XnStatus XN_C_DECL xnRegisterToPixelFormatChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to pixel format changes.
XN_C_API XnUInt8 *XN_C_DECL xnGetImageMap(XnNodeHandle hInstance)
Gets the current image-map as a byte buffer.
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddEx(XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes, const void *pAdditionalData, XnFreeHandler pFreeHandler)
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAllocate(XnNodeInfoList **ppList)
XN_C_API XnBool XN_C_DECL xnNodeInfoListIteratorIsValid(XnNodeInfoListIterator it)
XN_C_API void XN_C_DECL xnNodeInfoListFree(XnNodeInfoList *pList)
XN_C_API XnStatus XN_C_DECL xnNodeInfoListRemove(XnNodeInfoList *pList, XnNodeInfoListIterator it)
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetNext(XnNodeInfoListIterator it)
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAppend(XnNodeInfoList *pList, XnNodeInfoList *pOther)
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAdd(XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes)
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetLast(XnNodeInfoList *pList)
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetPrevious(XnNodeInfoListIterator it)
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddNodeFromList(XnNodeInfoList *pList, XnNodeInfoListIterator otherListIt)
XN_C_API XnBool XN_C_DECL xnNodeInfoListIsEmpty(XnNodeInfoList *pList)
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetFirst(XnNodeInfoList *pList)
XN_C_API XnStatus XN_C_DECL xnNodeInfoListClear(XnNodeInfoList *pList)
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddNode(XnNodeInfoList *pList, XnNodeInfo *pNode)
XN_C_API XnNodeInfo *XN_C_DECL xnNodeInfoListGetCurrent(XnNodeInfoListIterator it)
XN_C_API XnIRPixel *XN_C_DECL xnGetIRMap(XnNodeHandle hInstance)
Gets the current IR-map. This map is updated after a call to xnWaitAndUpdateData().
XN_C_API void XN_C_DECL xnGetIRMetaData(XnNodeHandle hInstance, XnIRMetaData *pMetaData)
Gets the current IR-map meta data.
XN_C_API XnStatus XN_C_DECL xnCreateIRGenerator(XnContext *pContext, XnNodeHandle *phIRGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an IR generator.
XN_C_API void XN_C_DECL xnFreeLicensesList(XnLicense *aLicenses)
XN_C_API XnStatus XN_C_DECL xnEnumerateLicenses(XnContext *pContext, XnLicense **paLicenses, XnUInt32 *pnCount)
XN_C_API XnStatus XN_C_DECL xnAddLicense(XnContext *pContext, const XnLicense *pLicense)
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 xnSetMapOutputMode(XnNodeHandle hInstance, const XnMapOutputMode *pOutputMode)
Sets the output mode.
XN_C_API XnStatus XN_C_DECL xnRegisterToMapOutputModeChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to mode changes.
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 xnGetMapOutputMode(XnNodeHandle hInstance, XnMapOutputMode *pOutputMode)
Gets the current output mode.
XN_C_API void XN_C_DECL xnUnregisterFromMapOutputModeChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToMapOutputModeChange.
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 void XN_C_DECL xnUnregisterFromMirrorChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToMirrorChange().
XN_C_API XnBool XN_C_DECL xnIsMirrored(XnNodeHandle hInstance)
Gets current mirroring configuration.
XN_C_API XnStatus XN_C_DECL xnRegisterToMirrorChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to mirror changes.
XN_C_API XnStatus XN_C_DECL xnSetMirror(XnNodeHandle hInstance, XnBool bMirror)
Sets current mirror configuration.
XN_C_API XnStatus XN_C_DECL xnMockAudioSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pData)
XN_C_API XnStatus XN_C_DECL xnMockRawSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void *pData)
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 xnMockIRSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel *pData)
XN_C_API XnStatus XN_C_DECL xnMockDepthSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel *pData)
XN_C_API XnStatus XN_C_DECL xnLockedNodeEndChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Ends changes request on a locked node.
XN_C_API XnStatus XN_C_DECL xnSetStringProperty(XnNodeHandle hInstance, const XnChar *strName, const XnChar *strValue)
Sets a string property.
XN_C_API XnStatus XN_C_DECL xnSetGeneralProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt32 nBufferSize, const void *pBuffer)
Sets a buffer property.
XN_C_API XnStatus XN_C_DECL xnUnlockNodeForChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Unlocks a previously locked node.
XN_C_API XnStatus XN_C_DECL xnLockedNodeStartChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Start changes request on a locked node, without releasing that lock.
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 xnGetIntProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt64 *pnValue)
Gets an integer property.
XN_C_API XnBool XN_C_DECL xnIsCapabilitySupported(XnNodeHandle hInstance, const XnChar *strCapabilityName)
Checks if a production node supports specific capability.
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 XnStatus XN_C_DECL xnSetIntProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt64 nValue)
Sets an integer property.
XN_C_API XnStatus XN_C_DECL xnGetRealProperty(XnNodeHandle hInstance, const XnChar *strName, XnDouble *pdValue)
Gets a real property.
XN_C_API XnNodeInfo *XN_C_DECL xnGetNodeInfo(XnNodeHandle hNode)
Gets information about a specific node, like its description, and dependent nodes.
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 xnGetGeneralProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt32 nBufferSize, void *pBuffer)
Gets a buffer property.
XN_C_API XnStatus XN_C_DECL xnSetRealProperty(XnNodeHandle hInstance, const XnChar *strName, XnDouble dValue)
Sets a real property.
XN_C_API XnStatus XN_C_DECL xnLockNodeForChanges(XnNodeHandle hInstance, XnLockHandle *phLock)
Locks a node, not allowing any changes (any "set" function).
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 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 xnCreatePlayer(XnContext *pContext, const XnChar *strFormatName, XnNodeHandle *phPlayer)
Creates a player.
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....
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.
XN_C_API XnBool XN_C_DECL xnIsPlayerAtEOF(XnNodeHandle hPlayer)
Checks whether the player is at the end-of-file marker.
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 xnTellPlayerTimestamp(XnNodeHandle hPlayer, XnUInt64 *pnTimestamp)
Reports the current timestamp of a player, i.e. the amount of time passed since the beginning of the ...
XN_C_API XnStatus XN_C_DECL xnGetPlayerSource(XnNodeHandle hPlayer, XnRecordMedium *pSourceType, XnChar *strSource, XnUInt32 nBufSize)
Gets the player's source, i.e where the played events come from.
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.
XN_C_API const XnChar *XN_C_DECL xnGetPlayerSupportedFormat(XnNodeHandle hPlayer)
Gets the name of the format supported by a player.
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 xnSetPlayerRepeat(XnNodeHandle hPlayer, XnBool bRepeat)
Determines whether the player will automatically rewind to the beginning of the recording when reachi...
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...
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 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 xnSetPlayerSource(XnNodeHandle hPlayer, XnRecordMedium sourceType, const XnChar *strSource)
Sets the source for the player, i.e. where the played events will come from.
XN_C_API XnStatus XN_C_DECL xnEnumeratePlayerNodes(XnNodeHandle hPlayer, XnNodeInfoList **ppList)
Retrieves a list of the nodes played by a player.
XN_C_API void XN_C_DECL xnUnregisterFromEndOfFileReached(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToEndOfFileReached().
XN_C_API XnStatus xnGetPoseStatus(XnNodeHandle hInstance, XnUserID userID, const XnChar *poseName, XnUInt64 *poseTime, XnPoseDetectionStatus *eStatus, XnPoseDetectionState *eState)
Gets the current pose status.
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 xnStopSinglePoseDetection(XnNodeHandle hInstance, XnUserID user, const XnChar *strPose)
Stop detection of a specific pose for a specific user.
XN_C_API XnStatus xnRegisterToPoseDetected(XnNodeHandle hInstance, XnPoseDetectionCallback handler, void *pCookie, XnCallbackHandle *phCallback)
Register to callback when a user is in pose.
XN_C_API XnStatus XN_C_DECL xnStopPoseDetection(XnNodeHandle hInstance, XnUserID user)
Stop detection of poses for a specific user.
XN_C_API XnBool XN_C_DECL xnIsPoseSupported(XnNodeHandle hInstance, const XnChar *strPose)
Tests if a pose is supported.
XN_C_API void xnUnregisterFromPoseDetected(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose detected callback.
XN_C_API XnUInt32 XN_C_DECL xnGetNumberOfPoses(XnNodeHandle hInstance)
Get the number of the supported poses.
XN_C_API void xnUnregisterFromOutOfPose(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from out of pose callback.
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 void XN_C_DECL xnUnregisterFromPoseCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose events.
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.
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 void XN_C_DECL xnUnregisterFromPoseDetectionInProgress(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose status callback.
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 xnGetAvailablePoses(XnNodeHandle hInstance, XnChar **pstrPoses, XnUInt32 *pnPoses)
Get the names of the supported poses.
XN_C_API const XnChar *XN_C_DECL xnNodeInfoGetCreationInfo(XnNodeInfo *pNodeInfo)
XN_C_API const XnProductionNodeDescription *XN_C_DECL xnNodeInfoGetDescription(XnNodeInfo *pNodeInfo)
XN_C_API XnStatus XN_C_DECL xnNodeInfoSetInstanceName(XnNodeInfo *pNodeInfo, const XnChar *strInstanceName)
XN_C_API XnStatus XN_C_DECL xnNodeInfoGetTreeStringRepresentation(XnNodeInfo *pNodeInfo, XnChar *csResult, XnUInt32 nSize)
XN_C_API XnNodeInfoList *XN_C_DECL xnNodeInfoGetNeededNodes(XnNodeInfo *pNodeInfo)
XN_C_API const XnChar *XN_C_DECL xnNodeInfoGetInstanceName(XnNodeInfo *pNodeInfo)
XN_C_API const void *XN_C_DECL xnNodeInfoGetAdditionalData(XnNodeInfo *pNodeInfo)
XN_C_API XnNodeHandle XN_C_DECL xnNodeInfoGetRefHandle(XnNodeInfo *pNodeInfo)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetName(XnNodeQuery *pQuery, const XnChar *strName)
XN_C_API XnStatus XN_C_DECL xnNodeQueryAllocate(XnNodeQuery **ppQuery)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetExistingNodeOnly(XnNodeQuery *pQuery, XnBool bExistingNode)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetSupportedMinUserPositions(XnNodeQuery *pQuery, const XnUInt32 nCount)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetCreationInfo(XnNodeQuery *pQuery, const XnChar *strCreationInfo)
XN_C_API XnStatus XN_C_DECL xnNodeQueryFilterList(XnContext *pContext, const XnNodeQuery *pQuery, XnNodeInfoList *pList)
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddSupportedCapability(XnNodeQuery *pQuery, const XnChar *strNeededCapability)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetVendor(XnNodeQuery *pQuery, const XnChar *strVendor)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetMaxVersion(XnNodeQuery *pQuery, const XnVersion *pMaxVersion)
XN_C_API void XN_C_DECL xnNodeQueryFree(XnNodeQuery *pQuery)
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddNeededNode(XnNodeQuery *pQuery, const XnChar *strInstanceName)
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddSupportedMapOutputMode(XnNodeQuery *pQuery, const XnMapOutputMode *pMapOutputMode)
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetMinVersion(XnNodeQuery *pQuery, const XnVersion *pMinVersion)
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...
XnRecordMedium
Definition: XnTypes.h:833
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 XnStatus XN_C_DECL xnGetRecorderDestination(XnNodeHandle hRecorder, XnRecordMedium *pDestType, XnChar *strDest, XnUInt32 nBufSize)
Returns the recoder's destination.
XN_C_API XnStatus XN_C_DECL xnCreateRecorder(XnContext *pContext, const XnChar *strFormatName, XnNodeHandle *phRecorder)
Creates a recorder.
XN_C_API XnStatus XN_C_DECL xnSetRecorderDestination(XnNodeHandle hRecorder, XnRecordMedium destType, const XnChar *strDest)
Tells the recorder where to record.
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.
XN_C_API XnStatus XN_C_DECL xnCreateSceneAnalyzer(XnContext *pContext, XnNodeHandle *phSceneAnalyzer, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an scene analyzer.
XN_C_API XnStatus XN_C_DECL xnGetFloor(XnNodeHandle hInstance, XnPlane3D *pPlane)
Gets a description of the floor, if it was found.
XN_C_API void XN_C_DECL xnGetSceneMetaData(XnNodeHandle hInstance, XnSceneMetaData *pMetaData)
Gets the current scene meta data.
XN_C_API const XnLabel *XN_C_DECL xnGetLabelMap(XnNodeHandle hInstance)
Gets the label map, describing the current segmentation of the scene.
XN_C_API XnStatus XN_C_DECL xnCreateScriptNode(XnContext *pContext, const XnChar *strFormat, XnNodeHandle *phScript)
XN_C_API XnStatus XN_C_DECL xnLoadScriptFromFile(XnNodeHandle hScript, const XnChar *strFileName)
XN_C_API XnStatus XN_C_DECL xnLoadScriptFromString(XnNodeHandle hScript, const XnChar *strScript)
XN_C_API const XnChar *XN_C_DECL xnScriptNodeGetSupportedFormat(XnNodeHandle hScript)
XN_C_API XnStatus XN_C_DECL xnScriptNodeRun(XnNodeHandle hScript, XnEnumerationErrors *pErrors)
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 xnSetJointActive(XnNodeHandle hInstance, XnSkeletonJoint eJoint, XnBool bState)
Change the state of a specific joint, to be active or inactive.
XN_C_API XnBool XN_C_DECL xnIsProfileAvailable(XnNodeHandle hInstance, XnSkeletonProfile eProfile)
Check if generator supports a specific profile.
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJoint(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation *pJoint)
Get a specific joint's full information.
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 xnSaveSkeletonCalibrationData(XnNodeHandle hInstance, XnUserID user, XnUInt32 nSlot)
Save the calibration data.
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrationData(XnNodeHandle hInstance, XnUInt32 nSlot)
Check if a specific slot already holds calibration data.
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 XnBool XN_C_DECL xnNeedPoseForSkeletonCalibration(XnNodeHandle hInstance)
Check if a specific pose is required for calibration.
XN_C_API XnStatus XN_C_DECL xnResetSkeleton(XnNodeHandle hInstance, XnUserID user)
Reset the skeleton - discard calibration.
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.
XN_C_API XnStatus XN_C_DECL xnRequestSkeletonCalibration(XnNodeHandle hInstance, XnUserID user, XnBool bForce)
Request calibration when possible.
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 xnAbortSkeletonCalibration(XnNodeHandle hInstance, XnUserID user)
stop calibration
XN_C_API XnBool XN_C_DECL xnIsSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being tracked.
XN_C_API XnStatus XN_C_DECL xnSaveSkeletonCalibrationDataToFile(XnNodeHandle hInstance, XnUserID user, const XnChar *strFileName)
Save the calibration data to file.
XN_C_API XnBool XN_C_DECL xnIsJointActive(XnNodeHandle hInstance, XnSkeletonJoint eJoint)
Check if joint is currently active.
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationComplete(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration complete with status.
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 xnGetSkeletonJointOrientation(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation *pJoint)
Get a specific joint's orientation.
XN_C_API XnStatus XN_C_DECL xnSetSkeletonSmoothing(XnNodeHandle hInstance, XnFloat fFactor)
Set the skeleton's smoothing factor.
XN_C_API XnStatus XN_C_DECL xnLoadSkeletonCalibrationData(XnNodeHandle hInstance, XnUserID user, XnUInt32 nSlot)
Load previously saved calibration data.
XN_C_API void XN_C_DECL xnUnregisterFromJointConfigurationChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from joint configuration changes.
XN_C_API XnStatus XN_C_DECL xnRegisterToCalibrationStart(XnNodeHandle hInstance, XnCalibrationStart handler, void *pCookie, XnCallbackHandle *phCallback)
Register to calibration start callback.
XN_C_API XnStatus XN_C_DECL xnStopSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Stop tracking a skeleton.
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationStart(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration start callback.
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrating(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being calibrated.
XN_C_API XnStatus XN_C_DECL xnRegisterToCalibrationComplete(XnNodeHandle hInstance, XnCalibrationComplete handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when calibration is complete, with status.
XN_C_API XnStatus XN_C_DECL xnGetSkeletonCalibrationPose(XnNodeHandle hInstance, XnChar *strPose)
Get the pose that is required for calibration.
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.
XN_C_API void XN_C_DECL xnUnregisterCalibrationCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration callbacks.
XN_C_API XnStatus XN_C_DECL xnClearSkeletonCalibrationData(XnNodeHandle hInstance, XnUInt32 nSlot)
Clear the requested slot from any saved calibration data.
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJointPosition(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointPosition *pJoint)
Get a specific joint's position.
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrated(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being calibrated.
XN_C_API XnStatus XN_C_DECL xnStartSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Start tracking a skeleton.
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.
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 xnUnregisterFromHandTouchingFOVEdge(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from hand approaching the edge of the FOV.
XN_C_API XnStatus XN_C_DECL xnGetUserPixels(XnNodeHandle hInstance, XnUserID user, XnSceneMetaData *pScene)
Get the pixels that belong to a user.
XN_C_API void XN_C_DECL xnUnregisterFromUserReEnter(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a user re-enters the scene.
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 xnRegisterToUserExit(XnNodeHandle hInstance, XnUserHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Register to when the user exits the scene (but not lost yet)
XN_C_API void XN_C_DECL xnUnregisterFromUserExit(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a user exits the scene.
XN_C_API void XN_C_DECL xnUnregisterUserCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from user callbacks.
XN_C_API XnStatus XN_C_DECL xnCreateUserGenerator(XnContext *pContext, XnNodeHandle *phUserGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a user generator.
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 xnGetUsers(XnNodeHandle hInstance, XnUserID *pUsers, XnUInt16 *pnUsers)
Get the current users.
XN_C_API XnUInt16 XN_C_DECL xnGetNumberOfUsers(XnNodeHandle hInstance)
Get current number of users.
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 XnUInt32 XN_C_DECL xnGetSupportedUserPositionsCount(XnNodeHandle hInstance)
Gets the number of user positions supported by this generator.
XN_C_API XnStatus XN_C_DECL xnSetUserPosition(XnNodeHandle hInstance, XnUInt32 nIndex, const XnBoundingBox3D *pPosition)
Sets the current user position.
XN_C_API XnStatus XN_C_DECL xnGetUserPosition(XnNodeHandle hInstance, XnUInt32 nIndex, XnBoundingBox3D *pPosition)
Gets the current user position.
XN_C_API void XN_C_DECL xnUnregisterFromUserPositionChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToUserPositionChange.
XN_C_API XnStatus XN_C_DECL xnRegisterToUserPositionChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to user position changes.
XN_C_API XnResolution XN_C_DECL xnResolutionGetFromName(const XnChar *strName)
XN_C_API XnStatus XN_C_DECL xnAutoEnumerateOverSingleInput(XnContext *pContext, XnNodeInfoList *pList, XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnProductionNodeType InputType, XnEnumerationErrors *pErrors, XnNodeQuery *pQuery)
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,...
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 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 XnUInt32 XN_C_DECL xnResolutionGetXRes(XnResolution resolution)
XN_C_API XnStatus XN_C_DECL xnGetVersion(XnVersion *pVersion)
XN_C_API XnInt32 XN_C_DECL xnVersionCompare(const XnVersion *pVersion1, const XnVersion *pVersion2)
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,...
XN_C_API const XnChar *XN_C_DECL xnResolutionGetName(XnResolution resolution)
XN_C_API XnUInt32 XN_C_DECL xnResolutionGetYRes(XnResolution resolution)
XN_C_API XnResolution XN_C_DECL xnResolutionGetFromXYRes(XnUInt32 xRes, XnUInt32 yRes)
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...
Definition: XnCppWrapper.h:35
void GetVersion(XnVersion &Version)
Definition: XnCppWrapper.h:9990
Definition: XnTypes.h:1164
XnOutputMetaData * pOutput
Definition: XnTypes.h:1166
XnWaveOutputMode Wave
Definition: XnTypes.h:1169
Definition: XnTypes.h:478
Definition: XnTypes.h:487
Definition: XnTypes.h:1132
XnDepthPixel nZRes
Definition: XnTypes.h:1140
XnMapMetaData * pMap
Definition: XnTypes.h:1134
Definition: XnTypes.h:504
Definition: XnTypes.h:1155
XnMapMetaData * pMap
Definition: XnTypes.h:1157
Definition: XnTypes.h:1145
XnMapMetaData * pMap
Definition: XnTypes.h:1147
Definition: XnTypes.h:203
Definition: XnTypes.h:1110
XnUInt32 nFPS
Definition: XnTypes.h:1127
XnPixelFormat PixelFormat
Definition: XnTypes.h:1124
XnOutputMetaData * pOutput
Definition: XnTypes.h:1112
XnUInt32XYPair Offset
Definition: XnTypes.h:1118
XnUInt32XYPair Res
Definition: XnTypes.h:1115
XnUInt32XYPair FullRes
Definition: XnTypes.h:1121
Definition: XnTypes.h:433
Definition: XnTypes.h:193
XnNodeInfoListNode * pCurrent
Definition: XnTypes.h:194
Definition: XnTypes.h:1093
XnUInt32 nDataSize
Definition: XnTypes.h:1101
XnUInt32 nFrameID
Definition: XnTypes.h:1098
XnUInt64 nTimestamp
Definition: XnTypes.h:1095
XnBool bIsNew
Definition: XnTypes.h:1104
Definition: XnTypes.h:561
Definition: XnTypes.h:163
Definition: XnTypes.h:283
Definition: XnTypes.h:1176
XnMapMetaData * pMap
Definition: XnTypes.h:1178
Definition: XnTypes.h:590
Definition: XnTypes.h:574
Definition: XnTypes.h:601
XnUInt32 X
Definition: XnTypes.h:1087
XnUInt32 Y
Definition: XnTypes.h:1088
Definition: XnTypes.h:466
Definition: XnTypes.h:152
XnUInt8 nMinor
Definition: XnTypes.h:154
XnUInt8 nMajor
Definition: XnTypes.h:153
XnUInt16 nMaintenance
Definition: XnTypes.h:155
XnUInt32 nBuild
Definition: XnTypes.h:156
Definition: XnTypes.h:456
XnUInt32 nSampleRate
Definition: XnTypes.h:457
XnUInt8 nChannels
Definition: XnTypes.h:459
XnUInt16 nBitsPerSample
Definition: XnTypes.h:458
Definition: XnTypes.h:291