Skip to content

Commit c916874

Browse files
committed
fix from avin2#5
1 parent 7a3cbe8 commit c916874

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

Source/XnDeviceSensorV2/XnSensorDepthGenerator.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <XnOpenNI.h>
2727
#include <XnOS.h>
2828
#include <XnPsVersion.h>
29-
#include <XnCommon/XnCommon.h>
29+
#include <XnCommon.h>
3030
#include <math.h>
3131

3232
//---------------------------------------------------------------------------
@@ -50,11 +50,11 @@ XnSensorDepthGenerator::~XnSensorDepthGenerator()
5050
XnStatus XnSensorDepthGenerator::Init()
5151
{
5252
XnStatus nRetVal = XN_STATUS_OK;
53-
53+
5454
nRetVal = XnSensorMapGenerator::Init();
5555
XN_IS_STATUS_OK(nRetVal);
5656

57-
const XnChar* aProps[] =
57+
const XnChar* aProps[] =
5858
{
5959
XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE,
6060
XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE,
@@ -103,7 +103,7 @@ void XnSensorDepthGenerator::GetFieldOfView(XnFieldOfView& FOV)
103103

104104
XnStatus XnSensorDepthGenerator::RegisterToFieldOfViewChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
105105
{
106-
return m_fovChangedEvent.Register(handler, pCookie, &hCallback);
106+
return m_fovChangedEvent.Register(handler, pCookie, hCallback);
107107
}
108108

109109
void XnSensorDepthGenerator::UnregisterFromFieldOfViewChange(XnCallbackHandle hCallback)
@@ -180,7 +180,7 @@ XnStatus XnSensorDepthGenerator::GetUserPosition(XnUInt32 nIndex, XnBoundingBox3
180180

181181
XnStatus XnSensorDepthGenerator::RegisterToUserPositionChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
182182
{
183-
const XnChar* aProps[] =
183+
const XnChar* aProps[] =
184184
{
185185
XN_STREAM_PROPERTY_AGC_BIN,
186186
NULL
@@ -244,6 +244,11 @@ XnStatus XnSensorDepthGenerator::SetViewPoint(xn::ProductionNode& OtherNode)
244244
}
245245
}
246246

247+
XnStatus XnSensorDepthGenerator::GetPixelCoordinatesInViewPoint(xn::ProductionNode& other, XnUInt32 x, XnUInt32 y, XnUInt32& altX, XnUInt32& altY)
248+
{
249+
return 0;
250+
}
251+
247252
XnStatus XnSensorDepthGenerator::ResetViewPoint()
248253
{
249254
return SetIntProperty(XN_STREAM_PROPERTY_REGISTRATION, FALSE);
@@ -259,7 +264,7 @@ XnBool XnSensorDepthGenerator::IsViewPointAs(xn::ProductionNode& OtherNode)
259264

260265
XnStatus XnSensorDepthGenerator::RegisterToViewPointChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
261266
{
262-
const XnChar* aProps[] =
267+
const XnChar* aProps[] =
263268
{
264269
XN_STREAM_PROPERTY_REGISTRATION,
265270
NULL
@@ -306,7 +311,7 @@ XnBool XnSensorDepthGenerator::IsFrameSyncedWith(xn::ProductionNode& OtherNode)
306311

307312
XnStatus XnSensorDepthGenerator::RegisterToFrameSyncChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
308313
{
309-
const XnChar* aProps[] =
314+
const XnChar* aProps[] =
310315
{
311316
XN_MODULE_PROPERTY_FRAME_SYNC,
312317
NULL

Source/XnDeviceSensorV2/XnSensorDepthGenerator.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
//---------------------------------------------------------------------------
2828
#include "XnSensorMapGenerator.h"
2929
#include "XnExportedSensorGenerator.h"
30+
#include <XnEventT.h>
3031

3132
//---------------------------------------------------------------------------
3233
// Types
@@ -35,8 +36,8 @@
3536
#pragma warning (push)
3637
#pragma warning (disable: 4250)
3738

38-
class XnSensorDepthGenerator :
39-
public XnSensorMapGenerator,
39+
class XnSensorDepthGenerator :
40+
public XnSensorMapGenerator,
4041
virtual public xn::ModuleDepthGenerator,
4142
virtual public xn::ModuleUserPositionInterface,
4243
virtual public xn::ModuleAlternativeViewPointInterface,
@@ -67,6 +68,7 @@ class XnSensorDepthGenerator :
6768
xn::ModuleAlternativeViewPointInterface* GetAlternativeViewPointInterface() { return this; }
6869
XnBool IsViewPointSupported(xn::ProductionNode& OtherNode);
6970
XnStatus SetViewPoint(xn::ProductionNode& OtherNode);
71+
XnStatus GetPixelCoordinatesInViewPoint(xn::ProductionNode& other, XnUInt32 x, XnUInt32 y, XnUInt32& altX, XnUInt32& altY);
7072
XnStatus ResetViewPoint();
7173
XnBool IsViewPointAs(xn::ProductionNode& OtherNode);
7274
XnStatus RegisterToViewPointChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
@@ -82,15 +84,14 @@ class XnSensorDepthGenerator :
8284

8385
protected:
8486
virtual void FilterProperties(XnActualPropertiesHash* pHash);
85-
87+
8688
private:
8789
XnStatus UpdateRealWorldTranslationData();
8890
XnBool IsSensorImageNode(xn::ProductionNode& Other);
8991

9092
static void XN_CALLBACK_TYPE RealWorldTranslationPropChanged(void* pCookie);
9193

92-
XN_DECLARE_EVENT_0ARG(PropChangeEvent, PropChangeEventInterface);
93-
PropChangeEvent m_fovChangedEvent;
94+
XnEventNoArgs m_fovChangedEvent;
9495

9596
XnCallbackHandle m_hRWPropCallback;
9697

@@ -106,4 +107,4 @@ class XnExportedSensorDepthGenerator : public XnExportedSensorGenerator
106107

107108
#pragma warning (pop)
108109

109-
#endif // __XN_SENSOR_DEPTH_GENERATOR_H__
110+
#endif // __XN_SENSOR_DEPTH_GENERATOR_H__

0 commit comments

Comments
 (0)