Fawkes API  Fawkes Development Version
HumanSkeletonProjectionInterface.cpp
1 
2 /***************************************************************************
3  * HumanSkeletonProjectionInterface.cpp - 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 #include <interfaces/HumanSkeletonProjectionInterface.h>
25 
26 #include <core/exceptions/software.h>
27 
28 #include <map>
29 #include <string>
30 #include <cstring>
31 #include <cstdlib>
32 
33 namespace fawkes {
34 
35 /** @class HumanSkeletonProjectionInterface <interfaces/HumanSkeletonProjectionInterface.h>
36  * HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
37  *
38  This interface provides projections of the 3D position coordinates into the 2D image of
39  the acquiring camera. Instances shall always be associated with a HumanSkeletonInterface
40  with the same ID. This interface is particularly useful for RGBD cameras.
41 
42  * @ingroup FawkesInterfaces
43  */
44 
45 
46 
47 /** Constructor */
48 HumanSkeletonProjectionInterface::HumanSkeletonProjectionInterface() : Interface()
49 {
50  data_size = sizeof(HumanSkeletonProjectionInterface_data_t);
51  data_ptr = malloc(data_size);
52  data = (HumanSkeletonProjectionInterface_data_t *)data_ptr;
53  data_ts = (interface_data_ts_t *)data_ptr;
54  memset(data_ptr, 0, data_size);
55  add_fieldinfo(IFT_FLOAT, "horizontal_fov", 1, &data->horizontal_fov);
56  add_fieldinfo(IFT_FLOAT, "vertical_fov", 1, &data->vertical_fov);
57  add_fieldinfo(IFT_UINT32, "res_x", 1, &data->res_x);
58  add_fieldinfo(IFT_UINT32, "res_y", 1, &data->res_y);
59  add_fieldinfo(IFT_UINT16, "max_depth", 1, &data->max_depth);
60  add_fieldinfo(IFT_FLOAT, "proj_com", 2, &data->proj_com);
61  add_fieldinfo(IFT_FLOAT, "proj_head", 2, &data->proj_head);
62  add_fieldinfo(IFT_FLOAT, "proj_neck", 2, &data->proj_neck);
63  add_fieldinfo(IFT_FLOAT, "proj_torso", 2, &data->proj_torso);
64  add_fieldinfo(IFT_FLOAT, "proj_waist", 2, &data->proj_waist);
65  add_fieldinfo(IFT_FLOAT, "proj_left_collar", 2, &data->proj_left_collar);
66  add_fieldinfo(IFT_FLOAT, "proj_left_shoulder", 2, &data->proj_left_shoulder);
67  add_fieldinfo(IFT_FLOAT, "proj_left_elbow", 2, &data->proj_left_elbow);
68  add_fieldinfo(IFT_FLOAT, "proj_left_wrist", 2, &data->proj_left_wrist);
69  add_fieldinfo(IFT_FLOAT, "proj_left_hand", 2, &data->proj_left_hand);
70  add_fieldinfo(IFT_FLOAT, "proj_left_fingertip", 2, &data->proj_left_fingertip);
71  add_fieldinfo(IFT_FLOAT, "proj_right_collar", 2, &data->proj_right_collar);
72  add_fieldinfo(IFT_FLOAT, "proj_right_shoulder", 2, &data->proj_right_shoulder);
73  add_fieldinfo(IFT_FLOAT, "proj_right_elbow", 2, &data->proj_right_elbow);
74  add_fieldinfo(IFT_FLOAT, "proj_right_wrist", 2, &data->proj_right_wrist);
75  add_fieldinfo(IFT_FLOAT, "proj_right_hand", 2, &data->proj_right_hand);
76  add_fieldinfo(IFT_FLOAT, "proj_right_fingertip", 2, &data->proj_right_fingertip);
77  add_fieldinfo(IFT_FLOAT, "proj_left_hip", 2, &data->proj_left_hip);
78  add_fieldinfo(IFT_FLOAT, "proj_left_knee", 2, &data->proj_left_knee);
79  add_fieldinfo(IFT_FLOAT, "proj_left_ankle", 2, &data->proj_left_ankle);
80  add_fieldinfo(IFT_FLOAT, "proj_left_foot", 2, &data->proj_left_foot);
81  add_fieldinfo(IFT_FLOAT, "proj_right_hip", 2, &data->proj_right_hip);
82  add_fieldinfo(IFT_FLOAT, "proj_right_knee", 2, &data->proj_right_knee);
83  add_fieldinfo(IFT_FLOAT, "proj_right_ankle", 2, &data->proj_right_ankle);
84  add_fieldinfo(IFT_FLOAT, "proj_right_foot", 2, &data->proj_right_foot);
85  unsigned char tmp_hash[] = {0x71, 0xb2, 0x40, 0x3e, 0xa, 0x85, 0xd5, 0xcc, 0x77, 0xeb, 0xf2, 0xf1, 0xa9, 0x9c, 0xec, 0xf3};
86  set_hash(tmp_hash);
87 }
88 
89 /** Destructor */
90 HumanSkeletonProjectionInterface::~HumanSkeletonProjectionInterface()
91 {
92  free(data_ptr);
93 }
94 /* Methods */
95 /** Get horizontal_fov value.
96  * Opening angle in radians.
97  * @return horizontal_fov value
98  */
99 float
100 HumanSkeletonProjectionInterface::horizontal_fov() const
101 {
102  return data->horizontal_fov;
103 }
104 
105 /** Get maximum length of horizontal_fov value.
106  * @return length of horizontal_fov value, can be length of the array or number of
107  * maximum number of characters for a string
108  */
109 size_t
110 HumanSkeletonProjectionInterface::maxlenof_horizontal_fov() const
111 {
112  return 1;
113 }
114 
115 /** Set horizontal_fov value.
116  * Opening angle in radians.
117  * @param new_horizontal_fov new horizontal_fov value
118  */
119 void
120 HumanSkeletonProjectionInterface::set_horizontal_fov(const float new_horizontal_fov)
121 {
122  data_changed |= change_field(data->horizontal_fov, new_horizontal_fov);
123 }
124 
125 /** Get vertical_fov value.
126  * Opening angle in radians.
127  * @return vertical_fov value
128  */
129 float
130 HumanSkeletonProjectionInterface::vertical_fov() const
131 {
132  return data->vertical_fov;
133 }
134 
135 /** Get maximum length of vertical_fov value.
136  * @return length of vertical_fov value, can be length of the array or number of
137  * maximum number of characters for a string
138  */
139 size_t
140 HumanSkeletonProjectionInterface::maxlenof_vertical_fov() const
141 {
142  return 1;
143 }
144 
145 /** Set vertical_fov value.
146  * Opening angle in radians.
147  * @param new_vertical_fov new vertical_fov value
148  */
149 void
150 HumanSkeletonProjectionInterface::set_vertical_fov(const float new_vertical_fov)
151 {
152  data_changed |= change_field(data->vertical_fov, new_vertical_fov);
153 }
154 
155 /** Get res_x value.
156  * X resolution (number of columns in frame).
157  * @return res_x value
158  */
159 uint32_t
160 HumanSkeletonProjectionInterface::res_x() const
161 {
162  return data->res_x;
163 }
164 
165 /** Get maximum length of res_x value.
166  * @return length of res_x value, can be length of the array or number of
167  * maximum number of characters for a string
168  */
169 size_t
170 HumanSkeletonProjectionInterface::maxlenof_res_x() const
171 {
172  return 1;
173 }
174 
175 /** Set res_x value.
176  * X resolution (number of columns in frame).
177  * @param new_res_x new res_x value
178  */
179 void
180 HumanSkeletonProjectionInterface::set_res_x(const uint32_t new_res_x)
181 {
182  data_changed |= change_field(data->res_x, new_res_x);
183 }
184 
185 /** Get res_y value.
186  * Y resolution (number of rows in frame).
187  * @return res_y value
188  */
189 uint32_t
190 HumanSkeletonProjectionInterface::res_y() const
191 {
192  return data->res_y;
193 }
194 
195 /** Get maximum length of res_y value.
196  * @return length of res_y value, can be length of the array or number of
197  * maximum number of characters for a string
198  */
199 size_t
200 HumanSkeletonProjectionInterface::maxlenof_res_y() const
201 {
202  return 1;
203 }
204 
205 /** Set res_y value.
206  * Y resolution (number of rows in frame).
207  * @param new_res_y new res_y value
208  */
209 void
210 HumanSkeletonProjectionInterface::set_res_y(const uint32_t new_res_y)
211 {
212  data_changed |= change_field(data->res_y, new_res_y);
213 }
214 
215 /** Get max_depth value.
216  * Maximum depth value.
217  * @return max_depth value
218  */
219 uint16_t
220 HumanSkeletonProjectionInterface::max_depth() const
221 {
222  return data->max_depth;
223 }
224 
225 /** Get maximum length of max_depth value.
226  * @return length of max_depth value, can be length of the array or number of
227  * maximum number of characters for a string
228  */
229 size_t
230 HumanSkeletonProjectionInterface::maxlenof_max_depth() const
231 {
232  return 1;
233 }
234 
235 /** Set max_depth value.
236  * Maximum depth value.
237  * @param new_max_depth new max_depth value
238  */
239 void
240 HumanSkeletonProjectionInterface::set_max_depth(const uint16_t new_max_depth)
241 {
242  data_changed |= change_field(data->max_depth, new_max_depth);
243 }
244 
245 /** Get proj_com value.
246  * Center of mass.
247  * @return proj_com value
248  */
249 float *
250 HumanSkeletonProjectionInterface::proj_com() const
251 {
252  return data->proj_com;
253 }
254 
255 /** Get proj_com value at given index.
256  * Center of mass.
257  * @param index index of value
258  * @return proj_com value
259  * @exception Exception thrown if index is out of bounds
260  */
261 float
262 HumanSkeletonProjectionInterface::proj_com(unsigned int index) const
263 {
264  if (index > 1) {
265  throw Exception("Index value %u out of bounds (0..1)", index);
266  }
267  return data->proj_com[index];
268 }
269 
270 /** Get maximum length of proj_com value.
271  * @return length of proj_com value, can be length of the array or number of
272  * maximum number of characters for a string
273  */
274 size_t
275 HumanSkeletonProjectionInterface::maxlenof_proj_com() const
276 {
277  return 2;
278 }
279 
280 /** Set proj_com value.
281  * Center of mass.
282  * @param new_proj_com new proj_com value
283  */
284 void
285 HumanSkeletonProjectionInterface::set_proj_com(const float * new_proj_com)
286 {
287  data_changed |= change_field(data->proj_com, new_proj_com);
288 }
289 
290 /** Set proj_com value at given index.
291  * Center of mass.
292  * @param new_proj_com new proj_com value
293  * @param index index for of the value
294  */
295 void
296 HumanSkeletonProjectionInterface::set_proj_com(unsigned int index, const float new_proj_com)
297 {
298  data_changed |= change_field(data->proj_com, index, new_proj_com);
299 }
300 /** Get proj_head value.
301  * Head position vector.
302  * @return proj_head value
303  */
304 float *
305 HumanSkeletonProjectionInterface::proj_head() const
306 {
307  return data->proj_head;
308 }
309 
310 /** Get proj_head value at given index.
311  * Head position vector.
312  * @param index index of value
313  * @return proj_head value
314  * @exception Exception thrown if index is out of bounds
315  */
316 float
317 HumanSkeletonProjectionInterface::proj_head(unsigned int index) const
318 {
319  if (index > 1) {
320  throw Exception("Index value %u out of bounds (0..1)", index);
321  }
322  return data->proj_head[index];
323 }
324 
325 /** Get maximum length of proj_head value.
326  * @return length of proj_head value, can be length of the array or number of
327  * maximum number of characters for a string
328  */
329 size_t
330 HumanSkeletonProjectionInterface::maxlenof_proj_head() const
331 {
332  return 2;
333 }
334 
335 /** Set proj_head value.
336  * Head position vector.
337  * @param new_proj_head new proj_head value
338  */
339 void
340 HumanSkeletonProjectionInterface::set_proj_head(const float * new_proj_head)
341 {
342  data_changed |= change_field(data->proj_head, new_proj_head);
343 }
344 
345 /** Set proj_head value at given index.
346  * Head position vector.
347  * @param new_proj_head new proj_head value
348  * @param index index for of the value
349  */
350 void
351 HumanSkeletonProjectionInterface::set_proj_head(unsigned int index, const float new_proj_head)
352 {
353  data_changed |= change_field(data->proj_head, index, new_proj_head);
354 }
355 /** Get proj_neck value.
356  * Neck position vector.
357  * @return proj_neck value
358  */
359 float *
360 HumanSkeletonProjectionInterface::proj_neck() const
361 {
362  return data->proj_neck;
363 }
364 
365 /** Get proj_neck value at given index.
366  * Neck position vector.
367  * @param index index of value
368  * @return proj_neck value
369  * @exception Exception thrown if index is out of bounds
370  */
371 float
372 HumanSkeletonProjectionInterface::proj_neck(unsigned int index) const
373 {
374  if (index > 1) {
375  throw Exception("Index value %u out of bounds (0..1)", index);
376  }
377  return data->proj_neck[index];
378 }
379 
380 /** Get maximum length of proj_neck value.
381  * @return length of proj_neck value, can be length of the array or number of
382  * maximum number of characters for a string
383  */
384 size_t
385 HumanSkeletonProjectionInterface::maxlenof_proj_neck() const
386 {
387  return 2;
388 }
389 
390 /** Set proj_neck value.
391  * Neck position vector.
392  * @param new_proj_neck new proj_neck value
393  */
394 void
395 HumanSkeletonProjectionInterface::set_proj_neck(const float * new_proj_neck)
396 {
397  data_changed |= change_field(data->proj_neck, new_proj_neck);
398 }
399 
400 /** Set proj_neck value at given index.
401  * Neck position vector.
402  * @param new_proj_neck new proj_neck value
403  * @param index index for of the value
404  */
405 void
406 HumanSkeletonProjectionInterface::set_proj_neck(unsigned int index, const float new_proj_neck)
407 {
408  data_changed |= change_field(data->proj_neck, index, new_proj_neck);
409 }
410 /** Get proj_torso value.
411  * Torso position vector.
412  * @return proj_torso value
413  */
414 float *
415 HumanSkeletonProjectionInterface::proj_torso() const
416 {
417  return data->proj_torso;
418 }
419 
420 /** Get proj_torso value at given index.
421  * Torso position vector.
422  * @param index index of value
423  * @return proj_torso value
424  * @exception Exception thrown if index is out of bounds
425  */
426 float
427 HumanSkeletonProjectionInterface::proj_torso(unsigned int index) const
428 {
429  if (index > 1) {
430  throw Exception("Index value %u out of bounds (0..1)", index);
431  }
432  return data->proj_torso[index];
433 }
434 
435 /** Get maximum length of proj_torso value.
436  * @return length of proj_torso value, can be length of the array or number of
437  * maximum number of characters for a string
438  */
439 size_t
440 HumanSkeletonProjectionInterface::maxlenof_proj_torso() const
441 {
442  return 2;
443 }
444 
445 /** Set proj_torso value.
446  * Torso position vector.
447  * @param new_proj_torso new proj_torso value
448  */
449 void
450 HumanSkeletonProjectionInterface::set_proj_torso(const float * new_proj_torso)
451 {
452  data_changed |= change_field(data->proj_torso, new_proj_torso);
453 }
454 
455 /** Set proj_torso value at given index.
456  * Torso position vector.
457  * @param new_proj_torso new proj_torso value
458  * @param index index for of the value
459  */
460 void
461 HumanSkeletonProjectionInterface::set_proj_torso(unsigned int index, const float new_proj_torso)
462 {
463  data_changed |= change_field(data->proj_torso, index, new_proj_torso);
464 }
465 /** Get proj_waist value.
466  * Waist position vector.
467  * @return proj_waist value
468  */
469 float *
470 HumanSkeletonProjectionInterface::proj_waist() const
471 {
472  return data->proj_waist;
473 }
474 
475 /** Get proj_waist value at given index.
476  * Waist position vector.
477  * @param index index of value
478  * @return proj_waist value
479  * @exception Exception thrown if index is out of bounds
480  */
481 float
482 HumanSkeletonProjectionInterface::proj_waist(unsigned int index) const
483 {
484  if (index > 1) {
485  throw Exception("Index value %u out of bounds (0..1)", index);
486  }
487  return data->proj_waist[index];
488 }
489 
490 /** Get maximum length of proj_waist value.
491  * @return length of proj_waist value, can be length of the array or number of
492  * maximum number of characters for a string
493  */
494 size_t
495 HumanSkeletonProjectionInterface::maxlenof_proj_waist() const
496 {
497  return 2;
498 }
499 
500 /** Set proj_waist value.
501  * Waist position vector.
502  * @param new_proj_waist new proj_waist value
503  */
504 void
505 HumanSkeletonProjectionInterface::set_proj_waist(const float * new_proj_waist)
506 {
507  data_changed |= change_field(data->proj_waist, new_proj_waist);
508 }
509 
510 /** Set proj_waist value at given index.
511  * Waist position vector.
512  * @param new_proj_waist new proj_waist value
513  * @param index index for of the value
514  */
515 void
516 HumanSkeletonProjectionInterface::set_proj_waist(unsigned int index, const float new_proj_waist)
517 {
518  data_changed |= change_field(data->proj_waist, index, new_proj_waist);
519 }
520 /** Get proj_left_collar value.
521  *
522  Left position vector.
523  * @return proj_left_collar value
524  */
525 float *
526 HumanSkeletonProjectionInterface::proj_left_collar() const
527 {
528  return data->proj_left_collar;
529 }
530 
531 /** Get proj_left_collar value at given index.
532  *
533  Left position vector.
534  * @param index index of value
535  * @return proj_left_collar value
536  * @exception Exception thrown if index is out of bounds
537  */
538 float
539 HumanSkeletonProjectionInterface::proj_left_collar(unsigned int index) const
540 {
541  if (index > 1) {
542  throw Exception("Index value %u out of bounds (0..1)", index);
543  }
544  return data->proj_left_collar[index];
545 }
546 
547 /** Get maximum length of proj_left_collar value.
548  * @return length of proj_left_collar value, can be length of the array or number of
549  * maximum number of characters for a string
550  */
551 size_t
552 HumanSkeletonProjectionInterface::maxlenof_proj_left_collar() const
553 {
554  return 2;
555 }
556 
557 /** Set proj_left_collar value.
558  *
559  Left position vector.
560  * @param new_proj_left_collar new proj_left_collar value
561  */
562 void
563 HumanSkeletonProjectionInterface::set_proj_left_collar(const float * new_proj_left_collar)
564 {
565  data_changed |= change_field(data->proj_left_collar, new_proj_left_collar);
566 }
567 
568 /** Set proj_left_collar value at given index.
569  *
570  Left position vector.
571  * @param new_proj_left_collar new proj_left_collar value
572  * @param index index for of the value
573  */
574 void
575 HumanSkeletonProjectionInterface::set_proj_left_collar(unsigned int index, const float new_proj_left_collar)
576 {
577  data_changed |= change_field(data->proj_left_collar, index, new_proj_left_collar);
578 }
579 /** Get proj_left_shoulder value.
580  *
581  Left shoulder position vector.
582  * @return proj_left_shoulder value
583  */
584 float *
585 HumanSkeletonProjectionInterface::proj_left_shoulder() const
586 {
587  return data->proj_left_shoulder;
588 }
589 
590 /** Get proj_left_shoulder value at given index.
591  *
592  Left shoulder position vector.
593  * @param index index of value
594  * @return proj_left_shoulder value
595  * @exception Exception thrown if index is out of bounds
596  */
597 float
598 HumanSkeletonProjectionInterface::proj_left_shoulder(unsigned int index) const
599 {
600  if (index > 1) {
601  throw Exception("Index value %u out of bounds (0..1)", index);
602  }
603  return data->proj_left_shoulder[index];
604 }
605 
606 /** Get maximum length of proj_left_shoulder value.
607  * @return length of proj_left_shoulder value, can be length of the array or number of
608  * maximum number of characters for a string
609  */
610 size_t
611 HumanSkeletonProjectionInterface::maxlenof_proj_left_shoulder() const
612 {
613  return 2;
614 }
615 
616 /** Set proj_left_shoulder value.
617  *
618  Left shoulder position vector.
619  * @param new_proj_left_shoulder new proj_left_shoulder value
620  */
621 void
622 HumanSkeletonProjectionInterface::set_proj_left_shoulder(const float * new_proj_left_shoulder)
623 {
624  data_changed |= change_field(data->proj_left_shoulder, new_proj_left_shoulder);
625 }
626 
627 /** Set proj_left_shoulder value at given index.
628  *
629  Left shoulder position vector.
630  * @param new_proj_left_shoulder new proj_left_shoulder value
631  * @param index index for of the value
632  */
633 void
634 HumanSkeletonProjectionInterface::set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder)
635 {
636  data_changed |= change_field(data->proj_left_shoulder, index, new_proj_left_shoulder);
637 }
638 /** Get proj_left_elbow value.
639  *
640  Left elbow position vector.
641  * @return proj_left_elbow value
642  */
643 float *
644 HumanSkeletonProjectionInterface::proj_left_elbow() const
645 {
646  return data->proj_left_elbow;
647 }
648 
649 /** Get proj_left_elbow value at given index.
650  *
651  Left elbow position vector.
652  * @param index index of value
653  * @return proj_left_elbow value
654  * @exception Exception thrown if index is out of bounds
655  */
656 float
657 HumanSkeletonProjectionInterface::proj_left_elbow(unsigned int index) const
658 {
659  if (index > 1) {
660  throw Exception("Index value %u out of bounds (0..1)", index);
661  }
662  return data->proj_left_elbow[index];
663 }
664 
665 /** Get maximum length of proj_left_elbow value.
666  * @return length of proj_left_elbow value, can be length of the array or number of
667  * maximum number of characters for a string
668  */
669 size_t
670 HumanSkeletonProjectionInterface::maxlenof_proj_left_elbow() const
671 {
672  return 2;
673 }
674 
675 /** Set proj_left_elbow value.
676  *
677  Left elbow position vector.
678  * @param new_proj_left_elbow new proj_left_elbow value
679  */
680 void
681 HumanSkeletonProjectionInterface::set_proj_left_elbow(const float * new_proj_left_elbow)
682 {
683  data_changed |= change_field(data->proj_left_elbow, new_proj_left_elbow);
684 }
685 
686 /** Set proj_left_elbow value at given index.
687  *
688  Left elbow position vector.
689  * @param new_proj_left_elbow new proj_left_elbow value
690  * @param index index for of the value
691  */
692 void
693 HumanSkeletonProjectionInterface::set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow)
694 {
695  data_changed |= change_field(data->proj_left_elbow, index, new_proj_left_elbow);
696 }
697 /** Get proj_left_wrist value.
698  *
699  Left wrist position vector.
700  * @return proj_left_wrist value
701  */
702 float *
703 HumanSkeletonProjectionInterface::proj_left_wrist() const
704 {
705  return data->proj_left_wrist;
706 }
707 
708 /** Get proj_left_wrist value at given index.
709  *
710  Left wrist position vector.
711  * @param index index of value
712  * @return proj_left_wrist value
713  * @exception Exception thrown if index is out of bounds
714  */
715 float
716 HumanSkeletonProjectionInterface::proj_left_wrist(unsigned int index) const
717 {
718  if (index > 1) {
719  throw Exception("Index value %u out of bounds (0..1)", index);
720  }
721  return data->proj_left_wrist[index];
722 }
723 
724 /** Get maximum length of proj_left_wrist value.
725  * @return length of proj_left_wrist value, can be length of the array or number of
726  * maximum number of characters for a string
727  */
728 size_t
729 HumanSkeletonProjectionInterface::maxlenof_proj_left_wrist() const
730 {
731  return 2;
732 }
733 
734 /** Set proj_left_wrist value.
735  *
736  Left wrist position vector.
737  * @param new_proj_left_wrist new proj_left_wrist value
738  */
739 void
740 HumanSkeletonProjectionInterface::set_proj_left_wrist(const float * new_proj_left_wrist)
741 {
742  data_changed |= change_field(data->proj_left_wrist, new_proj_left_wrist);
743 }
744 
745 /** Set proj_left_wrist value at given index.
746  *
747  Left wrist position vector.
748  * @param new_proj_left_wrist new proj_left_wrist value
749  * @param index index for of the value
750  */
751 void
752 HumanSkeletonProjectionInterface::set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist)
753 {
754  data_changed |= change_field(data->proj_left_wrist, index, new_proj_left_wrist);
755 }
756 /** Get proj_left_hand value.
757  *
758  Left hand position vector.
759  * @return proj_left_hand value
760  */
761 float *
762 HumanSkeletonProjectionInterface::proj_left_hand() const
763 {
764  return data->proj_left_hand;
765 }
766 
767 /** Get proj_left_hand value at given index.
768  *
769  Left hand position vector.
770  * @param index index of value
771  * @return proj_left_hand value
772  * @exception Exception thrown if index is out of bounds
773  */
774 float
775 HumanSkeletonProjectionInterface::proj_left_hand(unsigned int index) const
776 {
777  if (index > 1) {
778  throw Exception("Index value %u out of bounds (0..1)", index);
779  }
780  return data->proj_left_hand[index];
781 }
782 
783 /** Get maximum length of proj_left_hand value.
784  * @return length of proj_left_hand value, can be length of the array or number of
785  * maximum number of characters for a string
786  */
787 size_t
788 HumanSkeletonProjectionInterface::maxlenof_proj_left_hand() const
789 {
790  return 2;
791 }
792 
793 /** Set proj_left_hand value.
794  *
795  Left hand position vector.
796  * @param new_proj_left_hand new proj_left_hand value
797  */
798 void
799 HumanSkeletonProjectionInterface::set_proj_left_hand(const float * new_proj_left_hand)
800 {
801  data_changed |= change_field(data->proj_left_hand, new_proj_left_hand);
802 }
803 
804 /** Set proj_left_hand value at given index.
805  *
806  Left hand position vector.
807  * @param new_proj_left_hand new proj_left_hand value
808  * @param index index for of the value
809  */
810 void
811 HumanSkeletonProjectionInterface::set_proj_left_hand(unsigned int index, const float new_proj_left_hand)
812 {
813  data_changed |= change_field(data->proj_left_hand, index, new_proj_left_hand);
814 }
815 /** Get proj_left_fingertip value.
816  *
817  Left fingertip position vector.
818  * @return proj_left_fingertip value
819  */
820 float *
821 HumanSkeletonProjectionInterface::proj_left_fingertip() const
822 {
823  return data->proj_left_fingertip;
824 }
825 
826 /** Get proj_left_fingertip value at given index.
827  *
828  Left fingertip position vector.
829  * @param index index of value
830  * @return proj_left_fingertip value
831  * @exception Exception thrown if index is out of bounds
832  */
833 float
834 HumanSkeletonProjectionInterface::proj_left_fingertip(unsigned int index) const
835 {
836  if (index > 1) {
837  throw Exception("Index value %u out of bounds (0..1)", index);
838  }
839  return data->proj_left_fingertip[index];
840 }
841 
842 /** Get maximum length of proj_left_fingertip value.
843  * @return length of proj_left_fingertip value, can be length of the array or number of
844  * maximum number of characters for a string
845  */
846 size_t
847 HumanSkeletonProjectionInterface::maxlenof_proj_left_fingertip() const
848 {
849  return 2;
850 }
851 
852 /** Set proj_left_fingertip value.
853  *
854  Left fingertip position vector.
855  * @param new_proj_left_fingertip new proj_left_fingertip value
856  */
857 void
858 HumanSkeletonProjectionInterface::set_proj_left_fingertip(const float * new_proj_left_fingertip)
859 {
860  data_changed |= change_field(data->proj_left_fingertip, new_proj_left_fingertip);
861 }
862 
863 /** Set proj_left_fingertip value at given index.
864  *
865  Left fingertip position vector.
866  * @param new_proj_left_fingertip new proj_left_fingertip value
867  * @param index index for of the value
868  */
869 void
870 HumanSkeletonProjectionInterface::set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip)
871 {
872  data_changed |= change_field(data->proj_left_fingertip, index, new_proj_left_fingertip);
873 }
874 /** Get proj_right_collar value.
875  *
876  Right collar position vector.
877  * @return proj_right_collar value
878  */
879 float *
880 HumanSkeletonProjectionInterface::proj_right_collar() const
881 {
882  return data->proj_right_collar;
883 }
884 
885 /** Get proj_right_collar value at given index.
886  *
887  Right collar position vector.
888  * @param index index of value
889  * @return proj_right_collar value
890  * @exception Exception thrown if index is out of bounds
891  */
892 float
893 HumanSkeletonProjectionInterface::proj_right_collar(unsigned int index) const
894 {
895  if (index > 1) {
896  throw Exception("Index value %u out of bounds (0..1)", index);
897  }
898  return data->proj_right_collar[index];
899 }
900 
901 /** Get maximum length of proj_right_collar value.
902  * @return length of proj_right_collar value, can be length of the array or number of
903  * maximum number of characters for a string
904  */
905 size_t
906 HumanSkeletonProjectionInterface::maxlenof_proj_right_collar() const
907 {
908  return 2;
909 }
910 
911 /** Set proj_right_collar value.
912  *
913  Right collar position vector.
914  * @param new_proj_right_collar new proj_right_collar value
915  */
916 void
917 HumanSkeletonProjectionInterface::set_proj_right_collar(const float * new_proj_right_collar)
918 {
919  data_changed |= change_field(data->proj_right_collar, new_proj_right_collar);
920 }
921 
922 /** Set proj_right_collar value at given index.
923  *
924  Right collar position vector.
925  * @param new_proj_right_collar new proj_right_collar value
926  * @param index index for of the value
927  */
928 void
929 HumanSkeletonProjectionInterface::set_proj_right_collar(unsigned int index, const float new_proj_right_collar)
930 {
931  data_changed |= change_field(data->proj_right_collar, index, new_proj_right_collar);
932 }
933 /** Get proj_right_shoulder value.
934  *
935  Right shoulder position vector.
936  * @return proj_right_shoulder value
937  */
938 float *
939 HumanSkeletonProjectionInterface::proj_right_shoulder() const
940 {
941  return data->proj_right_shoulder;
942 }
943 
944 /** Get proj_right_shoulder value at given index.
945  *
946  Right shoulder position vector.
947  * @param index index of value
948  * @return proj_right_shoulder value
949  * @exception Exception thrown if index is out of bounds
950  */
951 float
952 HumanSkeletonProjectionInterface::proj_right_shoulder(unsigned int index) const
953 {
954  if (index > 1) {
955  throw Exception("Index value %u out of bounds (0..1)", index);
956  }
957  return data->proj_right_shoulder[index];
958 }
959 
960 /** Get maximum length of proj_right_shoulder value.
961  * @return length of proj_right_shoulder value, can be length of the array or number of
962  * maximum number of characters for a string
963  */
964 size_t
965 HumanSkeletonProjectionInterface::maxlenof_proj_right_shoulder() const
966 {
967  return 2;
968 }
969 
970 /** Set proj_right_shoulder value.
971  *
972  Right shoulder position vector.
973  * @param new_proj_right_shoulder new proj_right_shoulder value
974  */
975 void
976 HumanSkeletonProjectionInterface::set_proj_right_shoulder(const float * new_proj_right_shoulder)
977 {
978  data_changed |= change_field(data->proj_right_shoulder, new_proj_right_shoulder);
979 }
980 
981 /** Set proj_right_shoulder value at given index.
982  *
983  Right shoulder position vector.
984  * @param new_proj_right_shoulder new proj_right_shoulder value
985  * @param index index for of the value
986  */
987 void
988 HumanSkeletonProjectionInterface::set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder)
989 {
990  data_changed |= change_field(data->proj_right_shoulder, index, new_proj_right_shoulder);
991 }
992 /** Get proj_right_elbow value.
993  *
994  Right elbow position vector.
995  * @return proj_right_elbow value
996  */
997 float *
998 HumanSkeletonProjectionInterface::proj_right_elbow() const
999 {
1000  return data->proj_right_elbow;
1001 }
1002 
1003 /** Get proj_right_elbow value at given index.
1004  *
1005  Right elbow position vector.
1006  * @param index index of value
1007  * @return proj_right_elbow value
1008  * @exception Exception thrown if index is out of bounds
1009  */
1010 float
1011 HumanSkeletonProjectionInterface::proj_right_elbow(unsigned int index) const
1012 {
1013  if (index > 1) {
1014  throw Exception("Index value %u out of bounds (0..1)", index);
1015  }
1016  return data->proj_right_elbow[index];
1017 }
1018 
1019 /** Get maximum length of proj_right_elbow value.
1020  * @return length of proj_right_elbow value, can be length of the array or number of
1021  * maximum number of characters for a string
1022  */
1023 size_t
1024 HumanSkeletonProjectionInterface::maxlenof_proj_right_elbow() const
1025 {
1026  return 2;
1027 }
1028 
1029 /** Set proj_right_elbow value.
1030  *
1031  Right elbow position vector.
1032  * @param new_proj_right_elbow new proj_right_elbow value
1033  */
1034 void
1035 HumanSkeletonProjectionInterface::set_proj_right_elbow(const float * new_proj_right_elbow)
1036 {
1037  data_changed |= change_field(data->proj_right_elbow, new_proj_right_elbow);
1038 }
1039 
1040 /** Set proj_right_elbow value at given index.
1041  *
1042  Right elbow position vector.
1043  * @param new_proj_right_elbow new proj_right_elbow value
1044  * @param index index for of the value
1045  */
1046 void
1047 HumanSkeletonProjectionInterface::set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow)
1048 {
1049  data_changed |= change_field(data->proj_right_elbow, index, new_proj_right_elbow);
1050 }
1051 /** Get proj_right_wrist value.
1052  *
1053  Right wrist position vector.
1054  * @return proj_right_wrist value
1055  */
1056 float *
1057 HumanSkeletonProjectionInterface::proj_right_wrist() const
1058 {
1059  return data->proj_right_wrist;
1060 }
1061 
1062 /** Get proj_right_wrist value at given index.
1063  *
1064  Right wrist position vector.
1065  * @param index index of value
1066  * @return proj_right_wrist value
1067  * @exception Exception thrown if index is out of bounds
1068  */
1069 float
1070 HumanSkeletonProjectionInterface::proj_right_wrist(unsigned int index) const
1071 {
1072  if (index > 1) {
1073  throw Exception("Index value %u out of bounds (0..1)", index);
1074  }
1075  return data->proj_right_wrist[index];
1076 }
1077 
1078 /** Get maximum length of proj_right_wrist value.
1079  * @return length of proj_right_wrist value, can be length of the array or number of
1080  * maximum number of characters for a string
1081  */
1082 size_t
1083 HumanSkeletonProjectionInterface::maxlenof_proj_right_wrist() const
1084 {
1085  return 2;
1086 }
1087 
1088 /** Set proj_right_wrist value.
1089  *
1090  Right wrist position vector.
1091  * @param new_proj_right_wrist new proj_right_wrist value
1092  */
1093 void
1094 HumanSkeletonProjectionInterface::set_proj_right_wrist(const float * new_proj_right_wrist)
1095 {
1096  data_changed |= change_field(data->proj_right_wrist, new_proj_right_wrist);
1097 }
1098 
1099 /** Set proj_right_wrist value at given index.
1100  *
1101  Right wrist position vector.
1102  * @param new_proj_right_wrist new proj_right_wrist value
1103  * @param index index for of the value
1104  */
1105 void
1106 HumanSkeletonProjectionInterface::set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist)
1107 {
1108  data_changed |= change_field(data->proj_right_wrist, index, new_proj_right_wrist);
1109 }
1110 /** Get proj_right_hand value.
1111  *
1112  Right hand position vector.
1113  * @return proj_right_hand value
1114  */
1115 float *
1116 HumanSkeletonProjectionInterface::proj_right_hand() const
1117 {
1118  return data->proj_right_hand;
1119 }
1120 
1121 /** Get proj_right_hand value at given index.
1122  *
1123  Right hand position vector.
1124  * @param index index of value
1125  * @return proj_right_hand value
1126  * @exception Exception thrown if index is out of bounds
1127  */
1128 float
1129 HumanSkeletonProjectionInterface::proj_right_hand(unsigned int index) const
1130 {
1131  if (index > 1) {
1132  throw Exception("Index value %u out of bounds (0..1)", index);
1133  }
1134  return data->proj_right_hand[index];
1135 }
1136 
1137 /** Get maximum length of proj_right_hand value.
1138  * @return length of proj_right_hand value, can be length of the array or number of
1139  * maximum number of characters for a string
1140  */
1141 size_t
1142 HumanSkeletonProjectionInterface::maxlenof_proj_right_hand() const
1143 {
1144  return 2;
1145 }
1146 
1147 /** Set proj_right_hand value.
1148  *
1149  Right hand position vector.
1150  * @param new_proj_right_hand new proj_right_hand value
1151  */
1152 void
1153 HumanSkeletonProjectionInterface::set_proj_right_hand(const float * new_proj_right_hand)
1154 {
1155  data_changed |= change_field(data->proj_right_hand, new_proj_right_hand);
1156 }
1157 
1158 /** Set proj_right_hand value at given index.
1159  *
1160  Right hand position vector.
1161  * @param new_proj_right_hand new proj_right_hand value
1162  * @param index index for of the value
1163  */
1164 void
1165 HumanSkeletonProjectionInterface::set_proj_right_hand(unsigned int index, const float new_proj_right_hand)
1166 {
1167  data_changed |= change_field(data->proj_right_hand, index, new_proj_right_hand);
1168 }
1169 /** Get proj_right_fingertip value.
1170  *
1171  Right fingertip position vector.
1172  * @return proj_right_fingertip value
1173  */
1174 float *
1175 HumanSkeletonProjectionInterface::proj_right_fingertip() const
1176 {
1177  return data->proj_right_fingertip;
1178 }
1179 
1180 /** Get proj_right_fingertip value at given index.
1181  *
1182  Right fingertip position vector.
1183  * @param index index of value
1184  * @return proj_right_fingertip value
1185  * @exception Exception thrown if index is out of bounds
1186  */
1187 float
1188 HumanSkeletonProjectionInterface::proj_right_fingertip(unsigned int index) const
1189 {
1190  if (index > 1) {
1191  throw Exception("Index value %u out of bounds (0..1)", index);
1192  }
1193  return data->proj_right_fingertip[index];
1194 }
1195 
1196 /** Get maximum length of proj_right_fingertip value.
1197  * @return length of proj_right_fingertip value, can be length of the array or number of
1198  * maximum number of characters for a string
1199  */
1200 size_t
1201 HumanSkeletonProjectionInterface::maxlenof_proj_right_fingertip() const
1202 {
1203  return 2;
1204 }
1205 
1206 /** Set proj_right_fingertip value.
1207  *
1208  Right fingertip position vector.
1209  * @param new_proj_right_fingertip new proj_right_fingertip value
1210  */
1211 void
1212 HumanSkeletonProjectionInterface::set_proj_right_fingertip(const float * new_proj_right_fingertip)
1213 {
1214  data_changed |= change_field(data->proj_right_fingertip, new_proj_right_fingertip);
1215 }
1216 
1217 /** Set proj_right_fingertip value at given index.
1218  *
1219  Right fingertip position vector.
1220  * @param new_proj_right_fingertip new proj_right_fingertip value
1221  * @param index index for of the value
1222  */
1223 void
1224 HumanSkeletonProjectionInterface::set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip)
1225 {
1226  data_changed |= change_field(data->proj_right_fingertip, index, new_proj_right_fingertip);
1227 }
1228 /** Get proj_left_hip value.
1229  *
1230  Left hip position vector.
1231  * @return proj_left_hip value
1232  */
1233 float *
1234 HumanSkeletonProjectionInterface::proj_left_hip() const
1235 {
1236  return data->proj_left_hip;
1237 }
1238 
1239 /** Get proj_left_hip value at given index.
1240  *
1241  Left hip position vector.
1242  * @param index index of value
1243  * @return proj_left_hip value
1244  * @exception Exception thrown if index is out of bounds
1245  */
1246 float
1247 HumanSkeletonProjectionInterface::proj_left_hip(unsigned int index) const
1248 {
1249  if (index > 1) {
1250  throw Exception("Index value %u out of bounds (0..1)", index);
1251  }
1252  return data->proj_left_hip[index];
1253 }
1254 
1255 /** Get maximum length of proj_left_hip value.
1256  * @return length of proj_left_hip value, can be length of the array or number of
1257  * maximum number of characters for a string
1258  */
1259 size_t
1260 HumanSkeletonProjectionInterface::maxlenof_proj_left_hip() const
1261 {
1262  return 2;
1263 }
1264 
1265 /** Set proj_left_hip value.
1266  *
1267  Left hip position vector.
1268  * @param new_proj_left_hip new proj_left_hip value
1269  */
1270 void
1271 HumanSkeletonProjectionInterface::set_proj_left_hip(const float * new_proj_left_hip)
1272 {
1273  data_changed |= change_field(data->proj_left_hip, new_proj_left_hip);
1274 }
1275 
1276 /** Set proj_left_hip value at given index.
1277  *
1278  Left hip position vector.
1279  * @param new_proj_left_hip new proj_left_hip value
1280  * @param index index for of the value
1281  */
1282 void
1283 HumanSkeletonProjectionInterface::set_proj_left_hip(unsigned int index, const float new_proj_left_hip)
1284 {
1285  data_changed |= change_field(data->proj_left_hip, index, new_proj_left_hip);
1286 }
1287 /** Get proj_left_knee value.
1288  *
1289  Left knee position vector.
1290  * @return proj_left_knee value
1291  */
1292 float *
1293 HumanSkeletonProjectionInterface::proj_left_knee() const
1294 {
1295  return data->proj_left_knee;
1296 }
1297 
1298 /** Get proj_left_knee value at given index.
1299  *
1300  Left knee position vector.
1301  * @param index index of value
1302  * @return proj_left_knee value
1303  * @exception Exception thrown if index is out of bounds
1304  */
1305 float
1306 HumanSkeletonProjectionInterface::proj_left_knee(unsigned int index) const
1307 {
1308  if (index > 1) {
1309  throw Exception("Index value %u out of bounds (0..1)", index);
1310  }
1311  return data->proj_left_knee[index];
1312 }
1313 
1314 /** Get maximum length of proj_left_knee value.
1315  * @return length of proj_left_knee value, can be length of the array or number of
1316  * maximum number of characters for a string
1317  */
1318 size_t
1319 HumanSkeletonProjectionInterface::maxlenof_proj_left_knee() const
1320 {
1321  return 2;
1322 }
1323 
1324 /** Set proj_left_knee value.
1325  *
1326  Left knee position vector.
1327  * @param new_proj_left_knee new proj_left_knee value
1328  */
1329 void
1330 HumanSkeletonProjectionInterface::set_proj_left_knee(const float * new_proj_left_knee)
1331 {
1332  data_changed |= change_field(data->proj_left_knee, new_proj_left_knee);
1333 }
1334 
1335 /** Set proj_left_knee value at given index.
1336  *
1337  Left knee position vector.
1338  * @param new_proj_left_knee new proj_left_knee value
1339  * @param index index for of the value
1340  */
1341 void
1342 HumanSkeletonProjectionInterface::set_proj_left_knee(unsigned int index, const float new_proj_left_knee)
1343 {
1344  data_changed |= change_field(data->proj_left_knee, index, new_proj_left_knee);
1345 }
1346 /** Get proj_left_ankle value.
1347  *
1348  Left ankle position vector.
1349  * @return proj_left_ankle value
1350  */
1351 float *
1352 HumanSkeletonProjectionInterface::proj_left_ankle() const
1353 {
1354  return data->proj_left_ankle;
1355 }
1356 
1357 /** Get proj_left_ankle value at given index.
1358  *
1359  Left ankle position vector.
1360  * @param index index of value
1361  * @return proj_left_ankle value
1362  * @exception Exception thrown if index is out of bounds
1363  */
1364 float
1365 HumanSkeletonProjectionInterface::proj_left_ankle(unsigned int index) const
1366 {
1367  if (index > 1) {
1368  throw Exception("Index value %u out of bounds (0..1)", index);
1369  }
1370  return data->proj_left_ankle[index];
1371 }
1372 
1373 /** Get maximum length of proj_left_ankle value.
1374  * @return length of proj_left_ankle value, can be length of the array or number of
1375  * maximum number of characters for a string
1376  */
1377 size_t
1378 HumanSkeletonProjectionInterface::maxlenof_proj_left_ankle() const
1379 {
1380  return 2;
1381 }
1382 
1383 /** Set proj_left_ankle value.
1384  *
1385  Left ankle position vector.
1386  * @param new_proj_left_ankle new proj_left_ankle value
1387  */
1388 void
1389 HumanSkeletonProjectionInterface::set_proj_left_ankle(const float * new_proj_left_ankle)
1390 {
1391  data_changed |= change_field(data->proj_left_ankle, new_proj_left_ankle);
1392 }
1393 
1394 /** Set proj_left_ankle value at given index.
1395  *
1396  Left ankle position vector.
1397  * @param new_proj_left_ankle new proj_left_ankle value
1398  * @param index index for of the value
1399  */
1400 void
1401 HumanSkeletonProjectionInterface::set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle)
1402 {
1403  data_changed |= change_field(data->proj_left_ankle, index, new_proj_left_ankle);
1404 }
1405 /** Get proj_left_foot value.
1406  *
1407  Left foot position vector.
1408  * @return proj_left_foot value
1409  */
1410 float *
1411 HumanSkeletonProjectionInterface::proj_left_foot() const
1412 {
1413  return data->proj_left_foot;
1414 }
1415 
1416 /** Get proj_left_foot value at given index.
1417  *
1418  Left foot position vector.
1419  * @param index index of value
1420  * @return proj_left_foot value
1421  * @exception Exception thrown if index is out of bounds
1422  */
1423 float
1424 HumanSkeletonProjectionInterface::proj_left_foot(unsigned int index) const
1425 {
1426  if (index > 1) {
1427  throw Exception("Index value %u out of bounds (0..1)", index);
1428  }
1429  return data->proj_left_foot[index];
1430 }
1431 
1432 /** Get maximum length of proj_left_foot value.
1433  * @return length of proj_left_foot value, can be length of the array or number of
1434  * maximum number of characters for a string
1435  */
1436 size_t
1437 HumanSkeletonProjectionInterface::maxlenof_proj_left_foot() const
1438 {
1439  return 2;
1440 }
1441 
1442 /** Set proj_left_foot value.
1443  *
1444  Left foot position vector.
1445  * @param new_proj_left_foot new proj_left_foot value
1446  */
1447 void
1448 HumanSkeletonProjectionInterface::set_proj_left_foot(const float * new_proj_left_foot)
1449 {
1450  data_changed |= change_field(data->proj_left_foot, new_proj_left_foot);
1451 }
1452 
1453 /** Set proj_left_foot value at given index.
1454  *
1455  Left foot position vector.
1456  * @param new_proj_left_foot new proj_left_foot value
1457  * @param index index for of the value
1458  */
1459 void
1460 HumanSkeletonProjectionInterface::set_proj_left_foot(unsigned int index, const float new_proj_left_foot)
1461 {
1462  data_changed |= change_field(data->proj_left_foot, index, new_proj_left_foot);
1463 }
1464 /** Get proj_right_hip value.
1465  *
1466  Right hip position vector.
1467  * @return proj_right_hip value
1468  */
1469 float *
1470 HumanSkeletonProjectionInterface::proj_right_hip() const
1471 {
1472  return data->proj_right_hip;
1473 }
1474 
1475 /** Get proj_right_hip value at given index.
1476  *
1477  Right hip position vector.
1478  * @param index index of value
1479  * @return proj_right_hip value
1480  * @exception Exception thrown if index is out of bounds
1481  */
1482 float
1483 HumanSkeletonProjectionInterface::proj_right_hip(unsigned int index) const
1484 {
1485  if (index > 1) {
1486  throw Exception("Index value %u out of bounds (0..1)", index);
1487  }
1488  return data->proj_right_hip[index];
1489 }
1490 
1491 /** Get maximum length of proj_right_hip value.
1492  * @return length of proj_right_hip value, can be length of the array or number of
1493  * maximum number of characters for a string
1494  */
1495 size_t
1496 HumanSkeletonProjectionInterface::maxlenof_proj_right_hip() const
1497 {
1498  return 2;
1499 }
1500 
1501 /** Set proj_right_hip value.
1502  *
1503  Right hip position vector.
1504  * @param new_proj_right_hip new proj_right_hip value
1505  */
1506 void
1507 HumanSkeletonProjectionInterface::set_proj_right_hip(const float * new_proj_right_hip)
1508 {
1509  data_changed |= change_field(data->proj_right_hip, new_proj_right_hip);
1510 }
1511 
1512 /** Set proj_right_hip value at given index.
1513  *
1514  Right hip position vector.
1515  * @param new_proj_right_hip new proj_right_hip value
1516  * @param index index for of the value
1517  */
1518 void
1519 HumanSkeletonProjectionInterface::set_proj_right_hip(unsigned int index, const float new_proj_right_hip)
1520 {
1521  data_changed |= change_field(data->proj_right_hip, index, new_proj_right_hip);
1522 }
1523 /** Get proj_right_knee value.
1524  *
1525  Right knee position vector.
1526  * @return proj_right_knee value
1527  */
1528 float *
1529 HumanSkeletonProjectionInterface::proj_right_knee() const
1530 {
1531  return data->proj_right_knee;
1532 }
1533 
1534 /** Get proj_right_knee value at given index.
1535  *
1536  Right knee position vector.
1537  * @param index index of value
1538  * @return proj_right_knee value
1539  * @exception Exception thrown if index is out of bounds
1540  */
1541 float
1542 HumanSkeletonProjectionInterface::proj_right_knee(unsigned int index) const
1543 {
1544  if (index > 1) {
1545  throw Exception("Index value %u out of bounds (0..1)", index);
1546  }
1547  return data->proj_right_knee[index];
1548 }
1549 
1550 /** Get maximum length of proj_right_knee value.
1551  * @return length of proj_right_knee value, can be length of the array or number of
1552  * maximum number of characters for a string
1553  */
1554 size_t
1555 HumanSkeletonProjectionInterface::maxlenof_proj_right_knee() const
1556 {
1557  return 2;
1558 }
1559 
1560 /** Set proj_right_knee value.
1561  *
1562  Right knee position vector.
1563  * @param new_proj_right_knee new proj_right_knee value
1564  */
1565 void
1566 HumanSkeletonProjectionInterface::set_proj_right_knee(const float * new_proj_right_knee)
1567 {
1568  data_changed |= change_field(data->proj_right_knee, new_proj_right_knee);
1569 }
1570 
1571 /** Set proj_right_knee value at given index.
1572  *
1573  Right knee position vector.
1574  * @param new_proj_right_knee new proj_right_knee value
1575  * @param index index for of the value
1576  */
1577 void
1578 HumanSkeletonProjectionInterface::set_proj_right_knee(unsigned int index, const float new_proj_right_knee)
1579 {
1580  data_changed |= change_field(data->proj_right_knee, index, new_proj_right_knee);
1581 }
1582 /** Get proj_right_ankle value.
1583  *
1584  Right ankle position vector.
1585  * @return proj_right_ankle value
1586  */
1587 float *
1588 HumanSkeletonProjectionInterface::proj_right_ankle() const
1589 {
1590  return data->proj_right_ankle;
1591 }
1592 
1593 /** Get proj_right_ankle value at given index.
1594  *
1595  Right ankle position vector.
1596  * @param index index of value
1597  * @return proj_right_ankle value
1598  * @exception Exception thrown if index is out of bounds
1599  */
1600 float
1601 HumanSkeletonProjectionInterface::proj_right_ankle(unsigned int index) const
1602 {
1603  if (index > 1) {
1604  throw Exception("Index value %u out of bounds (0..1)", index);
1605  }
1606  return data->proj_right_ankle[index];
1607 }
1608 
1609 /** Get maximum length of proj_right_ankle value.
1610  * @return length of proj_right_ankle value, can be length of the array or number of
1611  * maximum number of characters for a string
1612  */
1613 size_t
1614 HumanSkeletonProjectionInterface::maxlenof_proj_right_ankle() const
1615 {
1616  return 2;
1617 }
1618 
1619 /** Set proj_right_ankle value.
1620  *
1621  Right ankle position vector.
1622  * @param new_proj_right_ankle new proj_right_ankle value
1623  */
1624 void
1625 HumanSkeletonProjectionInterface::set_proj_right_ankle(const float * new_proj_right_ankle)
1626 {
1627  data_changed |= change_field(data->proj_right_ankle, new_proj_right_ankle);
1628 }
1629 
1630 /** Set proj_right_ankle value at given index.
1631  *
1632  Right ankle position vector.
1633  * @param new_proj_right_ankle new proj_right_ankle value
1634  * @param index index for of the value
1635  */
1636 void
1637 HumanSkeletonProjectionInterface::set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle)
1638 {
1639  data_changed |= change_field(data->proj_right_ankle, index, new_proj_right_ankle);
1640 }
1641 /** Get proj_right_foot value.
1642  *
1643  Right foot position vector.
1644  * @return proj_right_foot value
1645  */
1646 float *
1647 HumanSkeletonProjectionInterface::proj_right_foot() const
1648 {
1649  return data->proj_right_foot;
1650 }
1651 
1652 /** Get proj_right_foot value at given index.
1653  *
1654  Right foot position vector.
1655  * @param index index of value
1656  * @return proj_right_foot value
1657  * @exception Exception thrown if index is out of bounds
1658  */
1659 float
1660 HumanSkeletonProjectionInterface::proj_right_foot(unsigned int index) const
1661 {
1662  if (index > 1) {
1663  throw Exception("Index value %u out of bounds (0..1)", index);
1664  }
1665  return data->proj_right_foot[index];
1666 }
1667 
1668 /** Get maximum length of proj_right_foot value.
1669  * @return length of proj_right_foot value, can be length of the array or number of
1670  * maximum number of characters for a string
1671  */
1672 size_t
1673 HumanSkeletonProjectionInterface::maxlenof_proj_right_foot() const
1674 {
1675  return 2;
1676 }
1677 
1678 /** Set proj_right_foot value.
1679  *
1680  Right foot position vector.
1681  * @param new_proj_right_foot new proj_right_foot value
1682  */
1683 void
1684 HumanSkeletonProjectionInterface::set_proj_right_foot(const float * new_proj_right_foot)
1685 {
1686  data_changed |= change_field(data->proj_right_foot, new_proj_right_foot);
1687 }
1688 
1689 /** Set proj_right_foot value at given index.
1690  *
1691  Right foot position vector.
1692  * @param new_proj_right_foot new proj_right_foot value
1693  * @param index index for of the value
1694  */
1695 void
1696 HumanSkeletonProjectionInterface::set_proj_right_foot(unsigned int index, const float new_proj_right_foot)
1697 {
1698  data_changed |= change_field(data->proj_right_foot, index, new_proj_right_foot);
1699 }
1700 /* =========== message create =========== */
1701 Message *
1702 HumanSkeletonProjectionInterface::create_message(const char *type) const
1703 {
1704  throw UnknownTypeException("The given type '%s' does not match any known "
1705  "message type for this interface type.", type);
1706 }
1707 
1708 
1709 /** Copy values from other interface.
1710  * @param other other interface to copy values from
1711  */
1712 void
1713 HumanSkeletonProjectionInterface::copy_values(const Interface *other)
1714 {
1715  const HumanSkeletonProjectionInterface *oi = dynamic_cast<const HumanSkeletonProjectionInterface *>(other);
1716  if (oi == NULL) {
1717  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
1718  type(), other->type());
1719  }
1720  memcpy(data, oi->data, sizeof(HumanSkeletonProjectionInterface_data_t));
1721 }
1722 
1723 const char *
1724 HumanSkeletonProjectionInterface::enum_tostring(const char *enumtype, int val) const
1725 {
1726  throw UnknownTypeException("Unknown enum type %s", enumtype);
1727 }
1728 
1729 /* =========== messages =========== */
1730 /** Check if message is valid and can be enqueued.
1731  * @param message Message to check
1732  * @return true if the message is valid, false otherwise.
1733  */
1734 bool
1735 HumanSkeletonProjectionInterface::message_valid(const Message *message) const
1736 {
1737  return false;
1738 }
1739 
1740 /// @cond INTERNALS
1741 EXPORT_INTERFACE(HumanSkeletonProjectionInterface)
1742 /// @endcond
1743 
1744 
1745 } // end namespace fawkes
fawkes::Message
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:45
fawkes::Interface::type
const char * type() const
Get type of interface.
Definition: interface.cpp:643
fawkes::HumanSkeletonProjectionInterface
HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
Definition: HumanSkeletonProjectionInterface.h:34
fawkes::TypeMismatchException
Type mismatch.
Definition: software.h:44
fawkes::UnknownTypeException
Unknown type.
Definition: software.h:50
fawkes
Fawkes library namespace.
fawkes::Interface
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
fawkes::change_field
bool change_field(FieldT &field, const DataT &value)
Set a field and return whether it changed.
Definition: message.h:167
fawkes::Exception
Base class for exceptions in Fawkes.
Definition: exception.h:36