XnCppWrapper.h
Go to the documentation of this file.
/****************************************************************************
* *
* OpenNI 1.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of OpenNI. *
* *
* OpenNI is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* OpenNI is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
* *
****************************************************************************/
#ifndef __XN_CPP_WRAPPER_H__
#define __XN_CPP_WRAPPER_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include <XnOpenNI.h>
#include <XnCodecIDs.h>
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
namespace xn
{
//---------------------------------------------------------------------------
// Forward Declarations
//---------------------------------------------------------------------------
class ProductionNode;
class EnumerationErrors;
class NodeInfo;
class NodeInfoList;
class Context;
class Query;
class Generator;
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
typedef void (XN_CALLBACK_TYPE* StateChangedHandler)(ProductionNode& node, void* pCookie);
//---------------------------------------------------------------------------
// Internal stuff
//---------------------------------------------------------------------------
typedef XnStatus (*_XnRegisterStateChangeFuncPtr)(XnNodeHandle hNode, XnStateChangedHandler handler, void* pCookie, XnCallbackHandle* phCallback);
typedef void (*_XnUnregisterStateChangeFuncPtr)(XnNodeHandle hNode, XnCallbackHandle hCallback);
static XnStatus _RegisterToStateChange(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
static void _UnregisterFromStateChange(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback);
//---------------------------------------------------------------------------
// Some Utilities
//---------------------------------------------------------------------------
class Version
{
public:
Version(const XnVersion& version) : m_version(version) {}
Version(XnUInt8 nMajor, XnUInt8 nMinor, XnUInt16 nMaintenance, XnUInt32 nBuild)
{
m_version.nMajor = nMajor;
m_version.nMinor = nMinor;
m_version.nMaintenance = nMaintenance;
m_version.nBuild = nBuild;
}
bool operator==(const Version& other) const
{
return (xnVersionCompare(&m_version, &other.m_version) == 0);
}
bool operator!=(const Version& other) const
{
return (xnVersionCompare(&m_version, &other.m_version) != 0);
}
bool operator<(const Version& other) const
{
return (xnVersionCompare(&m_version, &other.m_version) < 0);
}
bool operator<=(const Version& other) const
{
return (xnVersionCompare(&m_version, &other.m_version) <= 0);
}
bool operator>(const Version& other) const
{
return (xnVersionCompare(&m_version, &other.m_version) > 0);
}
bool operator>=(const Version& other) const
{
return (xnVersionCompare(&m_version, &other.m_version) >= 0);
}
static Version Current()
{
XnVersion version;
xnGetVersion(&version);
return Version(version);
}
XnUInt8 Major() const { return m_version.nMajor; }
XnUInt8 Minor() const { return m_version.nMinor; }
XnUInt16 Maintenance() const { return m_version.nMaintenance; }
XnUInt32 Build() const { return m_version.nBuild; }
XnUInt8& Major() { return m_version.nMajor; }
XnUInt8& Minor() { return m_version.nMinor; }
XnUInt16& Maintenance() { return m_version.nMaintenance; }
XnUInt32& Build() { return m_version.nBuild; }
const XnVersion* GetUnderlying() const { return &m_version; }
XnVersion* GetUnderlying() { return &m_version; }
private:
XnVersion m_version;
};
//---------------------------------------------------------------------------
// Meta Data
//---------------------------------------------------------------------------
class OutputMetaData
{
public:
inline OutputMetaData(const XnUInt8** ppData) : m_ppData(ppData), m_nAllocatedSize(0), m_pAllocatedData(NULL)
{
xnOSMemSet(&m_output, 0, sizeof(XnOutputMetaData));
}
virtual ~OutputMetaData() { Free(); }
inline XnUInt64 Timestamp() const { return m_output.nTimestamp; }
inline XnUInt64& Timestamp() { return m_output.nTimestamp; }
inline XnUInt32 FrameID() const { return m_output.nFrameID; }
inline XnUInt32& FrameID() { return m_output.nFrameID; }
inline XnUInt32 DataSize() const { return m_output.nDataSize; }
inline XnUInt32& DataSize() { return m_output.nDataSize; }
inline XnBool IsDataNew() const { return m_output.bIsNew; }
inline XnBool& IsDataNew() { return m_output.bIsNew; }
inline const XnOutputMetaData* GetUnderlying() const { return &m_output; }
inline XnOutputMetaData* GetUnderlying() { return &m_output; }
inline const XnUInt8* Data() const { return *m_ppData; }
inline const XnUInt8*& Data() { return *m_ppData; }
inline XnUInt8* WritableData()
{
MakeDataWritable();
return m_pAllocatedData;
}
XnStatus AllocateData(XnUInt32 nBytes)
{
if (nBytes > m_nAllocatedSize)
{
// reallocate
XnUInt8* pData = (XnUInt8*)xnOSMallocAligned(nBytes, XN_DEFAULT_MEM_ALIGN);
XN_VALIDATE_ALLOC_PTR(pData);
// allocation succeeded, replace
Free();
m_pAllocatedData = pData;
m_nAllocatedSize = nBytes;
}
DataSize() = nBytes;
*m_ppData = m_pAllocatedData;
return XN_STATUS_OK;
}
void Free()
{
if (m_nAllocatedSize != 0)
{
xnOSFreeAligned(m_pAllocatedData);
m_pAllocatedData = NULL;
m_nAllocatedSize = 0;
}
}
XnStatus MakeDataWritable()
{
XnStatus nRetVal = XN_STATUS_OK;
// check data isn't already writable
if (Data() != m_pAllocatedData || DataSize() > m_nAllocatedSize)
{
const XnUInt8* pOrigData = *m_ppData;
nRetVal = AllocateData(DataSize());
XN_IS_STATUS_OK(nRetVal);
if (pOrigData != NULL)
{
xnOSMemCopy(m_pAllocatedData, pOrigData, DataSize());
}
else
{
xnOSMemSet(m_pAllocatedData, 0, DataSize());
}
}
return (XN_STATUS_OK);
}
protected:
XnUInt8* m_pAllocatedData;
private:
XnOutputMetaData m_output;
const XnUInt8** m_ppData;
XnUInt32 m_nAllocatedSize;
};
class MapMetaData : public OutputMetaData
{
public:
inline MapMetaData(XnPixelFormat format, const XnUInt8** ppData) : OutputMetaData(ppData)
{
xnOSMemSet(&m_map, 0, sizeof(XnMapMetaData));
m_map.pOutput = OutputMetaData::GetUnderlying();
m_map.PixelFormat = format;
}
inline XnUInt32 XRes() const { return m_map.Res.X; }
inline XnUInt32& XRes() { return m_map.Res.X; }
inline XnUInt32 YRes() const { return m_map.Res.Y; }
inline XnUInt32& YRes() { return m_map.Res.Y; }
inline XnUInt32 XOffset() const { return m_map.Offset.X; }
inline XnUInt32& XOffset() { return m_map.Offset.X; }
inline XnUInt32 YOffset() const { return m_map.Offset.Y; }
inline XnUInt32& YOffset() { return m_map.Offset.Y; }
inline XnUInt32 FullXRes() const { return m_map.FullRes.X; }
inline XnUInt32& FullXRes() { return m_map.FullRes.X; }
inline XnUInt32 FullYRes() const { return m_map.FullRes.Y; }
inline XnUInt32& FullYRes() { return m_map.FullRes.Y; }
inline XnUInt32 FPS() const { return m_map.nFPS; }
inline XnUInt32& FPS() { return m_map.nFPS; }
inline XnPixelFormat PixelFormat() const { return m_map.PixelFormat; }
inline const XnMapMetaData* GetUnderlying() const { return &m_map; }
inline XnMapMetaData* GetUnderlying() { return &m_map; }
inline XnUInt32 BytesPerPixel() const
{
switch (PixelFormat())
{
case XN_PIXEL_FORMAT_RGB24:
return sizeof(XnRGB24Pixel);
case XN_PIXEL_FORMAT_YUV422:
return sizeof(XnYUV422DoublePixel)/2;
case XN_PIXEL_FORMAT_GRAYSCALE_8_BIT:
return sizeof(XnGrayscale8Pixel);
case XN_PIXEL_FORMAT_GRAYSCALE_16_BIT:
return sizeof(XnGrayscale16Pixel);
case XN_PIXEL_FORMAT_MJPEG:
return 2;
default:
XN_ASSERT(FALSE);
return 0;
}
}
XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes)
{
XnStatus nRetVal = XN_STATUS_OK;
XnUInt32 nSize = nXRes * nYRes * BytesPerPixel();
nRetVal = OutputMetaData::AllocateData(nSize);
XN_IS_STATUS_OK(nRetVal);
FullXRes() = XRes() = nXRes;
FullYRes() = YRes() = nYRes;
XOffset() = YOffset() = 0;
return (XN_STATUS_OK);
}
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnUInt8* pExternalBuffer)
{
XnStatus nRetVal = XN_STATUS_OK;
if (pExternalBuffer == NULL)
{
nRetVal = AllocateData(nXRes, nYRes);
XN_IS_STATUS_OK(nRetVal);
}
else
{
FullXRes() = XRes() = nXRes;
FullYRes() = YRes() = nYRes;
XOffset() = YOffset() = 0;
Data() = pExternalBuffer;
DataSize() = nXRes * nYRes * BytesPerPixel();
}
return (XN_STATUS_OK);
}
protected:
XnPixelFormat& PixelFormatImpl() { return m_map.PixelFormat; }
private:
// block copy ctor and assignment operator
MapMetaData& operator=(const MapMetaData&);
inline MapMetaData(const MapMetaData& other);
// Members
XnMapMetaData m_map;
};
template<class _pixelType>
class Map
{
public:
inline Map(_pixelType*& pData, XnUInt32& nXRes, XnUInt32 &nYRes) :
m_pData(pData), m_nXRes(nXRes), m_nYRes(nYRes)
{}
inline XnUInt32 XRes() const { return m_nXRes; }
inline XnUInt32 YRes() const { return m_nYRes; }
inline const _pixelType& operator[](XnUInt32 nIndex) const
{
XN_ASSERT(nIndex < (m_nXRes * m_nYRes));
return m_pData[nIndex];
}
inline _pixelType& operator[](XnUInt32 nIndex)
{
XN_ASSERT(nIndex < (m_nXRes *m_nYRes));
return m_pData[nIndex];
}
inline const _pixelType& operator()(XnUInt32 x, XnUInt32 y) const
{
XN_ASSERT(x < m_nXRes && y < m_nYRes);
return m_pData[y*m_nXRes + x];
}
inline _pixelType& operator()(XnUInt32 x, XnUInt32 y)
{
XN_ASSERT(x < m_nXRes && y < m_nYRes);
return m_pData[y*m_nXRes + x];
}
private:
/* block copy ctor and assignment operator */
Map(const Map& other);
Map& operator=(const Map&);
_pixelType*& m_pData;
XnUInt32& m_nXRes;
XnUInt32& m_nYRes;
};
typedef Map<XnDepthPixel> DepthMap;
typedef Map<XnUInt8> ImageMap;
typedef Map<XnRGB24Pixel> RGB24Map;
typedef Map<XnGrayscale16Pixel> Grayscale16Map;
typedef Map<XnGrayscale8Pixel> Grayscale8Map;
typedef Map<XnIRPixel> IRMap;
typedef Map<XnLabel> LabelMap;
class DepthMetaData : public MapMetaData
{
public:
inline DepthMetaData() :
MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_depth.pData),
m_depthMap(const_cast<XnDepthPixel*&>(m_depth.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_writableDepthMap((XnDepthPixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
{
xnOSMemSet(&m_depth, 0, sizeof(XnDepthMetaData));
m_depth.pMap = MapMetaData::GetUnderlying();
}
inline void InitFrom(const DepthMetaData& other)
{
xnCopyDepthMetaData(&m_depth, &other.m_depth);
}
inline XnStatus InitFrom(const DepthMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel* pExternalBuffer)
{
InitFrom(other);
return ReAdjust(nXRes, nYRes, pExternalBuffer);
}
XnStatus CopyFrom(const DepthMetaData& other)
{
// copy props
InitFrom(other);
// and make a copy of the data (this will allocate and copy data)
return MakeDataWritable();
}
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel* pExternalBuffer = NULL)
{
return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
}
inline XnDepthPixel ZRes() const { return m_depth.nZRes; }
inline XnDepthPixel& ZRes() { return m_depth.nZRes; }
inline const XnDepthPixel* Data() const { return (const XnDepthPixel*)MapMetaData::Data(); }
inline const XnDepthPixel*& Data() { return (const XnDepthPixel*&)MapMetaData::Data(); }
inline XnDepthPixel* WritableData() { return (XnDepthPixel*)MapMetaData::WritableData(); }
inline const xn::DepthMap& DepthMap() const { return m_depthMap; }
inline xn::DepthMap& WritableDepthMap()
{
MakeDataWritable();
return m_writableDepthMap;
}
inline const XnDepthPixel& operator[](XnUInt32 nIndex) const
{
XN_ASSERT(nIndex < (XRes()*YRes()));
return Data()[nIndex];
}
inline const XnDepthPixel& operator()(XnUInt32 x, XnUInt32 y) const
{
XN_ASSERT(x < XRes() && y < YRes());
return Data()[y*XRes() + x];
}
inline const XnDepthMetaData* GetUnderlying() const { return &m_depth; }
inline XnDepthMetaData* GetUnderlying() { return &m_depth; }
private:
// block copy ctor and assignment operator (because we can't return errors in those)
DepthMetaData(const DepthMetaData& other);
DepthMetaData& operator=(const DepthMetaData&);
XnDepthMetaData m_depth;
const xn::DepthMap m_depthMap;
xn::DepthMap m_writableDepthMap;
};
class ImageMetaData : public MapMetaData
{
public:
inline ImageMetaData() :
MapMetaData(XN_PIXEL_FORMAT_RGB24, &m_image.pData),
m_imageMap(const_cast<XnUInt8*&>(m_image.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_writableImageMap((XnUInt8*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_rgb24Map((XnRGB24Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_writableRgb24Map((XnRGB24Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_gray16Map((XnGrayscale16Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_writableGray16Map((XnGrayscale16Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_gray8Map((XnGrayscale8Pixel*&)m_image.pData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_writableGray8Map((XnGrayscale8Pixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
{
xnOSMemSet(&m_image, 0, sizeof(XnImageMetaData));
m_image.pMap = MapMetaData::GetUnderlying();
}
inline void InitFrom(const ImageMetaData& other)
{
xnCopyImageMetaData(&m_image, &other.m_image);
}
inline XnStatus InitFrom(const ImageMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8* pExternalBuffer)
{
InitFrom(other);
XnStatus nRetVal = ReAdjust(nXRes, nYRes, format, pExternalBuffer);
XN_IS_STATUS_OK(nRetVal);
PixelFormat() = format;
return XN_STATUS_OK;
}
inline XnStatus AllocateData(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format)
{
XnPixelFormat origFormat = PixelFormat();
PixelFormat() = format;
XnStatus nRetVal = MapMetaData::AllocateData(nXRes, nYRes);
if (nRetVal != XN_STATUS_OK)
{
PixelFormat() = origFormat;
return (nRetVal);
}
return XN_STATUS_OK;
}
inline XnStatus CopyFrom(const ImageMetaData& other)
{
// copy props
xnCopyImageMetaData(&m_image, &other.m_image);
// and make a copy of the data (this will allocate and copy data)
return MakeDataWritable();
}
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8* pExternalBuffer = NULL)
{
XnPixelFormat origFormat = PixelFormat();
PixelFormat() = format;
XnStatus nRetVal = MapMetaData::ReAdjust(nXRes, nYRes, pExternalBuffer);
if (nRetVal != XN_STATUS_OK)
{
PixelFormat() = origFormat;
return (nRetVal);
}
return XN_STATUS_OK;
}
inline XnPixelFormat PixelFormat() const { return MapMetaData::PixelFormat(); }
inline XnPixelFormat& PixelFormat() { return MapMetaData::PixelFormatImpl(); }
inline XnUInt8* WritableData() { return MapMetaData::WritableData(); }
inline const XnRGB24Pixel* RGB24Data() const { return (const XnRGB24Pixel*)MapMetaData::Data(); }
inline const XnRGB24Pixel*& RGB24Data() { return (const XnRGB24Pixel*&)MapMetaData::Data(); }
inline XnRGB24Pixel* WritableRGB24Data() { return (XnRGB24Pixel*)MapMetaData::WritableData(); }
inline const XnYUV422DoublePixel* YUV422Data() const { return (const XnYUV422DoublePixel*)MapMetaData::Data(); }
inline const XnYUV422DoublePixel*& YUV422Data() { return (const XnYUV422DoublePixel*&)MapMetaData::Data(); }
inline XnYUV422DoublePixel* WritableYUV422Data() { return (XnYUV422DoublePixel*)MapMetaData::WritableData(); }
inline const XnGrayscale8Pixel* Grayscale8Data() const { return (const XnGrayscale8Pixel*)MapMetaData::Data(); }
inline const XnGrayscale8Pixel*& Grayscale8Data() { return (const XnGrayscale8Pixel*&)MapMetaData::Data(); }
inline XnGrayscale8Pixel* WritableGrayscale8Data() { return (XnGrayscale8Pixel*)MapMetaData::WritableData(); }
inline const XnGrayscale16Pixel* Grayscale16Data() const { return (const XnGrayscale16Pixel*)MapMetaData::Data(); }
inline const XnGrayscale16Pixel*& Grayscale16Data() { return (const XnGrayscale16Pixel*&)MapMetaData::Data(); }
inline XnGrayscale16Pixel* WritableGrayscale16Data() { return (XnGrayscale16Pixel*)MapMetaData::WritableData(); }
inline const xn::ImageMap& ImageMap() const { return m_imageMap; }
inline xn::ImageMap& WritableImageMap() { MakeDataWritable(); return m_writableImageMap; }
inline const xn::RGB24Map& RGB24Map() const { return m_rgb24Map; }
inline xn::RGB24Map& WritableRGB24Map() { MakeDataWritable(); return m_writableRgb24Map; }
inline const xn::Grayscale8Map& Grayscale8Map() const { return m_gray8Map; }
inline xn::Grayscale8Map& WritableGrayscale8Map() { MakeDataWritable(); return m_writableGray8Map; }
inline const xn::Grayscale16Map& Grayscale16Map() const { return m_gray16Map; }
inline xn::Grayscale16Map& WritableGrayscale16Map() { MakeDataWritable(); return m_writableGray16Map; }
inline const XnImageMetaData* GetUnderlying() const { return &m_image; }
inline XnImageMetaData* GetUnderlying() { return &m_image; }
private:
// block copy ctor and assignment operator
ImageMetaData(const ImageMetaData& other);
ImageMetaData& operator=(const ImageMetaData&);
XnImageMetaData m_image;
const xn::ImageMap m_imageMap;
xn::ImageMap m_writableImageMap;
const xn::RGB24Map m_rgb24Map;
xn::RGB24Map m_writableRgb24Map;
const xn::Grayscale16Map m_gray16Map;
xn::Grayscale16Map m_writableGray16Map;
const xn::Grayscale8Map m_gray8Map;
xn::Grayscale8Map m_writableGray8Map;
};
class IRMetaData : public MapMetaData
{
public:
inline IRMetaData() :
MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_ir.pData),
m_irMap(const_cast<XnIRPixel*&>(m_ir.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_writableIRMap((XnIRPixel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
{
xnOSMemSet(&m_ir, 0, sizeof(XnIRMetaData));
m_ir.pMap = MapMetaData::GetUnderlying();
}
inline void InitFrom(const IRMetaData& other)
{
xnCopyIRMetaData(&m_ir, &other.m_ir);
}
inline XnStatus InitFrom(const IRMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel* pExternalBuffer)
{
InitFrom(other);
return ReAdjust(nXRes, nYRes, pExternalBuffer);
}
XnStatus CopyFrom(const IRMetaData& other)
{
// copy props
xnCopyIRMetaData(&m_ir, &other.m_ir);
// and make a copy of the data (this will allocate and copy data)
return MakeDataWritable();
}
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel* pExternalBuffer = NULL)
{
return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
}
inline const XnIRPixel* Data() const { return (const XnIRPixel*)MapMetaData::Data(); }
inline const XnIRPixel*& Data() { return (const XnIRPixel*&)MapMetaData::Data(); }
inline XnIRPixel* WritableData() { return (XnIRPixel*)MapMetaData::WritableData(); }
inline const XnIRPixel& operator[](XnUInt32 nIndex) const
{
XN_ASSERT(nIndex < (XRes()*YRes()));
return Data()[nIndex];
}
inline const XnIRPixel& operator()(XnUInt32 x, XnUInt32 y) const
{
XN_ASSERT(x < XRes() && y < YRes());
return Data()[y*XRes() + x];
}
inline const xn::IRMap& IRMap() const { return m_irMap; }
inline xn::IRMap& WritableIRMap() { MakeDataWritable(); return m_writableIRMap; }
inline const XnIRMetaData* GetUnderlying() const { return &m_ir; }
inline XnIRMetaData* GetUnderlying() { return &m_ir; }
private:
// block copy ctor and assignment operator
IRMetaData(const IRMetaData& other);
IRMetaData& operator=(const IRMetaData&);
XnIRMetaData m_ir;
const xn::IRMap m_irMap;
xn::IRMap m_writableIRMap;
};
class AudioMetaData : public OutputMetaData
{
public:
XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_UNALIGNED_ADDRESS_WARNING_ID);
inline AudioMetaData() : OutputMetaData(&m_audio.pData)
{
xnOSMemSet(&m_audio, 0, sizeof(XnAudioMetaData));
m_audio.pOutput = OutputMetaData::GetUnderlying();
}
XN_PRAGMA_STOP_DISABLED_WARNING_SECTION;
inline void InitFrom(const AudioMetaData& other)
{
xnCopyAudioMetaData(&m_audio, &other.m_audio);
}
inline XnUInt8 NumberOfChannels() const { return m_audio.Wave.nChannels; }
inline XnUInt8& NumberOfChannels() { return m_audio.Wave.nChannels; }
inline XnUInt32 SampleRate() const { return m_audio.Wave.nSampleRate; }
inline XnUInt32& SampleRate() { return m_audio.Wave.nSampleRate; }
inline XnUInt16 BitsPerSample() const { return m_audio.Wave.nBitsPerSample; }
inline XnUInt16& BitsPerSample() { return m_audio.Wave.nBitsPerSample; }
inline const XnAudioMetaData* GetUnderlying() const { return &m_audio; }
inline XnAudioMetaData* GetUnderlying() { return &m_audio; }
private:
// block copy ctor and assignment operator
AudioMetaData(const AudioMetaData& other);
AudioMetaData& operator=(const AudioMetaData&);
XnAudioMetaData m_audio;
};
class SceneMetaData : public MapMetaData
{
public:
inline SceneMetaData() :
MapMetaData(XN_PIXEL_FORMAT_GRAYSCALE_16_BIT, (const XnUInt8**)&m_scene.pData),
m_labelMap(const_cast<XnLabel*&>(m_scene.pData), MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y),
m_writableLabelMap((XnLabel*&)m_pAllocatedData, MapMetaData::GetUnderlying()->Res.X, MapMetaData::GetUnderlying()->Res.Y)
{
xnOSMemSet(&m_scene, 0, sizeof(XnSceneMetaData));
m_scene.pMap = MapMetaData::GetUnderlying();
}
inline void InitFrom(const SceneMetaData& other)
{
xnCopySceneMetaData(&m_scene, &other.m_scene);
}
inline XnStatus InitFrom(const SceneMetaData& other, XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel* pExternalBuffer)
{
InitFrom(other);
return ReAdjust(nXRes, nYRes, pExternalBuffer);
}
XnStatus CopyFrom(const SceneMetaData& other)
{
// copy props
xnCopySceneMetaData(&m_scene, &other.m_scene);
// and make a copy of the data (this will allocate and copy data)
return MakeDataWritable();
}
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel* pExternalBuffer = NULL)
{
return MapMetaData::ReAdjust(nXRes, nYRes, (const XnUInt8*)pExternalBuffer);
}
inline const XnLabel* Data() const { return (const XnLabel*)MapMetaData::Data(); }
inline const XnLabel*& Data() { return (const XnLabel*&)MapMetaData::Data(); }
inline XnLabel* WritableData() { return (XnLabel*)MapMetaData::WritableData(); }
inline const xn::LabelMap& LabelMap() const { return m_labelMap; }
inline xn::LabelMap& WritableLabelMap() { MakeDataWritable(); return m_writableLabelMap; }
inline const XnLabel& operator[](XnUInt32 nIndex) const
{
XN_ASSERT(nIndex < (XRes()*YRes()));
return Data()[nIndex];
}
inline const XnLabel& operator()(XnUInt32 x, XnUInt32 y) const
{
XN_ASSERT(x < XRes() && y < YRes());
return (*this)[y*XRes() + x];
}
inline const XnSceneMetaData* GetUnderlying() const { return &m_scene; }
inline XnSceneMetaData* GetUnderlying() { return &m_scene; }
private:
// block copy ctor and assignment operator
SceneMetaData(const SceneMetaData& other);
SceneMetaData& operator=(const SceneMetaData&);
XnSceneMetaData m_scene;
const xn::LabelMap m_labelMap;
xn::LabelMap m_writableLabelMap;
};
//---------------------------------------------------------------------------
// NodeWrapper
//---------------------------------------------------------------------------
class NodeWrapper
{
public:
friend class Context;
inline NodeWrapper(XnNodeHandle hNode) : m_hNode(NULL), m_hShuttingDownCallback(NULL)
{
SetHandle(hNode);
}
inline NodeWrapper(const NodeWrapper& other) : m_hNode(NULL), m_hShuttingDownCallback(NULL)
{
SetHandle(other.GetHandle());
}
inline NodeWrapper& operator=(const NodeWrapper& other)
{
SetHandle(other.GetHandle());
return *this;
}
inline ~NodeWrapper()
{
SetHandle(NULL);
}
inline operator XnNodeHandle() const { return GetHandle(); }
inline XnNodeHandle GetHandle() const { return m_hNode; }
inline XnBool operator==(const NodeWrapper& other)
{
return (GetHandle() == other.GetHandle());
}
inline XnBool operator!=(const NodeWrapper& other)
{
return (GetHandle() != other.GetHandle());
}
inline XnBool IsValid() const { return (GetHandle() != NULL); }
/*
* @brief Gets the instance name of a node. Unless the application made a specific
* request for a specific name, the name will be of the form: "Depth1", "Image2", etc.
*/
const XnChar* GetName() const {return xnGetNodeName(GetHandle()); }
inline XnStatus AddRef() { return xnProductionNodeAddRef(GetHandle()); }
inline void Release()
{
SetHandle(NULL);
}
inline void SetHandle(XnNodeHandle hNode)
{
if (m_hNode == hNode)
{
// Optimization: do nothing
return;
}
// check currently held node. If we're holding a node, release it
if (m_hNode != NULL)
{
XnContext* pContext = xnGetRefContextFromNodeHandle(m_hNode);
xnContextUnregisterFromShutdown(pContext, m_hShuttingDownCallback);
xnContextRelease(pContext);
xnProductionNodeRelease(m_hNode);
}
// check new node handle, if it points to a node, add ref to it
if (hNode != NULL)
{
XnStatus nRetVal = xnProductionNodeAddRef(hNode);
XN_ASSERT(nRetVal == XN_STATUS_OK);
XN_REFERENCE_VARIABLE(nRetVal);
XnContext* pContext = xnGetRefContextFromNodeHandle(hNode);
nRetVal = xnContextRegisterForShutdown(pContext, ContextShuttingDownCallback, this, &m_hShuttingDownCallback);
XN_ASSERT(nRetVal == XN_STATUS_OK);
xnContextRelease(pContext);
}
m_hNode = hNode;
}
inline void TakeOwnership(XnNodeHandle hNode)
{
SetHandle(hNode);
if (hNode != NULL)
{
xnProductionNodeRelease(hNode);
}
}
inline XnStatus XN_API_DEPRECATED("Please use AddRef() instead.") Ref() { return AddRef(); }
inline void XN_API_DEPRECATED("Please use Release() instead.") Unref() { Release(); }
private:
XnNodeHandle m_hNode;
XnCallbackHandle m_hShuttingDownCallback;
static void XN_CALLBACK_TYPE ContextShuttingDownCallback(XnContext* /*pContext*/, void* pCookie)
{
NodeWrapper* pThis = (NodeWrapper*)pCookie;
pThis->m_hNode = NULL;
}
};
//---------------------------------------------------------------------------
// Node Info
//---------------------------------------------------------------------------
class NodeInfo
{
public:
NodeInfo(XnNodeInfo* pInfo) : m_pNeededNodes(NULL), m_bOwnerOfNode(FALSE)
{
SetUnderlyingObject(pInfo);
}
NodeInfo(const NodeInfo& other) : m_pNeededNodes(NULL), m_bOwnerOfNode(FALSE)
{
SetUnderlyingObject(other.m_pInfo);
}
~NodeInfo()
{
SetUnderlyingObject(NULL);
}
inline NodeInfo& operator=(const NodeInfo& other)
{
SetUnderlyingObject(other.m_pInfo);
return *this;
}
inline operator XnNodeInfo*()
{
return m_pInfo;
}
inline XnStatus SetInstanceName(const XnChar* strName)
{
return xnNodeInfoSetInstanceName(m_pInfo, strName);
}
inline const XnProductionNodeDescription& GetDescription() const
{
return *xnNodeInfoGetDescription(m_pInfo);
}
inline const XnChar* GetInstanceName() const
{
return xnNodeInfoGetInstanceName(m_pInfo);
}
inline const XnChar* GetCreationInfo() const
{
return xnNodeInfoGetCreationInfo(m_pInfo);
}
/*
* @brief Gets the list of dependant nodes for this node alternative.
* These are any other node alternatives that the node is dependant on.
*/
inline NodeInfoList& GetNeededNodes() const;
inline XnStatus GetInstance(ProductionNode& node) const;
inline const void* GetAdditionalData() const
{
return xnNodeInfoGetAdditionalData(m_pInfo);
}
inline XnStatus GetTreeStringRepresentation(XnChar* csResultBuffer, XnUInt32 nBufferSize) const
{
return xnNodeInfoGetTreeStringRepresentation(m_pInfo, csResultBuffer, nBufferSize);
}
private:
inline void SetUnderlyingObject(XnNodeInfo* pInfo);
XnNodeInfo* m_pInfo;
mutable NodeInfoList* m_pNeededNodes;
XnBool m_bOwnerOfNode; // backwards compatibility
friend class Context;
};
//---------------------------------------------------------------------------
// Query
//---------------------------------------------------------------------------
class Query
{
public:
inline Query() : m_bAllocated(TRUE)
{
xnNodeQueryAllocate(&m_pQuery);
}
inline Query(XnNodeQuery* pNodeQuery) : m_bAllocated(FALSE), m_pQuery(pNodeQuery)
{
}
~Query()
{
if (m_bAllocated)
{
xnNodeQueryFree(m_pQuery);
}
}
inline const XnNodeQuery* GetUnderlyingObject() const { return m_pQuery; }
inline XnNodeQuery* GetUnderlyingObject() { return m_pQuery; }
inline XnStatus SetVendor(const XnChar* strVendor)
{
return xnNodeQuerySetVendor(m_pQuery, strVendor);
}
inline XnStatus SetName(const XnChar* strName)
{
return xnNodeQuerySetName(m_pQuery, strName);
}
inline XnStatus SetMinVersion(const XnVersion& minVersion)
{
return xnNodeQuerySetMinVersion(m_pQuery, &minVersion);
}
inline XnStatus SetMinVersion(const Version& minVersion)
{
return xnNodeQuerySetMinVersion(m_pQuery, minVersion.GetUnderlying());
}
inline XnStatus SetMaxVersion(const XnVersion& maxVersion)
{
return xnNodeQuerySetMaxVersion(m_pQuery, &maxVersion);
}
inline XnStatus SetMaxVersion(const Version& maxVersion)
{
return xnNodeQuerySetMaxVersion(m_pQuery, maxVersion.GetUnderlying());
}
inline XnStatus AddSupportedCapability(const XnChar* strNeededCapability)
{
return xnNodeQueryAddSupportedCapability(m_pQuery, strNeededCapability);
}
inline XnStatus AddSupportedMapOutputMode(const XnMapOutputMode& MapOutputMode)
{
return xnNodeQueryAddSupportedMapOutputMode(m_pQuery, &MapOutputMode);
}
inline XnStatus SetSupportedMinUserPositions(const XnUInt32 nCount)
{
return xnNodeQuerySetSupportedMinUserPositions(m_pQuery, nCount);
}
inline XnStatus SetExistingNodeOnly(XnBool bExistingNode)
{
return xnNodeQuerySetExistingNodeOnly(m_pQuery, bExistingNode);
}
inline XnStatus AddNeededNode(const XnChar* strInstanceName)
{
return xnNodeQueryAddNeededNode(m_pQuery, strInstanceName);
}
inline XnStatus SetCreationInfo(const XnChar* strCreationInfo)
{
return xnNodeQuerySetCreationInfo(m_pQuery, strCreationInfo);
}
private:
XnNodeQuery* m_pQuery;
XnBool m_bAllocated;
};
//---------------------------------------------------------------------------
// Node Info List
//---------------------------------------------------------------------------
class NodeInfoList
{
public:
class Iterator
{
public:
friend class NodeInfoList;
XnBool operator==(const Iterator& other) const
{
return m_it.pCurrent == other.m_it.pCurrent;
}
XnBool operator!=(const Iterator& other) const
{
return m_it.pCurrent != other.m_it.pCurrent;
}
inline Iterator& operator++()
{
UpdateInternalObject(xnNodeInfoListGetNext(m_it));
return *this;
}
inline Iterator operator++(int)
{
XnNodeInfoListIterator curr = m_it;
UpdateInternalObject(xnNodeInfoListGetNext(m_it));
return Iterator(curr);
}
inline Iterator& operator--()
{
UpdateInternalObject(xnNodeInfoListGetPrevious(m_it));
return *this;
}
inline Iterator operator--(int)
{
XnNodeInfoListIterator curr = m_it;
UpdateInternalObject(xnNodeInfoListGetPrevious(m_it));
return Iterator(curr);
}
inline NodeInfo operator*()
{
return m_Info;
}
private:
inline Iterator(XnNodeInfoListIterator it) : m_Info(NULL)
{
UpdateInternalObject(it);
}
inline void UpdateInternalObject(XnNodeInfoListIterator it)
{
m_it = it;
if (xnNodeInfoListIteratorIsValid(it))
{
XnNodeInfo* pInfo = xnNodeInfoListGetCurrent(it);
m_Info = NodeInfo(pInfo);
}
else
{
m_Info = NodeInfo(NULL);
}
}
NodeInfo m_Info;
XnNodeInfoListIterator m_it;
};
inline NodeInfoList()
{
xnNodeInfoListAllocate(&m_pList);
m_bAllocated = TRUE;
}
inline NodeInfoList(XnNodeInfoList* pList) : m_pList(pList), m_bAllocated(FALSE) {}
inline ~NodeInfoList()
{
FreeImpl();
}
inline XnNodeInfoList* GetUnderlyingObject() const { return m_pList; }
inline void ReplaceUnderlyingObject(XnNodeInfoList* pList)
{
FreeImpl();
m_pList = pList;
m_bAllocated = TRUE;
}
inline XnStatus Add(XnProductionNodeDescription& description, const XnChar* strCreationInfo, NodeInfoList* pNeededNodes)
{
XnNodeInfoList* pList = (pNeededNodes == NULL) ? NULL : pNeededNodes->GetUnderlyingObject();
return xnNodeInfoListAdd(m_pList, &description, strCreationInfo, pList);
}
inline XnStatus AddEx(XnProductionNodeDescription& description, const XnChar* strCreationInfo, NodeInfoList* pNeededNodes, const void* pAdditionalData, XnFreeHandler pFreeHandler)
{
XnNodeInfoList* pList = (pNeededNodes == NULL) ? NULL : pNeededNodes->GetUnderlyingObject();
return xnNodeInfoListAddEx(m_pList, &description, strCreationInfo, pList, pAdditionalData, pFreeHandler);
}
inline XnStatus AddNode(NodeInfo& info)
{
return xnNodeInfoListAddNode(m_pList, info);
}
inline XnStatus AddNodeFromAnotherList(Iterator& it)
{
return xnNodeInfoListAddNodeFromList(m_pList, it.m_it);
}
inline Iterator Begin() const
{
return Iterator(xnNodeInfoListGetFirst(m_pList));
}
inline Iterator End() const
{
XnNodeInfoListIterator it = { NULL };
return Iterator(it);
}
inline Iterator RBegin() const
{
return Iterator(xnNodeInfoListGetLast(m_pList));
}
inline Iterator REnd() const
{
XnNodeInfoListIterator it = { NULL };
return Iterator(it);
}
inline XnStatus Remove(Iterator& it)
{
return xnNodeInfoListRemove(m_pList, it.m_it);
}
inline XnStatus Clear()
{
return xnNodeInfoListClear(m_pList);
}
inline XnStatus Append(NodeInfoList& other)
{
return xnNodeInfoListAppend(m_pList, other.GetUnderlyingObject());
}
inline XnBool IsEmpty()
{
return xnNodeInfoListIsEmpty(m_pList);
}
inline XnStatus FilterList(Context& context, Query& query);
private:
inline void FreeImpl()
{
if (m_bAllocated)
{
xnNodeInfoListFree(m_pList);
m_bAllocated = FALSE;
m_pList = NULL;
}
}
XnNodeInfoList* m_pList;
XnBool m_bAllocated;
};
//---------------------------------------------------------------------------
// Production Nodes Functionality
//---------------------------------------------------------------------------
class Capability : public NodeWrapper
{
public:
Capability(XnNodeHandle hNode) : NodeWrapper(hNode) {}
Capability(const NodeWrapper& node) : NodeWrapper(node) {}
};
class ErrorStateCapability : public Capability
{
public:
ErrorStateCapability(XnNodeHandle hNode) : Capability(hNode) {}
ErrorStateCapability(const NodeWrapper& node) : Capability(node) {}
inline XnStatus GetErrorState() const
{
return xnGetNodeErrorState(GetHandle());
}
inline XnStatus RegisterToErrorStateChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToNodeErrorStateChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromNodeErrorStateChange, GetHandle(), hCallback);
}
};
class GeneralIntCapability : public Capability
{
public:
GeneralIntCapability(XnNodeHandle hNode, const XnChar* strCap) : Capability(hNode), m_strCap(strCap) {}
GeneralIntCapability(const NodeWrapper& node, const XnChar* strCap) : Capability(node), m_strCap(strCap) {}
inline void GetRange(XnInt32& nMin, XnInt32& nMax, XnInt32& nStep, XnInt32& nDefault, XnBool& bIsAutoSupported) const
{
xnGetGeneralIntRange(GetHandle(), m_strCap, &nMin, &nMax, &nStep, &nDefault, &bIsAutoSupported);
}
inline XnInt32 Get()
{
XnInt32 nValue;
xnGetGeneralIntValue(GetHandle(), m_strCap, &nValue);
return nValue;
}
inline XnStatus Set(XnInt32 nValue)
{
return xnSetGeneralIntValue(GetHandle(), m_strCap, nValue);
}
XnStatus RegisterToValueChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
void UnregisterFromValueChange(XnCallbackHandle hCallback);
private:
const XnChar* m_strCap;
};
class ProductionNode : public NodeWrapper
{
public:
inline ProductionNode(XnNodeHandle hNode = NULL) : NodeWrapper(hNode) {}
inline ProductionNode(const NodeWrapper& other) : NodeWrapper(other) {}
inline NodeInfo GetInfo() const { return NodeInfo(xnGetNodeInfo(GetHandle())); }
inline XnStatus AddNeededNode(ProductionNode& needed)
{
return xnAddNeededNode(GetHandle(), needed.GetHandle());
}
inline XnStatus RemoveNeededNode(ProductionNode& needed)
{
return xnRemoveNeededNode(GetHandle(), needed.GetHandle());
}
inline void GetContext(Context& context) const;
inline Context GetContext() const;
inline XnBool IsCapabilitySupported(const XnChar* strCapabilityName) const
{
return xnIsCapabilitySupported(GetHandle(), strCapabilityName);
}
inline XnStatus SetIntProperty(const XnChar* strName, XnUInt64 nValue)
{
return xnSetIntProperty(GetHandle(), strName, nValue);
}
inline XnStatus SetRealProperty(const XnChar* strName, XnDouble dValue)
{
return xnSetRealProperty(GetHandle(), strName, dValue);
}
inline XnStatus SetStringProperty(const XnChar* strName, const XnChar* strValue)
{
return xnSetStringProperty(GetHandle(), strName, strValue);
}
inline XnStatus SetGeneralProperty(const XnChar* strName, XnUInt32 nBufferSize, const void* pBuffer)
{
return xnSetGeneralProperty(GetHandle(), strName, nBufferSize, pBuffer);
}
inline XnStatus GetIntProperty(const XnChar* strName, XnUInt64& nValue) const
{
return xnGetIntProperty(GetHandle(), strName, &nValue);
}
inline XnStatus GetRealProperty(const XnChar* strName, XnDouble &dValue) const
{
return xnGetRealProperty(GetHandle(), strName, &dValue);
}
inline XnStatus GetStringProperty(const XnChar* strName, XnChar* csValue, XnUInt32 nBufSize) const
{
return xnGetStringProperty(GetHandle(), strName, csValue, nBufSize);
}
inline XnStatus GetGeneralProperty(const XnChar* strName, XnUInt32 nBufferSize, void* pBuffer) const
{
return xnGetGeneralProperty(GetHandle(), strName, nBufferSize, pBuffer);
}
inline XnStatus LockForChanges(XnLockHandle* phLock)
{
return xnLockNodeForChanges(GetHandle(), phLock);
}
inline void UnlockForChanges(XnLockHandle hLock)
{
xnUnlockNodeForChanges(GetHandle(), hLock);
}
inline XnStatus LockedNodeStartChanges(XnLockHandle hLock)
{
return xnLockedNodeStartChanges(GetHandle(), hLock);
}
inline void LockedNodeEndChanges(XnLockHandle hLock)
{
xnLockedNodeEndChanges(GetHandle(), hLock);
}
inline const ErrorStateCapability GetErrorStateCap() const
{
return ErrorStateCapability(GetHandle());
}
inline ErrorStateCapability GetErrorStateCap()
{
return ErrorStateCapability(GetHandle());
}
inline GeneralIntCapability GetGeneralIntCap(const XnChar* strCapability)
{
return GeneralIntCapability(GetHandle(), strCapability);
}
};
class DeviceIdentificationCapability : public Capability
{
public:
DeviceIdentificationCapability(XnNodeHandle hNode) : Capability(hNode) {}
DeviceIdentificationCapability(const NodeWrapper& node) : Capability(node) {}
inline XnStatus GetDeviceName(XnChar* strBuffer, XnUInt32 nBufferSize)
{
return xnGetDeviceName(GetHandle(), strBuffer, &nBufferSize);
}
inline XnStatus GetVendorSpecificData(XnChar* strBuffer, XnUInt32 nBufferSize)
{
return xnGetVendorSpecificData(GetHandle(), strBuffer, &nBufferSize);
}
inline XnStatus GetSerialNumber(XnChar* strBuffer, XnUInt32 nBufferSize)
{
return xnGetSerialNumber(GetHandle(), strBuffer, &nBufferSize);
}
};
class Device : public ProductionNode
{
public:
inline Device(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
inline Device(const NodeWrapper& other) : ProductionNode(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
inline DeviceIdentificationCapability GetIdentificationCap()
{
return DeviceIdentificationCapability(GetHandle());
}
};
class MirrorCapability : public Capability
{
public:
inline MirrorCapability(XnNodeHandle hNode) : Capability(hNode) {}
MirrorCapability(const NodeWrapper& node) : Capability(node) {}
inline XnStatus SetMirror(XnBool bMirror)
{
return xnSetMirror(GetHandle(), bMirror);
}
inline XnBool IsMirrored() const
{
return xnIsMirrored(GetHandle());
}
inline XnStatus RegisterToMirrorChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToMirrorChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromMirrorChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromMirrorChange, GetHandle(), hCallback);
}
};
class AlternativeViewPointCapability : public Capability
{
public:
inline AlternativeViewPointCapability(XnNodeHandle hNode) : Capability(hNode) {}
AlternativeViewPointCapability(const NodeWrapper& node) : Capability(node) {}
inline XnBool IsViewPointSupported(ProductionNode& otherNode) const
{
return xnIsViewPointSupported(GetHandle(), otherNode.GetHandle());
}
inline XnStatus SetViewPoint(ProductionNode& otherNode)
{
return xnSetViewPoint(GetHandle(), otherNode.GetHandle());
}
inline XnStatus ResetViewPoint()
{
return xnResetViewPoint(GetHandle());
}
inline XnBool IsViewPointAs(ProductionNode& otherNode) const
{
return xnIsViewPointAs(GetHandle(), otherNode.GetHandle());
}
inline XnStatus RegisterToViewPointChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToViewPointChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromViewPointChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromViewPointChange, GetHandle(), hCallback);
}
};
class FrameSyncCapability : public Capability
{
public:
inline FrameSyncCapability(XnNodeHandle hNode) : Capability(hNode) {}
FrameSyncCapability(const NodeWrapper& node) : Capability(node) {}
inline XnBool CanFrameSyncWith(Generator& other) const;
inline XnStatus FrameSyncWith(Generator& other);
inline XnStatus StopFrameSyncWith(Generator& other);
inline XnBool IsFrameSyncedWith(Generator& other) const;
inline XnStatus RegisterToFrameSyncChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToFrameSyncChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromFrameSyncChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromFrameSyncChange, GetHandle(), hCallback);
}
};
class Generator : public ProductionNode
{
public:
inline Generator(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
inline Generator(const NodeWrapper& other) : ProductionNode(other) {}
inline XnStatus StartGenerating()
{
return xnStartGenerating(GetHandle());
}
inline XnBool IsGenerating() const
{
return xnIsGenerating(GetHandle());
}
inline XnStatus StopGenerating()
{
return xnStopGenerating(GetHandle());
}
inline XnStatus RegisterToGenerationRunningChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle &hCallback)
{
return _RegisterToStateChange(xnRegisterToGenerationRunningChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromGenerationRunningChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromGenerationRunningChange, GetHandle(), hCallback);
}
inline XnStatus RegisterToNewDataAvailable(StateChangedHandler handler, void* pCookie, XnCallbackHandle &hCallback)
{
return _RegisterToStateChange(xnRegisterToNewDataAvailable, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromNewDataAvailable(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromNewDataAvailable, GetHandle(), hCallback);
}
inline XnBool IsNewDataAvailable(XnUInt64* pnTimestamp = NULL) const
{
return xnIsNewDataAvailable(GetHandle(), pnTimestamp);
}
inline XnStatus WaitAndUpdateData()
{
return xnWaitAndUpdateData(GetHandle());
}
inline XnBool IsDataNew() const
{
return xnIsDataNew(GetHandle());
}
inline const void* GetData()
{
return xnGetData(GetHandle());
}
inline XnUInt32 GetDataSize() const
{
return xnGetDataSize(GetHandle());
}
inline XnUInt64 GetTimestamp() const
{
return xnGetTimestamp(GetHandle());
}
inline XnUInt32 GetFrameID() const
{
return xnGetFrameID(GetHandle());
}
inline const MirrorCapability GetMirrorCap() const
{
return MirrorCapability(GetHandle());
}
inline MirrorCapability GetMirrorCap()
{
return MirrorCapability(GetHandle());
}
inline const AlternativeViewPointCapability GetAlternativeViewPointCap() const
{
return AlternativeViewPointCapability(GetHandle());
}
inline AlternativeViewPointCapability GetAlternativeViewPointCap()
{
return AlternativeViewPointCapability(GetHandle());
}
inline const FrameSyncCapability GetFrameSyncCap() const
{
return FrameSyncCapability(GetHandle());
}
inline FrameSyncCapability GetFrameSyncCap()
{
return FrameSyncCapability(GetHandle());
}
};
class Recorder : public ProductionNode
{
public:
inline Recorder(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
inline Recorder(const NodeWrapper& other) : ProductionNode(other) {}
inline XnStatus Create(Context& context, const XnChar* strFormatName = NULL);
inline XnStatus SetDestination(XnRecordMedium destType, const XnChar* strDest)
{
return xnSetRecorderDestination(GetHandle(), destType, strDest);
}
inline XnStatus GetDestination(XnRecordMedium& destType, XnChar* strDest, XnUInt32 nBufSize)
{
return xnGetRecorderDestination(GetHandle(), &destType, strDest, nBufSize);
}
inline XnStatus AddNodeToRecording(ProductionNode& Node, XnCodecID compression = XN_CODEC_NULL)
{
return xnAddNodeToRecording(GetHandle(), Node.GetHandle(), compression);
}
inline XnStatus RemoveNodeFromRecording(ProductionNode& Node)
{
return xnRemoveNodeFromRecording(GetHandle(), Node.GetHandle());
}
inline XnStatus Record()
{
return xnRecord(GetHandle());
}
};
class Player : public ProductionNode
{
public:
inline Player(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
inline Player(const NodeWrapper& other) : ProductionNode(other) {}
inline XnStatus Create(Context& context, const XnChar* strFormatName);
inline XnStatus SetRepeat(XnBool bRepeat)
{
return xnSetPlayerRepeat(GetHandle(), bRepeat);
}
inline XnStatus SetSource(XnRecordMedium sourceType, const XnChar* strSource)
{
return xnSetPlayerSource(GetHandle(), sourceType, strSource);
}
inline XnStatus GetSource(XnRecordMedium &sourceType, XnChar* strSource, XnUInt32 nBufSize) const
{
return xnGetPlayerSource(GetHandle(), &sourceType, strSource, nBufSize);
}
inline XnStatus ReadNext()
{
return xnPlayerReadNext(GetHandle());
}
inline XnStatus SeekToTimeStamp(XnInt64 nTimeOffset, XnPlayerSeekOrigin origin)
{
return xnSeekPlayerToTimeStamp(GetHandle(), nTimeOffset, origin);
}
inline XnStatus SeekToFrame(const XnChar* strNodeName, XnInt32 nFrameOffset, XnPlayerSeekOrigin origin)
{
return xnSeekPlayerToFrame(GetHandle(), strNodeName, nFrameOffset, origin);
}
inline XnStatus TellTimestamp(XnUInt64& nTimestamp) const
{
return xnTellPlayerTimestamp(GetHandle(), &nTimestamp);
}
inline XnStatus TellFrame(const XnChar* strNodeName, XnUInt32& nFrame) const
{
return xnTellPlayerFrame(GetHandle(), strNodeName, &nFrame);
}
inline XnStatus GetNumFrames(const XnChar* strNodeName, XnUInt32& nFrames) const
{
return xnGetPlayerNumFrames(GetHandle(), strNodeName, &nFrames);
}
inline const XnChar* GetSupportedFormat() const
{
return xnGetPlayerSupportedFormat(GetHandle());
}
inline XnStatus EnumerateNodes(NodeInfoList& list) const
{
XnNodeInfoList* pList;
XnStatus nRetVal = xnEnumeratePlayerNodes(GetHandle(), &pList);
XN_IS_STATUS_OK(nRetVal);
list.ReplaceUnderlyingObject(pList);
return (XN_STATUS_OK);
}
inline XnBool IsEOF() const
{
return xnIsPlayerAtEOF(GetHandle());
}
inline XnStatus RegisterToEndOfFileReached(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToEndOfFileReached, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromEndOfFileReached(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromEndOfFileReached, GetHandle(), hCallback);
}
inline XnStatus SetPlaybackSpeed(XnDouble dSpeed)
{
return xnSetPlaybackSpeed(GetHandle(), dSpeed);
}
inline XnDouble GetPlaybackSpeed() const
{
return xnGetPlaybackSpeed(GetHandle());
}
};
class CroppingCapability : public Capability
{
public:
inline CroppingCapability(XnNodeHandle hNode) : Capability(hNode) {}
CroppingCapability(const NodeWrapper& node) : Capability(node) {}
inline XnStatus SetCropping(const XnCropping& Cropping)
{
return xnSetCropping(GetHandle(), &Cropping);
}
inline XnStatus GetCropping(XnCropping& Cropping) const
{
return xnGetCropping(GetHandle(), &Cropping);
}
inline XnStatus RegisterToCroppingChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToCroppingChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromCroppingChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromCroppingChange, GetHandle(), hCallback);
}
};
class AntiFlickerCapability : public Capability
{
public:
inline AntiFlickerCapability(XnNodeHandle hNode) : Capability(hNode) {}
AntiFlickerCapability(const NodeWrapper& node) : Capability(node) {}
inline XnStatus SetPowerLineFrequency(XnPowerLineFrequency nFrequency)
{
return xnSetPowerLineFrequency(GetHandle(), nFrequency);
}
inline XnPowerLineFrequency GetPowerLineFrequency()
{
return xnGetPowerLineFrequency(GetHandle());
}
inline XnStatus RegisterToPowerLineFrequencyChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToPowerLineFrequencyChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromPowerLineFrequencyChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromPowerLineFrequencyChange, GetHandle(), hCallback);
}
};
class MapGenerator : public Generator
{
public:
inline MapGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
inline MapGenerator(const NodeWrapper& other) : Generator(other) {}
inline XnUInt32 GetSupportedMapOutputModesCount() const
{
return xnGetSupportedMapOutputModesCount(GetHandle());
}
inline XnStatus GetSupportedMapOutputModes(XnMapOutputMode* aModes, XnUInt32& nCount) const
{
return xnGetSupportedMapOutputModes(GetHandle(), aModes, &nCount);
}
inline XnStatus SetMapOutputMode(const XnMapOutputMode& OutputMode)
{
return xnSetMapOutputMode(GetHandle(), &OutputMode);
}
inline XnStatus GetMapOutputMode(XnMapOutputMode &OutputMode) const
{
return xnGetMapOutputMode(GetHandle(), &OutputMode);
}
inline XnUInt32 GetBytesPerPixel() const
{
return xnGetBytesPerPixel(GetHandle());
}
inline XnStatus RegisterToMapOutputModeChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToMapOutputModeChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromMapOutputModeChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromMapOutputModeChange, GetHandle(), hCallback);
}
inline const CroppingCapability GetCroppingCap() const
{
return CroppingCapability(GetHandle());
}
inline CroppingCapability GetCroppingCap()
{
return CroppingCapability(GetHandle());
}
inline GeneralIntCapability GetBrightnessCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_BRIGHTNESS);
}
inline GeneralIntCapability GetContrastCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_CONTRAST);
}
inline GeneralIntCapability GetHueCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_HUE);
}
inline GeneralIntCapability GetSaturationCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_SATURATION);
}
inline GeneralIntCapability GetSharpnessCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_SHARPNESS);
}
inline GeneralIntCapability GetGammaCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_GAMMA);
}
inline GeneralIntCapability GetWhiteBalanceCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_COLOR_TEMPERATURE);
}
inline GeneralIntCapability GetBacklightCompensationCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_BACKLIGHT_COMPENSATION);
}
inline GeneralIntCapability GetGainCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_GAIN);
}
inline GeneralIntCapability GetPanCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_PAN);
}
inline GeneralIntCapability GetTiltCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_TILT);
}
inline GeneralIntCapability GetRollCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_ROLL);
}
inline GeneralIntCapability GetZoomCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_ZOOM);
}
inline GeneralIntCapability GetExposureCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_EXPOSURE);
}
inline GeneralIntCapability GetIrisCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_IRIS);
}
inline GeneralIntCapability GetFocusCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_FOCUS);
}
inline GeneralIntCapability GetLowLightCompensationCap()
{
return GeneralIntCapability(GetHandle(), XN_CAPABILITY_LOW_LIGHT_COMPENSATION);
}
inline AntiFlickerCapability GetAntiFlickerCap()
{
return AntiFlickerCapability(GetHandle());
}
};
class UserPositionCapability : public Capability
{
public:
inline UserPositionCapability(XnNodeHandle hNode = NULL) : Capability(hNode) {}
UserPositionCapability(const NodeWrapper& node) : Capability(node) {}
inline XnUInt32 GetSupportedUserPositionsCount() const
{
return xnGetSupportedUserPositionsCount(GetHandle());
}
inline XnStatus SetUserPosition(XnUInt32 nIndex, const XnBoundingBox3D& Position)
{
return xnSetUserPosition(GetHandle(), nIndex, &Position);
}
inline XnStatus GetUserPosition(XnUInt32 nIndex, XnBoundingBox3D& Position) const
{
return xnGetUserPosition(GetHandle(), nIndex, &Position);
}
inline XnStatus RegisterToUserPositionChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToUserPositionChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromUserPositionChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromUserPositionChange, GetHandle(), hCallback);
}
};
class DepthGenerator : public MapGenerator
{
public:
inline DepthGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
inline DepthGenerator(const NodeWrapper& other) : MapGenerator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
inline void GetMetaData(DepthMetaData& metaData) const
{
xnGetDepthMetaData(GetHandle(), metaData.GetUnderlying());
}
inline const XnDepthPixel* GetDepthMap() const
{
return xnGetDepthMap(GetHandle());
}
inline XnDepthPixel GetDeviceMaxDepth() const
{
return xnGetDeviceMaxDepth(GetHandle());
}
inline XnStatus GetFieldOfView(XnFieldOfView& FOV) const
{
return xnGetDepthFieldOfView(GetHandle(), &FOV);
}
inline XnStatus RegisterToFieldOfViewChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToDepthFieldOfViewChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromFieldOfViewChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromDepthFieldOfViewChange, GetHandle(), hCallback);
}
inline XnStatus ConvertProjectiveToRealWorld(XnUInt32 nCount, const XnPoint3D aProjective[], XnPoint3D aRealWorld[]) const
{
return xnConvertProjectiveToRealWorld(GetHandle(), nCount, aProjective, aRealWorld);
}
inline XnStatus ConvertRealWorldToProjective(XnUInt32 nCount, const XnPoint3D aRealWorld[], XnPoint3D aProjective[]) const
{
return xnConvertRealWorldToProjective(GetHandle(), nCount, aRealWorld, aProjective);
}
inline const UserPositionCapability GetUserPositionCap() const
{
return UserPositionCapability(GetHandle());
}
inline UserPositionCapability GetUserPositionCap()
{
return UserPositionCapability(GetHandle());
}
};
class MockDepthGenerator : public DepthGenerator
{
public:
inline MockDepthGenerator(XnNodeHandle hNode = NULL) : DepthGenerator(hNode) {}
inline MockDepthGenerator(const NodeWrapper& other) : DepthGenerator(other) {}
XnStatus Create(Context& context, const XnChar* strName = NULL);
XnStatus CreateBasedOn(DepthGenerator& other, const XnChar* strName = NULL);
inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel* pDepthMap)
{
return xnMockDepthSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pDepthMap);
}
inline XnStatus SetData(const DepthMetaData& depthMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
{
return SetData(nFrameID, nTimestamp, depthMD.DataSize(), depthMD.Data());
}
inline XnStatus SetData(const DepthMetaData& depthMD)
{
return SetData(depthMD, depthMD.FrameID(), depthMD.Timestamp());
}
};
class ImageGenerator : public MapGenerator
{
public:
inline ImageGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
inline ImageGenerator(const NodeWrapper& other) : MapGenerator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
inline void GetMetaData(ImageMetaData& metaData) const
{
xnGetImageMetaData(GetHandle(), metaData.GetUnderlying());
}
inline const XnRGB24Pixel* GetRGB24ImageMap() const
{
return xnGetRGB24ImageMap(GetHandle());
}
inline const XnYUV422DoublePixel* GetYUV422ImageMap() const
{
return xnGetYUV422ImageMap(GetHandle());
}
inline const XnGrayscale8Pixel* GetGrayscale8ImageMap() const
{
return xnGetGrayscale8ImageMap(GetHandle());
}
inline const XnGrayscale16Pixel* GetGrayscale16ImageMap() const
{
return xnGetGrayscale16ImageMap(GetHandle());
}
inline const XnUInt8* GetImageMap() const
{
return xnGetImageMap(GetHandle());
}
inline XnBool IsPixelFormatSupported(XnPixelFormat Format) const
{
return xnIsPixelFormatSupported(GetHandle(), Format);
}
inline XnStatus SetPixelFormat(XnPixelFormat Format)
{
return xnSetPixelFormat(GetHandle(), Format);
}
inline XnPixelFormat GetPixelFormat() const
{
return xnGetPixelFormat(GetHandle());
}
inline XnStatus RegisterToPixelFormatChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToPixelFormatChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromPixelFormatChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromPixelFormatChange, GetHandle(), hCallback);
}
};
class MockImageGenerator : public ImageGenerator
{
public:
inline MockImageGenerator(XnNodeHandle hNode = NULL) : ImageGenerator(hNode) {}
inline MockImageGenerator(const NodeWrapper& other) : ImageGenerator(other) {}
XnStatus Create(Context& context, const XnChar* strName = NULL);
XnStatus CreateBasedOn(ImageGenerator& other, const XnChar* strName = NULL);
inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8* pImageMap)
{
return xnMockImageSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pImageMap);
}
inline XnStatus SetData(const ImageMetaData& imageMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
{
return SetData(nFrameID, nTimestamp, imageMD.DataSize(), imageMD.Data());
}
inline XnStatus SetData(const ImageMetaData& imageMD)
{
return SetData(imageMD, imageMD.FrameID(), imageMD.Timestamp());
}
};
class IRGenerator : public MapGenerator
{
public:
inline IRGenerator(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
inline IRGenerator(const NodeWrapper& other) : MapGenerator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
inline void GetMetaData(IRMetaData& metaData) const
{
xnGetIRMetaData(GetHandle(), metaData.GetUnderlying());
}
inline const XnIRPixel* GetIRMap() const
{
return xnGetIRMap(GetHandle());
}
};
class MockIRGenerator : public IRGenerator
{
public:
inline MockIRGenerator(XnNodeHandle hNode = NULL) : IRGenerator(hNode) {}
inline MockIRGenerator(const NodeWrapper& other) : IRGenerator(other) {}
XnStatus Create(Context& context, const XnChar* strName = NULL);
XnStatus CreateBasedOn(IRGenerator& other, const XnChar* strName = NULL);
inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel* pIRMap)
{
return xnMockIRSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pIRMap);
}
inline XnStatus SetData(const IRMetaData& irMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
{
return SetData(nFrameID, nTimestamp, irMD.DataSize(), irMD.Data());
}
inline XnStatus SetData(const IRMetaData& irMD)
{
return SetData(irMD, irMD.FrameID(), irMD.Timestamp());
}
};
class GestureGenerator : public Generator
{
public:
inline GestureGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
inline GestureGenerator(const NodeWrapper& other) : Generator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
inline XnStatus AddGesture(const XnChar* strGesture, XnBoundingBox3D* pArea)
{
return xnAddGesture(GetHandle(), strGesture, pArea);
}
inline XnStatus RemoveGesture(const XnChar* strGesture)
{
return xnRemoveGesture(GetHandle(), strGesture);
}
inline XnStatus GetAllActiveGestures(XnChar** astrGestures, XnUInt32 nNameLength, XnUInt16& nGestures) const
{
return xnGetAllActiveGestures(GetHandle(), astrGestures, nNameLength, &nGestures);
}
inline XnUInt16 GetNumberOfAvailableGestures() const
{
return xnGetNumberOfAvailableGestures(GetHandle());
}
inline XnStatus EnumerateAllGestures(XnChar** astrGestures, XnUInt32 nNameLength, XnUInt16& nGestures) const
{
return xnEnumerateAllGestures(GetHandle(), astrGestures, nNameLength, &nGestures);
}
inline XnBool IsGestureAvailable(const XnChar* strGesture) const
{
return xnIsGestureAvailable(GetHandle(), strGesture);
}
inline XnBool IsGestureProgressSupported(const XnChar* strGesture) const
{
return xnIsGestureProgressSupported(GetHandle(), strGesture);
}
typedef void (XN_CALLBACK_TYPE* GestureRecognized)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie);
typedef void (XN_CALLBACK_TYPE* GestureProgress)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie);
XnStatus RegisterGestureCallbacks(GestureRecognized RecognizedCB, GestureProgress ProgressCB, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
GestureCookie* pGestureCookie;
XN_VALIDATE_ALLOC(pGestureCookie, GestureCookie);
pGestureCookie->recognizedHandler = RecognizedCB;
pGestureCookie->progressHandler = ProgressCB;
pGestureCookie->pUserCookie = pCookie;
nRetVal = xnRegisterGestureCallbacks(GetHandle(), GestureRecognizedCallback, GestureProgressCallback, pGestureCookie, &pGestureCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pGestureCookie);
return (nRetVal);
}
hCallback = pGestureCookie;
return (XN_STATUS_OK);
}
inline void UnregisterGestureCallbacks(XnCallbackHandle hCallback)
{
GestureCookie* pGestureCookie = (GestureCookie*)hCallback;
xnUnregisterGestureCallbacks(GetHandle(), pGestureCookie->hCallback);
xnOSFree(pGestureCookie);
}
inline XnStatus RegisterToGestureChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToGestureChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromGestureChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromGestureChange, GetHandle(), hCallback);
}
typedef void (XN_CALLBACK_TYPE* GestureIntermediateStageCompleted)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie);
XnStatus RegisterToGestureIntermediateStageCompleted(GestureIntermediateStageCompleted handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
GestureIntermediateStageCompletedCookie* pGestureCookie;
XN_VALIDATE_ALLOC(pGestureCookie, GestureIntermediateStageCompletedCookie);
pGestureCookie->handler = handler;
pGestureCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToGestureIntermediateStageCompleted(GetHandle(), GestureIntermediateStageCompletedCallback, pGestureCookie, &pGestureCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pGestureCookie);
return (nRetVal);
}
hCallback = pGestureCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromGestureIntermediateStageCompleted(XnCallbackHandle hCallback)
{
GestureIntermediateStageCompletedCookie* pGestureCookie = (GestureIntermediateStageCompletedCookie*)hCallback;
xnUnregisterFromGestureIntermediateStageCompleted(GetHandle(), pGestureCookie->hCallback);
xnOSFree(pGestureCookie);
}
typedef void (XN_CALLBACK_TYPE* GestureReadyForNextIntermediateStage)(GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie);
XnStatus RegisterToGestureReadyForNextIntermediateStage(GestureReadyForNextIntermediateStage handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
GestureReadyForNextIntermediateStageCookie* pGestureCookie;
XN_VALIDATE_ALLOC(pGestureCookie, GestureReadyForNextIntermediateStageCookie);
pGestureCookie->handler = handler;
pGestureCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToGestureReadyForNextIntermediateStage(GetHandle(), GestureReadyForNextIntermediateStageCallback, pGestureCookie, &pGestureCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pGestureCookie);
return (nRetVal);
}
hCallback = pGestureCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromGestureReadyForNextIntermediateStageCallbacks(XnCallbackHandle hCallback)
{
GestureReadyForNextIntermediateStageCookie* pGestureCookie = (GestureReadyForNextIntermediateStageCookie*)hCallback;
xnUnregisterFromGestureReadyForNextIntermediateStage(GetHandle(), pGestureCookie->hCallback);
xnOSFree(pGestureCookie);
}
inline XnStatus XN_API_DEPRECATED("Use GetAllActiveGestures() instead") GetActiveGestures(XnChar*& astrGestures, XnUInt16& nGestures) const
{
return xnGetActiveGestures(GetHandle(), &astrGestures, &nGestures);
}
inline XnStatus XN_API_DEPRECATED("Use EnumerateAllGestures() instead") EnumerateGestures(XnChar*& astrGestures, XnUInt16& nGestures) const
{
return xnEnumerateGestures(GetHandle(), &astrGestures, &nGestures);
}
private:
typedef struct GestureCookie
{
GestureRecognized recognizedHandler;
GestureProgress progressHandler;
void* pUserCookie;
XnCallbackHandle hCallback;
} GestureCookie;
static void XN_CALLBACK_TYPE GestureRecognizedCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie)
{
GestureCookie* pGestureCookie = (GestureCookie*)pCookie;
GestureGenerator gen(hNode);
if (pGestureCookie->recognizedHandler != NULL)
{
pGestureCookie->recognizedHandler(gen, strGesture, pIDPosition, pEndPosition, pGestureCookie->pUserCookie);
}
}
static void XN_CALLBACK_TYPE GestureProgressCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie)
{
GestureCookie* pGestureCookie = (GestureCookie*)pCookie;
GestureGenerator gen(hNode);
if (pGestureCookie->progressHandler != NULL)
{
pGestureCookie->progressHandler(gen, strGesture, pPosition, fProgress, pGestureCookie->pUserCookie);
}
}
typedef struct GestureIntermediateStageCompletedCookie
{
GestureIntermediateStageCompleted handler;
void* pUserCookie;
XnCallbackHandle hCallback;
} GestureIntermediateStageCompletedCookie;
static void XN_CALLBACK_TYPE GestureIntermediateStageCompletedCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie)
{
GestureIntermediateStageCompletedCookie* pGestureCookie = (GestureIntermediateStageCompletedCookie*)pCookie;
GestureGenerator gen(hNode);
if (pGestureCookie->handler != NULL)
{
pGestureCookie->handler(gen, strGesture, pPosition, pGestureCookie->pUserCookie);
}
}
typedef struct GestureReadyForNextIntermediateStageCookie
{
GestureReadyForNextIntermediateStage handler;
void* pUserCookie;
XnCallbackHandle hCallback;
} GestureReadyForNextIntermediateStageCookie;
static void XN_CALLBACK_TYPE GestureReadyForNextIntermediateStageCallback(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie)
{
GestureReadyForNextIntermediateStageCookie* pGestureCookie = (GestureReadyForNextIntermediateStageCookie*)pCookie;
GestureGenerator gen(hNode);
if (pGestureCookie->handler != NULL)
{
pGestureCookie->handler(gen, strGesture, pPosition, pGestureCookie->pUserCookie);
}
}
};
class SceneAnalyzer : public MapGenerator
{
public:
inline SceneAnalyzer(XnNodeHandle hNode = NULL) : MapGenerator(hNode) {}
inline SceneAnalyzer(const NodeWrapper& other) : MapGenerator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
inline void GetMetaData(SceneMetaData& metaData) const
{
xnGetSceneMetaData(GetHandle(), metaData.GetUnderlying());
}
inline const XnLabel* GetLabelMap() const
{
return xnGetLabelMap(GetHandle());
}
inline XnStatus GetFloor(XnPlane3D& Plane) const
{
return xnGetFloor(GetHandle(), &Plane);
}
};
class HandTouchingFOVEdgeCapability : public Capability
{
public:
inline HandTouchingFOVEdgeCapability(XnNodeHandle hNode) : Capability(hNode) {}
HandTouchingFOVEdgeCapability(const NodeWrapper& node) : Capability(node) {}
typedef void (XN_CALLBACK_TYPE* HandTouchingFOVEdge)(HandTouchingFOVEdgeCapability& touchingfov, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie);
inline XnStatus RegisterToHandTouchingFOVEdge(HandTouchingFOVEdge handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
HandTouchingFOVEdgeCookie* pHandCookie;
XN_VALIDATE_ALLOC(pHandCookie, HandTouchingFOVEdgeCookie);
pHandCookie->handler = handler;
pHandCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToHandTouchingFOVEdge(GetHandle(), HandTouchingFOVEdgeCB, pHandCookie, &pHandCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pHandCookie);
return (nRetVal);
}
hCallback = pHandCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromHandTouchingFOVEdge(XnCallbackHandle hCallback)
{
HandTouchingFOVEdgeCookie* pHandCookie = (HandTouchingFOVEdgeCookie*)hCallback;
xnUnregisterFromHandTouchingFOVEdge(GetHandle(), pHandCookie->hCallback);
xnOSFree(pHandCookie);
}
private:
typedef struct HandTouchingFOVEdgeCookie
{
HandTouchingFOVEdge handler;
void* pUserCookie;
XnCallbackHandle hCallback;
} HandTouchingFOVEdgeCookie;
static void XN_CALLBACK_TYPE HandTouchingFOVEdgeCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie)
{
HandTouchingFOVEdgeCookie* pHandCookie = (HandTouchingFOVEdgeCookie*)pCookie;
HandTouchingFOVEdgeCapability cap(hNode);
if (pHandCookie->handler != NULL)
{
pHandCookie->handler(cap, user, pPosition, fTime, eDir, pHandCookie->pUserCookie);
}
}
};
class HandsGenerator : public Generator
{
public:
inline HandsGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
inline HandsGenerator(const NodeWrapper& other) : Generator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
typedef void (XN_CALLBACK_TYPE* HandCreate)(HandsGenerator& generator, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie);
typedef void (XN_CALLBACK_TYPE* HandUpdate)(HandsGenerator& generator, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie);
typedef void (XN_CALLBACK_TYPE* HandDestroy)(HandsGenerator& generator, XnUserID user, XnFloat fTime, void* pCookie);
inline XnStatus RegisterHandCallbacks(HandCreate CreateCB, HandUpdate UpdateCB, HandDestroy DestroyCB, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
HandCookie* pHandCookie;
XN_VALIDATE_ALLOC(pHandCookie, HandCookie);
pHandCookie->createHandler = CreateCB;
pHandCookie->updateHandler = UpdateCB;
pHandCookie->destroyHandler = DestroyCB;
pHandCookie->pUserCookie = pCookie;
nRetVal = xnRegisterHandCallbacks(GetHandle(), HandCreateCB, HandUpdateCB, HandDestroyCB, pHandCookie, &pHandCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pHandCookie);
return (nRetVal);
}
hCallback = pHandCookie;
return (XN_STATUS_OK);
}
inline void UnregisterHandCallbacks(XnCallbackHandle hCallback)
{
HandCookie* pHandCookie = (HandCookie*)hCallback;
xnUnregisterHandCallbacks(GetHandle(), pHandCookie->hCallback);
xnOSFree(pHandCookie);
}
inline XnStatus StopTracking(XnUserID user)
{
return xnStopTracking(GetHandle(), user);
}
inline XnStatus StopTrackingAll()
{
return xnStopTrackingAll(GetHandle());
}
inline XnStatus StartTracking(const XnPoint3D& ptPosition)
{
return xnStartTracking(GetHandle(), &ptPosition);
}
inline XnStatus SetSmoothing(XnFloat fSmoothingFactor)
{
return xnSetTrackingSmoothing(GetHandle(), fSmoothingFactor);
}
inline const HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap() const
{
return HandTouchingFOVEdgeCapability(GetHandle());
}
inline HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap()
{
return HandTouchingFOVEdgeCapability(GetHandle());
}
private:
typedef struct HandCookie
{
HandCreate createHandler;
HandUpdate updateHandler;
HandDestroy destroyHandler;
void* pUserCookie;
XnCallbackHandle hCallback;
} HandCookie;
static void XN_CALLBACK_TYPE HandCreateCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie)
{
HandCookie* pHandCookie = (HandCookie*)pCookie;
HandsGenerator gen(hNode);
if (pHandCookie->createHandler != NULL)
{
pHandCookie->createHandler(gen, user, pPosition, fTime, pHandCookie->pUserCookie);
}
}
static void XN_CALLBACK_TYPE HandUpdateCB(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie)
{
HandCookie* pHandCookie = (HandCookie*)pCookie;
HandsGenerator gen(hNode);
if (pHandCookie->updateHandler != NULL)
{
pHandCookie->updateHandler(gen, user, pPosition, fTime, pHandCookie->pUserCookie);
}
}
static void XN_CALLBACK_TYPE HandDestroyCB(XnNodeHandle hNode, XnUserID user, XnFloat fTime, void* pCookie)
{
HandCookie* pHandCookie = (HandCookie*)pCookie;
HandsGenerator gen(hNode);
if (pHandCookie->destroyHandler != NULL)
{
pHandCookie->destroyHandler(gen, user, fTime, pHandCookie->pUserCookie);
}
}
};
class SkeletonCapability : public Capability
{
public:
inline SkeletonCapability(XnNodeHandle hNode) : Capability(hNode) {}
SkeletonCapability(const NodeWrapper& node) : Capability(node) {}
inline XnBool IsJointAvailable(XnSkeletonJoint eJoint) const
{
return xnIsJointAvailable(GetHandle(), eJoint);
}
inline XnBool IsProfileAvailable(XnSkeletonProfile eProfile) const
{
return xnIsProfileAvailable(GetHandle(), eProfile);
}
inline XnStatus SetSkeletonProfile(XnSkeletonProfile eProfile)
{
return xnSetSkeletonProfile(GetHandle(), eProfile);
}
inline XnStatus SetJointActive(XnSkeletonJoint eJoint, XnBool bState)
{
return xnSetJointActive(GetHandle(), eJoint, bState);
}
inline XnBool IsJointActive(XnSkeletonJoint eJoint) const
{
return xnIsJointActive(GetHandle(), eJoint);
}
inline XnStatus RegisterToJointConfigurationChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToJointConfigurationChange, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromJointConfigurationChange(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromJointConfigurationChange, GetHandle(), hCallback);
}
inline XnStatus EnumerateActiveJoints(XnSkeletonJoint* pJoints, XnUInt16& nJoints) const
{
return xnEnumerateActiveJoints(GetHandle(), pJoints, &nJoints);
}
inline XnStatus GetSkeletonJoint(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation& Joint) const
{
return xnGetSkeletonJoint(GetHandle(), user, eJoint, &Joint);
}
inline XnStatus GetSkeletonJointPosition(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointPosition& Joint) const
{
return xnGetSkeletonJointPosition(GetHandle(), user, eJoint, &Joint);
}
inline XnStatus GetSkeletonJointOrientation(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation& Joint) const
{
return xnGetSkeletonJointOrientation(GetHandle(), user, eJoint, &Joint);
}
inline XnBool IsTracking(XnUserID user) const
{
return xnIsSkeletonTracking(GetHandle(), user);
}
inline XnBool IsCalibrated(XnUserID user) const
{
return xnIsSkeletonCalibrated(GetHandle(), user);
}
inline XnBool IsCalibrating(XnUserID user) const
{
return xnIsSkeletonCalibrating(GetHandle(), user);
}
inline XnStatus RequestCalibration(XnUserID user, XnBool bForce)
{
return xnRequestSkeletonCalibration(GetHandle(), user, bForce);
}
inline XnStatus AbortCalibration(XnUserID user)
{
return xnAbortSkeletonCalibration(GetHandle(), user);
}
inline XnStatus SaveCalibrationDataToFile(XnUserID user, const XnChar* strFileName)
{
return xnSaveSkeletonCalibrationDataToFile(GetHandle(), user, strFileName);
}
inline XnStatus LoadCalibrationDataFromFile(XnUserID user, const XnChar* strFileName)
{
return xnLoadSkeletonCalibrationDataFromFile(GetHandle(), user, strFileName);
}
inline XnStatus SaveCalibrationData(XnUserID user, XnUInt32 nSlot)
{
return xnSaveSkeletonCalibrationData(GetHandle(), user, nSlot);
}
inline XnStatus LoadCalibrationData(XnUserID user, XnUInt32 nSlot)
{
return xnLoadSkeletonCalibrationData(GetHandle(), user, nSlot);
}
inline XnStatus ClearCalibrationData(XnUInt32 nSlot)
{
return xnClearSkeletonCalibrationData(GetHandle(), nSlot);
}
inline XnBool IsCalibrationData(XnUInt32 nSlot) const
{
return xnIsSkeletonCalibrationData(GetHandle(), nSlot);
}
inline XnStatus StartTracking(XnUserID user)
{
return xnStartSkeletonTracking(GetHandle(), user);
}
inline XnStatus StopTracking(XnUserID user)
{
return xnStopSkeletonTracking(GetHandle(), user);
}
inline XnStatus Reset(XnUserID user)
{
return xnResetSkeleton(GetHandle(), user);
}
inline XnBool NeedPoseForCalibration() const
{
return xnNeedPoseForSkeletonCalibration(GetHandle());
}
inline XnStatus GetCalibrationPose(XnChar* strPose) const
{
return xnGetSkeletonCalibrationPose(GetHandle(), strPose);
}
inline XnStatus SetSmoothing(XnFloat fSmoothingFactor)
{
return xnSetSkeletonSmoothing(GetHandle(), fSmoothingFactor);
}
typedef void (XN_CALLBACK_TYPE* CalibrationStart)(SkeletonCapability& skeleton, XnUserID user, void* pCookie);
typedef void (XN_CALLBACK_TYPE* CalibrationEnd)(SkeletonCapability& skeleton, XnUserID user, XnBool bSuccess, void* pCookie);
inline XnStatus RegisterToCalibrationStart(CalibrationStart handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
CalibrationStartCookie* pCalibrationCookie;
XN_VALIDATE_ALLOC(pCalibrationCookie, CalibrationStartCookie);
pCalibrationCookie->handler = handler;
pCalibrationCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToCalibrationStart(GetHandle(), CalibrationStartCallback, pCalibrationCookie, &pCalibrationCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pCalibrationCookie);
return nRetVal;
}
hCallback = pCalibrationCookie;
return XN_STATUS_OK;
}
inline XnStatus UnregisterFromCalibrationStart(XnCallbackHandle hCallback)
{
CalibrationStartCookie* pCalibrationCookie = (CalibrationStartCookie*)hCallback;
xnUnregisterFromCalibrationStart(GetHandle(), pCalibrationCookie->hCallback);
xnOSFree(pCalibrationCookie);
return XN_STATUS_OK;
}
typedef void (XN_CALLBACK_TYPE* CalibrationInProgress)(SkeletonCapability& skeleton, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie);
inline XnStatus RegisterToCalibrationInProgress(CalibrationInProgress handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
CalibrationInProgressCookie* pSkeletonCookie;
XN_VALIDATE_ALLOC(pSkeletonCookie, CalibrationInProgressCookie);
pSkeletonCookie->handler = handler;
pSkeletonCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToCalibrationInProgress(GetHandle(), CalibrationInProgressCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pSkeletonCookie);
return (nRetVal);
}
hCallback = pSkeletonCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromCalibrationInProgress(XnCallbackHandle hCallback)
{
CalibrationInProgressCookie* pSkeletonCookie = (CalibrationInProgressCookie*)hCallback;
xnUnregisterFromCalibrationInProgress(GetHandle(), pSkeletonCookie->hCallback);
xnOSFree(pSkeletonCookie);
}
typedef void (XN_CALLBACK_TYPE* CalibrationComplete)(SkeletonCapability& skeleton, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie);
inline XnStatus RegisterToCalibrationComplete(CalibrationComplete handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
CalibrationCompleteCookie* pSkeletonCookie;
XN_VALIDATE_ALLOC(pSkeletonCookie, CalibrationCompleteCookie);
pSkeletonCookie->handler = handler;
pSkeletonCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToCalibrationComplete(GetHandle(), CalibrationCompleteCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pSkeletonCookie);
return (nRetVal);
}
hCallback = pSkeletonCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromCalibrationComplete(XnCallbackHandle hCallback)
{
CalibrationCompleteCookie* pSkeletonCookie = (CalibrationCompleteCookie*)hCallback;
xnUnregisterFromCalibrationComplete(GetHandle(), pSkeletonCookie->hCallback);
xnOSFree(pSkeletonCookie);
}
XN_API_DEPRECATED("Use the overload with one argument - the bState parameter is useless")
inline XnBool IsJointActive(XnSkeletonJoint eJoint, XnBool /*bState*/) const
{
return xnIsJointActive(GetHandle(), eJoint);
}
inline XnStatus XN_API_DEPRECATED("Please use RegisterToCalibrationStart/Complete") RegisterCalibrationCallbacks(CalibrationStart CalibrationStartCB, CalibrationEnd CalibrationEndCB, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
SkeletonCookie* pSkeletonCookie;
XN_VALIDATE_ALLOC(pSkeletonCookie, SkeletonCookie);
pSkeletonCookie->startHandler = CalibrationStartCB;
pSkeletonCookie->endHandler = CalibrationEndCB;
pSkeletonCookie->pUserCookie = pCookie;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
nRetVal = xnRegisterCalibrationCallbacks(GetHandle(), CalibrationStartBundleCallback, CalibrationEndBundleCallback, pSkeletonCookie, &pSkeletonCookie->hCallback);
#pragma warning (pop)
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pSkeletonCookie);
return (nRetVal);
}
hCallback = pSkeletonCookie;
return (XN_STATUS_OK);
}
inline void XN_API_DEPRECATED("Please use UnregisterFromCalibrationStart/Complete") UnregisterCalibrationCallbacks(XnCallbackHandle hCallback)
{
SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)hCallback;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
xnUnregisterCalibrationCallbacks(GetHandle(), pSkeletonCookie->hCallback);
#pragma warning (pop)
xnOSFree(pSkeletonCookie);
}
private:
typedef struct SkeletonCookie
{
CalibrationStart startHandler;
CalibrationEnd endHandler;
void* pUserCookie;
XnCallbackHandle hCallback;
} SkeletonCookie;
static void XN_CALLBACK_TYPE CalibrationStartBundleCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
{
SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)pCookie;
SkeletonCapability cap(hNode);
if (pSkeletonCookie->startHandler != NULL)
{
pSkeletonCookie->startHandler(cap, user, pSkeletonCookie->pUserCookie);
}
}
static void XN_CALLBACK_TYPE CalibrationEndBundleCallback(XnNodeHandle hNode, XnUserID user, XnBool bSuccess, void* pCookie)
{
SkeletonCookie* pSkeletonCookie = (SkeletonCookie*)pCookie;
SkeletonCapability cap(hNode);
if (pSkeletonCookie->endHandler != NULL)
{
pSkeletonCookie->endHandler(cap, user, bSuccess, pSkeletonCookie->pUserCookie);
}
}
typedef struct CalibrationStartCookie
{
CalibrationStart handler;
void* pUserCookie;
XnCallbackHandle hCallback;
} CalibrationStartCookie;
static void XN_CALLBACK_TYPE CalibrationStartCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
{
CalibrationStartCookie* pCalibrationCookie = (CalibrationStartCookie*)pCookie;
SkeletonCapability cap(hNode);
if (pCalibrationCookie->handler != NULL)
{
pCalibrationCookie->handler(cap, user, pCalibrationCookie->pUserCookie);
}
}
typedef struct CalibrationInProgressCookie
{
CalibrationInProgress handler;
void* pUserCookie;
XnCallbackHandle hCallback;
} CalibrationInProgressCookie;
static void XN_CALLBACK_TYPE CalibrationInProgressCallback(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie)
{
CalibrationInProgressCookie* pSkeletonCookie = (CalibrationInProgressCookie*)pCookie;
SkeletonCapability cap(hNode);
if (pSkeletonCookie->handler != NULL)
{
pSkeletonCookie->handler(cap, user, calibrationError, pSkeletonCookie->pUserCookie);
}
}
typedef struct CalibrationCompleteCookie
{
CalibrationComplete handler;
void* pUserCookie;
XnCallbackHandle hCallback;
} CalibrationCompleteCookie;
static void XN_CALLBACK_TYPE CalibrationCompleteCallback(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie)
{
CalibrationCompleteCookie* pSkeletonCookie = (CalibrationCompleteCookie*)pCookie;
SkeletonCapability cap(hNode);
if (pSkeletonCookie->handler != NULL)
{
pSkeletonCookie->handler(cap, user, calibrationError, pSkeletonCookie->pUserCookie);
}
}
};
class PoseDetectionCapability : public Capability
{
public:
inline PoseDetectionCapability(XnNodeHandle hNode) : Capability(hNode) {}
PoseDetectionCapability(const NodeWrapper& node) : Capability(node) {}
typedef void (XN_CALLBACK_TYPE* PoseDetection)(PoseDetectionCapability& pose, const XnChar* strPose, XnUserID user, void* pCookie);
inline XnUInt32 GetNumberOfPoses() const
{
return xnGetNumberOfPoses(GetHandle());
}
inline XnStatus GetAllAvailablePoses(XnChar** pstrPoses, XnUInt32 nNameLength, XnUInt32& nPoses) const
{
return xnGetAllAvailablePoses(GetHandle(), pstrPoses, nNameLength, &nPoses);
}
inline XnBool IsPoseSupported(const XnChar* strPose)
{
return xnIsPoseSupported(GetHandle(), strPose);
}
inline XnStatus GetPoseStatus(XnUserID userID, const XnChar* poseName, XnUInt64& poseTime, XnPoseDetectionStatus& eStatus, XnPoseDetectionState& eState)
{
return xnGetPoseStatus(GetHandle(), userID, poseName, &poseTime, &eStatus, &eState);
}
inline XnStatus StartPoseDetection(const XnChar* strPose, XnUserID user)
{
return xnStartPoseDetection(GetHandle(), strPose, user);
}
inline XnStatus StopPoseDetection(XnUserID user)
{
return xnStopPoseDetection(GetHandle(), user);
}
inline XnStatus StopSinglePoseDetection(XnUserID user, const XnChar* strPose)
{
return xnStopSinglePoseDetection(GetHandle(), user, strPose);
}
inline XnStatus RegisterToPoseDetected(PoseDetection handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
PoseDetectionCookie* pPoseCookie;
XN_VALIDATE_ALLOC(pPoseCookie, PoseDetectionCookie);
pPoseCookie->handler = handler;
pPoseCookie->pPoseCookie = pCookie;
nRetVal = xnRegisterToPoseDetected(GetHandle(), PoseDetectionCallback, pPoseCookie, &pPoseCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pPoseCookie);
return nRetVal;
}
hCallback = pPoseCookie;
return XN_STATUS_OK;
}
inline XnStatus RegisterToOutOfPose(PoseDetection handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
PoseDetectionCookie* pPoseCookie;
XN_VALIDATE_ALLOC(pPoseCookie, PoseDetectionCookie);
pPoseCookie->handler = handler;
pPoseCookie->pPoseCookie = pCookie;
nRetVal = xnRegisterToOutOfPose(GetHandle(), PoseDetectionCallback, pPoseCookie, &pPoseCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pPoseCookie);
return nRetVal;
}
hCallback = pPoseCookie;
return XN_STATUS_OK;
}
inline void UnregisterFromPoseDetected(XnCallbackHandle hCallback)
{
PoseDetectionCookie* pPoseCookie = (PoseDetectionCookie*)hCallback;
xnUnregisterFromPoseDetected(GetHandle(), pPoseCookie->hCallback);
xnOSFree(pPoseCookie);
}
inline void UnregisterFromOutOfPose(XnCallbackHandle hCallback)
{
PoseDetectionCookie* pPoseCookie = (PoseDetectionCookie*)hCallback;
xnUnregisterFromOutOfPose(GetHandle(), pPoseCookie->hCallback);
xnOSFree(pPoseCookie);
}
typedef void (XN_CALLBACK_TYPE* PoseInProgress)(PoseDetectionCapability& pose, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseError, void* pCookie);
inline XnStatus RegisterToPoseInProgress(PoseInProgress handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
PoseInProgressCookie* pPoseCookie;
XN_VALIDATE_ALLOC(pPoseCookie, PoseInProgressCookie);
pPoseCookie->handler = handler;
pPoseCookie->pPoseCookie = pCookie;
nRetVal = xnRegisterToPoseDetectionInProgress(GetHandle(), PoseDetectionInProgressCallback, pPoseCookie, &pPoseCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pPoseCookie);
return (nRetVal);
}
hCallback = pPoseCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromPoseInProgress(XnCallbackHandle hCallback)
{
PoseInProgressCookie* pPoseCookie = (PoseInProgressCookie*)hCallback;
xnUnregisterFromPoseDetectionInProgress(GetHandle(), pPoseCookie->hCallback);
xnOSFree(pPoseCookie);
}
inline XnStatus XN_API_DEPRECATED("Use GetAllAvailablePoses() instead") GetAvailablePoses(XnChar** pstrPoses, XnUInt32& nPoses) const
{
return xnGetAvailablePoses(GetHandle(), pstrPoses, &nPoses);
}
inline XnStatus XN_API_DEPRECATED("Please use RegisterToPoseDetected/RegisterToOutOfPose instead") RegisterToPoseCallbacks(PoseDetection PoseStartCB, PoseDetection PoseEndCB, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
PoseCookie* pPoseCookie;
XN_VALIDATE_ALLOC(pPoseCookie, PoseCookie);
pPoseCookie->startHandler = PoseStartCB;
pPoseCookie->endHandler = PoseEndCB;
pPoseCookie->pPoseCookie = pCookie;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
nRetVal = xnRegisterToPoseCallbacks(GetHandle(), PoseDetectionStartBundleCallback, PoseDetectionStartEndBundleCallback, pPoseCookie, &pPoseCookie->hCallback);
#pragma warning (pop)
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pPoseCookie);
return (nRetVal);
}
hCallback = pPoseCookie;
return (XN_STATUS_OK);
}
inline void XN_API_DEPRECATED("Please use UnregisterFromPoseDetected/UnregisterFromOutOfPose instead") UnregisterFromPoseCallbacks(XnCallbackHandle hCallback)
{
PoseCookie* pPoseCookie = (PoseCookie*)hCallback;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
xnUnregisterFromPoseCallbacks(GetHandle(), pPoseCookie->hCallback);
#pragma warning (pop)
xnOSFree(pPoseCookie);
}
private:
typedef struct PoseCookie
{
PoseDetection startHandler;
PoseDetection endHandler;
void* pPoseCookie;
XnCallbackHandle hCallback;
} PoseCookie;
static void XN_CALLBACK_TYPE PoseDetectionStartBundleCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
{
PoseCookie* pPoseCookie = (PoseCookie*)pCookie;
PoseDetectionCapability cap(hNode);
if (pPoseCookie->startHandler != NULL)
{
pPoseCookie->startHandler(cap, strPose, user, pPoseCookie->pPoseCookie);
}
}
static void XN_CALLBACK_TYPE PoseDetectionStartEndBundleCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
{
PoseCookie* pPoseCookie = (PoseCookie*)pCookie;
PoseDetectionCapability cap(hNode);
if (pPoseCookie->endHandler != NULL)
{
pPoseCookie->endHandler(cap, strPose, user, pPoseCookie->pPoseCookie);
}
}
typedef struct PoseDetectionCookie
{
PoseDetection handler;
void* pPoseCookie;
XnCallbackHandle hCallback;
} PoseDetectionCookie;
static void XN_CALLBACK_TYPE PoseDetectionCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie)
{
PoseDetectionCookie* pPoseDetectionCookie = (PoseDetectionCookie*)pCookie;
PoseDetectionCapability cap(hNode);
if (pPoseDetectionCookie->handler != NULL)
{
pPoseDetectionCookie->handler(cap, strPose, user, pPoseDetectionCookie->pPoseCookie);
}
}
typedef struct PoseInProgressCookie
{
PoseInProgress handler;
void* pPoseCookie;
XnCallbackHandle hCallback;
} PoseInProgressCookie;
static void XN_CALLBACK_TYPE PoseDetectionInProgressCallback(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseErrors, void* pCookie)
{
PoseInProgressCookie* pPoseCookie = (PoseInProgressCookie*)pCookie;
PoseDetectionCapability cap(hNode);
if (pPoseCookie->handler != NULL)
{
pPoseCookie->handler(cap, strPose, user, poseErrors, pPoseCookie->pPoseCookie);
}
}
};
class UserGenerator : public Generator
{
public:
inline UserGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
inline UserGenerator(const NodeWrapper& other) : Generator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
typedef void (XN_CALLBACK_TYPE* UserHandler)(UserGenerator& generator, XnUserID user, void* pCookie);
inline XnUInt16 GetNumberOfUsers() const
{
return xnGetNumberOfUsers(GetHandle());
}
inline XnStatus GetUsers(XnUserID aUsers[], XnUInt16& nUsers) const
{
return xnGetUsers(GetHandle(), aUsers, &nUsers);
}
inline XnStatus GetCoM(XnUserID user, XnPoint3D& com) const
{
return xnGetUserCoM(GetHandle(), user, &com);
}
inline XnStatus GetUserPixels(XnUserID user, SceneMetaData& smd) const
{
return xnGetUserPixels(GetHandle(), user, smd.GetUnderlying());
}
inline XnStatus RegisterUserCallbacks(UserHandler NewUserCB, UserHandler LostUserCB, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
UserCookie* pUserCookie;
XN_VALIDATE_ALLOC(pUserCookie, UserCookie);
pUserCookie->newHandler = NewUserCB;
pUserCookie->lostHandler = LostUserCB;
pUserCookie->pUserCookie = pCookie;
nRetVal = xnRegisterUserCallbacks(GetHandle(), NewUserCallback, LostUserCallback, pUserCookie, &pUserCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pUserCookie);
return (nRetVal);
}
hCallback = pUserCookie;
return (XN_STATUS_OK);
}
inline void UnregisterUserCallbacks(XnCallbackHandle hCallback)
{
UserCookie* pUserCookie = (UserCookie*)hCallback;
xnUnregisterUserCallbacks(GetHandle(), pUserCookie->hCallback);
xnOSFree(pUserCookie);
}
inline const SkeletonCapability GetSkeletonCap() const
{
return SkeletonCapability(GetHandle());
}
inline SkeletonCapability GetSkeletonCap()
{
return SkeletonCapability(GetHandle());
}
inline const PoseDetectionCapability GetPoseDetectionCap() const
{
return PoseDetectionCapability(GetHandle());
}
inline PoseDetectionCapability GetPoseDetectionCap()
{
return PoseDetectionCapability(GetHandle());
}
inline XnStatus RegisterToUserExit(UserHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
UserSingleCookie* pUserCookie;
XN_VALIDATE_ALLOC(pUserCookie, UserSingleCookie);
pUserCookie->handler = handler;
pUserCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToUserExit(GetHandle(), UserSingleCallback, pUserCookie, &pUserCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pUserCookie);
return (nRetVal);
}
hCallback = pUserCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromUserExit(XnCallbackHandle hCallback)
{
UserSingleCookie* pUserCookie = (UserSingleCookie*)hCallback;
xnUnregisterFromUserExit(GetHandle(), pUserCookie->hCallback);
xnOSFree(pUserCookie);
}
inline XnStatus RegisterToUserReEnter(UserHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
UserSingleCookie* pUserCookie;
XN_VALIDATE_ALLOC(pUserCookie, UserSingleCookie);
pUserCookie->handler = handler;
pUserCookie->pUserCookie = pCookie;
nRetVal = xnRegisterToUserReEnter(GetHandle(), UserSingleCallback, pUserCookie, &pUserCookie->hCallback);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pUserCookie);
return (nRetVal);
}
hCallback = pUserCookie;
return (XN_STATUS_OK);
}
inline void UnregisterFromUserReEnter(XnCallbackHandle hCallback)
{
UserSingleCookie* pUserCookie = (UserSingleCookie*)hCallback;
xnUnregisterFromUserReEnter(GetHandle(), pUserCookie->hCallback);
xnOSFree(pUserCookie);
}
private:
typedef struct UserCookie
{
UserHandler newHandler;
UserHandler lostHandler;
void* pUserCookie;
XnCallbackHandle hCallback;
} UserCookie;
static void XN_CALLBACK_TYPE NewUserCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
{
UserCookie* pUserCookie = (UserCookie*)pCookie;
UserGenerator gen(hNode);
if (pUserCookie->newHandler != NULL)
{
pUserCookie->newHandler(gen, user, pUserCookie->pUserCookie);
}
}
static void XN_CALLBACK_TYPE LostUserCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
{
UserCookie* pUserCookie = (UserCookie*)pCookie;
UserGenerator gen(hNode);
if (pUserCookie->lostHandler != NULL)
{
pUserCookie->lostHandler(gen, user, pUserCookie->pUserCookie);
}
}
typedef struct UserSingleCookie
{
UserHandler handler;
void* pUserCookie;
XnCallbackHandle hCallback;
} UserSingleCookie;
static void XN_CALLBACK_TYPE UserSingleCallback(XnNodeHandle hNode, XnUserID user, void* pCookie)
{
UserSingleCookie* pUserCookie = (UserSingleCookie*)pCookie;
UserGenerator gen(hNode);
if (pUserCookie->handler != NULL)
{
pUserCookie->handler(gen, user, pUserCookie->pUserCookie);
}
}
};
class AudioGenerator : public Generator
{
public:
inline AudioGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
inline AudioGenerator(const NodeWrapper& other) : Generator(other) {}
inline XnStatus Create(Context& context, Query* pQuery = NULL, EnumerationErrors* pErrors = NULL);
inline void GetMetaData(AudioMetaData& metaData) const
{
xnGetAudioMetaData(GetHandle(), metaData.GetUnderlying());
}
inline const XnUChar* GetAudioBuffer() const
{
return xnGetAudioBuffer(GetHandle());
}
inline XnUInt32 GetSupportedWaveOutputModesCount() const
{
return xnGetSupportedWaveOutputModesCount(GetHandle());
}
inline XnStatus GetSupportedWaveOutputModes(XnWaveOutputMode* aSupportedModes, XnUInt32& nCount) const
{
return xnGetSupportedWaveOutputModes(GetHandle(), aSupportedModes, &nCount);
}
inline XnStatus SetWaveOutputMode(const XnWaveOutputMode& OutputMode)
{
return xnSetWaveOutputMode(GetHandle(), &OutputMode);
}
inline XnStatus GetWaveOutputMode(XnWaveOutputMode& OutputMode) const
{
return xnGetWaveOutputMode(GetHandle(), &OutputMode);
}
inline XnStatus RegisterToWaveOutputModeChanges(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return _RegisterToStateChange(xnRegisterToWaveOutputModeChanges, GetHandle(), handler, pCookie, hCallback);
}
inline void UnregisterFromWaveOutputModeChanges(XnCallbackHandle hCallback)
{
_UnregisterFromStateChange(xnUnregisterFromWaveOutputModeChanges, GetHandle(), hCallback);
}
};
class MockAudioGenerator : public AudioGenerator
{
public:
inline MockAudioGenerator(XnNodeHandle hNode = NULL) : AudioGenerator(hNode) {}
inline MockAudioGenerator(const NodeWrapper& other) : AudioGenerator(other) {}
XnStatus Create(Context& context, const XnChar* strName = NULL);
XnStatus CreateBasedOn(AudioGenerator& other, const XnChar* strName = NULL);
inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8* pAudioBuffer)
{
return xnMockAudioSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pAudioBuffer);
}
inline XnStatus SetData(const AudioMetaData& audioMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
{
return SetData(nFrameID, nTimestamp, audioMD.DataSize(), audioMD.Data());
}
inline XnStatus SetData(const AudioMetaData& audioMD)
{
return SetData(audioMD, audioMD.FrameID(), audioMD.Timestamp());
}
};
class MockRawGenerator : public Generator
{
public:
MockRawGenerator(XnNodeHandle hNode = NULL) : Generator(hNode) {}
MockRawGenerator(const NodeWrapper& other) : Generator(other) {}
inline XnStatus Create(Context& context, const XnChar* strName = NULL);
inline XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void* pData)
{
return xnMockRawSetData(GetHandle(), nFrameID, nTimestamp, nDataSize, pData);
}
};
class Codec : public ProductionNode
{
public:
inline Codec(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
inline Codec(const NodeWrapper& other) : ProductionNode(other) {}
inline XnStatus Create(Context& context, XnCodecID codecID, ProductionNode& initializerNode);
inline XnCodecID GetCodecID() const
{
return xnGetCodecID(GetHandle());
}
inline XnStatus EncodeData(const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) const
{
return xnEncodeData(GetHandle(), pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten);
}
inline XnStatus DecodeData(const void* pSrc, XnUInt32 nSrcSize, void* pDst, XnUInt32 nDstSize, XnUInt* pnBytesWritten) const
{
return xnDecodeData(GetHandle(), pSrc, nSrcSize, pDst, nDstSize, pnBytesWritten);
}
};
class ScriptNode : public ProductionNode
{
public:
inline ScriptNode(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
inline ScriptNode(const NodeWrapper& other) : ProductionNode(other) {}
inline XnStatus Create(Context& context, const XnChar* strFormat);
inline const XnChar* GetSupportedFormat()
{
return xnScriptNodeGetSupportedFormat(GetHandle());
}
inline XnStatus LoadScriptFromFile(const XnChar* strFileName)
{
return xnLoadScriptFromFile(GetHandle(), strFileName);
}
inline XnStatus LoadScriptFromString(const XnChar* strScript)
{
return xnLoadScriptFromString(GetHandle(), strScript);
}
inline XnStatus Run(EnumerationErrors* pErrors);
};
//---------------------------------------------------------------------------
// EnumerationErrors
//---------------------------------------------------------------------------
class EnumerationErrors
{
public:
inline EnumerationErrors() : m_bAllocated(TRUE), m_pErrors(NULL) { xnEnumerationErrorsAllocate(&m_pErrors); }
inline EnumerationErrors(XnEnumerationErrors* pErrors, XnBool bOwn = FALSE) : m_bAllocated(bOwn), m_pErrors(pErrors) {}
~EnumerationErrors() { Free(); }
class Iterator
{
public:
friend class EnumerationErrors;
XnBool operator==(const Iterator& other) const
{
return m_it == other.m_it;
}
XnBool operator!=(const Iterator& other) const
{
return m_it != other.m_it;
}
inline Iterator& operator++()
{
m_it = xnEnumerationErrorsGetNext(m_it);
return *this;
}
inline Iterator operator++(int)
{
return Iterator(xnEnumerationErrorsGetNext(m_it));
}
inline const XnProductionNodeDescription& Description() { return *xnEnumerationErrorsGetCurrentDescription(m_it); }
inline XnStatus Error() { return xnEnumerationErrorsGetCurrentError(m_it); }
private:
inline Iterator(XnEnumerationErrorsIterator it) : m_it(it) {}
XnEnumerationErrorsIterator m_it;
};
inline Iterator Begin() const { return Iterator(xnEnumerationErrorsGetFirst(m_pErrors)); }
inline Iterator End() const { return Iterator(NULL); }
inline XnStatus ToString(XnChar* csBuffer, XnUInt32 nSize)
{
return xnEnumerationErrorsToString(m_pErrors, csBuffer, nSize);
}
inline void Free()
{
if (m_bAllocated)
{
xnEnumerationErrorsFree(m_pErrors);
m_pErrors = NULL;
m_bAllocated = FALSE;
}
}
inline XnEnumerationErrors* GetUnderlying() { return m_pErrors; }
private:
XnEnumerationErrors* m_pErrors;
XnBool m_bAllocated;
};
//---------------------------------------------------------------------------
// Context
//---------------------------------------------------------------------------
class Context
{
public:
typedef void (XN_CALLBACK_TYPE* NodeCreationHandler)(Context& context, ProductionNode& createdNode, void* pCookie);
typedef void (XN_CALLBACK_TYPE* NodeDestructionHandler)(Context& context, const XnChar* strDestroyedNodeName, void* pCookie);
inline Context() : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL) {}
inline Context(XnContext* pContext) : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL)
{
SetHandle(pContext);
}
inline Context(const Context& other) : m_pContext(NULL), m_bUsingDeprecatedAPI(FALSE), m_bAllocated(FALSE), m_hShuttingDownCallback(NULL)
{
SetHandle(other.m_pContext);
}
~Context()
{
SetHandle(NULL);
}
inline Context& operator=(const Context& other)
{
SetHandle(other.m_pContext);
return *this;
}
inline XnContext* GetUnderlyingObject() const { return m_pContext; }
inline XnBool operator==(const Context& other)
{
return (GetUnderlyingObject() == other.GetUnderlyingObject());
}
inline XnBool operator!=(const Context& other)
{
return (GetUnderlyingObject() != other.GetUnderlyingObject());
}
inline XnStatus Init()
{
XnContext* pContext = NULL;
XnStatus nRetVal = xnInit(&pContext);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(pContext);
m_bAllocated = TRUE;
return (XN_STATUS_OK);
}
inline XnStatus RunXmlScript(const XnChar* strScript, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hScriptNode;
nRetVal = xnContextRunXmlScriptEx(m_pContext, strScript, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
XN_IS_STATUS_OK(nRetVal);
scriptNode.TakeOwnership(hScriptNode);
return (XN_STATUS_OK);
}
inline XnStatus RunXmlScriptFromFile(const XnChar* strFileName, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hScriptNode;
nRetVal = xnContextRunXmlScriptFromFileEx(m_pContext, strFileName, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
XN_IS_STATUS_OK(nRetVal);
scriptNode.TakeOwnership(hScriptNode);
return (XN_STATUS_OK);
}
inline XnStatus InitFromXmlFile(const XnChar* strFileName, ScriptNode& scriptNode, EnumerationErrors* pErrors = NULL)
{
XnContext* pContext = NULL;
XnNodeHandle hScriptNode;
XnStatus nRetVal = xnInitFromXmlFileEx(strFileName, &pContext, pErrors == NULL ? NULL : pErrors->GetUnderlying(), &hScriptNode);
XN_IS_STATUS_OK(nRetVal);
scriptNode.TakeOwnership(hScriptNode);
TakeOwnership(pContext);
m_bAllocated = TRUE;
return (XN_STATUS_OK);
}
inline XnStatus OpenFileRecording(const XnChar* strFileName, ProductionNode& playerNode)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hPlayer;
nRetVal = xnContextOpenFileRecordingEx(m_pContext, strFileName, &hPlayer);
XN_IS_STATUS_OK(nRetVal);
playerNode.TakeOwnership(hPlayer);
return (XN_STATUS_OK);
}
inline XnStatus CreateMockNode(XnProductionNodeType type, const XnChar* strName, ProductionNode& mockNode)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hMockNode;
nRetVal = xnCreateMockNode(m_pContext, type, strName, &hMockNode);
XN_IS_STATUS_OK(nRetVal);
mockNode.TakeOwnership(hMockNode);
return (XN_STATUS_OK);
}
inline XnStatus CreateMockNodeBasedOn(ProductionNode& originalNode, const XnChar* strName, ProductionNode& mockNode)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hMockNode;
nRetVal = xnCreateMockNodeBasedOn(m_pContext, originalNode, strName, &hMockNode);
XN_IS_STATUS_OK(nRetVal);
mockNode.TakeOwnership(hMockNode);
return (XN_STATUS_OK);
}
inline XnStatus CreateCodec(XnCodecID codecID, ProductionNode& initializerNode, Codec& codec)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hCodec;
nRetVal = xnCreateCodec(m_pContext, codecID, initializerNode.GetHandle(), &hCodec);
XN_IS_STATUS_OK(nRetVal);
codec.TakeOwnership(hCodec);
return (XN_STATUS_OK);
}
inline XnStatus AddRef()
{
return xnContextAddRef(m_pContext);
}
inline void Release()
{
SetHandle(NULL);
}
inline XnStatus AddLicense(const XnLicense& License)
{
return xnAddLicense(m_pContext, &License);
}
inline XnStatus EnumerateLicenses(XnLicense*& aLicenses, XnUInt32& nCount) const
{
return xnEnumerateLicenses(m_pContext, &aLicenses, &nCount);
}
inline static void FreeLicensesList(XnLicense aLicenses[])
{
xnFreeLicensesList(aLicenses);
}
XnStatus EnumerateProductionTrees(XnProductionNodeType Type, const Query* pQuery, NodeInfoList& TreesList, EnumerationErrors* pErrors = NULL) const
{
XnStatus nRetVal = XN_STATUS_OK;
const XnNodeQuery* pInternalQuery = (pQuery != NULL) ? pQuery->GetUnderlyingObject() : NULL;
XnNodeInfoList* pList = NULL;
nRetVal = xnEnumerateProductionTrees(m_pContext, Type, pInternalQuery, &pList, pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TreesList.ReplaceUnderlyingObject(pList);
return (XN_STATUS_OK);
}
XnStatus CreateAnyProductionTree(XnProductionNodeType type, Query* pQuery, ProductionNode& node, EnumerationErrors* pErrors = NULL)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeQuery* pInternalQuery = (pQuery != NULL) ? pQuery->GetUnderlyingObject() : NULL;
XnNodeHandle hNode;
nRetVal = xnCreateAnyProductionTree(m_pContext, type, pInternalQuery, &hNode, pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
node.TakeOwnership(hNode);
return (XN_STATUS_OK);
}
XnStatus CreateProductionTree(NodeInfo& Tree, ProductionNode& node)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hNode;
nRetVal = xnCreateProductionTree(m_pContext, Tree, &hNode);
XN_IS_STATUS_OK(nRetVal);
node.TakeOwnership(hNode);
return (XN_STATUS_OK);
}
XnStatus EnumerateExistingNodes(NodeInfoList& list) const
{
XnNodeInfoList* pList;
XnStatus nRetVal = xnEnumerateExistingNodes(m_pContext, &pList);
XN_IS_STATUS_OK(nRetVal);
list.ReplaceUnderlyingObject(pList);
return (XN_STATUS_OK);
}
XnStatus EnumerateExistingNodes(NodeInfoList& list, XnProductionNodeType type) const
{
XnNodeInfoList* pList;
XnStatus nRetVal = xnEnumerateExistingNodesByType(m_pContext, type, &pList);
XN_IS_STATUS_OK(nRetVal);
list.ReplaceUnderlyingObject(pList);
return (XN_STATUS_OK);
}
XnStatus FindExistingNode(XnProductionNodeType type, ProductionNode& node) const
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hNode;
nRetVal = xnFindExistingRefNodeByType(m_pContext, type, &hNode);
XN_IS_STATUS_OK(nRetVal);
node.TakeOwnership(hNode);
return (XN_STATUS_OK);
}
XnStatus GetProductionNodeByName(const XnChar* strInstanceName, ProductionNode& node) const
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hNode;
nRetVal = xnGetRefNodeHandleByName(m_pContext, strInstanceName, &hNode);
XN_IS_STATUS_OK(nRetVal);
node.TakeOwnership(hNode);
return (XN_STATUS_OK);
}
XnStatus GetProductionNodeInfoByName(const XnChar* strInstanceName, NodeInfo& nodeInfo) const
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hNode;
nRetVal = xnGetRefNodeHandleByName(m_pContext, strInstanceName, &hNode);
XN_IS_STATUS_OK(nRetVal);
xnProductionNodeRelease(hNode);
nodeInfo = NodeInfo(xnGetNodeInfo(hNode));
return (XN_STATUS_OK);
}
inline XnStatus StartGeneratingAll()
{
return xnStartGeneratingAll(m_pContext);
}
inline XnStatus StopGeneratingAll()
{
return xnStopGeneratingAll(m_pContext);
}
inline XnStatus SetGlobalMirror(XnBool bMirror)
{
return xnSetGlobalMirror(m_pContext, bMirror);
}
inline XnBool GetGlobalMirror()
{
return xnGetGlobalMirror(m_pContext);
}
inline XnStatus GetGlobalErrorState()
{
return xnGetGlobalErrorState(m_pContext);
}
inline XnStatus RegisterToErrorStateChange(XnErrorStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return xnRegisterToGlobalErrorStateChange(m_pContext, handler, pCookie, &hCallback);
}
inline void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
{
xnUnregisterFromGlobalErrorStateChange(m_pContext, hCallback);
}
inline XnStatus RegisterToNodeCreation(NodeCreationHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
NodeCreationCookie* pCreationCookie;
XN_VALIDATE_ALLOC(pCreationCookie, NodeCreationCookie);
pCreationCookie->pFunc = handler;
pCreationCookie->pCookie = pCookie;
nRetVal = xnRegisterToNodeCreation(m_pContext, NodeCreationCallback, pCreationCookie, &pCreationCookie->hUnderlyingCallback);
XN_IS_STATUS_OK(nRetVal);
hCallback = pCreationCookie;
return XN_STATUS_OK;
}
inline void UnregisterFromNodeCreation(XnCallbackHandle hCallback)
{
NodeCreationCookie* pCreationCookie = (NodeCreationCookie*)hCallback;
xnUnregisterFromNodeCreation(m_pContext, pCreationCookie->hUnderlyingCallback);
xnOSFree(pCreationCookie);
}
inline XnStatus RegisterToNodeDestruction(NodeDestructionHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
NodeDestructionCookie* pDestructionCookie;
XN_VALIDATE_ALLOC(pDestructionCookie, NodeDestructionCookie);
pDestructionCookie->pFunc = handler;
pDestructionCookie->pCookie = pCookie;
nRetVal = xnRegisterToNodeDestruction(m_pContext, NodeDestructionCallback, pDestructionCookie, &pDestructionCookie->hUnderlyingCallback);
XN_IS_STATUS_OK(nRetVal);
hCallback = pDestructionCookie;
return XN_STATUS_OK;
}
inline void UnregisterFromNodeDestruction(XnCallbackHandle hCallback)
{
NodeDestructionCookie* pDestructionCookie = (NodeDestructionCookie*)hCallback;
xnUnregisterFromNodeDestruction(m_pContext, pDestructionCookie->hUnderlyingCallback);
xnOSFree(pDestructionCookie);
}
inline XnStatus WaitAndUpdateAll()
{
return xnWaitAndUpdateAll(m_pContext);
}
inline XnStatus WaitAnyUpdateAll()
{
return xnWaitAnyUpdateAll(m_pContext);
}
inline XnStatus WaitOneUpdateAll(ProductionNode& node)
{
return xnWaitOneUpdateAll(m_pContext, node.GetHandle());
}
inline XnStatus WaitNoneUpdateAll()
{
return xnWaitNoneUpdateAll(m_pContext);
}
inline XnStatus AutoEnumerateOverSingleInput(NodeInfoList& List, XnProductionNodeDescription& description, const XnChar* strCreationInfo, XnProductionNodeType InputType, EnumerationErrors* pErrors, Query* pQuery = NULL) const
{
return xnAutoEnumerateOverSingleInput(m_pContext, List.GetUnderlyingObject(), &description, strCreationInfo, InputType, pErrors == NULL ? NULL : pErrors->GetUnderlying(), pQuery == NULL ? NULL : pQuery->GetUnderlyingObject());
}
inline void SetHandle(XnContext* pContext)
{
if (m_pContext == pContext)
{
return;
}
if (m_pContext != NULL)
{
if (m_bUsingDeprecatedAPI && m_bAllocated)
{
// Backwards compatibility: call shutdown instead of release, to make old programs get the
// exact same behavior they used to have.
xnForceShutdown(m_pContext);
}
else
{
xnContextUnregisterFromShutdown(m_pContext, m_hShuttingDownCallback);
xnContextRelease(m_pContext);
}
}
if (pContext != NULL)
{
XnStatus nRetVal = xnContextAddRef(pContext);
XN_ASSERT(nRetVal == XN_STATUS_OK);
XN_REFERENCE_VARIABLE(nRetVal);
nRetVal = xnContextRegisterForShutdown(pContext, ContextShuttingDownCallback, this, &m_hShuttingDownCallback);
XN_ASSERT(nRetVal == XN_STATUS_OK);
}
m_pContext = pContext;
}
inline void TakeOwnership(XnContext* pContext)
{
SetHandle(pContext);
if (pContext != NULL)
{
xnContextRelease(pContext);
}
}
inline XnStatus XN_API_DEPRECATED("Use other overload!") RunXmlScript(const XnChar* strScript, EnumerationErrors* pErrors = NULL)
{
m_bUsingDeprecatedAPI = TRUE;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
return xnContextRunXmlScript(m_pContext, strScript, pErrors == NULL ? NULL : pErrors->GetUnderlying());
#pragma warning (pop)
}
inline XnStatus XN_API_DEPRECATED("Use other overload!") RunXmlScriptFromFile(const XnChar* strFileName, EnumerationErrors* pErrors = NULL)
{
m_bUsingDeprecatedAPI = TRUE;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
return xnContextRunXmlScriptFromFile(m_pContext, strFileName, pErrors == NULL ? NULL : pErrors->GetUnderlying());
#pragma warning (pop)
}
inline XnStatus XN_API_DEPRECATED("Use other overload!") InitFromXmlFile(const XnChar* strFileName, EnumerationErrors* pErrors = NULL)
{
XnContext* pContext = NULL;
m_bUsingDeprecatedAPI = TRUE;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
XnStatus nRetVal = xnInitFromXmlFile(strFileName, &pContext, pErrors == NULL ? NULL : pErrors->GetUnderlying());
#pragma warning (pop)
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(pContext);
m_bAllocated = TRUE;
return (XN_STATUS_OK);
}
inline XnStatus XN_API_DEPRECATED("Use other overload!") OpenFileRecording(const XnChar* strFileName)
{
m_bUsingDeprecatedAPI = TRUE;
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
return xnContextOpenFileRecording(m_pContext, strFileName);
#pragma warning (pop)
}
inline void XN_API_DEPRECATED("You may use Release() instead, or count on dtor") Shutdown()
{
if (m_pContext != NULL)
{
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
xnShutdown(m_pContext);
#pragma warning (pop)
m_pContext = NULL;
}
}
XnStatus XN_API_DEPRECATED("Please use other overload") CreateProductionTree(NodeInfo& Tree)
{
XnStatus nRetVal = XN_STATUS_OK;
XnNodeHandle hNode;
nRetVal = xnCreateProductionTree(m_pContext, Tree, &hNode);
XN_IS_STATUS_OK(nRetVal);
Tree.m_bOwnerOfNode = TRUE;
return (XN_STATUS_OK);
}
private:
typedef struct NodeCreationCookie
{
NodeCreationHandler pFunc;
void* pCookie;
XnCallbackHandle hUnderlyingCallback;
} NodeCreationCookie;
typedef struct NodeDestructionCookie
{
NodeDestructionHandler pFunc;
void* pCookie;
XnCallbackHandle hUnderlyingCallback;
} NodeDestructionCookie;
static void XN_CALLBACK_TYPE NodeCreationCallback(XnContext* pContext, XnNodeHandle hCreatedNode, void* pCookie)
{
NodeCreationCookie* pNodeCreationCookie = (NodeCreationCookie*)pCookie;
Context context(pContext);
ProductionNode createdNode(hCreatedNode);
pNodeCreationCookie->pFunc(context, createdNode, pNodeCreationCookie->pCookie);
}
static void XN_CALLBACK_TYPE NodeDestructionCallback(XnContext* pContext, const XnChar* strDestroyedNodeName, void* pCookie)
{
NodeDestructionCookie* pNodeCreationCookie = (NodeDestructionCookie*)pCookie;
Context context(pContext);
pNodeCreationCookie->pFunc(context, strDestroyedNodeName, pNodeCreationCookie->pCookie);
}
static void XN_CALLBACK_TYPE ContextShuttingDownCallback(XnContext* /*pContext*/, void* pCookie)
{
Context* pThis = (Context*)pCookie;
pThis->m_pContext = NULL;
}
XnContext* m_pContext;
XnBool m_bUsingDeprecatedAPI;
XnBool m_bAllocated;
XnCallbackHandle m_hShuttingDownCallback;
};
class Resolution
{
public:
inline Resolution(XnResolution res) : m_Res(res)
{
m_nXRes = xnResolutionGetXRes(res);
m_nYRes = xnResolutionGetYRes(res);
m_strName = xnResolutionGetName(res);
}
inline Resolution(XnUInt32 xRes, XnUInt32 yRes) : m_nXRes(xRes), m_nYRes(yRes)
{
m_Res = xnResolutionGetFromXYRes(xRes, yRes);
m_strName = xnResolutionGetName(m_Res);
}
inline Resolution(const XnChar* strName)
{
m_Res = xnResolutionGetFromName(strName);
m_nXRes = xnResolutionGetXRes(m_Res);
m_nYRes = xnResolutionGetYRes(m_Res);
m_strName = xnResolutionGetName(m_Res);
}
inline XnResolution GetResolution() const { return m_Res; }
inline XnUInt32 GetXResolution() const { return m_nXRes; }
inline XnUInt32 GetYResolution() const { return m_nYRes; }
inline const XnChar* GetName() const { return m_strName; }
private:
XnResolution m_Res;
XnUInt32 m_nXRes;
XnUInt32 m_nYRes;
const XnChar* m_strName;
};
//---------------------------------------------------------------------------
// Functions Implementation
//---------------------------------------------------------------------------
inline XnStatus NodeInfoList::FilterList(Context& context, Query& query)
{
return xnNodeQueryFilterList(context.GetUnderlyingObject(), query.GetUnderlyingObject(), m_pList);
}
inline void ProductionNode::GetContext(Context& context) const
{
context.TakeOwnership(xnGetRefContextFromNodeHandle(GetHandle()));
}
inline Context ProductionNode::GetContext() const
{
XnContext* pContext = xnGetRefContextFromNodeHandle(GetHandle());
Context result(pContext);
xnContextRelease(pContext);
return result;
}
inline NodeInfoList& NodeInfo::GetNeededNodes() const
{
if (m_pNeededNodes == NULL)
{
XnNodeInfoList* pList = xnNodeInfoGetNeededNodes(m_pInfo);
m_pNeededNodes = XN_NEW(NodeInfoList, pList);
}
return *m_pNeededNodes;
}
inline void NodeInfo::SetUnderlyingObject(XnNodeInfo* pInfo)
{
if (m_pNeededNodes != NULL)
{
XN_DELETE(m_pNeededNodes);
}
m_bOwnerOfNode = FALSE;
m_pInfo = pInfo;
m_pNeededNodes = NULL;
}
inline XnBool FrameSyncCapability::CanFrameSyncWith(Generator& other) const
{
return xnCanFrameSyncWith(GetHandle(), other.GetHandle());
}
inline XnStatus FrameSyncCapability::FrameSyncWith(Generator& other)
{
return xnFrameSyncWith(GetHandle(), other.GetHandle());
}
inline XnStatus FrameSyncCapability::StopFrameSyncWith(Generator& other)
{
return xnStopFrameSyncWith(GetHandle(), other.GetHandle());
}
inline XnBool FrameSyncCapability::IsFrameSyncedWith(Generator& other) const
{
return xnIsFrameSyncedWith(GetHandle(), other.GetHandle());
}
inline XnStatus NodeInfo::GetInstance(ProductionNode& node) const
{
if (m_pInfo == NULL)
{
return XN_STATUS_INVALID_OPERATION;
}
XnNodeHandle hNode = xnNodeInfoGetRefHandle(m_pInfo);
node.TakeOwnership(hNode);
if (m_bOwnerOfNode)
{
xnProductionNodeRelease(hNode);
}
return (XN_STATUS_OK);
}
//---------------------------------------------------------------------------
// Node creation functions
//---------------------------------------------------------------------------
inline XnStatus Device::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateDevice(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus Recorder::Create(Context& context, const XnChar* strFormatName /*= NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateRecorder(context.GetUnderlyingObject(), strFormatName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus Player::Create(Context& context, const XnChar* strFormatName)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreatePlayer(context.GetUnderlyingObject(), strFormatName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus DepthGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateDepthGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockDepthGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_DEPTH, strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockDepthGenerator::CreateBasedOn(DepthGenerator& other, const XnChar* strName /* = NULL */)
{
Context context;
other.GetContext(context);
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus ImageGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateImageGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockImageGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_IMAGE, strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockImageGenerator::CreateBasedOn(ImageGenerator& other, const XnChar* strName /* = NULL */)
{
Context context;
other.GetContext(context);
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus IRGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateIRGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockIRGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_IR, strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockIRGenerator::CreateBasedOn(IRGenerator& other, const XnChar* strName /* = NULL */)
{
Context context;
other.GetContext(context);
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus GestureGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateGestureGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus SceneAnalyzer::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
//You're creating a scene!
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateSceneAnalyzer(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus HandsGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateHandsGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus UserGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateUserGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus AudioGenerator::Create(Context& context, Query* pQuery/*=NULL*/, EnumerationErrors* pErrors/*=NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateAudioGenerator(context.GetUnderlyingObject(), &hNode, pQuery == NULL ? NULL : pQuery->GetUnderlyingObject(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockAudioGenerator::Create(Context& context, const XnChar* strName /* = NULL */)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_AUDIO, strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockAudioGenerator::CreateBasedOn(AudioGenerator& other, const XnChar* strName /* = NULL */)
{
Context context;
other.GetContext(context);
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNodeBasedOn(context.GetUnderlyingObject(), other.GetHandle(), strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus MockRawGenerator::Create(Context& context, const XnChar* strName /*= NULL*/)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateMockNode(context.GetUnderlyingObject(), XN_NODE_TYPE_GENERATOR, strName, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus Codec::Create(Context& context, XnCodecID codecID, ProductionNode& initializerNode)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateCodec(context.GetUnderlyingObject(), codecID, initializerNode.GetHandle(), &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
inline XnStatus ScriptNode::Run(EnumerationErrors* pErrors)
{
return xnScriptNodeRun(GetHandle(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
}
inline XnStatus ScriptNode::Create(Context& context, const XnChar* strFormat)
{
XnNodeHandle hNode;
XnStatus nRetVal = xnCreateScriptNode(context.GetUnderlyingObject(), strFormat, &hNode);
XN_IS_STATUS_OK(nRetVal);
TakeOwnership(hNode);
return (XN_STATUS_OK);
}
//---------------------------------------------------------------------------
// Global Helper Functions
//---------------------------------------------------------------------------
inline void XN_API_DEPRECATED("Use xn::Version::Current() instead") GetVersion(XnVersion& Version)
{
xnGetVersion(&Version);
}
//---------------------------------------------------------------------------
// Internal Helper Classes and Functions
//---------------------------------------------------------------------------
class StateChangedCallbackTranslator
{
public:
StateChangedCallbackTranslator(StateChangedHandler handler, void* pCookie) : m_UserHandler(handler), m_pUserCookie(pCookie), m_hCallback(NULL) {}
XnStatus Register(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
{
return xnFunc(hNode, StateChangedCallback, this, &m_hCallback);
}
void Unregister(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
{
xnFunc(hNode, m_hCallback);
}
static XnStatus RegisterToUnderlying(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
StateChangedCallbackTranslator* pTrans;
XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
nRetVal = pTrans->Register(xnFunc, hNode);
if (nRetVal != XN_STATUS_OK)
{
XN_DELETE(pTrans);
return (nRetVal);
}
hCallback = pTrans;
return (XN_STATUS_OK);
}
static XnStatus UnregisterFromUnderlying(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
{
StateChangedCallbackTranslator* pTrans = (StateChangedCallbackTranslator*)hCallback;
pTrans->Unregister(xnFunc, hNode);
XN_DELETE(pTrans);
return XN_STATUS_OK;
}
private:
friend class GeneralIntCapability;
typedef struct StateChangeCookie
{
StateChangedHandler userHandler;
void* pUserCookie;
XnCallbackHandle hCallback;
} StateChangeCookie;
static void XN_CALLBACK_TYPE StateChangedCallback(XnNodeHandle hNode, void* pCookie)
{
StateChangedCallbackTranslator* pTrans = (StateChangedCallbackTranslator*)pCookie;
ProductionNode node(hNode);
pTrans->m_UserHandler(node, pTrans->m_pUserCookie);
}
StateChangedHandler m_UserHandler;
void* m_pUserCookie;
XnCallbackHandle m_hCallback;
};
static XnStatus _RegisterToStateChange(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
return StateChangedCallbackTranslator::RegisterToUnderlying(xnFunc, hNode, handler, pCookie, hCallback);
}
static void _UnregisterFromStateChange(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
{
StateChangedCallbackTranslator::UnregisterFromUnderlying(xnFunc, hNode, hCallback);
}
inline XnStatus GeneralIntCapability::RegisterToValueChange(StateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
{
XnStatus nRetVal = XN_STATUS_OK;
StateChangedCallbackTranslator* pTrans;
XN_VALIDATE_NEW(pTrans, StateChangedCallbackTranslator, handler, pCookie);
nRetVal = xnRegisterToGeneralIntValueChange(GetHandle(), m_strCap, pTrans->StateChangedCallback, pTrans, &pTrans->m_hCallback);
if (nRetVal != XN_STATUS_OK)
{
XN_DELETE(pTrans);
return (nRetVal);
}
hCallback = pTrans;
return (XN_STATUS_OK);
}
inline void GeneralIntCapability::UnregisterFromValueChange(XnCallbackHandle hCallback)
{
StateChangedCallbackTranslator* pTrans = (StateChangedCallbackTranslator*)hCallback;
xnUnregisterFromGeneralIntValueChange(GetHandle(), m_strCap, pTrans->m_hCallback);
XN_DELETE(pTrans);
}
};
#endif // __XN_CPP_WRAPPER_H__
XnCodecIDs.h
XN_CODEC_NULL
#define XN_CODEC_NULL
Definition XnCodecIDs.h:27
XN_IS_STATUS_OK
#define XN_IS_STATUS_OK(x)
Definition XnMacros.h:60
XN_REFERENCE_VARIABLE
#define XN_REFERENCE_VARIABLE(x)
Definition XnMacros.h:125
XN_VALIDATE_ALLOC_PTR
#define XN_VALIDATE_ALLOC_PTR(x)
Definition XnOS.h:128
XN_VALIDATE_ALLOC
#define XN_VALIDATE_ALLOC(x, y)
Definition XnOS.h:131
XN_DELETE
#define XN_DELETE(p)
Definition XnOS.h:336
XN_NEW
#define XN_NEW(type,...)
Definition XnOS.h:326
XN_VALIDATE_NEW
#define XN_VALIDATE_NEW(ptr, type,...)
Definition XnOS.h:168
xnOSFreeAligned
XN_C_API void XN_C_DECL xnOSFreeAligned(const void *pMemBlock)
xnOSMallocAligned
XN_C_API void *XN_C_DECL xnOSMallocAligned(const XnSizeT nAllocSize, const XnSizeT nAlignment)
xnOSMemCopy
XN_C_API void XN_C_DECL xnOSMemCopy(void *pDest, const void *pSource, XnSizeT nCount)
xnOSMemSet
XN_C_API void XN_C_DECL xnOSMemSet(void *pDest, XnUInt8 nValue, XnSizeT nCount)
xnOSFree
XN_C_API void XN_C_DECL xnOSFree(const void *pMemBlock)
XnOpenNI.h
TRUE
#define TRUE
Definition XnPlatform.h:96
FALSE
#define FALSE
Definition XnPlatform.h:100
XnStatus
XnUInt32 XnStatus
Definition XnStatus.h:34
XN_STATUS_OK
#define XN_STATUS_OK
Definition XnStatus.h:37
XN_CAPABILITY_BACKLIGHT_COMPENSATION
#define XN_CAPABILITY_BACKLIGHT_COMPENSATION
Definition XnTypes.h:331
XnCodecID
XnUInt32 XnCodecID
Definition XnTypes.h:839
XnGrayscale8Pixel
XnUInt8 XnGrayscale8Pixel
Definition XnTypes.h:299
XN_CAPABILITY_CONTRAST
#define XN_CAPABILITY_CONTRAST
Definition XnTypes.h:325
XnPixelFormat
XnPixelFormat
Definition XnTypes.h:512
XN_PIXEL_FORMAT_YUV422
@ XN_PIXEL_FORMAT_YUV422
Definition XnTypes.h:514
XN_PIXEL_FORMAT_MJPEG
@ XN_PIXEL_FORMAT_MJPEG
Definition XnTypes.h:517
XN_PIXEL_FORMAT_GRAYSCALE_16_BIT
@ XN_PIXEL_FORMAT_GRAYSCALE_16_BIT
Definition XnTypes.h:516
XN_PIXEL_FORMAT_GRAYSCALE_8_BIT
@ XN_PIXEL_FORMAT_GRAYSCALE_8_BIT
Definition XnTypes.h:515
XN_PIXEL_FORMAT_RGB24
@ XN_PIXEL_FORMAT_RGB24
Definition XnTypes.h:513
XnResolution
XnResolution
Definition XnTypes.h:408
XN_CAPABILITY_GAMMA
#define XN_CAPABILITY_GAMMA
Definition XnTypes.h:329
XnPoint3D
XnVector3D XnPoint3D
Definition XnTypes.h:472
XN_CAPABILITY_GAIN
#define XN_CAPABILITY_GAIN
Definition XnTypes.h:332
XnSkeletonProfile
XnSkeletonProfile
Definition XnTypes.h:645
XnPoseDetectionStatus
XnPoseDetectionStatus
Definition XnTypes.h:664
XN_CAPABILITY_SATURATION
#define XN_CAPABILITY_SATURATION
Definition XnTypes.h:327
XnNodeInfoListIterator
struct XnNodeInfoListIterator XnNodeInfoListIterator
XN_CAPABILITY_TILT
#define XN_CAPABILITY_TILT
Definition XnTypes.h:334
XnPowerLineFrequency
XnPowerLineFrequency
Definition XnTypes.h:539
XnGrayscale16Pixel
XnUInt16 XnGrayscale16Pixel
Definition XnTypes.h:302
XN_CAPABILITY_EXPOSURE
#define XN_CAPABILITY_EXPOSURE
Definition XnTypes.h:337
XnPlayerSeekOrigin
XnPlayerSeekOrigin
Definition XnTypes.h:532
XnCallbackHandle
void * XnCallbackHandle
Definition XnTypes.h:268
XN_CAPABILITY_COLOR_TEMPERATURE
#define XN_CAPABILITY_COLOR_TEMPERATURE
Definition XnTypes.h:330
XN_CAPABILITY_HUE
#define XN_CAPABILITY_HUE
Definition XnTypes.h:326
XnFreeHandler
void(* XnFreeHandler)(const void *pData)
Definition XnTypes.h:242
XN_CAPABILITY_ROLL
#define XN_CAPABILITY_ROLL
Definition XnTypes.h:335
XnLockHandle
XnUInt32 XnLockHandle
Definition XnTypes.h:87
XnIRPixel
XnGrayscale16Pixel XnIRPixel
Definition XnTypes.h:305
XnNodeInfoList
struct XnNodeInfoList XnNodeInfoList
Definition XnTypes.h:187
XnUserID
XnUInt32 XnUserID
Definition XnTypes.h:546
XN_CAPABILITY_IRIS
#define XN_CAPABILITY_IRIS
Definition XnTypes.h:338
XN_CAPABILITY_PAN
#define XN_CAPABILITY_PAN
Definition XnTypes.h:333
XnErrorStateChangedHandler
void(* XnErrorStateChangedHandler)(XnStatus errorState, void *pCookie)
Definition XnTypes.h:235
XN_CAPABILITY_FOCUS
#define XN_CAPABILITY_FOCUS
Definition XnTypes.h:339
XnNodeInfo
struct XnNodeInfo XnNodeInfo
Definition XnTypes.h:177
XN_CAPABILITY_LOW_LIGHT_COMPENSATION
#define XN_CAPABILITY_LOW_LIGHT_COMPENSATION
Definition XnTypes.h:340
XN_CAPABILITY_SHARPNESS
#define XN_CAPABILITY_SHARPNESS
Definition XnTypes.h:328
XN_CAPABILITY_ZOOM
#define XN_CAPABILITY_ZOOM
Definition XnTypes.h:336
XnProductionNodeType
XnInt32 XnProductionNodeType
Definition XnTypes.h:92
XnDirection
XnDirection
Definition XnTypes.h:699
XnSkeletonJoint
XnSkeletonJoint
Definition XnTypes.h:612
XnPoseDetectionState
XnPoseDetectionState
Definition XnTypes.h:676
XnNodeQuery
struct XnNodeQuery XnNodeQuery
Definition XnTypes.h:197
XnCalibrationStatus
XnCalibrationStatus
Definition XnTypes.h:683
XN_NODE_TYPE_DEPTH
@ XN_NODE_TYPE_DEPTH
Definition XnTypes.h:106
XN_NODE_TYPE_IR
@ XN_NODE_TYPE_IR
Definition XnTypes.h:115
XN_NODE_TYPE_IMAGE
@ XN_NODE_TYPE_IMAGE
Definition XnTypes.h:109
XN_NODE_TYPE_AUDIO
@ XN_NODE_TYPE_AUDIO
Definition XnTypes.h:112
XN_NODE_TYPE_GENERATOR
@ XN_NODE_TYPE_GENERATOR
Definition XnTypes.h:140
XnStateChangedHandler
void(* XnStateChangedHandler)(XnNodeHandle hNode, void *pCookie)
Definition XnTypes.h:227
XnDepthPixel
XnUInt16 XnDepthPixel
Definition XnTypes.h:276
XN_CAPABILITY_BRIGHTNESS
#define XN_CAPABILITY_BRIGHTNESS
Definition XnTypes.h:324
XnNodeHandle
struct XnInternalNodeData * XnNodeHandle
Definition XnTypes.h:82
XnLabel
XnUInt16 XnLabel
Definition XnTypes.h:308
XnContext
struct XnContext XnContext
Definition XnTypes.h:77
xn::AlternativeViewPointCapability
Definition XnCppWrapper.h:3104
xn::AlternativeViewPointCapability::UnregisterFromViewPointChange
void UnregisterFromViewPointChange(XnCallbackHandle hCallback)
Unregisters the event handler for the the 'Viewpoint Change' event.
Definition XnCppWrapper.h:3181
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:3135
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:3123
xn::AlternativeViewPointCapability::ResetViewPoint
XnStatus ResetViewPoint()
Sets the viewpoint of the holding generator node to its normal viewpoint.
Definition XnCppWrapper.h:3143
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:3169
xn::AlternativeViewPointCapability::AlternativeViewPointCapability
AlternativeViewPointCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:3106
xn::AlternativeViewPointCapability::AlternativeViewPointCapability
AlternativeViewPointCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:3107
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:3155
xn::AntiFlickerCapability
Definition XnCppWrapper.h:4175
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 u...
Definition XnCppWrapper.h:4189
xn::AntiFlickerCapability::UnregisterFromPowerLineFrequencyChange
void UnregisterFromPowerLineFrequencyChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Power Line Frequency Change' event.
Definition XnCppWrapper.h:4224
xn::AntiFlickerCapability::AntiFlickerCapability
AntiFlickerCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:4183
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:4212
xn::AntiFlickerCapability::GetPowerLineFrequency
XnPowerLineFrequency GetPowerLineFrequency()
Gets the power line frequency. For full details and usage, see xnGetPowerLineFrequency
Definition XnCppWrapper.h:4198
xn::AntiFlickerCapability::AntiFlickerCapability
AntiFlickerCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:4182
xn::AudioGenerator
Definition XnCppWrapper.h:8039
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:9925
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:8074
xn::AudioGenerator::GetAudioBuffer
const XnUChar * GetAudioBuffer() const
For full details and usage, see xnGetAudioBuffer
Definition XnCppWrapper.h:8083
xn::AudioGenerator::AudioGenerator
AudioGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:8047
xn::AudioGenerator::UnregisterFromWaveOutputModeChanges
void UnregisterFromWaveOutputModeChanges(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Wave Output Mode Change' event.
Definition XnCppWrapper.h:8160
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:8148
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:8134
xn::AudioGenerator::AudioGenerator
AudioGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:8046
xn::AudioGenerator::GetSupportedWaveOutputModesCount
XnUInt32 GetSupportedWaveOutputModesCount() const
Gets the node's number of supported wave output modes.
Definition XnCppWrapper.h:8091
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:8118
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:8102
xn::AudioMetaData
Definition XnCppWrapper.h:1375
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:1410
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:1419
xn::AudioMetaData::XN_PRAGMA_STOP_DISABLED_WARNING_SECTION
XN_PRAGMA_STOP_DISABLED_WARNING_SECTION
Definition XnCppWrapper.h:1384
xn::AudioMetaData::GetUnderlying
const XnAudioMetaData * GetUnderlying() const
Definition XnCppWrapper.h:1428
xn::AudioMetaData::BitsPerSample
XnUInt16 & BitsPerSample()
Gets the number of bits per channel in a sample. This is a packet configuration setting associated wi...
Definition XnCppWrapper.h:1423
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:1401
xn::AudioMetaData::XN_PRAGMA_START_DISABLED_WARNING_SECTION
XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_UNALIGNED_ADDRESS_WARNING_ID)
xn::AudioMetaData::GetUnderlying
XnAudioMetaData * GetUnderlying()
Definition XnCppWrapper.h:1432
xn::AudioMetaData::SampleRate
XnUInt32 & SampleRate()
Gets the rate at which the audio interface was sampled. This is a packet configuration setting associ...
Definition XnCppWrapper.h:1414
xn::AudioMetaData::InitFrom
void InitFrom(const AudioMetaData &other)
Shallow-Copies an AudioMetaData object.
Definition XnCppWrapper.h:1393
xn::AudioMetaData::AudioMetaData
AudioMetaData()
Definition XnCppWrapper.h:1378
xn::AudioMetaData::NumberOfChannels
XnUInt8 & NumberOfChannels()
Gets the number of channels in each sample. This is a packet configuration setting associated with th...
Definition XnCppWrapper.h:1405
xn::Capability::Capability
Capability(XnNodeHandle hNode)
Definition XnCppWrapper.h:2443
xn::Capability::Capability
Capability(const NodeWrapper &node)
Definition XnCppWrapper.h:2444
xn::Codec
Definition XnCppWrapper.h:8254
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:8283
xn::Codec::Create
XnStatus Create(Context &context, XnCodecID codecID, ProductionNode &initializerNode)
For full details and usage, see xnCreateCodec
Definition XnCppWrapper.h:9963
xn::Codec::GetCodecID
XnCodecID GetCodecID() const
For full details and usage, see xnGetCodecID
Definition XnCppWrapper.h:8274
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:8292
xn::Codec::Codec
Codec(const NodeWrapper &other)
Definition XnCppWrapper.h:8262
xn::Codec::Codec
Codec(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:8261
xn::Context
Definition XnCppWrapper.h:8594
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:8762
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:9108
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:9384
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:8951
xn::Context::~Context
~Context()
Definition XnCppWrapper.h:8657
xn::Context::UnregisterFromNodeCreation
void UnregisterFromNodeCreation(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Node Creation' event. see Event: 'Node Creation'.
Definition XnCppWrapper.h:9265
xn::Context::CreateCodec
XnStatus CreateCodec(XnCodecID codecID, ProductionNode &initializerNode, Codec &codec)
For full details and usage, see xnCreateCodec
Definition XnCppWrapper.h:8872
xn::Context::EnumerateLicenses
XnStatus EnumerateLicenses(XnLicense *&aLicenses, XnUInt32 &nCount) const
For full details and usage, see xnEnumerateLicenses
Definition XnCppWrapper.h:8917
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:8821
xn::Context::Context
Context()
Definition XnCppWrapper.h:8631
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:8734
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:9215
xn::Context::Context
Context(XnContext *pContext)
Definition XnCppWrapper.h:8638
xn::Context::Release
void Release()
Releases a context object, decreasing its ref count by 1. If reference count has reached 0,...
Definition XnCppWrapper.h:8898
xn::Context::UnregisterFromErrorStateChange
void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Global Error State Change' event.
Definition XnCppWrapper.h:9227
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:8998
xn::Context::GetProductionNodeInfoByName
XnStatus GetProductionNodeInfoByName(const XnChar *strInstanceName, NodeInfo &nodeInfo) const
For full details and usage, see xnGetNodeHandleByName
Definition XnCppWrapper.h:9142
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:9345
xn::Context::operator=
Context & operator=(const Context &other)
Definition XnCppWrapper.h:8662
xn::Context::GetGlobalMirror
XnBool GetGlobalMirror()
Gets the current state of the GlobalMirror flag.
Definition XnCppWrapper.h:9192
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:9454
xn::Context::operator==
XnBool operator==(const Context &other)
Definition XnCppWrapper.h:8678
xn::Context::operator!=
XnBool operator!=(const Context &other)
Definition XnCppWrapper.h:8688
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:8838
xn::Context::AddRef
XnStatus AddRef()
Adds a reference to the context object. For full details and usage, see xnContextAddRef
Definition XnCppWrapper.h:8889
xn::Context::Context
Context(const Context &other)
Definition XnCppWrapper.h:8649
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:9201
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:8790
xn::Context::UnregisterFromNodeDestruction
void UnregisterFromNodeDestruction(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Node Destruction' event. see Event: 'Node Destruction'.
Definition XnCppWrapper.h:9305
xn::Context::GetProductionNodeByName
XnStatus GetProductionNodeByName(const XnChar *strInstanceName, ProductionNode &node) const
For full details and usage, see xnGetNodeHandleByName
Definition XnCppWrapper.h:9125
xn::Context::EnumerateExistingNodes
XnStatus EnumerateExistingNodes(NodeInfoList &list) const
Returns a list of all the context's existing created nodes.
Definition XnCppWrapper.h:9050
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:9241
xn::Context::TakeOwnership
void TakeOwnership(XnContext *pContext)
Definition XnCppWrapper.h:9497
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:9281
xn::Context::EnumerateExistingNodes
XnStatus EnumerateExistingNodes(NodeInfoList &list, XnProductionNodeType type) const
Returns a list of the context's existing created nodes filtered by type.
Definition XnCppWrapper.h:9079
xn::Context::NodeDestructionHandler
void(* NodeDestructionHandler)(Context &context, const XnChar *strDestroyedNodeName, void *pCookie)
Definition XnCppWrapper.h:8626
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:8855
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:9419
xn::Context::FreeLicensesList
static void FreeLicensesList(XnLicense aLicenses[])
For full details and usage, see xnFreeLicensesList
Definition XnCppWrapper.h:8926
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:9029
xn::Context::NodeCreationHandler
void(* NodeCreationHandler)(Context &context, ProductionNode &createdNode, void *pCookie)
Definition XnCppWrapper.h:8610
xn::Context::SetGlobalMirror
XnStatus SetGlobalMirror(XnBool bMirror)
Enables/disables the GlobalMirror flag.
Definition XnCppWrapper.h:9183
xn::Context::Init
XnStatus Init()
Builds the context's general software environment.
Definition XnCppWrapper.h:8707
xn::Context::WaitNoneUpdateAll
XnStatus WaitNoneUpdateAll()
Immediately updates all generator nodes in the context to their latest available data,...
Definition XnCppWrapper.h:9445
xn::Context::SetHandle
void SetHandle(XnContext *pContext)
Definition XnCppWrapper.h:9462
xn::Context::StopGeneratingAll
XnStatus StopGeneratingAll()
Ensures all generator nodes are not generating data.
Definition XnCppWrapper.h:9169
xn::Context::AddLicense
XnStatus AddLicense(const XnLicense &License)
For full details and usage, see xnAddLicense
Definition XnCppWrapper.h:8908
xn::Context::GetUnderlyingObject
XnContext * GetUnderlyingObject() const
Definition XnCppWrapper.h:8671
xn::Context::StartGeneratingAll
XnStatus StartGeneratingAll()
Ensures all created generator nodes are generating data.
Definition XnCppWrapper.h:9161
xn::CroppingCapability
Definition XnCppWrapper.h:4100
xn::CroppingCapability::CroppingCapability
CroppingCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:4108
xn::CroppingCapability::CroppingCapability
CroppingCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:4107
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:4119
xn::CroppingCapability::RegisterToCroppingChange
XnStatus RegisterToCroppingChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Cropping Change' event.
Definition XnCppWrapper.h:4148
xn::CroppingCapability::UnregisterFromCroppingChange
void UnregisterFromCroppingChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Cropping Change' event.
Definition XnCppWrapper.h:4160
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:4134
xn::DepthGenerator
Definition XnCppWrapper.h:4695
xn::DepthGenerator::GetUserPositionCap
const UserPositionCapability GetUserPositionCap() const
Definition XnCppWrapper.h:4840
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:4753
xn::DepthGenerator::GetDepthMap
const XnDepthPixel * GetDepthMap() const
Gets the current depth-map. This map is updated after a call to xnWaitAndUpdateData()....
Definition XnCppWrapper.h:4739
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:4830
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:4730
xn::DepthGenerator::GetUserPositionCap
UserPositionCapability GetUserPositionCap()
Definition XnCppWrapper.h:4850
xn::DepthGenerator::DepthGenerator
DepthGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:4703
xn::DepthGenerator::GetFieldOfView
XnStatus GetFieldOfView(XnFieldOfView &FOV) const
Gets the dimensions of the field of view (FOV) of the hardware sensor.
Definition XnCppWrapper.h:4776
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:9801
xn::DepthGenerator::UnregisterFromFieldOfViewChange
void UnregisterFromFieldOfViewChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Field-Of-View Change' event.
Definition XnCppWrapper.h:4802
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:4816
xn::DepthGenerator::DepthGenerator
DepthGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:4702
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:4790
xn::DepthMetaData
Definition XnCppWrapper.h:755
xn::DepthMetaData::Data
const XnDepthPixel *& Data()
Returns the depth map.
Definition XnCppWrapper.h:857
xn::DepthMetaData::GetUnderlying
const XnDepthMetaData * GetUnderlying() const
Definition XnCppWrapper.h:904
xn::DepthMetaData::operator[]
const XnDepthPixel & operator[](XnUInt32 nIndex) const
Definition XnCppWrapper.h:883
xn::DepthMetaData::CopyFrom
XnStatus CopyFrom(const DepthMetaData &other)
Definition XnCppWrapper.h:803
xn::DepthMetaData::InitFrom
XnStatus InitFrom(const DepthMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer)
Definition XnCppWrapper.h:791
xn::DepthMetaData::ZRes
XnDepthPixel & ZRes()
Definition XnCppWrapper.h:830
xn::DepthMetaData::ReAdjust
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer=NULL)
Definition XnCppWrapper.h:814
xn::DepthMetaData::Data
const XnDepthPixel * Data() const
Returns the depth map.
Definition XnCppWrapper.h:844
xn::DepthMetaData::GetUnderlying
XnDepthMetaData * GetUnderlying()
Definition XnCppWrapper.h:908
xn::DepthMetaData::DepthMap
const xn::DepthMap & DepthMap() const
Definition XnCppWrapper.h:868
xn::DepthMetaData::WritableDepthMap
xn::DepthMap & WritableDepthMap()
Definition XnCppWrapper.h:872
xn::DepthMetaData::operator()
const XnDepthPixel & operator()(XnUInt32 x, XnUInt32 y) const
Definition XnCppWrapper.h:895
xn::DepthMetaData::DepthMetaData
DepthMetaData()
Definition XnCppWrapper.h:760
xn::DepthMetaData::ZRes
XnDepthPixel ZRes() const
Definition XnCppWrapper.h:824
xn::DepthMetaData::WritableData
XnDepthPixel * WritableData()
Definition XnCppWrapper.h:863
xn::DepthMetaData::InitFrom
void InitFrom(const DepthMetaData &other)
Shallow-Copies a DepthMetaData object.
Definition XnCppWrapper.h:776
xn::Device::Device
Device(const NodeWrapper &other)
Definition XnCppWrapper.h:2941
xn::Device::Device
Device(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:2940
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:9774
xn::Device::GetIdentificationCap
DeviceIdentificationCapability GetIdentificationCap()
Definition XnCppWrapper.h:2966
xn::DeviceIdentificationCapability
Definition XnCppWrapper.h:2871
xn::DeviceIdentificationCapability::DeviceIdentificationCapability
DeviceIdentificationCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:2879
xn::DeviceIdentificationCapability::GetVendorSpecificData
XnStatus GetVendorSpecificData(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the vendor-specific name of the device holding this capability object.
Definition XnCppWrapper.h:2904
xn::DeviceIdentificationCapability::DeviceIdentificationCapability
DeviceIdentificationCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:2878
xn::DeviceIdentificationCapability::GetDeviceName
XnStatus GetDeviceName(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the name of the device holding this capability object.
Definition XnCppWrapper.h:2890
xn::DeviceIdentificationCapability::GetSerialNumber
XnStatus GetSerialNumber(XnChar *strBuffer, XnUInt32 nBufferSize)
Gets the vendor-specific name of the device holding this capability object.
Definition XnCppWrapper.h:2918
xn::EnumerationErrors::Iterator
Definition XnCppWrapper.h:8432
xn::EnumerationErrors::Iterator::operator!=
XnBool operator!=(const Iterator &other) const
Definition XnCppWrapper.h:8451
xn::EnumerationErrors::Iterator::operator++
Iterator & operator++()
Definition XnCppWrapper.h:8460
xn::EnumerationErrors::Iterator::operator++
Iterator operator++(int)
Definition XnCppWrapper.h:8470
xn::EnumerationErrors::Iterator::operator==
XnBool operator==(const Iterator &other) const
Definition XnCppWrapper.h:8441
xn::EnumerationErrors::Iterator::Description
const XnProductionNodeDescription & Description()
Returns the description data of the failing node the iterator points to.
Definition XnCppWrapper.h:8483
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:8489
xn::EnumerationErrors::Iterator::EnumerationErrors
friend class EnumerationErrors
Definition XnCppWrapper.h:8434
xn::EnumerationErrors
Definition XnCppWrapper.h:8407
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:8525
xn::EnumerationErrors::GetUnderlying
XnEnumerationErrors * GetUnderlying()
Definition XnCppWrapper.h:8547
xn::EnumerationErrors::Begin
Iterator Begin() const
Gets an iterator to the first item in an enumeration errors list.
Definition XnCppWrapper.h:8505
xn::EnumerationErrors::EnumerationErrors
EnumerationErrors()
Definition XnCppWrapper.h:8412
xn::EnumerationErrors::EnumerationErrors
EnumerationErrors(XnEnumerationErrors *pErrors, XnBool bOwn=FALSE)
Definition XnCppWrapper.h:8421
xn::EnumerationErrors::~EnumerationErrors
~EnumerationErrors()
Definition XnCppWrapper.h:8426
xn::EnumerationErrors::End
Iterator End() const
Returns an iterator referring to the past-the-end element in an enumeration errors list....
Definition XnCppWrapper.h:8515
xn::EnumerationErrors::Free
void Free()
For full details and usage, see xnEnumerationErrorsFree
Definition XnCppWrapper.h:8534
xn::ErrorStateCapability
Definition XnCppWrapper.h:2481
xn::ErrorStateCapability::RegisterToErrorStateChange
XnStatus RegisterToErrorStateChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Error State Change' event.
Definition XnCppWrapper.h:2508
xn::ErrorStateCapability::UnregisterFromErrorStateChange
void UnregisterFromErrorStateChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Error State Change' event.
Definition XnCppWrapper.h:2520
xn::ErrorStateCapability::ErrorStateCapability
ErrorStateCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:2489
xn::ErrorStateCapability::ErrorStateCapability
ErrorStateCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:2488
xn::ErrorStateCapability::GetErrorState
XnStatus GetErrorState() const
Gets the current error state of the holding node.
Definition XnCppWrapper.h:2494
xn::FrameSyncCapability
Definition XnCppWrapper.h:3209
xn::FrameSyncCapability::FrameSyncWith
XnStatus FrameSyncWith(Generator &other)
Activates frame synchronization with the other generator node.
Definition XnCppWrapper.h:9737
xn::FrameSyncCapability::FrameSyncCapability
FrameSyncCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:3212
xn::FrameSyncCapability::RegisterToFrameSyncChange
XnStatus RegisterToFrameSyncChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Frame Sync Change' event.
Definition XnCppWrapper.h:3255
xn::FrameSyncCapability::FrameSyncCapability
FrameSyncCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:3211
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:9742
xn::FrameSyncCapability::UnregisterFromFrameSyncChange
void UnregisterFromFrameSyncChange(XnCallbackHandle hCallback)
Unregisters the 'Frame Sync Change' event handler.
Definition XnCppWrapper.h:3267
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:9747
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:9732
xn::GeneralIntCapability
Definition XnCppWrapper.h:2532
xn::GeneralIntCapability::Set
XnStatus Set(XnInt32 nValue)
Sets the current value of this capability. For full details and usage, see xnSetGeneralIntValue
Definition XnCppWrapper.h:2567
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:2547
xn::GeneralIntCapability::Get
XnInt32 Get()
Gets the current value of this capability. For full details and usage, see xnGetGeneralIntValue
Definition XnCppWrapper.h:2556
xn::GeneralIntCapability::GeneralIntCapability
GeneralIntCapability(XnNodeHandle hNode, const XnChar *strCap)
Definition XnCppWrapper.h:2540
xn::GeneralIntCapability::UnregisterFromValueChange
void UnregisterFromValueChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Value Change' event.
Definition XnCppWrapper.h:10092
xn::GeneralIntCapability::RegisterToValueChange
XnStatus RegisterToValueChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Value Change' event.
Definition XnCppWrapper.h:10073
xn::GeneralIntCapability::GeneralIntCapability
GeneralIntCapability(const NodeWrapper &node, const XnChar *strCap)
Definition XnCppWrapper.h:2541
xn::Generator
Definition XnCppWrapper.h:3326
xn::Generator::GetFrameSyncCap
const FrameSyncCapability GetFrameSyncCap() const
Definition XnCppWrapper.h:3626
xn::Generator::Generator
Generator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:3333
xn::Generator::GetFrameSyncCap
FrameSyncCapability GetFrameSyncCap()
Definition XnCppWrapper.h:3640
xn::Generator::UnregisterFromGenerationRunningChange
void UnregisterFromGenerationRunningChange(XnCallbackHandle hCallback)
Unregisters the 'Generation State Change' event handler.
Definition XnCppWrapper.h:3406
xn::Generator::StartGenerating
XnStatus StartGenerating()
Enters the node into Generating state.
Definition XnCppWrapper.h:3355
xn::Generator::RegisterToGenerationRunningChange
XnStatus RegisterToGenerationRunningChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Generation State Change' event.
Definition XnCppWrapper.h:3394
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:3449
xn::Generator::GetMirrorCap
MirrorCapability GetMirrorCap()
Gets a MirrorCapability object for accessing Mirror functionality.
Definition XnCppWrapper.h:3582
xn::Generator::GetAlternativeViewPointCap
const AlternativeViewPointCapability GetAlternativeViewPointCap() const
Definition XnCppWrapper.h:3597
xn::Generator::RegisterToNewDataAvailable
XnStatus RegisterToNewDataAvailable(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'New Data Available' event.
Definition XnCppWrapper.h:3424
xn::Generator::IsDataNew
XnBool IsDataNew() const
Definition XnCppWrapper.h:3481
xn::Generator::Generator
Generator(const NodeWrapper &other)
Definition XnCppWrapper.h:3334
xn::Generator::UnregisterFromNewDataAvailable
void UnregisterFromNewDataAvailable(XnCallbackHandle hCallback)
Unregisters the event handler for the 'New Data Available' event.
Definition XnCppWrapper.h:3436
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:3539
xn::Generator::GetMirrorCap
const MirrorCapability GetMirrorCap() const
Gets a MirrorCapability object for accessing Mirror functionality.
Definition XnCppWrapper.h:3569
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:3472
xn::Generator::StopGenerating
XnStatus StopGenerating()
Makes the node leave Generating state (enters Non-Generating state).
Definition XnCppWrapper.h:3376
xn::Generator::GetAlternativeViewPointCap
AlternativeViewPointCapability GetAlternativeViewPointCap()
Definition XnCppWrapper.h:3612
xn::Generator::GetFrameID
XnUInt32 GetFrameID() const
Gets the frame ID of the current frame data from the Generator node.
Definition XnCppWrapper.h:3556
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:3503
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:3521
xn::Generator::IsGenerating
XnBool IsGenerating() const
Returns whether the node is currently in Generating state.
Definition XnCppWrapper.h:3363
xn::GestureGenerator::UnregisterFromGestureChange
void UnregisterFromGestureChange(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Gesture Change' event.
Definition XnCppWrapper.h:5583
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:5393
xn::GestureGenerator::RegisterToGestureChange
XnStatus RegisterToGestureChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Gesture Change' event.
Definition XnCppWrapper.h:5571
xn::GestureGenerator::GestureRecognized
void(* GestureRecognized)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pIDPosition, const XnPoint3D *pEndPosition, void *pCookie)
Definition XnCppWrapper.h:5485
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:5440
xn::GestureGenerator::GestureReadyForNextIntermediateStage
void(* GestureReadyForNextIntermediateStage)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pPosition, void *pCookie)
Definition XnCppWrapper.h:5679
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:5418
xn::GestureGenerator::GestureProgress
void(* GestureProgress)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pPosition, XnFloat fProgress, void *pCookie)
Definition XnCppWrapper.h:5513
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:9888
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:5526
xn::GestureGenerator::GestureGenerator
GestureGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:5363
xn::GestureGenerator::IsGestureAvailable
XnBool IsGestureAvailable(const XnChar *strGesture) const
Returns whether a specific gesture is available in this generator node.
Definition XnCppWrapper.h:5450
xn::GestureGenerator::GestureIntermediateStageCompleted
void(* GestureIntermediateStageCompleted)(GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pPosition, void *pCookie)
Definition XnCppWrapper.h:5615
xn::GestureGenerator::UnregisterGestureCallbacks
void UnregisterGestureCallbacks(XnCallbackHandle hCallback)
Unregisters the event handlers for the 'Gesture Recognized' and 'Gesture Progress' events.
Definition XnCppWrapper.h:5555
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:5459
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:5626
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:5405
xn::GestureGenerator::GetNumberOfAvailableGestures
XnUInt16 GetNumberOfAvailableGestures() const
Get the number of all gestures available. For full details and usage, see xnGetNumberOfAvailableGe...
Definition XnCppWrapper.h:5427
xn::GestureGenerator::GestureGenerator
GestureGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:5362
xn::GestureGenerator::UnregisterFromGestureIntermediateStageCompleted
void UnregisterFromGestureIntermediateStageCompleted(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Gesture Intermediate Stage Completed' event.
Definition XnCppWrapper.h:5654
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:5690
xn::GestureGenerator::UnregisterFromGestureReadyForNextIntermediateStageCallbacks
void UnregisterFromGestureReadyForNextIntermediateStageCallbacks(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Gesture Ready For Next Intermediate Stage' event.
Definition XnCppWrapper.h:5718
xn::HandTouchingFOVEdgeCapability
Definition XnCppWrapper.h:5891
xn::HandTouchingFOVEdgeCapability::HandTouchingFOVEdgeCapability
HandTouchingFOVEdgeCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:5899
xn::HandTouchingFOVEdgeCapability::UnregisterFromHandTouchingFOVEdge
void UnregisterFromHandTouchingFOVEdge(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Hand Touching FOV Edge' event.
Definition XnCppWrapper.h:5950
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:5922
xn::HandTouchingFOVEdgeCapability::HandTouchingFOVEdge
void(* HandTouchingFOVEdge)(HandTouchingFOVEdgeCapability &touchingfov, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, XnDirection eDir, void *pCookie)
Definition XnCppWrapper.h:5911
xn::HandTouchingFOVEdgeCapability::HandTouchingFOVEdgeCapability
HandTouchingFOVEdgeCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:5898
xn::HandsGenerator::SetSmoothing
XnStatus SetSmoothing(XnFloat fSmoothingFactor)
Changes the smoothing factor.
Definition XnCppWrapper.h:6250
xn::HandsGenerator::HandCreate
void(* HandCreate)(HandsGenerator &generator, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, void *pCookie)
Definition XnCppWrapper.h:6098
xn::HandsGenerator::StopTracking
XnStatus StopTracking(XnUserID user)
Stops tracking an existing hand that you are no longer interested in.
Definition XnCppWrapper.h:6195
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:9907
xn::HandsGenerator::StopTrackingAll
XnStatus StopTrackingAll()
Stops tracking all existing hands.
Definition XnCppWrapper.h:6208
xn::HandsGenerator::GetHandTouchingFOVEdgeCap
HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap()
Definition XnCppWrapper.h:6274
xn::HandsGenerator::HandDestroy
void(* HandDestroy)(HandsGenerator &generator, XnUserID user, XnFloat fTime, void *pCookie)
Definition XnCppWrapper.h:6131
xn::HandsGenerator::UnregisterHandCallbacks
void UnregisterHandCallbacks(XnCallbackHandle hCallback)
Unregisters event handlers for the 'Hand Create', 'Hand Update' and 'Hand Destroy' events.
Definition XnCppWrapper.h:6175
xn::HandsGenerator::GetHandTouchingFOVEdgeCap
const HandTouchingFOVEdgeCapability GetHandTouchingFOVEdgeCap() const
Definition XnCppWrapper.h:6262
xn::HandsGenerator::HandsGenerator
HandsGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:6072
xn::HandsGenerator::HandUpdate
void(* HandUpdate)(HandsGenerator &generator, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, void *pCookie)
Definition XnCppWrapper.h:6116
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:6145
xn::HandsGenerator::StartTracking
XnStatus StartTracking(const XnPoint3D &ptPosition)
Starts tracking at the specific position where the application expects a hand.
Definition XnCppWrapper.h:6229
xn::HandsGenerator::HandsGenerator
HandsGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:6071
xn::IRGenerator
Definition XnCppWrapper.h:5176
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:9859
xn::IRGenerator::IRGenerator
IRGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:5184
xn::IRGenerator::IRGenerator
IRGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:5183
xn::IRGenerator::GetIRMap
const XnIRPixel * GetIRMap() const
Gets a pointer to the latest IR map.
Definition XnCppWrapper.h:5218
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:5210
xn::IRMetaData
Definition XnCppWrapper.h:1217
xn::IRMetaData::IRMap
const xn::IRMap & IRMap() const
Gets a fast, light object wrapping the IR map. Remarks.
Definition XnCppWrapper.h:1338
xn::IRMetaData::CopyFrom
XnStatus CopyFrom(const IRMetaData &other)
Definition XnCppWrapper.h:1260
xn::IRMetaData::ReAdjust
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel *pExternalBuffer=NULL)
Definition XnCppWrapper.h:1271
xn::IRMetaData::Data
const XnIRPixel * Data() const
Returns the IR map.
Definition XnCppWrapper.h:1288
xn::IRMetaData::Data
const XnIRPixel *& Data()
Returns the IR map.
Definition XnCppWrapper.h:1301
xn::IRMetaData::GetUnderlying
XnIRMetaData * GetUnderlying()
Definition XnCppWrapper.h:1356
xn::IRMetaData::WritableIRMap
xn::IRMap & WritableIRMap()
Gets a fast, light object wrapping the writable IR map. Remarks.
Definition XnCppWrapper.h:1347
xn::IRMetaData::operator()
const XnIRPixel & operator()(XnUInt32 x, XnUInt32 y) const
Definition XnCppWrapper.h:1324
xn::IRMetaData::IRMetaData
IRMetaData()
Definition XnCppWrapper.h:1219
xn::IRMetaData::GetUnderlying
const XnIRMetaData * GetUnderlying() const
Definition XnCppWrapper.h:1352
xn::IRMetaData::InitFrom
void InitFrom(const IRMetaData &other)
Shallow-Copies an IRMetaData object.
Definition XnCppWrapper.h:1235
xn::IRMetaData::operator[]
const XnIRPixel & operator[](XnUInt32 nIndex) const
Definition XnCppWrapper.h:1312
xn::IRMetaData::WritableData
XnIRPixel * WritableData()
Definition XnCppWrapper.h:1305
xn::IRMetaData::InitFrom
XnStatus InitFrom(const IRMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnIRPixel *pExternalBuffer)
Definition XnCppWrapper.h:1249
xn::ImageGenerator
Definition XnCppWrapper.h:4940
xn::ImageGenerator::UnregisterFromPixelFormatChange
void UnregisterFromPixelFormatChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Pixel Format Change' event.
Definition XnCppWrapper.h:5096
xn::ImageGenerator::RegisterToPixelFormatChange
XnStatus RegisterToPixelFormatChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Pixel Format Change' event.
Definition XnCppWrapper.h:5084
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:5070
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:5055
xn::ImageGenerator::ImageGenerator
ImageGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:4947
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:4982
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:9830
xn::ImageGenerator::ImageGenerator
ImageGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:4948
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:4973
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:5033
xn::ImageGenerator::GetImageMap
const XnUInt8 * GetImageMap() const
Gets the current image-map as a byte buffer. For full details, see xnGetImageMap().
Definition XnCppWrapper.h:5018
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:4991
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:5009
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:5000
xn::ImageMetaData
Definition XnCppWrapper.h:947
xn::ImageMetaData::ImageMetaData
ImageMetaData()
Definition XnCppWrapper.h:949
xn::ImageMetaData::InitFrom
XnStatus InitFrom(const ImageMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer)
Definition XnCppWrapper.h:987
xn::ImageMetaData::WritableYUV422Data
XnYUV422DoublePixel * WritableYUV422Data()
Definition XnCppWrapper.h:1111
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:1064
xn::ImageMetaData::ImageMap
const xn::ImageMap & ImageMap() const
Gets a light object wrapping the image map.
Definition XnCppWrapper.h:1146
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:1117
xn::ImageMetaData::WritableImageMap
xn::ImageMap & WritableImageMap()
Definition XnCppWrapper.h:1150
xn::ImageMetaData::PixelFormat
XnPixelFormat & PixelFormat()
Gets the frame's pixel color format used in this image map. This is the format of the frame object sa...
Definition XnCppWrapper.h:1074
xn::ImageMetaData::WritableRGB24Map
xn::RGB24Map & WritableRGB24Map()
Definition XnCppWrapper.h:1161
xn::ImageMetaData::CopyFrom
XnStatus CopyFrom(const ImageMetaData &other)
Definition XnCppWrapper.h:1022
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:1101
xn::ImageMetaData::WritableGrayscale8Data
XnGrayscale8Pixel * WritableGrayscale8Data()
Definition XnCppWrapper.h:1126
xn::ImageMetaData::RGB24Data
const XnRGB24Pixel *& RGB24Data()
Gets a pointer to the first pixel of the image in RGB24 format. RGB24 format represents each pixel as...
Definition XnCppWrapper.h:1090
xn::ImageMetaData::WritableData
XnUInt8 * WritableData()
Definition XnCppWrapper.h:1079
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:1003
xn::ImageMetaData::WritableGrayscale16Data
XnGrayscale16Pixel * WritableGrayscale16Data()
Definition XnCppWrapper.h:1141
xn::ImageMetaData::YUV422Data
const XnYUV422DoublePixel *& YUV422Data()
Gets a pointer to the first pixel of the image in YUV422 format. YUV422 is a type of compression with...
Definition XnCppWrapper.h:1107
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:1085
xn::ImageMetaData::ReAdjust
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer=NULL)
Definition XnCppWrapper.h:1039
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:1176
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:1157
xn::ImageMetaData::WritableRGB24Data
XnRGB24Pixel * WritableRGB24Data()
Definition XnCppWrapper.h:1094
xn::ImageMetaData::Grayscale8Data
const XnGrayscale8Pixel *& Grayscale8Data()
Gets a pointer to the first pixel of the image in Grayscale8 format. Grayscale8 represents each pixel...
Definition XnCppWrapper.h:1122
xn::ImageMetaData::WritableGrayscale8Map
xn::Grayscale8Map & WritableGrayscale8Map()
Definition XnCppWrapper.h:1170
xn::ImageMetaData::Grayscale8Map
const xn::Grayscale8Map & Grayscale8Map() const
Gets a light wrapper object wrapping the image map as Grayscale8 format.
Definition XnCppWrapper.h:1166
xn::ImageMetaData::Grayscale16Data
const XnGrayscale16Pixel *& Grayscale16Data()
Gets a pointer to the first pixel of the image in Grayscale16 format. Grayscale16 represents each pix...
Definition XnCppWrapper.h:1137
xn::ImageMetaData::GetUnderlying
XnImageMetaData * GetUnderlying()
Definition XnCppWrapper.h:1189
xn::ImageMetaData::GetUnderlying
const XnImageMetaData * GetUnderlying() const
Definition XnCppWrapper.h:1185
xn::ImageMetaData::WritableGrayscale16Map
xn::Grayscale16Map & WritableGrayscale16Map()
Definition XnCppWrapper.h:1180
xn::ImageMetaData::InitFrom
void InitFrom(const ImageMetaData &other)
Shallow-copies an ImageMetaData object.
Definition XnCppWrapper.h:971
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:1132
xn::MapGenerator::GetCroppingCap
CroppingCapability GetCroppingCap()
Gets a CroppingCapability object for accessing Cropping functionality.
Definition XnCppWrapper.h:4391
xn::MapGenerator::GetExposureCap
GeneralIntCapability GetExposureCap()
Definition XnCppWrapper.h:4531
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:4353
xn::MapGenerator::GetIrisCap
GeneralIntCapability GetIrisCap()
Definition XnCppWrapper.h:4541
xn::MapGenerator::GetTiltCap
GeneralIntCapability GetTiltCap()
Definition XnCppWrapper.h:4501
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:4326
xn::MapGenerator::GetZoomCap
GeneralIntCapability GetZoomCap()
Definition XnCppWrapper.h:4521
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:4286
xn::MapGenerator::UnregisterFromMapOutputModeChange
void UnregisterFromMapOutputModeChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Map Output Mode Change' event.
Definition XnCppWrapper.h:4365
xn::MapGenerator::GetPanCap
GeneralIntCapability GetPanCap()
Definition XnCppWrapper.h:4491
xn::MapGenerator::GetFocusCap
GeneralIntCapability GetFocusCap()
Definition XnCppWrapper.h:4551
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:4339
xn::MapGenerator::GetSaturationCap
GeneralIntCapability GetSaturationCap()
Definition XnCppWrapper.h:4431
xn::MapGenerator::GetLowLightCompensationCap
GeneralIntCapability GetLowLightCompensationCap()
Definition XnCppWrapper.h:4561
xn::MapGenerator::GetSupportedMapOutputModesCount
XnUInt32 GetSupportedMapOutputModesCount() const
Gets the number of output modes that the generator node supports.
Definition XnCppWrapper.h:4271
xn::MapGenerator::GetBacklightCompensationCap
GeneralIntCapability GetBacklightCompensationCap()
Definition XnCppWrapper.h:4471
xn::MapGenerator::GetCroppingCap
const CroppingCapability GetCroppingCap() const
Gets a CroppingCapability object for accessing Cropping functionality.
Definition XnCppWrapper.h:4378
xn::MapGenerator::GetRollCap
GeneralIntCapability GetRollCap()
Definition XnCppWrapper.h:4511
xn::MapGenerator::GetHueCap
GeneralIntCapability GetHueCap()
Definition XnCppWrapper.h:4421
xn::MapGenerator::GetAntiFlickerCap
AntiFlickerCapability GetAntiFlickerCap()
Definition XnCppWrapper.h:4571
xn::MapGenerator::MapGenerator
MapGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:4262
xn::MapGenerator::MapGenerator
MapGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:4261
xn::MapGenerator::GetSharpnessCap
GeneralIntCapability GetSharpnessCap()
Definition XnCppWrapper.h:4441
xn::MapGenerator::GetWhiteBalanceCap
GeneralIntCapability GetWhiteBalanceCap()
Definition XnCppWrapper.h:4461
xn::MapGenerator::GetGainCap
GeneralIntCapability GetGainCap()
Definition XnCppWrapper.h:4481
xn::MapGenerator::GetBrightnessCap
GeneralIntCapability GetBrightnessCap()
Definition XnCppWrapper.h:4401
xn::MapGenerator::GetContrastCap
GeneralIntCapability GetContrastCap()
Definition XnCppWrapper.h:4411
xn::MapGenerator::GetGammaCap
GeneralIntCapability GetGammaCap()
Definition XnCppWrapper.h:4451
xn::MapGenerator::SetMapOutputMode
XnStatus SetMapOutputMode(const XnMapOutputMode &OutputMode)
Sets the current map output mode of the generator node.
Definition XnCppWrapper.h:4304
xn::Map
Definition XnCppWrapper.h:610
xn::Map::YRes
XnUInt32 YRes() const
Definition XnCppWrapper.h:631
xn::Map::operator()
const _pixelType & operator()(XnUInt32 x, XnUInt32 y) const
Definition XnCppWrapper.h:674
xn::Map::operator()
_pixelType & operator()(XnUInt32 x, XnUInt32 y)
Definition XnCppWrapper.h:687
xn::Map::Map
Map(_pixelType *&pData, XnUInt32 &nXRes, XnUInt32 &nYRes)
Definition XnCppWrapper.h:612
xn::Map::operator[]
_pixelType & operator[](XnUInt32 nIndex)
Definition XnCppWrapper.h:660
xn::Map::XRes
XnUInt32 XRes() const
Definition XnCppWrapper.h:623
xn::Map::operator[]
const _pixelType & operator[](XnUInt32 nIndex) const
Definition XnCppWrapper.h:644
xn::MapMetaData
Definition XnCppWrapper.h:392
xn::MapMetaData::PixelFormat
XnPixelFormat PixelFormat() const
Definition XnCppWrapper.h:505
xn::MapMetaData::XRes
XnUInt32 & XRes()
Definition XnCppWrapper.h:418
xn::MapMetaData::ReAdjust
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnUInt8 *pExternalBuffer)
Definition XnCppWrapper.h:568
xn::MapMetaData::FullYRes
XnUInt32 FullYRes() const
Definition XnCppWrapper.h:487
xn::MapMetaData::XOffset
XnUInt32 XOffset() const
Definition XnCppWrapper.h:441
xn::MapMetaData::PixelFormatImpl
XnPixelFormat & PixelFormatImpl()
Definition XnCppWrapper.h:590
xn::MapMetaData::FullYRes
XnUInt32 & FullYRes()
Definition XnCppWrapper.h:491
xn::MapMetaData::XOffset
XnUInt32 & XOffset()
Definition XnCppWrapper.h:450
xn::MapMetaData::YRes
XnUInt32 & YRes()
Definition XnCppWrapper.h:431
xn::MapMetaData::GetUnderlying
XnMapMetaData * GetUnderlying()
Definition XnCppWrapper.h:514
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:545
xn::MapMetaData::FPS
XnUInt32 & FPS()
Definition XnCppWrapper.h:500
xn::MapMetaData::FPS
XnUInt32 FPS() const
Definition XnCppWrapper.h:496
xn::MapMetaData::BytesPerPixel
XnUInt32 BytesPerPixel() const
Definition XnCppWrapper.h:519
xn::MapMetaData::YRes
XnUInt32 YRes() const
Definition XnCppWrapper.h:425
xn::MapMetaData::XRes
XnUInt32 XRes() const
Definition XnCppWrapper.h:412
xn::MapMetaData::MapMetaData
MapMetaData(XnPixelFormat format, const XnUInt8 **ppData)
Definition XnCppWrapper.h:400
xn::MapMetaData::FullXRes
XnUInt32 & FullXRes()
Definition XnCppWrapper.h:482
xn::MapMetaData::YOffset
XnUInt32 YOffset() const
Definition XnCppWrapper.h:460
xn::MapMetaData::GetUnderlying
const XnMapMetaData * GetUnderlying() const
Definition XnCppWrapper.h:510
xn::MapMetaData::FullXRes
XnUInt32 FullXRes() const
Definition XnCppWrapper.h:475
xn::MapMetaData::YOffset
XnUInt32 & YOffset()
Definition XnCppWrapper.h:469
xn::MirrorCapability
Definition XnCppWrapper.h:3020
xn::MirrorCapability::MirrorCapability
MirrorCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:3022
xn::MirrorCapability::IsMirrored
XnBool IsMirrored() const
Gets the current mirroring configuration of the holder node. This configuration is used for generatin...
Definition XnCppWrapper.h:3039
xn::MirrorCapability::RegisterToMirrorChange
XnStatus RegisterToMirrorChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Mirror Change' event.
Definition XnCppWrapper.h:3053
xn::MirrorCapability::SetMirror
XnStatus SetMirror(XnBool bMirror)
Sets the current mirror configuration of the holder node, enabling or disabling mirroring....
Definition XnCppWrapper.h:3031
xn::MirrorCapability::UnregisterFromMirrorChange
void UnregisterFromMirrorChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'Mirror Change' event.
Definition XnCppWrapper.h:3065
xn::MirrorCapability::MirrorCapability
MirrorCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:3023
xn::MockAudioGenerator::Create
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9934
xn::MockAudioGenerator::SetData
XnStatus SetData(const AudioMetaData &audioMD)
Definition XnCppWrapper.h:8225
xn::MockAudioGenerator::SetData
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pAudioBuffer)
For full details and usage, see xnMockAudioSetData
Definition XnCppWrapper.h:8202
xn::MockAudioGenerator::CreateBasedOn
XnStatus CreateBasedOn(AudioGenerator &other, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9943
xn::MockAudioGenerator::MockAudioGenerator
MockAudioGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:8179
xn::MockAudioGenerator::MockAudioGenerator
MockAudioGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:8178
xn::MockAudioGenerator::SetData
XnStatus SetData(const AudioMetaData &audioMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition XnCppWrapper.h:8215
xn::MockDepthGenerator::SetData
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel *pDepthMap)
For full details and usage, see xnMockDepthSetData
Definition XnCppWrapper.h:4892
xn::MockDepthGenerator::MockDepthGenerator
MockDepthGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:4868
xn::MockDepthGenerator::SetData
XnStatus SetData(const DepthMetaData &depthMD)
Definition XnCppWrapper.h:4915
xn::MockDepthGenerator::CreateBasedOn
XnStatus CreateBasedOn(DepthGenerator &other, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9819
xn::MockDepthGenerator::SetData
XnStatus SetData(const DepthMetaData &depthMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition XnCppWrapper.h:4905
xn::MockDepthGenerator::Create
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9810
xn::MockDepthGenerator::MockDepthGenerator
MockDepthGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:4869
xn::MockIRGenerator::MockIRGenerator
MockIRGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:5237
xn::MockIRGenerator::SetData
XnStatus SetData(const IRMetaData &irMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition XnCppWrapper.h:5271
xn::MockIRGenerator::CreateBasedOn
XnStatus CreateBasedOn(IRGenerator &other, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9877
xn::MockIRGenerator::Create
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9868
xn::MockIRGenerator::SetData
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel *pIRMap)
For full details and usage, see xnMockIRSetData
Definition XnCppWrapper.h:5258
xn::MockIRGenerator::SetData
XnStatus SetData(const IRMetaData &irMD)
Definition XnCppWrapper.h:5281
xn::MockIRGenerator::MockIRGenerator
MockIRGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:5236
xn::MockImageGenerator::MockImageGenerator
MockImageGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:5115
xn::MockImageGenerator::SetData
XnStatus SetData(const ImageMetaData &imageMD, XnUInt32 nFrameID, XnUInt64 nTimestamp)
Definition XnCppWrapper.h:5151
xn::MockImageGenerator::SetData
XnStatus SetData(const ImageMetaData &imageMD)
Definition XnCppWrapper.h:5161
xn::MockImageGenerator::SetData
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pImageMap)
For full details and usage, see xnMockImageSetData
Definition XnCppWrapper.h:5138
xn::MockImageGenerator::CreateBasedOn
XnStatus CreateBasedOn(ImageGenerator &other, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9848
xn::MockImageGenerator::Create
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9839
xn::MockImageGenerator::MockImageGenerator
MockImageGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:5114
xn::MockRawGenerator::MockRawGenerator
MockRawGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:8238
xn::MockRawGenerator::Create
XnStatus Create(Context &context, const XnChar *strName=NULL)
Definition XnCppWrapper.h:9954
xn::MockRawGenerator::MockRawGenerator
MockRawGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:8237
xn::MockRawGenerator::SetData
XnStatus SetData(XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void *pData)
Definition XnCppWrapper.h:8242
xn::NodeInfo
Definition XnCppWrapper.h:1803
xn::NodeInfo::GetInstanceName
const XnChar * GetInstanceName() const
Gets the instance name of a node alternative.
Definition XnCppWrapper.h:1891
xn::NodeInfo::GetInstance
XnStatus GetInstance(ProductionNode &node) const
Definition XnCppWrapper.h:9752
xn::NodeInfo::operator=
NodeInfo & operator=(const NodeInfo &other)
Definition XnCppWrapper.h:1838
xn::NodeInfo::NodeInfo
NodeInfo(XnNodeInfo *pInfo)
Definition XnCppWrapper.h:1810
xn::NodeInfo::GetAdditionalData
const void * GetAdditionalData() const
For full details and usage, see xnNodeInfoGetAdditionalData
Definition XnCppWrapper.h:1931
xn::NodeInfo::GetNeededNodes
NodeInfoList & GetNeededNodes() const
Definition XnCppWrapper.h:9709
xn::NodeInfo::~NodeInfo
~NodeInfo()
Definition XnCppWrapper.h:1828
xn::NodeInfo::GetCreationInfo
const XnChar * GetCreationInfo() const
Gets the creation information of the node alternative.
Definition XnCppWrapper.h:1907
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:1857
xn::NodeInfo::NodeInfo
NodeInfo(const NodeInfo &other)
Definition XnCppWrapper.h:1820
xn::NodeInfo::Context
friend class Context
Definition XnCppWrapper.h:1951
xn::NodeInfo::GetDescription
const XnProductionNodeDescription & GetDescription() const
Gets the description of a node alternative.
Definition XnCppWrapper.h:1875
xn::NodeInfo::GetTreeStringRepresentation
XnStatus GetTreeStringRepresentation(XnChar *csResultBuffer, XnUInt32 nBufferSize) const
For full details and usage, see xnNodeInfoGetTreeStringRepresentation
Definition XnCppWrapper.h:1940
xn::NodeInfoList::Iterator
Definition XnCppWrapper.h:2151
xn::NodeInfoList::Iterator::operator==
XnBool operator==(const Iterator &other) const
Definition XnCppWrapper.h:2167
xn::NodeInfoList::Iterator::operator*
NodeInfo operator*()
Definition XnCppWrapper.h:2226
xn::NodeInfoList::Iterator::operator--
Iterator operator--(int)
Definition XnCppWrapper.h:2216
xn::NodeInfoList::Iterator::operator++
Iterator operator++(int)
Definition XnCppWrapper.h:2197
xn::NodeInfoList::Iterator::operator++
Iterator & operator++()
Definition XnCppWrapper.h:2187
xn::NodeInfoList::Iterator::NodeInfoList
friend class NodeInfoList
Definition XnCppWrapper.h:2153
xn::NodeInfoList::Iterator::operator--
Iterator & operator--()
Definition XnCppWrapper.h:2207
xn::NodeInfoList::Iterator::operator!=
XnBool operator!=(const Iterator &other) const
Definition XnCppWrapper.h:2178
xn::NodeInfoList
Definition XnCppWrapper.h:2145
xn::NodeInfoList::~NodeInfoList
~NodeInfoList()
Definition XnCppWrapper.h:2272
xn::NodeInfoList::NodeInfoList
NodeInfoList()
Definition XnCppWrapper.h:2258
xn::NodeInfoList::Remove
XnStatus Remove(Iterator &it)
For full details and usage, see xnNodeInfoListRemove
Definition XnCppWrapper.h:2375
xn::NodeInfoList::RBegin
Iterator RBegin() const
Definition XnCppWrapper.h:2356
xn::NodeInfoList::ReplaceUnderlyingObject
void ReplaceUnderlyingObject(XnNodeInfoList *pList)
Definition XnCppWrapper.h:2288
xn::NodeInfoList::Clear
XnStatus Clear()
For full details and usage, see xnNodeInfoListClear
Definition XnCppWrapper.h:2384
xn::NodeInfoList::Add
XnStatus Add(XnProductionNodeDescription &description, const XnChar *strCreationInfo, NodeInfoList *pNeededNodes)
For full details and usage, see xnNodeInfoListAdd
Definition XnCppWrapper.h:2299
xn::NodeInfoList::Append
XnStatus Append(NodeInfoList &other)
For full details and usage, see xnNodeInfoListAppend
Definition XnCppWrapper.h:2393
xn::NodeInfoList::GetUnderlyingObject
XnNodeInfoList * GetUnderlyingObject() const
Definition XnCppWrapper.h:2280
xn::NodeInfoList::End
Iterator End() const
Definition XnCppWrapper.h:2346
xn::NodeInfoList::REnd
Iterator REnd() const
Definition XnCppWrapper.h:2365
xn::NodeInfoList::FilterList
XnStatus FilterList(Context &context, Query &query)
For full details and usage, see xnNodeQueryFilterList
Definition XnCppWrapper.h:9691
xn::NodeInfoList::AddNodeFromAnotherList
XnStatus AddNodeFromAnotherList(Iterator &it)
For full details and usage, see xnNodeInfoListAddNodeFromList
Definition XnCppWrapper.h:2328
xn::NodeInfoList::Begin
Iterator Begin() const
Definition XnCppWrapper.h:2337
xn::NodeInfoList::IsEmpty
XnBool IsEmpty()
Checks if the list NodeInfoList object is empty.
Definition XnCppWrapper.h:2401
xn::NodeInfoList::AddNode
XnStatus AddNode(NodeInfo &info)
For full details and usage, see xnNodeInfoListAddNode
Definition XnCppWrapper.h:2319
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:2309
xn::NodeInfoList::NodeInfoList
NodeInfoList(XnNodeInfoList *pList)
Definition XnCppWrapper.h:2270
xn::NodeWrapper
Definition XnCppWrapper.h:1629
xn::NodeWrapper::~NodeWrapper
~NodeWrapper()
Definition XnCppWrapper.h:1654
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:1699
xn::NodeWrapper::NodeWrapper
NodeWrapper(const NodeWrapper &other)
Definition XnCppWrapper.h:1643
xn::NodeWrapper::operator=
NodeWrapper & operator=(const NodeWrapper &other)
Definition XnCppWrapper.h:1648
xn::NodeWrapper::NodeWrapper
NodeWrapper(XnNodeHandle hNode)
Definition XnCppWrapper.h:1638
xn::NodeWrapper::TakeOwnership
void TakeOwnership(XnNodeHandle hNode)
Definition XnCppWrapper.h:1761
xn::NodeWrapper::Context
friend class Context
Definition XnCppWrapper.h:1631
xn::NodeWrapper::Release
void Release()
Definition XnCppWrapper.h:1717
xn::NodeWrapper::GetName
const XnChar * GetName() const
Definition XnCppWrapper.h:1705
xn::NodeWrapper::operator!=
XnBool operator!=(const NodeWrapper &other)
Definition XnCppWrapper.h:1681
xn::NodeWrapper::AddRef
XnStatus AddRef()
References a production node, increasing its reference count by 1. For full details and usage,...
Definition XnCppWrapper.h:1711
xn::NodeWrapper::operator==
XnBool operator==(const NodeWrapper &other)
Definition XnCppWrapper.h:1671
xn::NodeWrapper::SetHandle
void SetHandle(XnNodeHandle hNode)
Definition XnCppWrapper.h:1726
xn::NodeWrapper::GetHandle
XnNodeHandle GetHandle() const
Definition XnCppWrapper.h:1664
xn::OutputMetaData::m_pAllocatedData
XnUInt8 * m_pAllocatedData
Definition XnCppWrapper.h:370
xn::OutputMetaData::Free
void Free()
Definition XnCppWrapper.h:330
xn::OutputMetaData::GetUnderlying
const XnOutputMetaData * GetUnderlying() const
Definition XnCppWrapper.h:273
xn::OutputMetaData::Timestamp
XnUInt64 & Timestamp()
Definition XnCppWrapper.h:224
xn::OutputMetaData::Timestamp
XnUInt64 Timestamp() const
Definition XnCppWrapper.h:219
xn::OutputMetaData::~OutputMetaData
virtual ~OutputMetaData()
Definition XnCppWrapper.h:214
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:307
xn::OutputMetaData::IsDataNew
XnBool IsDataNew() const
Definition XnCppWrapper.h:262
xn::OutputMetaData::MakeDataWritable
XnStatus MakeDataWritable()
Definition XnCppWrapper.h:344
xn::OutputMetaData::IsDataNew
XnBool & IsDataNew()
Definition XnCppWrapper.h:268
xn::OutputMetaData::Data
const XnUInt8 *& Data()
Definition XnCppWrapper.h:288
xn::OutputMetaData::OutputMetaData
OutputMetaData(const XnUInt8 **ppData)
Definition XnCppWrapper.h:206
xn::OutputMetaData::DataSize
XnUInt32 & DataSize()
Returns the size, in bytes, of the data of the frame object saved in this object.
Definition XnCppWrapper.h:256
xn::OutputMetaData::FrameID
XnUInt32 & FrameID()
Definition XnCppWrapper.h:236
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:246
xn::OutputMetaData::FrameID
XnUInt32 FrameID() const
Definition XnCppWrapper.h:230
xn::OutputMetaData::GetUnderlying
XnOutputMetaData * GetUnderlying()
Definition XnCppWrapper.h:277
xn::OutputMetaData::Data
const XnUInt8 * Data() const
Definition XnCppWrapper.h:283
xn::OutputMetaData::WritableData
XnUInt8 * WritableData()
Definition XnCppWrapper.h:293
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:3865
xn::Player::EnumerateNodes
XnStatus EnumerateNodes(NodeInfoList &list) const
Retrieves a list of the nodes played by a player. For full details and usage, see xnEnumeratePlaye...
Definition XnCppWrapper.h:3989
xn::Player::Create
XnStatus Create(Context &context, const XnChar *strFormatName)
Creates a player node.
Definition XnCppWrapper.h:9792
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:3843
xn::Player::Player
Player(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:3815
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:3971
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:3903
xn::Player::GetPlaybackSpeed
XnDouble GetPlaybackSpeed() const
Gets the playback speed.
Definition XnCppWrapper.h:4066
xn::Player::ReadNext
XnStatus ReadNext()
Reads the next data element from the player. For full details and usage, see xnPlayerReadNext
Definition XnCppWrapper.h:3874
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:3942
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:4057
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 ...
Definition XnCppWrapper.h:3852
xn::Player::IsEOF
XnBool IsEOF() const
Returns whether the player is at the end-of-file marker.
Definition XnCppWrapper.h:4008
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:4022
xn::Player::UnregisterFromEndOfFileReached
void UnregisterFromEndOfFileReached(XnCallbackHandle hCallback)
Unregisters the event handler for the 'End-Of-File Reached' event.
Definition XnCppWrapper.h:4034
xn::Player::Player
Player(const NodeWrapper &other)
Definition XnCppWrapper.h:3816
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:3932
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:3959
xn::Player::GetSupportedFormat
const XnChar * GetSupportedFormat() const
Gets the name of the format supported by a player. For full details and usage, see xnGetPlayerSupp...
Definition XnCppWrapper.h:3980
xn::PoseDetectionCapability
Definition XnCppWrapper.h:7185
xn::PoseDetectionCapability::GetPoseStatus
XnStatus GetPoseStatus(XnUserID userID, const XnChar *poseName, XnUInt64 &poseTime, XnPoseDetectionStatus &eStatus, XnPoseDetectionState &eState)
Definition XnCppWrapper.h:7246
xn::PoseDetectionCapability::RegisterToPoseInProgress
XnStatus RegisterToPoseInProgress(PoseInProgress handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Pose In Progress' event.
Definition XnCppWrapper.h:7415
xn::PoseDetectionCapability::GetNumberOfPoses
XnUInt32 GetNumberOfPoses() const
Get the number of poses supported by this capability.
Definition XnCppWrapper.h:7219
xn::PoseDetectionCapability::UnregisterFromOutOfPose
void UnregisterFromOutOfPose(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Out Of Pose' event.
Definition XnCppWrapper.h:7368
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:7236
xn::PoseDetectionCapability::RegisterToPoseDetected
XnStatus RegisterToPoseDetected(PoseDetection handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Pose Detected' event.
Definition XnCppWrapper.h:7304
xn::PoseDetectionCapability::StopPoseDetection
XnStatus StopPoseDetection(XnUserID user)
Stops attempting to detect a pose (for a specific user).
Definition XnCppWrapper.h:7282
xn::PoseDetectionCapability::PoseDetectionCapability
PoseDetectionCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:7192
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:7290
xn::PoseDetectionCapability::StartPoseDetection
XnStatus StartPoseDetection(const XnChar *strPose, XnUserID user)
Starts attempting to detect a pose for a specific user.
Definition XnCppWrapper.h:7266
xn::PoseDetectionCapability::UnregisterFromPoseInProgress
void UnregisterFromPoseInProgress(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Pose In Progress' event.
Definition XnCppWrapper.h:7443
xn::PoseDetectionCapability::IsPoseSupported
XnBool IsPoseSupported(const XnChar *strPose)
Definition XnCppWrapper.h:7241
xn::PoseDetectionCapability::PoseInProgress
void(* PoseInProgress)(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, XnPoseDetectionStatus poseError, void *pCookie)
Definition XnCppWrapper.h:7397
xn::PoseDetectionCapability::PoseDetectionCapability
PoseDetectionCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:7193
xn::PoseDetectionCapability::RegisterToOutOfPose
XnStatus RegisterToOutOfPose(PoseDetection handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Out Of Pose' event.
Definition XnCppWrapper.h:7331
xn::PoseDetectionCapability::PoseDetection
void(* PoseDetection)(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, void *pCookie)
Definition XnCppWrapper.h:7208
xn::PoseDetectionCapability::UnregisterFromPoseDetected
void UnregisterFromPoseDetected(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Pose Detected' event.
Definition XnCppWrapper.h:7355
xn::ProductionNode
Definition XnCppWrapper.h:2632
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:2750
xn::ProductionNode::SetRealProperty
XnStatus SetRealProperty(const XnChar *strName, XnDouble dValue)
Sets a real property. For full details and usage, see xnSetRealProperty
Definition XnCppWrapper.h:2723
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:2768
xn::ProductionNode::ProductionNode
ProductionNode(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:2639
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:2804
xn::ProductionNode::RemoveNeededNode
XnStatus RemoveNeededNode(ProductionNode &needed)
Removes a needed node from the list of needed nodes. For full details and usage,...
Definition XnCppWrapper.h:2665
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:2759
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:2732
xn::ProductionNode::LockedNodeEndChanges
void LockedNodeEndChanges(XnLockHandle hLock)
Ends changes request on a locked node. For full details and usage, see xnLockedNodeEndChanges
Definition XnCppWrapper.h:2813
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:2741
xn::ProductionNode::GetGeneralIntCap
GeneralIntCapability GetGeneralIntCap(const XnChar *strCapability)
Gets an GeneralIntCapability object for accessing the capability functionality.
Definition XnCppWrapper.h:2855
xn::ProductionNode::GetContext
Context GetContext() const
Gets the node's context.
Definition XnCppWrapper.h:9701
xn::ProductionNode::UnlockForChanges
void UnlockForChanges(XnLockHandle hLock)
Unlocks a previously locked node. For full details and usage, see xnUnlockNodeForChanges
Definition XnCppWrapper.h:2795
xn::ProductionNode::SetIntProperty
XnStatus SetIntProperty(const XnChar *strName, XnUInt64 nValue)
Sets an integer property. For full details and usage, see xnSetIntProperty
Definition XnCppWrapper.h:2714
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:2656
xn::ProductionNode::GetContext
void GetContext(Context &context) const
Gets the node's context.
Definition XnCppWrapper.h:9696
xn::ProductionNode::ProductionNode
ProductionNode(const NodeWrapper &other)
Definition XnCppWrapper.h:2640
xn::ProductionNode::IsCapabilitySupported
XnBool IsCapabilitySupported(const XnChar *strCapabilityName) const
Returns whether a production node supports a specific capability.
Definition XnCppWrapper.h:2705
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:2786
xn::ProductionNode::GetInfo
NodeInfo GetInfo() const
Gets information about the node.
Definition XnCppWrapper.h:2650
xn::ProductionNode::GetErrorStateCap
const ErrorStateCapability GetErrorStateCap() const
Gets an xn::ErrorStateCapability object for accessing the functionality of the Error State capability...
Definition XnCppWrapper.h:2826
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:2777
xn::ProductionNode::GetErrorStateCap
ErrorStateCapability GetErrorStateCap()
Gets an xn::ErrorStateCapability object for accessing the functionality of the Error State capability...
Definition XnCppWrapper.h:2839
xn::Query
Definition XnCppWrapper.h:1977
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:2019
xn::Query::~Query
~Query()
Definition XnCppWrapper.h:1988
xn::Query::SetSupportedMinUserPositions
XnStatus SetSupportedMinUserPositions(const XnUInt32 nCount)
For full details and usage, see xnNodeQuerySetSupportedMinUserPositions
Definition XnCppWrapper.h:2092
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:2027
xn::Query::Query
Query()
Definition XnCppWrapper.h:1979
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:2083
xn::Query::GetUnderlyingObject
XnNodeQuery * GetUnderlyingObject()
Definition XnCppWrapper.h:2000
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:2126
xn::Query::SetMaxVersion
XnStatus SetMaxVersion(const Version &maxVersion)
Sets in the Query object the maximum required version allowed for the node alternative.
Definition XnCppWrapper.h:2051
xn::Query::SetMinVersion
XnStatus SetMinVersion(const Version &minVersion)
Sets in the Query object the minimum required version allowed for the Node Alternative.
Definition XnCppWrapper.h:2035
xn::Query::SetVendor
XnStatus SetVendor(const XnChar *strVendor)
Sets in the Query object the vendor name to search for.
Definition XnCppWrapper.h:2006
xn::Query::Query
Query(XnNodeQuery *pNodeQuery)
Definition XnCppWrapper.h:1984
xn::Query::AddSupportedCapability
XnStatus AddSupportedCapability(const XnChar *strNeededCapability)
Sets in the Query object a capability that the Node Alternative must support.
Definition XnCppWrapper.h:2068
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:2117
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:2043
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:2108
xn::Query::GetUnderlyingObject
const XnNodeQuery * GetUnderlyingObject() const
Definition XnCppWrapper.h:1999
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:3757
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:3718
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:3732
xn::Recorder::Create
XnStatus Create(Context &context, const XnChar *strFormatName=NULL)
Creates a Recorder node.
Definition XnCppWrapper.h:9783
xn::Recorder::Record
XnStatus Record()
Records one frame of data from each node that was added to the recorder with AddNodeToRecording().
Definition XnCppWrapper.h:3774
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:3746
xn::Recorder::Recorder
Recorder(const NodeWrapper &other)
Definition XnCppWrapper.h:3699
xn::Recorder::Recorder
Recorder(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:3698
xn::Resolution::GetXResolution
XnUInt32 GetXResolution() const
Definition XnCppWrapper.h:9671
xn::Resolution::GetResolution
XnResolution GetResolution() const
Definition XnCppWrapper.h:9667
xn::Resolution::GetName
const XnChar * GetName() const
Definition XnCppWrapper.h:9679
xn::Resolution::GetYResolution
XnUInt32 GetYResolution() const
Definition XnCppWrapper.h:9675
xn::Resolution::Resolution
Resolution(XnResolution res)
Definition XnCppWrapper.h:9632
xn::Resolution::Resolution
Resolution(const XnChar *strName)
Definition XnCppWrapper.h:9656
xn::Resolution::Resolution
Resolution(XnUInt32 xRes, XnUInt32 yRes)
Definition XnCppWrapper.h:9645
xn::SceneAnalyzer::GetFloor
XnStatus GetFloor(XnPlane3D &Plane) const
Gets a description of the floor, if it was found.
Definition XnCppWrapper.h:5877
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:9897
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:5867
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:5858
xn::SceneAnalyzer::SceneAnalyzer
SceneAnalyzer(const NodeWrapper &other)
Definition XnCppWrapper.h:5827
xn::SceneAnalyzer::SceneAnalyzer
SceneAnalyzer(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:5826
xn::SceneMetaData
Definition XnCppWrapper.h:1451
xn::SceneMetaData::Data
const XnLabel * Data() const
Returns the scene map.
Definition XnCppWrapper.h:1523
xn::SceneMetaData::InitFrom
XnStatus InitFrom(const SceneMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer)
Definition XnCppWrapper.h:1483
xn::SceneMetaData::WritableLabelMap
xn::LabelMap & WritableLabelMap()
Definition XnCppWrapper.h:1551
xn::SceneMetaData::WritableData
XnLabel * WritableData()
Definition XnCppWrapper.h:1542
xn::SceneMetaData::InitFrom
void InitFrom(const SceneMetaData &other)
Shallow-Copies an SceneMetaData object.
Definition XnCppWrapper.h:1469
xn::SceneMetaData::operator()
const XnLabel & operator()(XnUInt32 x, XnUInt32 y) const
Definition XnCppWrapper.h:1580
xn::SceneMetaData::SceneMetaData
SceneMetaData()
Definition XnCppWrapper.h:1453
xn::SceneMetaData::Data
const XnLabel *& Data()
Returns the scene map.
Definition XnCppWrapper.h:1537
xn::SceneMetaData::GetUnderlying
XnSceneMetaData * GetUnderlying()
Definition XnCppWrapper.h:1593
xn::SceneMetaData::operator[]
const XnLabel & operator[](XnUInt32 nIndex) const
Definition XnCppWrapper.h:1563
xn::SceneMetaData::LabelMap
const xn::LabelMap & LabelMap() const
Definition XnCppWrapper.h:1547
xn::SceneMetaData::ReAdjust
XnStatus ReAdjust(XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer=NULL)
Definition XnCppWrapper.h:1505
xn::SceneMetaData::GetUnderlying
const XnSceneMetaData * GetUnderlying() const
Definition XnCppWrapper.h:1589
xn::SceneMetaData::CopyFrom
XnStatus CopyFrom(const SceneMetaData &other)
Definition XnCppWrapper.h:1494
xn::ScriptNode
Definition XnCppWrapper.h:8332
xn::ScriptNode::LoadScriptFromString
XnStatus LoadScriptFromString(const XnChar *strScript)
Loads an XML script string into the ScriptNode object.
Definition XnCppWrapper.h:8364
xn::ScriptNode::LoadScriptFromFile
XnStatus LoadScriptFromFile(const XnChar *strFileName)
Loads an XML script file into the ScriptNode object.
Definition XnCppWrapper.h:8354
xn::ScriptNode::ScriptNode
ScriptNode(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:8339
xn::ScriptNode::Create
XnStatus Create(Context &context, const XnChar *strFormat)
Definition XnCppWrapper.h:9977
xn::ScriptNode::GetSupportedFormat
const XnChar * GetSupportedFormat()
Definition XnCppWrapper.h:8344
xn::ScriptNode::Run
XnStatus Run(EnumerationErrors *pErrors)
Runs the ScriptNode object's XML script to build a production graph.
Definition XnCppWrapper.h:9972
xn::ScriptNode::ScriptNode
ScriptNode(const NodeWrapper &other)
Definition XnCppWrapper.h:8340
xn::SkeletonCapability
Definition XnCppWrapper.h:6375
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:6799
xn::SkeletonCapability::IsJointAvailable
XnBool IsJointAvailable(XnSkeletonJoint eJoint) const
Returns whether a specific skeleton joint is supported by the SkeletonCapability object.
Definition XnCppWrapper.h:6390
xn::SkeletonCapability::GetSkeletonJointOrientation
XnStatus GetSkeletonJointOrientation(XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation &Joint) const
Gets the orientation of a specific skeleton joint.
Definition XnCppWrapper.h:6559
xn::SkeletonCapability::IsProfileAvailable
XnBool IsProfileAvailable(XnSkeletonProfile eProfile) const
Returns whether a specific skeleton profile is supported by the SkeletonCapability object.
Definition XnCppWrapper.h:6400
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:6708
xn::SkeletonCapability::AbortCalibration
XnStatus AbortCalibration(XnUserID user)
Aborts an existing calibration process currently being executed for a specified user.
Definition XnCppWrapper.h:6647
xn::SkeletonCapability::RegisterToCalibrationStart
XnStatus RegisterToCalibrationStart(CalibrationStart handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Calibration Start' event.
Definition XnCppWrapper.h:6874
xn::SkeletonCapability::UnregisterFromJointConfigurationChange
void UnregisterFromJointConfigurationChange(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Joint Configuration Change' event.
Definition XnCppWrapper.h:6499
xn::SkeletonCapability::SaveCalibrationDataToFile
XnStatus SaveCalibrationDataToFile(XnUserID user, const XnChar *strFileName)
Saves the skeleton's current calibration data to a file.
Definition XnCppWrapper.h:6670
xn::SkeletonCapability::RequestCalibration
XnStatus RequestCalibration(XnUserID user, XnBool bForce)
Starts the calibration process to calibrate a user.
Definition XnCppWrapper.h:6633
xn::SkeletonCapability::RegisterToJointConfigurationChange
XnStatus RegisterToJointConfigurationChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Joint Configuration Change' event.
Definition XnCppWrapper.h:6487
xn::SkeletonCapability::StopTracking
XnStatus StopTracking(XnUserID user)
Stops tracking a skeleton.
Definition XnCppWrapper.h:6756
xn::SkeletonCapability::IsCalibrating
XnBool IsCalibrating(XnUserID user) const
Returns whether a user is being calibrated right now. see Calibration.
Definition XnCppWrapper.h:6604
xn::SkeletonCapability::LoadCalibrationDataFromFile
XnStatus LoadCalibrationDataFromFile(XnUserID user, const XnChar *strFileName)
Loads skeleton calibration data from a file to a skeleton.
Definition XnCppWrapper.h:6681
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:6782
xn::SkeletonCapability::SkeletonCapability
SkeletonCapability(XnNodeHandle hNode)
Definition XnCppWrapper.h:6382
xn::SkeletonCapability::UnregisterFromCalibrationComplete
void UnregisterFromCalibrationComplete(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Calibration Complete' event.
Definition XnCppWrapper.h:7032
xn::SkeletonCapability::RegisterToCalibrationInProgress
XnStatus RegisterToCalibrationInProgress(CalibrationInProgress handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Calibration In Progress' event.
Definition XnCppWrapper.h:6941
xn::SkeletonCapability::CalibrationStart
void(* CalibrationStart)(SkeletonCapability &skeleton, XnUserID user, void *pCookie)
Definition XnCppWrapper.h:6842
xn::SkeletonCapability::IsCalibrated
XnBool IsCalibrated(XnUserID user) const
Returns whether a user has been calibrated. see Calibration.
Definition XnCppWrapper.h:6589
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:6993
xn::SkeletonCapability::StartTracking
XnStatus StartTracking(XnUserID user)
Starts tracking a skeleton.
Definition XnCppWrapper.h:6747
xn::SkeletonCapability::UnregisterFromCalibrationStart
XnStatus UnregisterFromCalibrationStart(XnCallbackHandle hCallback)
Unregisters a handler from the 'Calibration Start' event.
Definition XnCppWrapper.h:6901
xn::SkeletonCapability::IsCalibrationData
XnBool IsCalibrationData(XnUInt32 nSlot) const
Returns whether a specific slot already holds calibration data.
Definition XnCppWrapper.h:6728
xn::SkeletonCapability::ClearCalibrationData
XnStatus ClearCalibrationData(XnUInt32 nSlot)
Clears a specified slot of any saved calibration data.
Definition XnCppWrapper.h:6718
xn::SkeletonCapability::SetSkeletonProfile
XnStatus SetSkeletonProfile(XnSkeletonProfile eProfile)
Sets the skeleton profile. The skeleton profile specifies which joints are to be active,...
Definition XnCppWrapper.h:6435
xn::SkeletonCapability::EnumerateActiveJoints
XnStatus EnumerateActiveJoints(XnSkeletonJoint *pJoints, XnUInt16 &nJoints) const
Get all active joints. For full details and usage, see xnEnumerateActiveJoints
Definition XnCppWrapper.h:6508
xn::SkeletonCapability::SkeletonCapability
SkeletonCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:6383
xn::SkeletonCapability::RegisterToCalibrationComplete
XnStatus RegisterToCalibrationComplete(CalibrationComplete handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'Calibration Complete' event.
Definition XnCppWrapper.h:7004
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:6697
xn::SkeletonCapability::IsJointActive
XnBool IsJointActive(XnSkeletonJoint eJoint) const
Checks if a specific joint is tracked or not.
Definition XnCppWrapper.h:6473
xn::SkeletonCapability::UnregisterFromCalibrationInProgress
void UnregisterFromCalibrationInProgress(XnCallbackHandle hCallback)
Unregisters an event handler for the 'Calibration In Progress' event.
Definition XnCppWrapper.h:6969
xn::SkeletonCapability::IsTracking
XnBool IsTracking(XnUserID user) const
Returns whether a user is currently being tracked.
Definition XnCppWrapper.h:6574
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:6521
xn::SkeletonCapability::Reset
XnStatus Reset(XnUserID user)
Discards a skeleton's calibration.
Definition XnCppWrapper.h:6769
xn::SkeletonCapability::CalibrationEnd
void(* CalibrationEnd)(SkeletonCapability &skeleton, XnUserID user, XnBool bSuccess, void *pCookie)
Definition XnCppWrapper.h:6861
xn::SkeletonCapability::SetSmoothing
XnStatus SetSmoothing(XnFloat fSmoothingFactor)
Sets the smoothing factor for all users generated by this xn::UserGenerator node.
Definition XnCppWrapper.h:6816
xn::SkeletonCapability::CalibrationInProgress
void(* CalibrationInProgress)(SkeletonCapability &skeleton, XnUserID user, XnCalibrationStatus calibrationError, void *pCookie)
Definition XnCppWrapper.h:6930
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:6463
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:6547
xn::StateChangedCallbackTranslator
Definition XnCppWrapper.h:10000
xn::StateChangedCallbackTranslator::Unregister
void Unregister(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
Definition XnCppWrapper.h:10009
xn::StateChangedCallbackTranslator::StateChangedCallbackTranslator
StateChangedCallbackTranslator(StateChangedHandler handler, void *pCookie)
Definition XnCppWrapper.h:10002
xn::StateChangedCallbackTranslator::Register
XnStatus Register(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode)
Definition XnCppWrapper.h:10004
xn::StateChangedCallbackTranslator::RegisterToUnderlying
static XnStatus RegisterToUnderlying(_XnRegisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Definition XnCppWrapper.h:10014
xn::StateChangedCallbackTranslator::UnregisterFromUnderlying
static XnStatus UnregisterFromUnderlying(_XnUnregisterStateChangeFuncPtr xnFunc, XnNodeHandle hNode, XnCallbackHandle hCallback)
Definition XnCppWrapper.h:10033
xn::StateChangedCallbackTranslator::GeneralIntCapability
friend class GeneralIntCapability
Definition XnCppWrapper.h:10042
xn::UserGenerator::RegisterToUserReEnter
XnStatus RegisterToUserReEnter(UserHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'User Reenter' event.
Definition XnCppWrapper.h:7943
xn::UserGenerator::GetPoseDetectionCap
PoseDetectionCapability GetPoseDetectionCap()
Gets a xn::PoseDetectionCapability object for accessing Pose Detection functionality.
Definition XnCppWrapper.h:7885
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:7757
xn::UserGenerator::UnregisterUserCallbacks
void UnregisterUserCallbacks(XnCallbackHandle hCallback)
Unregisters event handlers for the 'New User' and 'Lost User' events.
Definition XnCppWrapper.h:7821
xn::UserGenerator::UserGenerator
UserGenerator(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:7673
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:7777
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:9916
xn::UserGenerator::UserHandler
void(* UserHandler)(UserGenerator &generator, XnUserID user, void *pCookie)
Event handler signature for all UserGenerator events.
Definition XnCppWrapper.h:7697
xn::UserGenerator::UnregisterFromUserReEnter
void UnregisterFromUserReEnter(XnCallbackHandle hCallback)
Unregisters an event handler for the 'User Reenter' event.
Definition XnCppWrapper.h:7971
xn::UserGenerator::UnregisterFromUserExit
void UnregisterFromUserExit(XnCallbackHandle hCallback)
Unregisters an event handler for the 'User Exit' event.
Definition XnCppWrapper.h:7927
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:7792
xn::UserGenerator::RegisterToUserExit
XnStatus RegisterToUserExit(UserHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'User Exit' event.
Definition XnCppWrapper.h:7899
xn::UserGenerator::GetPoseDetectionCap
const PoseDetectionCapability GetPoseDetectionCap() const
Gets a xn::PoseDetectionCapability object for accessing Pose Detection functionality.
Definition XnCppWrapper.h:7870
xn::UserGenerator::GetSkeletonCap
const SkeletonCapability GetSkeletonCap() const
Gets a SkeletonCapability object for accessing Skeleton functionality.
Definition XnCppWrapper.h:7839
xn::UserGenerator::UserGenerator
UserGenerator(const NodeWrapper &other)
Definition XnCppWrapper.h:7674
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:7733
xn::UserGenerator::GetSkeletonCap
SkeletonCapability GetSkeletonCap()
Gets a SkeletonCapability object for accessing Skeleton functionality.
Definition XnCppWrapper.h:7855
xn::UserGenerator::GetNumberOfUsers
XnUInt16 GetNumberOfUsers() const
Gets the number of users currently identified in the scene.
Definition XnCppWrapper.h:7706
xn::UserPositionCapability
Definition XnCppWrapper.h:4586
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:4618
xn::UserPositionCapability::UnregisterFromUserPositionChange
void UnregisterFromUserPositionChange(XnCallbackHandle hCallback)
Unregisters the event handler for the 'User Position Change' event.
Definition XnCppWrapper.h:4644
xn::UserPositionCapability::UserPositionCapability
UserPositionCapability(const NodeWrapper &node)
Definition XnCppWrapper.h:4594
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:4609
xn::UserPositionCapability::UserPositionCapability
UserPositionCapability(XnNodeHandle hNode=NULL)
Definition XnCppWrapper.h:4593
xn::UserPositionCapability::RegisterToUserPositionChange
XnStatus RegisterToUserPositionChange(StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
Registers an event handler for the 'User Position Change' event.
Definition XnCppWrapper.h:4632
xn::UserPositionCapability::GetSupportedUserPositionsCount
XnUInt32 GetSupportedUserPositionsCount() const
Gets the number of user positions supported by this generator. For full details and usage,...
Definition XnCppWrapper.h:4600
xn::Version
Definition XnCppWrapper.h:120
xn::Version::operator<=
bool operator<=(const Version &other) const
Definition XnCppWrapper.h:143
xn::Version::operator!=
bool operator!=(const Version &other) const
Definition XnCppWrapper.h:135
xn::Version::Maintenance
XnUInt16 Maintenance() const
Definition XnCppWrapper.h:165
xn::Version::Version
Version(XnUInt8 nMajor, XnUInt8 nMinor, XnUInt16 nMaintenance, XnUInt32 nBuild)
Definition XnCppWrapper.h:123
xn::Version::Maintenance
XnUInt16 & Maintenance()
Definition XnCppWrapper.h:170
xn::Version::Current
static Version Current()
Definition XnCppWrapper.h:156
xn::Version::Build
XnUInt32 & Build()
Definition XnCppWrapper.h:171
xn::Version::operator>=
bool operator>=(const Version &other) const
Definition XnCppWrapper.h:151
xn::Version::Minor
XnUInt8 Minor() const
Definition XnCppWrapper.h:164
xn::Version::operator>
bool operator>(const Version &other) const
Definition XnCppWrapper.h:147
xn::Version::Minor
XnUInt8 & Minor()
Definition XnCppWrapper.h:169
xn::Version::Major
XnUInt8 & Major()
Definition XnCppWrapper.h:168
xn::Version::Build
XnUInt32 Build() const
Definition XnCppWrapper.h:166
xn::Version::operator==
bool operator==(const Version &other) const
Definition XnCppWrapper.h:131
xn::Version::GetUnderlying
XnVersion * GetUnderlying()
Definition XnCppWrapper.h:174
xn::Version::GetUnderlying
const XnVersion * GetUnderlying() const
Definition XnCppWrapper.h:173
xn::Version::Version
Version(const XnVersion &version)
Definition XnCppWrapper.h:122
xn::Version::Major
XnUInt8 Major() const
Definition XnCppWrapper.h:163
xn::Version::operator<
bool operator<(const Version &other) const
Definition XnCppWrapper.h:139
xnResetViewPoint
XN_C_API XnStatus XN_C_DECL xnResetViewPoint(XnNodeHandle hInstance)
Sets the view point of this generator to its normal one.
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.
xnUnregisterFromViewPointChange
XN_C_API void XN_C_DECL xnUnregisterFromViewPointChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToViewPointChange().
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,...
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.
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.
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.
xnUnregisterFromPowerLineFrequencyChange
XN_C_API void XN_C_DECL xnUnregisterFromPowerLineFrequencyChange(XnNodeHandle hGenerator, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToPowerLineFrequencyChange().
xnGetPowerLineFrequency
XN_C_API XnPowerLineFrequency XN_C_DECL xnGetPowerLineFrequency(XnNodeHandle hGenerator)
Gets the power line frequency.
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.
xnRegisterToWaveOutputModeChanges
XN_C_API XnStatus XN_C_DECL xnRegisterToWaveOutputModeChanges(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
xnSetWaveOutputMode
XN_C_API XnStatus XN_C_DECL xnSetWaveOutputMode(XnNodeHandle hInstance, const XnWaveOutputMode *OutputMode)
xnGetAudioMetaData
XN_C_API void XN_C_DECL xnGetAudioMetaData(XnNodeHandle hInstance, XnAudioMetaData *pMetaData)
Gets the current audio meta data.
xnGetWaveOutputMode
XN_C_API XnStatus XN_C_DECL xnGetWaveOutputMode(XnNodeHandle hInstance, XnWaveOutputMode *OutputMode)
xnUnregisterFromWaveOutputModeChanges
XN_C_API void XN_C_DECL xnUnregisterFromWaveOutputModeChanges(XnNodeHandle hInstance, XnCallbackHandle hCallback)
xnGetSupportedWaveOutputModes
XN_C_API XnStatus XN_C_DECL xnGetSupportedWaveOutputModes(XnNodeHandle hInstance, XnWaveOutputMode *aSupportedModes, XnUInt32 *pnCount)
xnGetSupportedWaveOutputModesCount
XN_C_API XnUInt32 XN_C_DECL xnGetSupportedWaveOutputModesCount(XnNodeHandle hInstance)
xnGetAudioBuffer
XN_C_API XnUChar *XN_C_DECL xnGetAudioBuffer(XnNodeHandle hInstance)
xnCreateAudioGenerator
XN_C_API XnStatus XN_C_DECL xnCreateAudioGenerator(XnContext *pContext, XnNodeHandle *phAudioGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an audio generator.
xnCreateCodec
XN_C_API XnStatus XN_C_DECL xnCreateCodec(XnContext *pContext, XnCodecID codecID, XnNodeHandle hInitializerNode, XnNodeHandle *phCodec)
xnGetCodecID
XN_C_API XnCodecID XN_C_DECL xnGetCodecID(XnNodeHandle hCodec)
xnEncodeData
XN_C_API XnStatus XN_C_DECL xnEncodeData(XnNodeHandle hCodec, const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten)
xnDecodeData
XN_C_API XnStatus XN_C_DECL xnDecodeData(XnNodeHandle hCodec, const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten)
xnUnregisterFromNodeCreation
XN_C_API void XN_C_DECL xnUnregisterFromNodeCreation(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeCreation().
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...
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....
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.
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...
xnInit
XN_C_API XnStatus XN_C_DECL xnInit(XnContext **ppContext)
Initializes the OpenNI library.
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.
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.
xnUnregisterFromGlobalErrorStateChange
XN_C_API void XN_C_DECL xnUnregisterFromGlobalErrorStateChange(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToGlobalErrorStateChange().
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,...
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,...
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...
xnStartGeneratingAll
XN_C_API XnStatus XN_C_DECL xnStartGeneratingAll(XnContext *pContext)
Make sure all generators are generating data.
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...
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,...
xnContextAddRef
XN_C_API XnStatus XN_C_DECL xnContextAddRef(XnContext *pContext)
Adds a reference to the context object.
xnGetGlobalMirror
XN_C_API XnBool XN_C_DECL xnGetGlobalMirror(XnContext *pContext)
Gets the global mirror flag.
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.
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...
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...
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...
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.
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....
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,...
xnStopGeneratingAll
XN_C_API XnStatus XN_C_DECL xnStopGeneratingAll(XnContext *pContext)
Stop all generators from generating data.
xnUnregisterFromNodeDestruction
XN_C_API void XN_C_DECL xnUnregisterFromNodeDestruction(XnContext *pContext, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeDestruction().
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.
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...
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...
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....
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.
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...
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,...
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...
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.
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...
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.
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.
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....
xnProductionNodeAddRef
XN_C_API XnStatus XN_C_DECL xnProductionNodeAddRef(XnNodeHandle hNode)
References a production node, increasing its reference count by 1.
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::StateChangedHandler
void(* StateChangedHandler)(ProductionNode &node, void *pCookie)
Definition XnCppWrapper.h:101
xn::DepthMap
Map< XnDepthPixel > DepthMap
Definition XnCppWrapper.h:707
xn::LabelMap
Map< XnLabel > LabelMap
Definition XnCppWrapper.h:719
xn::IRMap
Map< XnIRPixel > IRMap
Definition XnCppWrapper.h:717
xn::ImageMap
Map< XnUInt8 > ImageMap
Definition XnCppWrapper.h:709
xn::RGB24Map
Map< XnRGB24Pixel > RGB24Map
Definition XnCppWrapper.h:711
xn::Grayscale8Map
Map< XnGrayscale8Pixel > Grayscale8Map
Definition XnCppWrapper.h:715
xn::Grayscale16Map
Map< XnGrayscale16Pixel > Grayscale16Map
Definition XnCppWrapper.h:713
xnGetCropping
XN_C_API XnStatus XN_C_DECL xnGetCropping(XnNodeHandle hInstance, XnCropping *pCropping)
Gets current cropping configuration.
xnSetCropping
XN_C_API XnStatus XN_C_DECL xnSetCropping(XnNodeHandle hInstance, const XnCropping *pCropping)
Sets the cropping.
xnUnregisterFromCroppingChange
XN_C_API void XN_C_DECL xnUnregisterFromCroppingChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToCroppingChange().
xnRegisterToCroppingChange
XN_C_API XnStatus XN_C_DECL xnRegisterToCroppingChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to cropping changes.
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.
xnGetDepthMetaData
XN_C_API void XN_C_DECL xnGetDepthMetaData(XnNodeHandle hInstance, XnDepthMetaData *pMetaData)
Gets the current depth-map meta data.
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().
xnUnregisterFromDepthFieldOfViewChange
XN_C_API void XN_C_DECL xnUnregisterFromDepthFieldOfViewChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToDepthFieldOfViewChange.
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.
xnCreateDepthGenerator
XN_C_API XnStatus XN_C_DECL xnCreateDepthGenerator(XnContext *pContext, XnNodeHandle *phDepthGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a depth generator.
xnGetDeviceMaxDepth
XN_C_API XnDepthPixel XN_C_DECL xnGetDeviceMaxDepth(XnNodeHandle hInstance)
Gets the maximum depth the device can produce.
xnGetDepthFieldOfView
XN_C_API XnStatus XN_C_DECL xnGetDepthFieldOfView(XnNodeHandle hInstance, XnFieldOfView *pFOV)
Gets the Field-Of-View of the depth generator, in radians.
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.
xnGetSerialNumber
XN_C_API XnStatus XN_C_DECL xnGetSerialNumber(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
xnGetVendorSpecificData
XN_C_API XnStatus XN_C_DECL xnGetVendorSpecificData(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
xnGetDeviceName
XN_C_API XnStatus XN_C_DECL xnGetDeviceName(XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
xnCreateDevice
XN_C_API XnStatus XN_C_DECL xnCreateDevice(XnContext *pContext, XnNodeHandle *phDevice, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a device node.
XnEnumerationErrors
struct XnEnumerationErrors XnEnumerationErrors
Definition XnTypes.h:214
xnEnumerationErrorsGetNext
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetNext(XnEnumerationErrorsIterator it)
xnEnumerationErrorsAllocate
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsAllocate(XnEnumerationErrors **ppErrors)
XnEnumerationErrorsIterator
struct XnModuleError * XnEnumerationErrorsIterator
Definition XnEnumerationErrors.h:57
xnEnumerationErrorsFree
XN_C_API void XN_C_DECL xnEnumerationErrorsFree(const XnEnumerationErrors *pErrors)
xnEnumerationErrorsGetCurrentError
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsGetCurrentError(XnEnumerationErrorsIterator it)
xnEnumerationErrorsGetFirst
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetFirst(const XnEnumerationErrors *pErrors)
xnEnumerationErrorsToString
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsToString(const XnEnumerationErrors *pErrors, XnChar *csBuffer, XnUInt32 nSize)
xnEnumerationErrorsGetCurrentDescription
XN_C_API const XnProductionNodeDescription *XN_C_DECL xnEnumerationErrorsGetCurrentDescription(XnEnumerationErrorsIterator it)
xnGetNodeErrorState
XN_C_API XnStatus XN_C_DECL xnGetNodeErrorState(XnNodeHandle hInstance)
Gets current error state of this node.
xnUnregisterFromNodeErrorStateChange
XN_C_API void XN_C_DECL xnUnregisterFromNodeErrorStateChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNodeErrorStateChange().
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.
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.
xnUnregisterFromFrameSyncChange
XN_C_API void XN_C_DECL xnUnregisterFromFrameSyncChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToFrameSyncChange().
xnStopFrameSyncWith
XN_C_API XnStatus XN_C_DECL xnStopFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Stops frame sync with the other node.
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.
xnCanFrameSyncWith
XN_C_API XnBool XN_C_DECL xnCanFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Checks if this generator can frame sync to another node.
xnFrameSyncWith
XN_C_API XnStatus XN_C_DECL xnFrameSyncWith(XnNodeHandle hInstance, XnNodeHandle hOther)
Activates frame sync with the other node.
xnSetGeneralIntValue
XN_C_API XnStatus XN_C_DECL xnSetGeneralIntValue(XnNodeHandle hNode, const XnChar *strCap, XnInt32 nValue)
Sets the current value of this capability.
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.
xnGetGeneralIntValue
XN_C_API XnStatus XN_C_DECL xnGetGeneralIntValue(XnNodeHandle hNode, const XnChar *strCap, XnInt32 *pnValue)
Gets the current value of this capability.
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.
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().
xnGetDataSize
XN_C_API XnUInt32 XN_C_DECL xnGetDataSize(XnNodeHandle hInstance)
Gets the size of current data, in bytes.
xnIsGenerating
XN_C_API XnBool XN_C_DECL xnIsGenerating(XnNodeHandle hInstance)
Checks if this node is currently generating.
xnUnregisterFromNewDataAvailable
XN_C_API void XN_C_DECL xnUnregisterFromNewDataAvailable(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToNewDataAvailable().
xnGetData
XN_C_API const void *XN_C_DECL xnGetData(XnNodeHandle hInstance)
Gets the current data.
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...
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).
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...
xnGetFrameID
XN_C_API XnUInt32 XN_C_DECL xnGetFrameID(XnNodeHandle hInstance)
Gets the frame ID of current data.
xnGetTimestamp
XN_C_API XnUInt64 XN_C_DECL xnGetTimestamp(XnNodeHandle hInstance)
Gets the timestamp of current data, in microseconds.
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.
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.
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.
xnStopGenerating
XN_C_API XnStatus XN_C_DECL xnStopGenerating(XnNodeHandle hInstance)
Stops generation of the output.
xnUnregisterFromGenerationRunningChange
XN_C_API void XN_C_DECL xnUnregisterFromGenerationRunningChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToGenerationRunningChange().
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).
xnRegisterGestureCallbacks
XN_C_API XnStatus XN_C_DECL xnRegisterGestureCallbacks(XnNodeHandle hInstance, XnGestureRecognized RecognizedCB, XnGestureProgress ProgressCB, void *pCookie, XnCallbackHandle *phCallback)
Register to all gesture callbacks.
xnEnumerateGestures
XN_C_API XnStatus XN_C_DECL xnEnumerateGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt16 *nGestures)
Get the names of all gestures available.
xnUnregisterFromGestureReadyForNextIntermediateStage
XN_C_API void XN_C_DECL xnUnregisterFromGestureReadyForNextIntermediateStage(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a gesture is ready for its next stage.
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.
xnUnregisterFromGestureIntermediateStageCompleted
XN_C_API void XN_C_DECL xnUnregisterFromGestureIntermediateStageCompleted(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a gesture is in progress.
xnCreateGestureGenerator
XN_C_API XnStatus XN_C_DECL xnCreateGestureGenerator(XnContext *pContext, XnNodeHandle *phGestureGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a Gesture Generator.
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.
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.
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.
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.
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.
xnUnregisterFromGestureChange
XN_C_API void XN_C_DECL xnUnregisterFromGestureChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when gestures are added or removed.
xnEnumerateAllGestures
XN_C_API XnStatus XN_C_DECL xnEnumerateAllGestures(XnNodeHandle hInstance, XnChar **pstrGestures, XnUInt32 nNameLength, XnUInt16 *nGestures)
Get the names of all gestures available.
xnIsGestureProgressSupported
XN_C_API XnBool XN_C_DECL xnIsGestureProgressSupported(XnNodeHandle hInstance, const XnChar *strGesture)
Check if the specific gesture supports 'in progress' callbacks.
xnUnregisterGestureCallbacks
XN_C_API void XN_C_DECL xnUnregisterGestureCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from gesture callbacks.
xnGetNumberOfAvailableGestures
XN_C_API XnUInt16 XN_C_DECL xnGetNumberOfAvailableGestures(XnNodeHandle hInstance)
Get the number of all gestures available.
xnIsGestureAvailable
XN_C_API XnBool XN_C_DECL xnIsGestureAvailable(XnNodeHandle hInstance, const XnChar *strGesture)
Check if a specific gesture is available in this generator.
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.
xnCreateHandsGenerator
XN_C_API XnStatus XN_C_DECL xnCreateHandsGenerator(XnContext *pContext, XnNodeHandle *phHandsGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an hands generator.
xnStopTrackingAll
XN_C_API XnStatus XN_C_DECL xnStopTrackingAll(XnNodeHandle hInstance)
Stop tracking all hands.
xnStopTracking
XN_C_API XnStatus XN_C_DECL xnStopTracking(XnNodeHandle hInstance, XnUserID user)
Stop tracking a specific hand.
xnSetTrackingSmoothing
XN_C_API XnStatus XN_C_DECL xnSetTrackingSmoothing(XnNodeHandle hInstance, XnFloat fFactor)
Change smoothing factor.
xnStartTracking
XN_C_API XnStatus XN_C_DECL xnStartTracking(XnNodeHandle hInstance, const XnPoint3D *pPosition)
Start tracking at a specific position.
xnUnregisterHandCallbacks
XN_C_API void XN_C_DECL xnUnregisterHandCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from hands callbacks.
xnUnregisterFromPixelFormatChange
XN_C_API void XN_C_DECL xnUnregisterFromPixelFormatChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToPixelFormatChange.
xnIsPixelFormatSupported
XN_C_API XnBool XN_C_DECL xnIsPixelFormatSupported(XnNodeHandle hInstance, XnPixelFormat Format)
Checks if a specific pixel format is supported.
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()....
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()....
xnGetImageMetaData
XN_C_API void XN_C_DECL xnGetImageMetaData(XnNodeHandle hInstance, XnImageMetaData *pMetaData)
Gets the current image-map meta data.
xnSetPixelFormat
XN_C_API XnStatus XN_C_DECL xnSetPixelFormat(XnNodeHandle hInstance, XnPixelFormat Format)
Sets the pixel format of the image map.
xnCreateImageGenerator
XN_C_API XnStatus XN_C_DECL xnCreateImageGenerator(XnContext *pContext, XnNodeHandle *phImageGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an image generator.
xnGetPixelFormat
XN_C_API XnPixelFormat XN_C_DECL xnGetPixelFormat(XnNodeHandle hInstance)
Gets current pixel format.
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()....
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()....
xnGetImageMap
XN_C_API XnUInt8 *XN_C_DECL xnGetImageMap(XnNodeHandle hInstance)
Gets the current image-map as a byte buffer.
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.
xnNodeInfoListAddEx
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddEx(XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes, const void *pAdditionalData, XnFreeHandler pFreeHandler)
xnNodeInfoListAllocate
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAllocate(XnNodeInfoList **ppList)
xnNodeInfoListIteratorIsValid
XN_C_API XnBool XN_C_DECL xnNodeInfoListIteratorIsValid(XnNodeInfoListIterator it)
xnNodeInfoListFree
XN_C_API void XN_C_DECL xnNodeInfoListFree(XnNodeInfoList *pList)
xnNodeInfoListRemove
XN_C_API XnStatus XN_C_DECL xnNodeInfoListRemove(XnNodeInfoList *pList, XnNodeInfoListIterator it)
xnNodeInfoListGetNext
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetNext(XnNodeInfoListIterator it)
xnNodeInfoListAppend
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAppend(XnNodeInfoList *pList, XnNodeInfoList *pOther)
xnNodeInfoListAdd
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAdd(XnNodeInfoList *pList, const XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnNodeInfoList *pNeededNodes)
xnNodeInfoListGetLast
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetLast(XnNodeInfoList *pList)
xnNodeInfoListGetPrevious
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetPrevious(XnNodeInfoListIterator it)
xnNodeInfoListAddNodeFromList
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddNodeFromList(XnNodeInfoList *pList, XnNodeInfoListIterator otherListIt)
xnNodeInfoListGetCurrent
XN_C_API XnNodeInfo *XN_C_DECL xnNodeInfoListGetCurrent(XnNodeInfoListIterator it)
xnNodeInfoListIsEmpty
XN_C_API XnBool XN_C_DECL xnNodeInfoListIsEmpty(XnNodeInfoList *pList)
xnNodeInfoListGetFirst
XN_C_API XnNodeInfoListIterator XN_C_DECL xnNodeInfoListGetFirst(XnNodeInfoList *pList)
xnNodeInfoListClear
XN_C_API XnStatus XN_C_DECL xnNodeInfoListClear(XnNodeInfoList *pList)
xnNodeInfoListAddNode
XN_C_API XnStatus XN_C_DECL xnNodeInfoListAddNode(XnNodeInfoList *pList, XnNodeInfo *pNode)
xnGetIRMetaData
XN_C_API void XN_C_DECL xnGetIRMetaData(XnNodeHandle hInstance, XnIRMetaData *pMetaData)
Gets the current IR-map meta data.
xnCreateIRGenerator
XN_C_API XnStatus XN_C_DECL xnCreateIRGenerator(XnContext *pContext, XnNodeHandle *phIRGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an IR generator.
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().
xnFreeLicensesList
XN_C_API void XN_C_DECL xnFreeLicensesList(XnLicense *aLicenses)
xnEnumerateLicenses
XN_C_API XnStatus XN_C_DECL xnEnumerateLicenses(XnContext *pContext, XnLicense **paLicenses, XnUInt32 *pnCount)
xnAddLicense
XN_C_API XnStatus XN_C_DECL xnAddLicense(XnContext *pContext, const XnLicense *pLicense)
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...
xnSetMapOutputMode
XN_C_API XnStatus XN_C_DECL xnSetMapOutputMode(XnNodeHandle hInstance, const XnMapOutputMode *pOutputMode)
Sets the output mode.
xnRegisterToMapOutputModeChange
XN_C_API XnStatus XN_C_DECL xnRegisterToMapOutputModeChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to mode changes.
xnGetBytesPerPixel
XN_C_API XnUInt32 XN_C_DECL xnGetBytesPerPixel(XnNodeHandle hInstance)
Gets the number of bytes per pixel for this map generator.
xnGetMapOutputMode
XN_C_API XnStatus XN_C_DECL xnGetMapOutputMode(XnNodeHandle hInstance, XnMapOutputMode *pOutputMode)
Gets the current output mode.
xnUnregisterFromMapOutputModeChange
XN_C_API void XN_C_DECL xnUnregisterFromMapOutputModeChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToMapOutputModeChange.
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...
xnUnregisterFromMirrorChange
XN_C_API void XN_C_DECL xnUnregisterFromMirrorChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToMirrorChange().
xnIsMirrored
XN_C_API XnBool XN_C_DECL xnIsMirrored(XnNodeHandle hInstance)
Gets current mirroring configuration.
xnRegisterToMirrorChange
XN_C_API XnStatus XN_C_DECL xnRegisterToMirrorChange(XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
Registers a callback function to mirror changes.
xnSetMirror
XN_C_API XnStatus XN_C_DECL xnSetMirror(XnNodeHandle hInstance, XnBool bMirror)
Sets current mirror configuration.
xnMockAudioSetData
XN_C_API XnStatus XN_C_DECL xnMockAudioSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pData)
xnMockRawSetData
XN_C_API XnStatus XN_C_DECL xnMockRawSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const void *pData)
xnMockImageSetData
XN_C_API XnStatus XN_C_DECL xnMockImageSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnUInt8 *pData)
xnMockIRSetData
XN_C_API XnStatus XN_C_DECL xnMockIRSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnIRPixel *pData)
xnMockDepthSetData
XN_C_API XnStatus XN_C_DECL xnMockDepthSetData(XnNodeHandle hInstance, XnUInt32 nFrameID, XnUInt64 nTimestamp, XnUInt32 nDataSize, const XnDepthPixel *pData)
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...
xnLockedNodeEndChanges
XN_C_API XnStatus XN_C_DECL xnLockedNodeEndChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Ends changes request on a locked node.
xnSetStringProperty
XN_C_API XnStatus XN_C_DECL xnSetStringProperty(XnNodeHandle hInstance, const XnChar *strName, const XnChar *strValue)
Sets a string property.
xnSetGeneralProperty
XN_C_API XnStatus XN_C_DECL xnSetGeneralProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt32 nBufferSize, const void *pBuffer)
Sets a buffer property.
xnUnlockNodeForChanges
XN_C_API XnStatus XN_C_DECL xnUnlockNodeForChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Unlocks a previously locked node.
xnGetNodeInfo
XN_C_API XnNodeInfo *XN_C_DECL xnGetNodeInfo(XnNodeHandle hNode)
Gets information about a specific node, like its description, and dependent nodes.
xnGetNodeName
XN_C_API const XnChar *XN_C_DECL xnGetNodeName(XnNodeHandle hNode)
Gets the instance name of a node by its handle.
xnLockedNodeStartChanges
XN_C_API XnStatus XN_C_DECL xnLockedNodeStartChanges(XnNodeHandle hInstance, XnLockHandle hLock)
Start changes request on a locked node, without releasing that lock.
xnGetStringProperty
XN_C_API XnStatus XN_C_DECL xnGetStringProperty(XnNodeHandle hInstance, const XnChar *strName, XnChar *csValue, XnUInt32 nBufSize)
Gets a string property.
xnGetIntProperty
XN_C_API XnStatus XN_C_DECL xnGetIntProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt64 *pnValue)
Gets an integer property.
xnIsCapabilitySupported
XN_C_API XnBool XN_C_DECL xnIsCapabilitySupported(XnNodeHandle hInstance, const XnChar *strCapabilityName)
Checks if a production node supports specific capability.
xnRemoveNeededNode
XN_C_API XnStatus XN_C_DECL xnRemoveNeededNode(XnNodeHandle hInstance, XnNodeHandle hNeededNode)
Removes a needed node from the list of needed nodes.
xnSetIntProperty
XN_C_API XnStatus XN_C_DECL xnSetIntProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt64 nValue)
Sets an integer property.
xnGetRealProperty
XN_C_API XnStatus XN_C_DECL xnGetRealProperty(XnNodeHandle hInstance, const XnChar *strName, XnDouble *pdValue)
Gets a real property.
xnGetGeneralProperty
XN_C_API XnStatus XN_C_DECL xnGetGeneralProperty(XnNodeHandle hInstance, const XnChar *strName, XnUInt32 nBufferSize, void *pBuffer)
Gets a buffer property.
xnSetRealProperty
XN_C_API XnStatus XN_C_DECL xnSetRealProperty(XnNodeHandle hInstance, const XnChar *strName, XnDouble dValue)
Sets a real property.
xnLockNodeForChanges
XN_C_API XnStatus XN_C_DECL xnLockNodeForChanges(XnNodeHandle hInstance, XnLockHandle *phLock)
Locks a node, not allowing any changes (any "set" function).
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.
xnCreatePlayer
XN_C_API XnStatus XN_C_DECL xnCreatePlayer(XnContext *pContext, const XnChar *strFormatName, XnNodeHandle *phPlayer)
Creates a player.
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....
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.
xnIsPlayerAtEOF
XN_C_API XnBool XN_C_DECL xnIsPlayerAtEOF(XnNodeHandle hPlayer)
Checks whether the player is at the end-of-file marker.
xnPlayerReadNext
XN_C_API XnStatus XN_C_DECL xnPlayerReadNext(XnNodeHandle hPlayer)
Reads the next data element from the player.
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 ...
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.
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.
xnGetPlaybackSpeed
XN_C_API XnDouble XN_C_DECL xnGetPlaybackSpeed(XnNodeHandle hInstance)
Gets the playback speed. see xnSetPlaybackSpeed() for more details.
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...
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...
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.
xnGetPlayerSupportedFormat
XN_C_API const XnChar *XN_C_DECL xnGetPlayerSupportedFormat(XnNodeHandle hPlayer)
Gets the name of the format supported by a player.
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.
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.
xnEnumeratePlayerNodes
XN_C_API XnStatus XN_C_DECL xnEnumeratePlayerNodes(XnNodeHandle hPlayer, XnNodeInfoList **ppList)
Retrieves a list of the nodes played by a player.
xnUnregisterFromEndOfFileReached
XN_C_API void XN_C_DECL xnUnregisterFromEndOfFileReached(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToEndOfFileReached().
xnGetPoseStatus
XN_C_API XnStatus xnGetPoseStatus(XnNodeHandle hInstance, XnUserID userID, const XnChar *poseName, XnUInt64 *poseTime, XnPoseDetectionStatus *eStatus, XnPoseDetectionState *eState)
Gets the current pose status.
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.
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.
xnRegisterToPoseDetected
XN_C_API XnStatus xnRegisterToPoseDetected(XnNodeHandle hInstance, XnPoseDetectionCallback handler, void *pCookie, XnCallbackHandle *phCallback)
Register to callback when a user is in pose.
xnStopPoseDetection
XN_C_API XnStatus XN_C_DECL xnStopPoseDetection(XnNodeHandle hInstance, XnUserID user)
Stop detection of poses for a specific user.
xnIsPoseSupported
XN_C_API XnBool XN_C_DECL xnIsPoseSupported(XnNodeHandle hInstance, const XnChar *strPose)
Tests if a pose is supported.
xnUnregisterFromPoseDetected
XN_C_API void xnUnregisterFromPoseDetected(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose detected callback.
xnGetNumberOfPoses
XN_C_API XnUInt32 XN_C_DECL xnGetNumberOfPoses(XnNodeHandle hInstance)
Get the number of the supported poses.
xnUnregisterFromOutOfPose
XN_C_API void xnUnregisterFromOutOfPose(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from out of pose callback.
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.
xnUnregisterFromPoseCallbacks
XN_C_API void XN_C_DECL xnUnregisterFromPoseCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose events.
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.
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.
xnUnregisterFromPoseDetectionInProgress
XN_C_API void XN_C_DECL xnUnregisterFromPoseDetectionInProgress(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from pose status callback.
xnGetAllAvailablePoses
XN_C_API XnStatus XN_C_DECL xnGetAllAvailablePoses(XnNodeHandle hInstance, XnChar **pstrPoses, XnUInt32 nNameLength, XnUInt32 *pnPoses)
Get the names of the supported poses.
xnGetAvailablePoses
XN_C_API XnStatus XN_C_DECL xnGetAvailablePoses(XnNodeHandle hInstance, XnChar **pstrPoses, XnUInt32 *pnPoses)
Get the names of the supported poses.
xnNodeInfoGetNeededNodes
XN_C_API XnNodeInfoList *XN_C_DECL xnNodeInfoGetNeededNodes(XnNodeInfo *pNodeInfo)
xnNodeInfoGetInstanceName
XN_C_API const XnChar *XN_C_DECL xnNodeInfoGetInstanceName(XnNodeInfo *pNodeInfo)
xnNodeInfoGetDescription
XN_C_API const XnProductionNodeDescription *XN_C_DECL xnNodeInfoGetDescription(XnNodeInfo *pNodeInfo)
xnNodeInfoGetCreationInfo
XN_C_API const XnChar *XN_C_DECL xnNodeInfoGetCreationInfo(XnNodeInfo *pNodeInfo)
xnNodeInfoSetInstanceName
XN_C_API XnStatus XN_C_DECL xnNodeInfoSetInstanceName(XnNodeInfo *pNodeInfo, const XnChar *strInstanceName)
xnNodeInfoGetTreeStringRepresentation
XN_C_API XnStatus XN_C_DECL xnNodeInfoGetTreeStringRepresentation(XnNodeInfo *pNodeInfo, XnChar *csResult, XnUInt32 nSize)
xnNodeInfoGetAdditionalData
XN_C_API const void *XN_C_DECL xnNodeInfoGetAdditionalData(XnNodeInfo *pNodeInfo)
xnNodeInfoGetRefHandle
XN_C_API XnNodeHandle XN_C_DECL xnNodeInfoGetRefHandle(XnNodeInfo *pNodeInfo)
xnNodeQuerySetName
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetName(XnNodeQuery *pQuery, const XnChar *strName)
xnNodeQueryAllocate
XN_C_API XnStatus XN_C_DECL xnNodeQueryAllocate(XnNodeQuery **ppQuery)
xnNodeQuerySetExistingNodeOnly
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetExistingNodeOnly(XnNodeQuery *pQuery, XnBool bExistingNode)
xnNodeQuerySetSupportedMinUserPositions
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetSupportedMinUserPositions(XnNodeQuery *pQuery, const XnUInt32 nCount)
xnNodeQuerySetCreationInfo
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetCreationInfo(XnNodeQuery *pQuery, const XnChar *strCreationInfo)
xnNodeQueryFilterList
XN_C_API XnStatus XN_C_DECL xnNodeQueryFilterList(XnContext *pContext, const XnNodeQuery *pQuery, XnNodeInfoList *pList)
xnNodeQueryAddSupportedCapability
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddSupportedCapability(XnNodeQuery *pQuery, const XnChar *strNeededCapability)
xnNodeQuerySetVendor
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetVendor(XnNodeQuery *pQuery, const XnChar *strVendor)
xnNodeQuerySetMaxVersion
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetMaxVersion(XnNodeQuery *pQuery, const XnVersion *pMaxVersion)
xnNodeQueryFree
XN_C_API void XN_C_DECL xnNodeQueryFree(XnNodeQuery *pQuery)
xnNodeQueryAddNeededNode
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddNeededNode(XnNodeQuery *pQuery, const XnChar *strInstanceName)
xnNodeQueryAddSupportedMapOutputMode
XN_C_API XnStatus XN_C_DECL xnNodeQueryAddSupportedMapOutputMode(XnNodeQuery *pQuery, const XnMapOutputMode *pMapOutputMode)
xnNodeQuerySetMinVersion
XN_C_API XnStatus XN_C_DECL xnNodeQuerySetMinVersion(XnNodeQuery *pQuery, const XnVersion *pMinVersion)
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...
XnRecordMedium
XnRecordMedium
Definition XnTypes.h:833
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...
xnGetRecorderDestination
XN_C_API XnStatus XN_C_DECL xnGetRecorderDestination(XnNodeHandle hRecorder, XnRecordMedium *pDestType, XnChar *strDest, XnUInt32 nBufSize)
Returns the recoder's destination.
xnCreateRecorder
XN_C_API XnStatus XN_C_DECL xnCreateRecorder(XnContext *pContext, const XnChar *strFormatName, XnNodeHandle *phRecorder)
Creates a recorder.
xnSetRecorderDestination
XN_C_API XnStatus XN_C_DECL xnSetRecorderDestination(XnNodeHandle hRecorder, XnRecordMedium destType, const XnChar *strDest)
Tells the recorder where to record.
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.
xnGetLabelMap
XN_C_API const XnLabel *XN_C_DECL xnGetLabelMap(XnNodeHandle hInstance)
Gets the label map, describing the current segmentation of the scene.
xnCreateSceneAnalyzer
XN_C_API XnStatus XN_C_DECL xnCreateSceneAnalyzer(XnContext *pContext, XnNodeHandle *phSceneAnalyzer, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates an scene analyzer.
xnGetFloor
XN_C_API XnStatus XN_C_DECL xnGetFloor(XnNodeHandle hInstance, XnPlane3D *pPlane)
Gets a description of the floor, if it was found.
xnGetSceneMetaData
XN_C_API void XN_C_DECL xnGetSceneMetaData(XnNodeHandle hInstance, XnSceneMetaData *pMetaData)
Gets the current scene meta data.
xnScriptNodeGetSupportedFormat
XN_C_API const XnChar *XN_C_DECL xnScriptNodeGetSupportedFormat(XnNodeHandle hScript)
xnCreateScriptNode
XN_C_API XnStatus XN_C_DECL xnCreateScriptNode(XnContext *pContext, const XnChar *strFormat, XnNodeHandle *phScript)
xnLoadScriptFromFile
XN_C_API XnStatus XN_C_DECL xnLoadScriptFromFile(XnNodeHandle hScript, const XnChar *strFileName)
xnLoadScriptFromString
XN_C_API XnStatus XN_C_DECL xnLoadScriptFromString(XnNodeHandle hScript, const XnChar *strScript)
xnScriptNodeRun
XN_C_API XnStatus XN_C_DECL xnScriptNodeRun(XnNodeHandle hScript, XnEnumerationErrors *pErrors)
xnEnumerateActiveJoints
XN_C_API XnStatus XN_C_DECL xnEnumerateActiveJoints(XnNodeHandle hInstance, XnSkeletonJoint *pJoints, XnUInt16 *pnJoints)
Get all active joints.
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.
xnIsProfileAvailable
XN_C_API XnBool XN_C_DECL xnIsProfileAvailable(XnNodeHandle hInstance, XnSkeletonProfile eProfile)
Check if generator supports a specific profile.
xnGetSkeletonJoint
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJoint(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointTransformation *pJoint)
Get a specific joint's full information.
xnUnregisterFromCalibrationInProgress
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationInProgress(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration status while in progress.
xnSaveSkeletonCalibrationData
XN_C_API XnStatus XN_C_DECL xnSaveSkeletonCalibrationData(XnNodeHandle hInstance, XnUserID user, XnUInt32 nSlot)
Save the calibration data.
xnIsSkeletonCalibrationData
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrationData(XnNodeHandle hInstance, XnUInt32 nSlot)
Check if a specific slot already holds calibration data.
xnLoadSkeletonCalibrationDataFromFile
XN_C_API XnStatus XN_C_DECL xnLoadSkeletonCalibrationDataFromFile(XnNodeHandle hInstance, XnUserID user, const XnChar *strFileName)
Load previously saved calibration data from file.
xnNeedPoseForSkeletonCalibration
XN_C_API XnBool XN_C_DECL xnNeedPoseForSkeletonCalibration(XnNodeHandle hInstance)
Check if a specific pose is required for calibration.
xnResetSkeleton
XN_C_API XnStatus XN_C_DECL xnResetSkeleton(XnNodeHandle hInstance, XnUserID user)
Reset the skeleton - discard calibration.
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.
xnRequestSkeletonCalibration
XN_C_API XnStatus XN_C_DECL xnRequestSkeletonCalibration(XnNodeHandle hInstance, XnUserID user, XnBool bForce)
Request calibration when possible.
xnIsJointAvailable
XN_C_API XnBool XN_C_DECL xnIsJointAvailable(XnNodeHandle hInstance, XnSkeletonJoint eJoint)
Check if generator supports a specific joint.
xnAbortSkeletonCalibration
XN_C_API XnStatus XN_C_DECL xnAbortSkeletonCalibration(XnNodeHandle hInstance, XnUserID user)
stop calibration
xnIsSkeletonTracking
XN_C_API XnBool XN_C_DECL xnIsSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being tracked.
xnSaveSkeletonCalibrationDataToFile
XN_C_API XnStatus XN_C_DECL xnSaveSkeletonCalibrationDataToFile(XnNodeHandle hInstance, XnUserID user, const XnChar *strFileName)
Save the calibration data to file.
xnIsJointActive
XN_C_API XnBool XN_C_DECL xnIsJointActive(XnNodeHandle hInstance, XnSkeletonJoint eJoint)
Check if joint is currently active.
xnUnregisterFromCalibrationComplete
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationComplete(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration complete with status.
xnRegisterCalibrationCallbacks
XN_C_API XnStatus XN_C_DECL xnRegisterCalibrationCallbacks(XnNodeHandle hInstance, XnCalibrationStart CalibrationStartCB, XnCalibrationEnd CalibrationEndCB, void *pCookie, XnCallbackHandle *phCallback)
Register to calibration callbacks.
xnGetSkeletonJointOrientation
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJointOrientation(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointOrientation *pJoint)
Get a specific joint's orientation.
xnSetSkeletonSmoothing
XN_C_API XnStatus XN_C_DECL xnSetSkeletonSmoothing(XnNodeHandle hInstance, XnFloat fFactor)
Set the skeleton's smoothing factor.
xnLoadSkeletonCalibrationData
XN_C_API XnStatus XN_C_DECL xnLoadSkeletonCalibrationData(XnNodeHandle hInstance, XnUserID user, XnUInt32 nSlot)
Load previously saved calibration data.
xnUnregisterFromJointConfigurationChange
XN_C_API void XN_C_DECL xnUnregisterFromJointConfigurationChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from joint configuration changes.
xnRegisterToCalibrationStart
XN_C_API XnStatus XN_C_DECL xnRegisterToCalibrationStart(XnNodeHandle hInstance, XnCalibrationStart handler, void *pCookie, XnCallbackHandle *phCallback)
Register to calibration start callback.
xnStopSkeletonTracking
XN_C_API XnStatus XN_C_DECL xnStopSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Stop tracking a skeleton.
xnUnregisterFromCalibrationStart
XN_C_API void XN_C_DECL xnUnregisterFromCalibrationStart(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration start callback.
xnIsSkeletonCalibrating
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrating(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being calibrated.
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.
xnGetSkeletonCalibrationPose
XN_C_API XnStatus XN_C_DECL xnGetSkeletonCalibrationPose(XnNodeHandle hInstance, XnChar *strPose)
Get the pose that is required for calibration.
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.
xnUnregisterCalibrationCallbacks
XN_C_API void XN_C_DECL xnUnregisterCalibrationCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from calibration callbacks.
xnClearSkeletonCalibrationData
XN_C_API XnStatus XN_C_DECL xnClearSkeletonCalibrationData(XnNodeHandle hInstance, XnUInt32 nSlot)
Clear the requested slot from any saved calibration data.
xnGetSkeletonJointPosition
XN_C_API XnStatus XN_C_DECL xnGetSkeletonJointPosition(XnNodeHandle hInstance, XnUserID user, XnSkeletonJoint eJoint, XnSkeletonJointPosition *pJoint)
Get a specific joint's position.
xnIsSkeletonCalibrated
XN_C_API XnBool XN_C_DECL xnIsSkeletonCalibrated(XnNodeHandle hInstance, XnUserID user)
Check if skeleton is being calibrated.
xnStartSkeletonTracking
XN_C_API XnStatus XN_C_DECL xnStartSkeletonTracking(XnNodeHandle hInstance, XnUserID user)
Start tracking a skeleton.
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.
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.
xnUnregisterFromHandTouchingFOVEdge
XN_C_API void XN_C_DECL xnUnregisterFromHandTouchingFOVEdge(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from hand approaching the edge of the FOV.
xnGetUserPixels
XN_C_API XnStatus XN_C_DECL xnGetUserPixels(XnNodeHandle hInstance, XnUserID user, XnSceneMetaData *pScene)
Get the pixels that belong to a user.
xnUnregisterFromUserReEnter
XN_C_API void XN_C_DECL xnUnregisterFromUserReEnter(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a user re-enters the scene.
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.
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).
xnUnregisterFromUserExit
XN_C_API void XN_C_DECL xnUnregisterFromUserExit(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from when a user exits the scene.
xnUnregisterUserCallbacks
XN_C_API void XN_C_DECL xnUnregisterUserCallbacks(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregister from user callbacks.
xnCreateUserGenerator
XN_C_API XnStatus XN_C_DECL xnCreateUserGenerator(XnContext *pContext, XnNodeHandle *phUserGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
Creates a user generator.
xnGetUserCoM
XN_C_API XnStatus XN_C_DECL xnGetUserCoM(XnNodeHandle hInstance, XnUserID user, XnPoint3D *pCoM)
Get the center of mass of a user.
xnGetUsers
XN_C_API XnStatus XN_C_DECL xnGetUsers(XnNodeHandle hInstance, XnUserID *pUsers, XnUInt16 *pnUsers)
Get the current users.
xnGetNumberOfUsers
XN_C_API XnUInt16 XN_C_DECL xnGetNumberOfUsers(XnNodeHandle hInstance)
Get current number of users.
xnRegisterUserCallbacks
XN_C_API XnStatus XN_C_DECL xnRegisterUserCallbacks(XnNodeHandle hInstance, XnUserHandler NewUserCB, XnUserHandler LostUserCB, void *pCookie, XnCallbackHandle *phCallback)
Register to user callbacks.
xnGetSupportedUserPositionsCount
XN_C_API XnUInt32 XN_C_DECL xnGetSupportedUserPositionsCount(XnNodeHandle hInstance)
Gets the number of user positions supported by this generator.
xnSetUserPosition
XN_C_API XnStatus XN_C_DECL xnSetUserPosition(XnNodeHandle hInstance, XnUInt32 nIndex, const XnBoundingBox3D *pPosition)
Sets the current user position.
xnGetUserPosition
XN_C_API XnStatus XN_C_DECL xnGetUserPosition(XnNodeHandle hInstance, XnUInt32 nIndex, XnBoundingBox3D *pPosition)
Gets the current user position.
xnUnregisterFromUserPositionChange
XN_C_API void XN_C_DECL xnUnregisterFromUserPositionChange(XnNodeHandle hInstance, XnCallbackHandle hCallback)
Unregisters a callback function which was registered using xnRegisterToUserPositionChange.
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.
xnResolutionGetFromName
XN_C_API XnResolution XN_C_DECL xnResolutionGetFromName(const XnChar *strName)
xnAutoEnumerateOverSingleInput
XN_C_API XnStatus XN_C_DECL xnAutoEnumerateOverSingleInput(XnContext *pContext, XnNodeInfoList *pList, XnProductionNodeDescription *pDescription, const XnChar *strCreationInfo, XnProductionNodeType InputType, XnEnumerationErrors *pErrors, XnNodeQuery *pQuery)
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,...
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 ...
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...
xnResolutionGetXRes
XN_C_API XnUInt32 XN_C_DECL xnResolutionGetXRes(XnResolution resolution)
xnGetVersion
XN_C_API XnStatus XN_C_DECL xnGetVersion(XnVersion *pVersion)
xnVersionCompare
XN_C_API XnInt32 XN_C_DECL xnVersionCompare(const XnVersion *pVersion1, const XnVersion *pVersion2)
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,...
xnResolutionGetYRes
XN_C_API XnUInt32 XN_C_DECL xnResolutionGetYRes(XnResolution resolution)
xnResolutionGetName
XN_C_API const XnChar *XN_C_DECL xnResolutionGetName(XnResolution resolution)
xnResolutionGetFromXYRes
XN_C_API XnResolution XN_C_DECL xnResolutionGetFromXYRes(XnUInt32 xRes, XnUInt32 yRes)
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
Definition XnCppWrapper.h:35
xn::GetVersion
void GetVersion(XnVersion &Version)
Definition XnCppWrapper.h:9990
XnAudioMetaData
Definition XnTypes.h:1164
XnBoundingBox3D
Definition XnTypes.h:478
XnCropping
Definition XnTypes.h:487
XnDepthMetaData
Definition XnTypes.h:1132
XnFieldOfView
Definition XnTypes.h:504
XnIRMetaData
Definition XnTypes.h:1155
XnImageMetaData
Definition XnTypes.h:1145
XnLicense
Definition XnTypes.h:203
XnMapMetaData
Definition XnTypes.h:1110
XnMapOutputMode
Definition XnTypes.h:433
XnNodeInfoListIterator
Definition XnTypes.h:193
XnNodeInfoListIterator::pCurrent
XnNodeInfoListNode * pCurrent
Definition XnTypes.h:194
XnOutputMetaData
Definition XnTypes.h:1093
XnPlane3D
Definition XnTypes.h:561
XnProductionNodeDescription
Definition XnTypes.h:163
XnRGB24Pixel
Definition XnTypes.h:283
XnSceneMetaData
Definition XnTypes.h:1176
XnSkeletonJointOrientation
Definition XnTypes.h:590
XnSkeletonJointPosition
Definition XnTypes.h:574
XnSkeletonJointTransformation
Definition XnTypes.h:601
XnVersion
Definition XnTypes.h:152
XnWaveOutputMode
Definition XnTypes.h:456
XnYUV422DoublePixel
Definition XnTypes.h:291