Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
Skeleton.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2011. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5
/*----------------------------------------------------------------------------*/
6
7
#ifndef __SKELETON_H__
8
#define __SKELETON_H__
9
15
class
Skeleton
16
{
17
friend
class
Kinect
;
18
public
:
19
typedef
enum
20
{
21
HipCenter = 0,
22
Spine = 1,
23
ShoulderCenter = 2,
24
Head = 3,
25
ShoulderLeft = 4,
26
ElbowLeft = 5,
27
WristLeft = 6,
28
HandLeft = 7,
29
ShoulderRight = 8,
30
ElbowRight = 9,
31
WristRight = 10,
32
HandRight = 11,
33
HipLeft = 12,
34
KneeLeft = 13,
35
AnkleLeft = 14,
36
FootLeft = 15,
37
HipRight = 16,
38
KneeRight = 17,
39
AnkleRight = 18,
40
FootRight = 19,
41
JointCount = 20
42
} JointTypes;
43
44
typedef
enum
{kNotTracked, kInferred, kTracked} JointTrackingState;
45
46
typedef
struct
47
{
48
float
x;
49
float
y;
50
float
z;
51
JointTrackingState trackingState;
52
}
Joint
;
53
54
Joint
GetHandRight() {
return
m_joints[HandRight]; }
55
Joint GetHandLeft() {
return
m_joints[HandLeft]; }
56
Joint GetWristRight() {
return
m_joints[WristRight]; }
57
Joint GetWristLeft() {
return
m_joints[WristLeft]; }
58
Joint GetElbowLeft() {
return
m_joints[ElbowLeft]; }
59
Joint GetElbowRight() {
return
m_joints[ElbowRight]; }
60
Joint GetShoulderLeft() {
return
m_joints[ShoulderLeft]; }
61
Joint GetShoulderRight() {
return
m_joints[ShoulderRight]; }
62
Joint GetShoulderCenter() {
return
m_joints[ShoulderCenter]; }
63
Joint GetHead() {
return
m_joints[Head]; }
64
Joint GetSpine() {
return
m_joints[Spine]; }
65
Joint GetHipCenter() {
return
m_joints[HipCenter]; }
66
Joint GetHipRight() {
return
m_joints[HipRight]; }
67
Joint GetHipLeft() {
return
m_joints[HipLeft]; }
68
Joint GetKneeLeft() {
return
m_joints[KneeLeft]; }
69
Joint GetKneeRight() {
return
m_joints[KneeRight]; }
70
Joint GetAnkleLeft() {
return
m_joints[AnkleLeft]; }
71
Joint GetAnkleRight() {
return
m_joints[AnkleRight]; }
72
Joint GetFootLeft() {
return
m_joints[FootLeft]; }
73
Joint GetFootRight() {
return
m_joints[FootRight]; }
74
Joint GetJointValue(JointTypes index) {
return
m_joints[index]; }
75
76
private
:
77
Joint m_joints[20];
78
};
79
80
#endif
81
Skeleton::Joint
Definition:
Skeleton.h:46
Skeleton
Definition:
Skeleton.h:15
Kinect
Definition:
Kinect.h:24
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.