vrecko
virtual reality framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Kinect.h
Go to the documentation of this file.
1
10
#pragma once
11
12
#ifndef WIN32_LEAN_AND_MEAN
13
#define WIN32_LEAN_AND_MEAN
14
#endif
15
#include <windows.h>
16
17
#include <
vrecko/IOPins.h
>
18
#include <
vrecko/Device.h
>
19
#include <
vrecko/EventDispatcher.h
>
20
21
#include <NuiApi.h>
22
#include <NuiSkeleton.h>
23
24
namespace
vreckoDP_Kinect {
25
26
class
DP_EXPORT
Kinect
:
public
vrecko::Device
27
{
28
public
:
29
Kinect
();
31
virtual
int
openDevice(
void
);
32
int
closeDevice(
void
);
33
void
update(
void
);
34
bool
loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode
*pParametersNode);
35
36
void
getSkeleton();
37
static
DWORD WINAPI KinectThread(LPVOID pParam);
38
void
sendSkeletonPositions(NUI_SKELETON_DATA * pSkel);
39
void
sendPosition(
vrecko::OutputPin<vrecko::MessageVec3>
* outputPin,
int
index, NUI_SKELETON_DATA * pSkel );
40
41
// InputConnector uses this kind of events
42
void
sendSensorTransformation(
int
sensorNumber,
int
SkeletonIndex, NUI_SKELETON_DATA * pSkel);
43
44
protected
:
45
HANDLE
_hNextSkeletonEvent
;
46
47
48
//XML parameters
49
float
_scale
;
50
bool
_smoothing
;
51
osg::Vec3
_worldOrigin
;
52
bool
_inputConnector
;
53
int
*
_inputConnectorMappings
;
54
55
// thread handling
56
HANDLE
_hThNuiProcess
;
57
HANDLE
_hEvNuiProcessStop
;
58
59
DECLARE_OUTPUT
(HipCenterPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_HIP_CENTER
60
DECLARE_OUTPUT
(SpinePosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_SPINE
61
DECLARE_OUTPUT
(ShoulderCenterPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_SHOULDER_CENTER
62
DECLARE_OUTPUT
(HeadPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_HEAD
63
DECLARE_OUTPUT
(ShoulderLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_SHOULDER_LEFT
64
DECLARE_OUTPUT
(ElbowLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_ELBOW_LEFT
65
DECLARE_OUTPUT
(WristLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_WRIST_LEFT
66
DECLARE_OUTPUT
(HandLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_HAND_LEFT
67
DECLARE_OUTPUT
(ShoulderRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_SHOULDER_RIGHT
68
DECLARE_OUTPUT
(ElbowRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_ELBOW_RIGHT
69
DECLARE_OUTPUT
(WristRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_WRIST_RIGHT
70
DECLARE_OUTPUT
(HandRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_HAND_RIGHT
71
DECLARE_OUTPUT
(HipLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_HIP_LEFT
72
DECLARE_OUTPUT
(KneeLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_KNEE_LEFT
73
DECLARE_OUTPUT
(AnkleLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_ANKLE_LEFT
74
DECLARE_OUTPUT
(FootLeftPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_FOOT_LEFT
75
DECLARE_OUTPUT
(HipRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_HIP_RIGHT
76
DECLARE_OUTPUT
(KneeRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_KNEE_RIGHT
77
DECLARE_OUTPUT
(AnkleRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_ANKLE_RIGHT
78
DECLARE_OUTPUT
(FootRightPosition,
vrecko::MessageVec3
);
//NUI_SKELETON_POSITION_FOOT_RIGHT
79
80
DECLARE_OUTPUT
(Sensor_Transformation,
vrecko::MessageSensorTransformation
);
//data about one point
81
};
82
}
83
include
vreckoDP
Kinect
Kinect.h
Generated on Tue Feb 19 2013 10:23:45 for vrecko by
1.8.3.1