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