-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathNiteCTypes.h
executable file
·194 lines (153 loc) · 4.16 KB
/
NiteCTypes.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
/*******************************************************************************
* *
* PrimeSense NiTE 2.0 *
* Copyright (C) 2012 PrimeSense Ltd. *
* *
*******************************************************************************/
#ifndef _NITE_C_TYPES_H_
#define _NITE_C_TYPES_H_
#include "OniCTypes.h"
#include "NiteCEnums.h"
typedef short int NiteUserId;
typedef struct NiteUserTracker* NiteUserTrackerHandle;
#define NITE_JOINT_COUNT 15
#define NITE_POSE_COUNT 2
/** 3D Point */
typedef struct
{
float x, y, z;
} NitePoint3f;
/** Quaternion */
typedef struct
{
float x, y, z, w;
} NiteQuaternion;
/** Single joint of a skeleton */
typedef struct
{
/** Type of the joint */
NiteJointType jointType;
/** Position of the joint - in real world coordinates */
NitePoint3f position;
float positionConfidence;
/** Orientation of the joint */
NiteQuaternion orientation;
float orientationConfidence;
} NiteSkeletonJoint;
/** 3D Box */
typedef struct
{
NitePoint3f min;
NitePoint3f max;
} NiteBoundingBox;
typedef struct
{
NitePoseType type;
int state;
} NitePoseData;
/** Skeleton - a set of joints */
typedef struct
{
NiteSkeletonJoint joints[NITE_JOINT_COUNT];
NiteSkeletonState state;
} NiteSkeleton;
/** Snapshot of a specific user */
typedef struct
{
NiteUserId id;
NiteBoundingBox boundingBox;
NitePoint3f centerOfMass;
int state;
NiteSkeleton skeleton;
NitePoseData poses[NITE_POSE_COUNT];
} NiteUserData;
/** Snapshot of the scene segmentation*/
typedef struct
{
NiteUserId* pixels;
int width;
int height;
int stride;
} NiteUserMap;
/** 3D Plane */
typedef struct
{
NitePoint3f point;
NitePoint3f normal;
} NitePlane;
/** Output snapshot of the User Tracker algorithm */
typedef struct
{
/** Number of users */
int userCount;
/** List of users */
NiteUserData* pUser;
/** Scene segmentation map */
NiteUserMap userMap;
/** The depth frame from which this data was learned */
OniFrame* pDepthFrame;
unsigned long long timestamp;
int frameIndex;
/** Confidence of the floor plane */
float floorConfidence;
/** Floor plane */
NitePlane floor;
} NiteUserTrackerFrame;
typedef struct
{
OniGeneralCallback readyForNextFrame;
} NiteUserTrackerCallbacks;
typedef short int NiteHandId;
/** A snapshot of a specific hand */
typedef struct
{
NiteHandId id;
NitePoint3f position;
int state;
} NiteHandData;
/** A snapshot of a specific gesture */
typedef struct
{
NiteGestureType type;
NitePoint3f currentPosition;
int state;
} NiteGestureData;
/** Output snapshot of the Hand Tracker algorithm */
typedef struct
{
/** Number of hands */
int handCount;
/** List of hands */
NiteHandData* pHands;
/** Number of gestures */
int gestureCount;
/** List of gestures */
NiteGestureData* pGestures;
/** The depth frame from which this data was learned */
OniFrame* pDepthFrame;
unsigned long long timestamp;
int frameIndex;
} NiteHandTrackerFrame;
typedef struct
{
OniGeneralCallback readyForNextFrame;
} NiteHandTrackerCallbacks;
#define _NITE_DECLARE_VERSION(name) \
/** Holds a NiTEversion number, which consists of four separate numbers in the format: major.minor.maintenance.build*/ \
\
typedef struct \
{ \
/** Major version number, incremented for major API restructuring. */ \
int major; \
/** Minor version number, incremented when significant new features added. */ \
int minor; \
/** Maintenance build number, incremented for new releases that primarily \
provide minor bug fixes. */ \
int maintenance; \
/** Build number. Incremented for each new API build. Generally not shown \
on the installer and download site. */ \
int build; \
} name;
_NITE_DECLARE_VERSION(NiteVersion);
typedef struct NiteHandTracker* NiteHandTrackerHandle;
#endif // _NITE_C_TYPES_H_