-
Notifications
You must be signed in to change notification settings - Fork 1
/
Viewer.h
58 lines (42 loc) · 1.57 KB
/
Viewer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*******************************************************************************
* *
* PrimeSense NiTE 2.0 - User Viewer Sample *
* Copyright (C) 2012 PrimeSense Ltd. *
* *
*******************************************************************************/
#ifndef _NITE_USER_VIEWER_H_
#define _NITE_USER_VIEWER_H_
#include "NiTE.h"
#define MAX_DEPTH 10000
class SampleViewer
{
public:
SampleViewer(const char* strSampleName);
virtual ~SampleViewer();
virtual openni::Status Init(int argc, char **argv);
virtual openni::Status Run(); //Does not return
protected:
virtual void Display();
virtual void DisplayPostDraw(){}; // Overload to draw over the screen image
virtual void OnKey(unsigned char key, int x, int y);
virtual openni::Status InitOpenGL(int argc, char **argv);
void InitOpenGLHooks();
void Finalize();
private:
SampleViewer(const SampleViewer&);
SampleViewer& operator=(SampleViewer&);
static SampleViewer* ms_self;
static void glutIdle();
static void glutDisplay();
static void glutKeyboard(unsigned char key, int x, int y);
float m_pDepthHist[MAX_DEPTH];
char m_strSampleName[ONI_MAX_STR];
openni::RGB888Pixel* m_pTexMap;
unsigned int m_nTexMapX;
unsigned int m_nTexMapY;
openni::Device m_device;
nite::UserTracker* m_pUserTracker;
nite::UserId m_poseUser;
uint64_t m_poseTime;
};
#endif // _NITE_USER_VIEWER_H_