Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HumanSkeletonProjectionInterface.h
1 
2 /***************************************************************************
3  * HumanSkeletonProjectionInterface.h - Fawkes BlackBoard Interface - HumanSkeletonProjectionInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2007-2011 Tim Niemueller
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __INTERFACES_HUMANSKELETONPROJECTIONINTERFACE_H_
25 #define __INTERFACES_HUMANSKELETONPROJECTIONINTERFACE_H_
26 
27 #include <interface/interface.h>
28 #include <interface/message.h>
29 #include <interface/field_iterator.h>
30 
31 namespace fawkes {
32 
34 {
35  /// @cond INTERNALS
36  INTERFACE_MGMT_FRIENDS(HumanSkeletonProjectionInterface)
37  /// @endcond
38  public:
39  /* constants */
40 
41  private:
42 #pragma pack(push,4)
43  /** Internal data storage, do NOT modify! */
44  typedef struct {
45  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
46  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
47  float horizontal_fov; /**< Opening angle in radians. */
48  float vertical_fov; /**< Opening angle in radians. */
49  uint32_t res_x; /**< X resolution (number of columns in frame). */
50  uint32_t res_y; /**< Y resolution (number of rows in frame). */
51  uint16_t max_depth; /**< Maximum depth value. */
52  float proj_com[2]; /**< Center of mass. */
53  float proj_head[2]; /**< Head position vector. */
54  float proj_neck[2]; /**< Neck position vector. */
55  float proj_torso[2]; /**< Torso position vector. */
56  float proj_waist[2]; /**< Waist position vector. */
57  float proj_left_collar[2]; /**<
58  Left position vector. */
59  float proj_left_shoulder[2]; /**<
60  Left shoulder position vector. */
61  float proj_left_elbow[2]; /**<
62  Left elbow position vector. */
63  float proj_left_wrist[2]; /**<
64  Left wrist position vector. */
65  float proj_left_hand[2]; /**<
66  Left hand position vector. */
67  float proj_left_fingertip[2]; /**<
68  Left fingertip position vector. */
69  float proj_right_collar[2]; /**<
70  Right collar position vector. */
71  float proj_right_shoulder[2]; /**<
72  Right shoulder position vector. */
73  float proj_right_elbow[2]; /**<
74  Right elbow position vector. */
75  float proj_right_wrist[2]; /**<
76  Right wrist position vector. */
77  float proj_right_hand[2]; /**<
78  Right hand position vector. */
79  float proj_right_fingertip[2]; /**<
80  Right fingertip position vector. */
81  float proj_left_hip[2]; /**<
82  Left hip position vector. */
83  float proj_left_knee[2]; /**<
84  Left knee position vector. */
85  float proj_left_ankle[2]; /**<
86  Left ankle position vector. */
87  float proj_left_foot[2]; /**<
88  Left foot position vector. */
89  float proj_right_hip[2]; /**<
90  Right hip position vector. */
91  float proj_right_knee[2]; /**<
92  Right knee position vector. */
93  float proj_right_ankle[2]; /**<
94  Right ankle position vector. */
95  float proj_right_foot[2]; /**<
96  Right foot position vector. */
97  } HumanSkeletonProjectionInterface_data_t;
98 #pragma pack(pop)
99 
100  HumanSkeletonProjectionInterface_data_t *data;
101 
102  public:
103  /* messages */
104  virtual bool message_valid(const Message *message) const;
105  private:
108 
109  public:
110  /* Methods */
111  float horizontal_fov() const;
112  void set_horizontal_fov(const float new_horizontal_fov);
113  size_t maxlenof_horizontal_fov() const;
114  float vertical_fov() const;
115  void set_vertical_fov(const float new_vertical_fov);
116  size_t maxlenof_vertical_fov() const;
117  uint32_t res_x() const;
118  void set_res_x(const uint32_t new_res_x);
119  size_t maxlenof_res_x() const;
120  uint32_t res_y() const;
121  void set_res_y(const uint32_t new_res_y);
122  size_t maxlenof_res_y() const;
123  uint16_t max_depth() const;
124  void set_max_depth(const uint16_t new_max_depth);
125  size_t maxlenof_max_depth() const;
126  float * proj_com() const;
127  float proj_com(unsigned int index) const;
128  void set_proj_com(unsigned int index, const float new_proj_com);
129  void set_proj_com(const float * new_proj_com);
130  size_t maxlenof_proj_com() const;
131  float * proj_head() const;
132  float proj_head(unsigned int index) const;
133  void set_proj_head(unsigned int index, const float new_proj_head);
134  void set_proj_head(const float * new_proj_head);
135  size_t maxlenof_proj_head() const;
136  float * proj_neck() const;
137  float proj_neck(unsigned int index) const;
138  void set_proj_neck(unsigned int index, const float new_proj_neck);
139  void set_proj_neck(const float * new_proj_neck);
140  size_t maxlenof_proj_neck() const;
141  float * proj_torso() const;
142  float proj_torso(unsigned int index) const;
143  void set_proj_torso(unsigned int index, const float new_proj_torso);
144  void set_proj_torso(const float * new_proj_torso);
145  size_t maxlenof_proj_torso() const;
146  float * proj_waist() const;
147  float proj_waist(unsigned int index) const;
148  void set_proj_waist(unsigned int index, const float new_proj_waist);
149  void set_proj_waist(const float * new_proj_waist);
150  size_t maxlenof_proj_waist() const;
151  float * proj_left_collar() const;
152  float proj_left_collar(unsigned int index) const;
153  void set_proj_left_collar(unsigned int index, const float new_proj_left_collar);
154  void set_proj_left_collar(const float * new_proj_left_collar);
155  size_t maxlenof_proj_left_collar() const;
156  float * proj_left_shoulder() const;
157  float proj_left_shoulder(unsigned int index) const;
158  void set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder);
159  void set_proj_left_shoulder(const float * new_proj_left_shoulder);
160  size_t maxlenof_proj_left_shoulder() const;
161  float * proj_left_elbow() const;
162  float proj_left_elbow(unsigned int index) const;
163  void set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow);
164  void set_proj_left_elbow(const float * new_proj_left_elbow);
165  size_t maxlenof_proj_left_elbow() const;
166  float * proj_left_wrist() const;
167  float proj_left_wrist(unsigned int index) const;
168  void set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist);
169  void set_proj_left_wrist(const float * new_proj_left_wrist);
170  size_t maxlenof_proj_left_wrist() const;
171  float * proj_left_hand() const;
172  float proj_left_hand(unsigned int index) const;
173  void set_proj_left_hand(unsigned int index, const float new_proj_left_hand);
174  void set_proj_left_hand(const float * new_proj_left_hand);
175  size_t maxlenof_proj_left_hand() const;
176  float * proj_left_fingertip() const;
177  float proj_left_fingertip(unsigned int index) const;
178  void set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip);
179  void set_proj_left_fingertip(const float * new_proj_left_fingertip);
180  size_t maxlenof_proj_left_fingertip() const;
181  float * proj_right_collar() const;
182  float proj_right_collar(unsigned int index) const;
183  void set_proj_right_collar(unsigned int index, const float new_proj_right_collar);
184  void set_proj_right_collar(const float * new_proj_right_collar);
185  size_t maxlenof_proj_right_collar() const;
186  float * proj_right_shoulder() const;
187  float proj_right_shoulder(unsigned int index) const;
188  void set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder);
189  void set_proj_right_shoulder(const float * new_proj_right_shoulder);
190  size_t maxlenof_proj_right_shoulder() const;
191  float * proj_right_elbow() const;
192  float proj_right_elbow(unsigned int index) const;
193  void set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow);
194  void set_proj_right_elbow(const float * new_proj_right_elbow);
195  size_t maxlenof_proj_right_elbow() const;
196  float * proj_right_wrist() const;
197  float proj_right_wrist(unsigned int index) const;
198  void set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist);
199  void set_proj_right_wrist(const float * new_proj_right_wrist);
200  size_t maxlenof_proj_right_wrist() const;
201  float * proj_right_hand() const;
202  float proj_right_hand(unsigned int index) const;
203  void set_proj_right_hand(unsigned int index, const float new_proj_right_hand);
204  void set_proj_right_hand(const float * new_proj_right_hand);
205  size_t maxlenof_proj_right_hand() const;
206  float * proj_right_fingertip() const;
207  float proj_right_fingertip(unsigned int index) const;
208  void set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip);
209  void set_proj_right_fingertip(const float * new_proj_right_fingertip);
210  size_t maxlenof_proj_right_fingertip() const;
211  float * proj_left_hip() const;
212  float proj_left_hip(unsigned int index) const;
213  void set_proj_left_hip(unsigned int index, const float new_proj_left_hip);
214  void set_proj_left_hip(const float * new_proj_left_hip);
215  size_t maxlenof_proj_left_hip() const;
216  float * proj_left_knee() const;
217  float proj_left_knee(unsigned int index) const;
218  void set_proj_left_knee(unsigned int index, const float new_proj_left_knee);
219  void set_proj_left_knee(const float * new_proj_left_knee);
220  size_t maxlenof_proj_left_knee() const;
221  float * proj_left_ankle() const;
222  float proj_left_ankle(unsigned int index) const;
223  void set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle);
224  void set_proj_left_ankle(const float * new_proj_left_ankle);
225  size_t maxlenof_proj_left_ankle() const;
226  float * proj_left_foot() const;
227  float proj_left_foot(unsigned int index) const;
228  void set_proj_left_foot(unsigned int index, const float new_proj_left_foot);
229  void set_proj_left_foot(const float * new_proj_left_foot);
230  size_t maxlenof_proj_left_foot() const;
231  float * proj_right_hip() const;
232  float proj_right_hip(unsigned int index) const;
233  void set_proj_right_hip(unsigned int index, const float new_proj_right_hip);
234  void set_proj_right_hip(const float * new_proj_right_hip);
235  size_t maxlenof_proj_right_hip() const;
236  float * proj_right_knee() const;
237  float proj_right_knee(unsigned int index) const;
238  void set_proj_right_knee(unsigned int index, const float new_proj_right_knee);
239  void set_proj_right_knee(const float * new_proj_right_knee);
240  size_t maxlenof_proj_right_knee() const;
241  float * proj_right_ankle() const;
242  float proj_right_ankle(unsigned int index) const;
243  void set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle);
244  void set_proj_right_ankle(const float * new_proj_right_ankle);
245  size_t maxlenof_proj_right_ankle() const;
246  float * proj_right_foot() const;
247  float proj_right_foot(unsigned int index) const;
248  void set_proj_right_foot(unsigned int index, const float new_proj_right_foot);
249  void set_proj_right_foot(const float * new_proj_right_foot);
250  size_t maxlenof_proj_right_foot() const;
251  virtual Message * create_message(const char *type) const;
252 
253  virtual void copy_values(const Interface *other);
254  virtual const char * enum_tostring(const char *enumtype, int val) const;
255 
256 };
257 
258 } // end namespace fawkes
259 
260 #endif
void set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder)
Set proj_right_shoulder value at given index.
void set_proj_left_foot(unsigned int index, const float new_proj_left_foot)
Set proj_left_foot value at given index.
void set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle)
Set proj_left_ankle value at given index.
void set_proj_left_collar(unsigned int index, const float new_proj_left_collar)
Set proj_left_collar value at given index.
size_t maxlenof_proj_left_fingertip() const
Get maximum length of proj_left_fingertip value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:43
float * proj_right_hand() const
Get proj_right_hand value.
HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
size_t maxlenof_proj_waist() const
Get maximum length of proj_waist value.
void set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip)
Set proj_right_fingertip value at given index.
float * proj_right_fingertip() const
Get proj_right_fingertip value.
size_t maxlenof_proj_right_collar() const
Get maximum length of proj_right_collar value.
float * proj_left_shoulder() const
Get proj_left_shoulder value.
size_t maxlenof_proj_right_elbow() const
Get maximum length of proj_right_elbow value.
void set_res_y(const uint32_t new_res_y)
Set res_y value.
float * proj_right_knee() const
Get proj_right_knee value.
void set_proj_right_collar(unsigned int index, const float new_proj_right_collar)
Set proj_right_collar value at given index.
size_t maxlenof_proj_head() const
Get maximum length of proj_head value.
size_t maxlenof_proj_left_wrist() const
Get maximum length of proj_left_wrist value.
float * proj_right_hip() const
Get proj_right_hip value.
void set_proj_left_knee(unsigned int index, const float new_proj_left_knee)
Set proj_left_knee value at given index.
size_t maxlenof_proj_left_hip() const
Get maximum length of proj_left_hip value.
void set_proj_torso(unsigned int index, const float new_proj_torso)
Set proj_torso value at given index.
virtual Message * create_message(const char *type) const
Create message based on type name.
void set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist)
Set proj_right_wrist value at given index.
size_t maxlenof_proj_right_fingertip() const
Get maximum length of proj_right_fingertip value.
void set_proj_right_foot(unsigned int index, const float new_proj_right_foot)
Set proj_right_foot value at given index.
size_t maxlenof_proj_left_shoulder() const
Get maximum length of proj_left_shoulder value.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
void set_proj_head(unsigned int index, const float new_proj_head)
Set proj_head value at given index.
float * proj_right_ankle() const
Get proj_right_ankle value.
void set_proj_right_hand(unsigned int index, const float new_proj_right_hand)
Set proj_right_hand value at given index.
size_t maxlenof_proj_left_collar() const
Get maximum length of proj_left_collar value.
size_t maxlenof_proj_left_hand() const
Get maximum length of proj_left_hand value.
size_t maxlenof_proj_left_knee() const
Get maximum length of proj_left_knee value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
size_t maxlenof_proj_left_foot() const
Get maximum length of proj_left_foot value.
void set_horizontal_fov(const float new_horizontal_fov)
Set horizontal_fov value.
void set_proj_com(unsigned int index, const float new_proj_com)
Set proj_com value at given index.
void set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip)
Set proj_left_fingertip value at given index.
size_t maxlenof_horizontal_fov() const
Get maximum length of horizontal_fov value.
size_t maxlenof_proj_right_shoulder() const
Get maximum length of proj_right_shoulder value.
size_t maxlenof_proj_right_wrist() const
Get maximum length of proj_right_wrist value.
float * proj_left_wrist() const
Get proj_left_wrist value.
void set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow)
Set proj_right_elbow value at given index.
void set_proj_waist(unsigned int index, const float new_proj_waist)
Set proj_waist value at given index.
float * proj_left_hip() const
Get proj_left_hip value.
float * proj_left_elbow() const
Get proj_left_elbow value.
void set_proj_neck(unsigned int index, const float new_proj_neck)
Set proj_neck value at given index.
float * proj_right_collar() const
Get proj_right_collar value.
float * proj_right_shoulder() const
Get proj_right_shoulder value.
void set_vertical_fov(const float new_vertical_fov)
Set vertical_fov value.
float * proj_right_wrist() const
Get proj_right_wrist value.
void set_proj_left_hip(unsigned int index, const float new_proj_left_hip)
Set proj_left_hip value at given index.
float * proj_left_collar() const
Get proj_left_collar value.
size_t maxlenof_proj_neck() const
Get maximum length of proj_neck value.
size_t maxlenof_proj_right_hand() const
Get maximum length of proj_right_hand value.
float horizontal_fov() const
Get horizontal_fov value.
void set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder)
Set proj_left_shoulder value at given index.
float * proj_left_knee() const
Get proj_left_knee value.
size_t maxlenof_proj_right_foot() const
Get maximum length of proj_right_foot value.
float * proj_left_fingertip() const
Get proj_left_fingertip value.
void set_proj_right_knee(unsigned int index, const float new_proj_right_knee)
Set proj_right_knee value at given index.
size_t maxlenof_res_y() const
Get maximum length of res_y value.
float * proj_right_foot() const
Get proj_right_foot value.
size_t maxlenof_proj_com() const
Get maximum length of proj_com value.
void set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist)
Set proj_left_wrist value at given index.
size_t maxlenof_proj_right_hip() const
Get maximum length of proj_right_hip value.
float vertical_fov() const
Get vertical_fov value.
float * proj_right_elbow() const
Get proj_right_elbow value.
size_t maxlenof_proj_left_elbow() const
Get maximum length of proj_left_elbow value.
float * proj_left_hand() const
Get proj_left_hand value.
void set_proj_right_hip(unsigned int index, const float new_proj_right_hip)
Set proj_right_hip value at given index.
size_t maxlenof_proj_left_ankle() const
Get maximum length of proj_left_ankle value.
void set_max_depth(const uint16_t new_max_depth)
Set max_depth value.
void set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow)
Set proj_left_elbow value at given index.
size_t maxlenof_proj_right_knee() const
Get maximum length of proj_right_knee value.
size_t maxlenof_max_depth() const
Get maximum length of max_depth value.
const char * type() const
Get type of interface.
Definition: interface.cpp:635
void set_res_x(const uint32_t new_res_x)
Set res_x value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
size_t maxlenof_vertical_fov() const
Get maximum length of vertical_fov value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_proj_right_ankle() const
Get maximum length of proj_right_ankle value.
void set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle)
Set proj_right_ankle value at given index.
size_t maxlenof_proj_torso() const
Get maximum length of proj_torso value.
float * proj_left_ankle() const
Get proj_left_ankle value.
float * proj_left_foot() const
Get proj_left_foot value.
void set_proj_left_hand(unsigned int index, const float new_proj_left_hand)
Set proj_left_hand value at given index.
size_t maxlenof_res_x() const
Get maximum length of res_x value.