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
33namespace 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 */
48HumanSkeletonProjectionInterface::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 */
90HumanSkeletonProjectionInterface::~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 */
99float
100HumanSkeletonProjectionInterface::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 */
109size_t
110HumanSkeletonProjectionInterface::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 */
119void
120HumanSkeletonProjectionInterface::set_horizontal_fov(const float new_horizontal_fov)
121{
122 set_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 */
129float
130HumanSkeletonProjectionInterface::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 */
139size_t
140HumanSkeletonProjectionInterface::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 */
149void
150HumanSkeletonProjectionInterface::set_vertical_fov(const float new_vertical_fov)
151{
152 set_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 */
159uint32_t
160HumanSkeletonProjectionInterface::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 */
169size_t
170HumanSkeletonProjectionInterface::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 */
179void
180HumanSkeletonProjectionInterface::set_res_x(const uint32_t new_res_x)
181{
182 set_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 */
189uint32_t
190HumanSkeletonProjectionInterface::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 */
199size_t
200HumanSkeletonProjectionInterface::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 */
209void
210HumanSkeletonProjectionInterface::set_res_y(const uint32_t new_res_y)
211{
212 set_field(data->res_y, new_res_y);
213}
214
215/** Get max_depth value.
216 * Maximum depth value.
217 * @return max_depth value
218 */
219uint16_t
220HumanSkeletonProjectionInterface::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 */
229size_t
230HumanSkeletonProjectionInterface::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 */
239void
240HumanSkeletonProjectionInterface::set_max_depth(const uint16_t new_max_depth)
241{
242 set_field(data->max_depth, new_max_depth);
243}
244
245/** Get proj_com value.
246 * Center of mass.
247 * @return proj_com value
248 */
249float *
250HumanSkeletonProjectionInterface::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 */
261float
262HumanSkeletonProjectionInterface::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 */
274size_t
275HumanSkeletonProjectionInterface::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 */
284void
285HumanSkeletonProjectionInterface::set_proj_com(const float * new_proj_com)
286{
287 set_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 */
295void
296HumanSkeletonProjectionInterface::set_proj_com(unsigned int index, const float new_proj_com)
297{
298 set_field(data->proj_com, index, new_proj_com);
299}
300/** Get proj_head value.
301 * Head position vector.
302 * @return proj_head value
303 */
304float *
305HumanSkeletonProjectionInterface::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 */
316float
317HumanSkeletonProjectionInterface::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 */
329size_t
330HumanSkeletonProjectionInterface::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 */
339void
340HumanSkeletonProjectionInterface::set_proj_head(const float * new_proj_head)
341{
342 set_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 */
350void
351HumanSkeletonProjectionInterface::set_proj_head(unsigned int index, const float new_proj_head)
352{
353 set_field(data->proj_head, index, new_proj_head);
354}
355/** Get proj_neck value.
356 * Neck position vector.
357 * @return proj_neck value
358 */
359float *
360HumanSkeletonProjectionInterface::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 */
371float
372HumanSkeletonProjectionInterface::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 */
384size_t
385HumanSkeletonProjectionInterface::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 */
394void
395HumanSkeletonProjectionInterface::set_proj_neck(const float * new_proj_neck)
396{
397 set_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 */
405void
406HumanSkeletonProjectionInterface::set_proj_neck(unsigned int index, const float new_proj_neck)
407{
408 set_field(data->proj_neck, index, new_proj_neck);
409}
410/** Get proj_torso value.
411 * Torso position vector.
412 * @return proj_torso value
413 */
414float *
415HumanSkeletonProjectionInterface::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 */
426float
427HumanSkeletonProjectionInterface::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 */
439size_t
440HumanSkeletonProjectionInterface::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 */
449void
450HumanSkeletonProjectionInterface::set_proj_torso(const float * new_proj_torso)
451{
452 set_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 */
460void
461HumanSkeletonProjectionInterface::set_proj_torso(unsigned int index, const float new_proj_torso)
462{
463 set_field(data->proj_torso, index, new_proj_torso);
464}
465/** Get proj_waist value.
466 * Waist position vector.
467 * @return proj_waist value
468 */
469float *
470HumanSkeletonProjectionInterface::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 */
481float
482HumanSkeletonProjectionInterface::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 */
494size_t
495HumanSkeletonProjectionInterface::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 */
504void
505HumanSkeletonProjectionInterface::set_proj_waist(const float * new_proj_waist)
506{
507 set_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 */
515void
516HumanSkeletonProjectionInterface::set_proj_waist(unsigned int index, const float new_proj_waist)
517{
518 set_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 */
525float *
526HumanSkeletonProjectionInterface::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 */
538float
539HumanSkeletonProjectionInterface::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 */
551size_t
552HumanSkeletonProjectionInterface::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 */
562void
563HumanSkeletonProjectionInterface::set_proj_left_collar(const float * new_proj_left_collar)
564{
565 set_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 */
574void
575HumanSkeletonProjectionInterface::set_proj_left_collar(unsigned int index, const float new_proj_left_collar)
576{
577 set_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 */
584float *
585HumanSkeletonProjectionInterface::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 */
597float
598HumanSkeletonProjectionInterface::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 */
610size_t
611HumanSkeletonProjectionInterface::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 */
621void
622HumanSkeletonProjectionInterface::set_proj_left_shoulder(const float * new_proj_left_shoulder)
623{
624 set_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 */
633void
634HumanSkeletonProjectionInterface::set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder)
635{
636 set_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 */
643float *
644HumanSkeletonProjectionInterface::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 */
656float
657HumanSkeletonProjectionInterface::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 */
669size_t
670HumanSkeletonProjectionInterface::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 */
680void
681HumanSkeletonProjectionInterface::set_proj_left_elbow(const float * new_proj_left_elbow)
682{
683 set_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 */
692void
693HumanSkeletonProjectionInterface::set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow)
694{
695 set_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 */
702float *
703HumanSkeletonProjectionInterface::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 */
715float
716HumanSkeletonProjectionInterface::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 */
728size_t
729HumanSkeletonProjectionInterface::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 */
739void
740HumanSkeletonProjectionInterface::set_proj_left_wrist(const float * new_proj_left_wrist)
741{
742 set_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 */
751void
752HumanSkeletonProjectionInterface::set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist)
753{
754 set_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 */
761float *
762HumanSkeletonProjectionInterface::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 */
774float
775HumanSkeletonProjectionInterface::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 */
787size_t
788HumanSkeletonProjectionInterface::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 */
798void
799HumanSkeletonProjectionInterface::set_proj_left_hand(const float * new_proj_left_hand)
800{
801 set_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 */
810void
811HumanSkeletonProjectionInterface::set_proj_left_hand(unsigned int index, const float new_proj_left_hand)
812{
813 set_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 */
820float *
821HumanSkeletonProjectionInterface::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 */
833float
834HumanSkeletonProjectionInterface::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 */
846size_t
847HumanSkeletonProjectionInterface::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 */
857void
858HumanSkeletonProjectionInterface::set_proj_left_fingertip(const float * new_proj_left_fingertip)
859{
860 set_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 */
869void
870HumanSkeletonProjectionInterface::set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip)
871{
872 set_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 */
879float *
880HumanSkeletonProjectionInterface::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 */
892float
893HumanSkeletonProjectionInterface::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 */
905size_t
906HumanSkeletonProjectionInterface::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 */
916void
917HumanSkeletonProjectionInterface::set_proj_right_collar(const float * new_proj_right_collar)
918{
919 set_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 */
928void
929HumanSkeletonProjectionInterface::set_proj_right_collar(unsigned int index, const float new_proj_right_collar)
930{
931 set_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 */
938float *
939HumanSkeletonProjectionInterface::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 */
951float
952HumanSkeletonProjectionInterface::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 */
964size_t
965HumanSkeletonProjectionInterface::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 */
975void
976HumanSkeletonProjectionInterface::set_proj_right_shoulder(const float * new_proj_right_shoulder)
977{
978 set_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 */
987void
988HumanSkeletonProjectionInterface::set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder)
989{
990 set_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 */
997float *
998HumanSkeletonProjectionInterface::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 */
1010float
1011HumanSkeletonProjectionInterface::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 */
1023size_t
1024HumanSkeletonProjectionInterface::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 */
1034void
1035HumanSkeletonProjectionInterface::set_proj_right_elbow(const float * new_proj_right_elbow)
1036{
1037 set_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 */
1046void
1047HumanSkeletonProjectionInterface::set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow)
1048{
1049 set_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 */
1056float *
1057HumanSkeletonProjectionInterface::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 */
1069float
1070HumanSkeletonProjectionInterface::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 */
1082size_t
1083HumanSkeletonProjectionInterface::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 */
1093void
1094HumanSkeletonProjectionInterface::set_proj_right_wrist(const float * new_proj_right_wrist)
1095{
1096 set_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 */
1105void
1106HumanSkeletonProjectionInterface::set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist)
1107{
1108 set_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 */
1115float *
1116HumanSkeletonProjectionInterface::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 */
1128float
1129HumanSkeletonProjectionInterface::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 */
1141size_t
1142HumanSkeletonProjectionInterface::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 */
1152void
1153HumanSkeletonProjectionInterface::set_proj_right_hand(const float * new_proj_right_hand)
1154{
1155 set_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 */
1164void
1165HumanSkeletonProjectionInterface::set_proj_right_hand(unsigned int index, const float new_proj_right_hand)
1166{
1167 set_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 */
1174float *
1175HumanSkeletonProjectionInterface::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 */
1187float
1188HumanSkeletonProjectionInterface::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 */
1200size_t
1201HumanSkeletonProjectionInterface::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 */
1211void
1212HumanSkeletonProjectionInterface::set_proj_right_fingertip(const float * new_proj_right_fingertip)
1213{
1214 set_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 */
1223void
1224HumanSkeletonProjectionInterface::set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip)
1225{
1226 set_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 */
1233float *
1234HumanSkeletonProjectionInterface::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 */
1246float
1247HumanSkeletonProjectionInterface::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 */
1259size_t
1260HumanSkeletonProjectionInterface::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 */
1270void
1271HumanSkeletonProjectionInterface::set_proj_left_hip(const float * new_proj_left_hip)
1272{
1273 set_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 */
1282void
1283HumanSkeletonProjectionInterface::set_proj_left_hip(unsigned int index, const float new_proj_left_hip)
1284{
1285 set_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 */
1292float *
1293HumanSkeletonProjectionInterface::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 */
1305float
1306HumanSkeletonProjectionInterface::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 */
1318size_t
1319HumanSkeletonProjectionInterface::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 */
1329void
1330HumanSkeletonProjectionInterface::set_proj_left_knee(const float * new_proj_left_knee)
1331{
1332 set_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 */
1341void
1342HumanSkeletonProjectionInterface::set_proj_left_knee(unsigned int index, const float new_proj_left_knee)
1343{
1344 set_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 */
1351float *
1352HumanSkeletonProjectionInterface::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 */
1364float
1365HumanSkeletonProjectionInterface::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 */
1377size_t
1378HumanSkeletonProjectionInterface::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 */
1388void
1389HumanSkeletonProjectionInterface::set_proj_left_ankle(const float * new_proj_left_ankle)
1390{
1391 set_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 */
1400void
1401HumanSkeletonProjectionInterface::set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle)
1402{
1403 set_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 */
1410float *
1411HumanSkeletonProjectionInterface::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 */
1423float
1424HumanSkeletonProjectionInterface::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 */
1436size_t
1437HumanSkeletonProjectionInterface::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 */
1447void
1448HumanSkeletonProjectionInterface::set_proj_left_foot(const float * new_proj_left_foot)
1449{
1450 set_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 */
1459void
1460HumanSkeletonProjectionInterface::set_proj_left_foot(unsigned int index, const float new_proj_left_foot)
1461{
1462 set_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 */
1469float *
1470HumanSkeletonProjectionInterface::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 */
1482float
1483HumanSkeletonProjectionInterface::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 */
1495size_t
1496HumanSkeletonProjectionInterface::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 */
1506void
1507HumanSkeletonProjectionInterface::set_proj_right_hip(const float * new_proj_right_hip)
1508{
1509 set_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 */
1518void
1519HumanSkeletonProjectionInterface::set_proj_right_hip(unsigned int index, const float new_proj_right_hip)
1520{
1521 set_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 */
1528float *
1529HumanSkeletonProjectionInterface::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 */
1541float
1542HumanSkeletonProjectionInterface::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 */
1554size_t
1555HumanSkeletonProjectionInterface::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 */
1565void
1566HumanSkeletonProjectionInterface::set_proj_right_knee(const float * new_proj_right_knee)
1567{
1568 set_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 */
1577void
1578HumanSkeletonProjectionInterface::set_proj_right_knee(unsigned int index, const float new_proj_right_knee)
1579{
1580 set_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 */
1587float *
1588HumanSkeletonProjectionInterface::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 */
1600float
1601HumanSkeletonProjectionInterface::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 */
1613size_t
1614HumanSkeletonProjectionInterface::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 */
1624void
1625HumanSkeletonProjectionInterface::set_proj_right_ankle(const float * new_proj_right_ankle)
1626{
1627 set_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 */
1636void
1637HumanSkeletonProjectionInterface::set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle)
1638{
1639 set_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 */
1646float *
1647HumanSkeletonProjectionInterface::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 */
1659float
1660HumanSkeletonProjectionInterface::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 */
1672size_t
1673HumanSkeletonProjectionInterface::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 */
1683void
1684HumanSkeletonProjectionInterface::set_proj_right_foot(const float * new_proj_right_foot)
1685{
1686 set_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 */
1695void
1696HumanSkeletonProjectionInterface::set_proj_right_foot(unsigned int index, const float new_proj_right_foot)
1697{
1698 set_field(data->proj_right_foot, index, new_proj_right_foot);
1699}
1700/* =========== message create =========== */
1701Message *
1702HumanSkeletonProjectionInterface::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 */
1712void
1713HumanSkeletonProjectionInterface::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
1723const char *
1724HumanSkeletonProjectionInterface::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 */
1734bool
1735HumanSkeletonProjectionInterface::message_valid(const Message *message) const
1736{
1737 return false;
1738}
1739
1740/// @cond INTERNALS
1741EXPORT_INTERFACE(HumanSkeletonProjectionInterface)
1742/// @endcond
1743
1744
1745} // end namespace fawkes
Base class for exceptions in Fawkes.
Definition: exception.h:36
HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
const char * type() const
Get type of interface.
Definition: interface.cpp:652
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
Fawkes library namespace.