-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKinectTools.h
66 lines (53 loc) · 1.25 KB
/
KinectTools.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
/*
* KinectTools.h
* Created by ZKYF
*
* This header file add some basic math functions to the Joint class.
*/
#define _USE_MATH_DEFINES
#include <Windows.h>
#include <Kinect.h>
#include <math.h>
#include <vector>
using namespace std;
#ifndef _KINECTTOOLS_H
#define _KINECTTOOLS_H
const double KTEPS = 1e-10;
typedef CameraSpacePoint _3DPoint;
class JOINT : public Joint
{
public:
JOINT();
JOINT(Joint p);
double length();
void RotX(double radian);
void RotY(double radian);
void RotZ(double radian);
void RotA(_3DPoint a, double radian);
friend JOINT operator+(JOINT a, JOINT b);
friend JOINT operator-(JOINT a, JOINT b);
friend JOINT operator*(JOINT a, double b);
friend JOINT operator*(double a, JOINT b);
friend JOINT operator/(JOINT a, double b);
};
typedef vector<JOINT> _JOINTS;
class JOINTS : public _JOINTS
{
public:
JOINTS();
JOINTS(JOINTS& ps);
void operator=(JOINTS& ps);
double length();
void RotX(double r);
void RotY(double r);
void RotZ(double r);
void RotA(_3DPoint a, double r);
void Resample(int T);
void Normalize();
};
double JointsDistance(JOINTS p1, JOINTS p2);
typedef JOINTS::iterator JOINTP;
typedef vector<JOINTS> JOINTSLIST;
typedef vector<POINT> DRAWLIST;
typedef vector<POINT>::iterator DRAWITE;
#endif