Bowls
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Kinect.h
Go to the documentation of this file.
1 #pragma once
2 #include <Windows.h>
3 #include <NuiApi.h>
4 #include "cgg/cgg.h"
5 
8 {
11 };
12 
19 {
20 private:
21 
23  INuiSensor* kinectSensor;
27  bool sitMode;
29  NUI_SKELETON_POSITION_INDEX selectedJoint;
31  cgg::Vec3 handPos;
32 
37  bool initSensor();
38 
44  void processSkeletonData();
45 
51  void calculateHandPos(NUI_SKELETON_DATA);
52 
56  void kinectPosConversion();
57 
58 public:
66 
67  ~KinectInput();
68 
75 
82  bool startTracking();
83 
90  void update();
91 
99  cgg::Vec3 getHandPos();
100 };
bool sitMode
Whether the Kinect should look for standing or sitting skeletons.
Definition: Kinect.h:27
cgg::Vec3 handPos
Current position of the selected joint.
Definition: Kinect.h:31
KinectInput(bool, TrackingPoint)
Creates the Kinect Input Manager.
Right Hand.
Definition: Kinect.h:10
void processSkeletonData()
Processes a Skeleton.
void calculateHandPos(NUI_SKELETON_DATA)
Calculates the selected hands position.
void switchHand(TrackingPoint)
Switch which hand the Kinect tracks.
INuiSensor * kinectSensor
Pointer to a Kinect Sensor.
Definition: Kinect.h:23
Left Hand.
Definition: Kinect.h:9
HANDLE nextSkeletonUpdate
Handle that indicates when a skeleton is ready to process.
Definition: Kinect.h:25
NUI_SKELETON_POSITION_INDEX selectedJoint
Which joint we want the Kinect to track.
Definition: Kinect.h:29
void update()
Update the Kinect Input Managers Internals.
bool startTracking()
Start tracking skeletons.
TrackingPoint
Kinect Tracking Points.
Definition: Kinect.h:7
bool initSensor()
Initializes the Kinect Sensor.
cgg::Vec3 getHandPos()
Get the current tracked hand position.
void kinectPosConversion()
Converts the hand position to usable numbers.
Kinect Input Manager.
Definition: Kinect.h:18