Fawkes API  Fawkes Development Version
HumanSkeletonProjectionInterface.cpp
00001 
00002 /***************************************************************************
00003  *  HumanSkeletonProjectionInterface.cpp - Fawkes BlackBoard Interface - HumanSkeletonProjectionInterface
00004  *
00005  *  Templated created:   Thu Oct 12 10:49:19 2006
00006  *  Copyright  2007-2011  Tim Niemueller
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #include <interfaces/HumanSkeletonProjectionInterface.h>
00025 
00026 #include <core/exceptions/software.h>
00027 
00028 #include <cstring>
00029 #include <cstdlib>
00030 
00031 namespace fawkes {
00032 
00033 /** @class HumanSkeletonProjectionInterface <interfaces/HumanSkeletonProjectionInterface.h>
00034  * HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
00035  * 
00036       This interface provides projections of the 3D position coordinates into the 2D image of
00037       the acquiring camera. Instances shall always be associated with a HumanSkeletonInterface
00038       with the same ID. This interface is particularly useful for RGBD cameras.
00039     
00040  * @ingroup FawkesInterfaces
00041  */
00042 
00043 
00044 
00045 /** Constructor */
00046 HumanSkeletonProjectionInterface::HumanSkeletonProjectionInterface() : Interface()
00047 {
00048   data_size = sizeof(HumanSkeletonProjectionInterface_data_t);
00049   data_ptr  = malloc(data_size);
00050   data      = (HumanSkeletonProjectionInterface_data_t *)data_ptr;
00051   data_ts   = (interface_data_ts_t *)data_ptr;
00052   memset(data_ptr, 0, data_size);
00053   add_fieldinfo(IFT_FLOAT, "horizontal_fov", 1, &data->horizontal_fov);
00054   add_fieldinfo(IFT_FLOAT, "vertical_fov", 1, &data->vertical_fov);
00055   add_fieldinfo(IFT_UINT32, "res_x", 1, &data->res_x);
00056   add_fieldinfo(IFT_UINT32, "res_y", 1, &data->res_y);
00057   add_fieldinfo(IFT_UINT16, "max_depth", 1, &data->max_depth);
00058   add_fieldinfo(IFT_FLOAT, "proj_com", 2, &data->proj_com);
00059   add_fieldinfo(IFT_FLOAT, "proj_head", 2, &data->proj_head);
00060   add_fieldinfo(IFT_FLOAT, "proj_neck", 2, &data->proj_neck);
00061   add_fieldinfo(IFT_FLOAT, "proj_torso", 2, &data->proj_torso);
00062   add_fieldinfo(IFT_FLOAT, "proj_waist", 2, &data->proj_waist);
00063   add_fieldinfo(IFT_FLOAT, "proj_left_collar", 2, &data->proj_left_collar);
00064   add_fieldinfo(IFT_FLOAT, "proj_left_shoulder", 2, &data->proj_left_shoulder);
00065   add_fieldinfo(IFT_FLOAT, "proj_left_elbow", 2, &data->proj_left_elbow);
00066   add_fieldinfo(IFT_FLOAT, "proj_left_wrist", 2, &data->proj_left_wrist);
00067   add_fieldinfo(IFT_FLOAT, "proj_left_hand", 2, &data->proj_left_hand);
00068   add_fieldinfo(IFT_FLOAT, "proj_left_fingertip", 2, &data->proj_left_fingertip);
00069   add_fieldinfo(IFT_FLOAT, "proj_right_collar", 2, &data->proj_right_collar);
00070   add_fieldinfo(IFT_FLOAT, "proj_right_shoulder", 2, &data->proj_right_shoulder);
00071   add_fieldinfo(IFT_FLOAT, "proj_right_elbow", 2, &data->proj_right_elbow);
00072   add_fieldinfo(IFT_FLOAT, "proj_right_wrist", 2, &data->proj_right_wrist);
00073   add_fieldinfo(IFT_FLOAT, "proj_right_hand", 2, &data->proj_right_hand);
00074   add_fieldinfo(IFT_FLOAT, "proj_right_fingertip", 2, &data->proj_right_fingertip);
00075   add_fieldinfo(IFT_FLOAT, "proj_left_hip", 2, &data->proj_left_hip);
00076   add_fieldinfo(IFT_FLOAT, "proj_left_knee", 2, &data->proj_left_knee);
00077   add_fieldinfo(IFT_FLOAT, "proj_left_ankle", 2, &data->proj_left_ankle);
00078   add_fieldinfo(IFT_FLOAT, "proj_left_foot", 2, &data->proj_left_foot);
00079   add_fieldinfo(IFT_FLOAT, "proj_right_hip", 2, &data->proj_right_hip);
00080   add_fieldinfo(IFT_FLOAT, "proj_right_knee", 2, &data->proj_right_knee);
00081   add_fieldinfo(IFT_FLOAT, "proj_right_ankle", 2, &data->proj_right_ankle);
00082   add_fieldinfo(IFT_FLOAT, "proj_right_foot", 2, &data->proj_right_foot);
00083   unsigned char tmp_hash[] = {0x71, 0xb2, 0x40, 0x3e, 0xa, 0x85, 0xd5, 0xcc, 0x77, 0xeb, 0xf2, 0xf1, 0xa9, 0x9c, 0xec, 0xf3};
00084   set_hash(tmp_hash);
00085 }
00086 
00087 /** Destructor */
00088 HumanSkeletonProjectionInterface::~HumanSkeletonProjectionInterface()
00089 {
00090   free(data_ptr);
00091 }
00092 /* Methods */
00093 /** Get horizontal_fov value.
00094  * Opening angle in radians.
00095  * @return horizontal_fov value
00096  */
00097 float
00098 HumanSkeletonProjectionInterface::horizontal_fov() const
00099 {
00100   return data->horizontal_fov;
00101 }
00102 
00103 /** Get maximum length of horizontal_fov value.
00104  * @return length of horizontal_fov value, can be length of the array or number of 
00105  * maximum number of characters for a string
00106  */
00107 size_t
00108 HumanSkeletonProjectionInterface::maxlenof_horizontal_fov() const
00109 {
00110   return 1;
00111 }
00112 
00113 /** Set horizontal_fov value.
00114  * Opening angle in radians.
00115  * @param new_horizontal_fov new horizontal_fov value
00116  */
00117 void
00118 HumanSkeletonProjectionInterface::set_horizontal_fov(const float new_horizontal_fov)
00119 {
00120   data->horizontal_fov = new_horizontal_fov;
00121   data_changed = true;
00122 }
00123 
00124 /** Get vertical_fov value.
00125  * Opening angle in radians.
00126  * @return vertical_fov value
00127  */
00128 float
00129 HumanSkeletonProjectionInterface::vertical_fov() const
00130 {
00131   return data->vertical_fov;
00132 }
00133 
00134 /** Get maximum length of vertical_fov value.
00135  * @return length of vertical_fov value, can be length of the array or number of 
00136  * maximum number of characters for a string
00137  */
00138 size_t
00139 HumanSkeletonProjectionInterface::maxlenof_vertical_fov() const
00140 {
00141   return 1;
00142 }
00143 
00144 /** Set vertical_fov value.
00145  * Opening angle in radians.
00146  * @param new_vertical_fov new vertical_fov value
00147  */
00148 void
00149 HumanSkeletonProjectionInterface::set_vertical_fov(const float new_vertical_fov)
00150 {
00151   data->vertical_fov = new_vertical_fov;
00152   data_changed = true;
00153 }
00154 
00155 /** Get res_x value.
00156  * X resolution (number of columns in frame).
00157  * @return res_x value
00158  */
00159 uint32_t
00160 HumanSkeletonProjectionInterface::res_x() const
00161 {
00162   return data->res_x;
00163 }
00164 
00165 /** Get maximum length of res_x value.
00166  * @return length of res_x value, can be length of the array or number of 
00167  * maximum number of characters for a string
00168  */
00169 size_t
00170 HumanSkeletonProjectionInterface::maxlenof_res_x() const
00171 {
00172   return 1;
00173 }
00174 
00175 /** Set res_x value.
00176  * X resolution (number of columns in frame).
00177  * @param new_res_x new res_x value
00178  */
00179 void
00180 HumanSkeletonProjectionInterface::set_res_x(const uint32_t new_res_x)
00181 {
00182   data->res_x = new_res_x;
00183   data_changed = true;
00184 }
00185 
00186 /** Get res_y value.
00187  * Y resolution (number of rows in frame).
00188  * @return res_y value
00189  */
00190 uint32_t
00191 HumanSkeletonProjectionInterface::res_y() const
00192 {
00193   return data->res_y;
00194 }
00195 
00196 /** Get maximum length of res_y value.
00197  * @return length of res_y value, can be length of the array or number of 
00198  * maximum number of characters for a string
00199  */
00200 size_t
00201 HumanSkeletonProjectionInterface::maxlenof_res_y() const
00202 {
00203   return 1;
00204 }
00205 
00206 /** Set res_y value.
00207  * Y resolution (number of rows in frame).
00208  * @param new_res_y new res_y value
00209  */
00210 void
00211 HumanSkeletonProjectionInterface::set_res_y(const uint32_t new_res_y)
00212 {
00213   data->res_y = new_res_y;
00214   data_changed = true;
00215 }
00216 
00217 /** Get max_depth value.
00218  * Maximum depth value.
00219  * @return max_depth value
00220  */
00221 uint16_t
00222 HumanSkeletonProjectionInterface::max_depth() const
00223 {
00224   return data->max_depth;
00225 }
00226 
00227 /** Get maximum length of max_depth value.
00228  * @return length of max_depth value, can be length of the array or number of 
00229  * maximum number of characters for a string
00230  */
00231 size_t
00232 HumanSkeletonProjectionInterface::maxlenof_max_depth() const
00233 {
00234   return 1;
00235 }
00236 
00237 /** Set max_depth value.
00238  * Maximum depth value.
00239  * @param new_max_depth new max_depth value
00240  */
00241 void
00242 HumanSkeletonProjectionInterface::set_max_depth(const uint16_t new_max_depth)
00243 {
00244   data->max_depth = new_max_depth;
00245   data_changed = true;
00246 }
00247 
00248 /** Get proj_com value.
00249  * Center of mass.
00250  * @return proj_com value
00251  */
00252 float *
00253 HumanSkeletonProjectionInterface::proj_com() const
00254 {
00255   return data->proj_com;
00256 }
00257 
00258 /** Get proj_com value at given index.
00259  * Center of mass.
00260  * @param index index of value
00261  * @return proj_com value
00262  * @exception Exception thrown if index is out of bounds
00263  */
00264 float
00265 HumanSkeletonProjectionInterface::proj_com(unsigned int index) const
00266 {
00267   if (index > 2) {
00268     throw Exception("Index value %u out of bounds (0..2)", index);
00269   }
00270   return data->proj_com[index];
00271 }
00272 
00273 /** Get maximum length of proj_com value.
00274  * @return length of proj_com value, can be length of the array or number of 
00275  * maximum number of characters for a string
00276  */
00277 size_t
00278 HumanSkeletonProjectionInterface::maxlenof_proj_com() const
00279 {
00280   return 2;
00281 }
00282 
00283 /** Set proj_com value.
00284  * Center of mass.
00285  * @param new_proj_com new proj_com value
00286  */
00287 void
00288 HumanSkeletonProjectionInterface::set_proj_com(const float * new_proj_com)
00289 {
00290   memcpy(data->proj_com, new_proj_com, sizeof(float) * 2);
00291   data_changed = true;
00292 }
00293 
00294 /** Set proj_com value at given index.
00295  * Center of mass.
00296  * @param new_proj_com new proj_com value
00297  * @param index index for of the value
00298  */
00299 void
00300 HumanSkeletonProjectionInterface::set_proj_com(unsigned int index, const float new_proj_com)
00301 {
00302   if (index > 2) {
00303     throw Exception("Index value %u out of bounds (0..2)", index);
00304   }
00305   data->proj_com[index] = new_proj_com;
00306   data_changed = true;
00307 }
00308 /** Get proj_head value.
00309  * Head position vector.
00310  * @return proj_head value
00311  */
00312 float *
00313 HumanSkeletonProjectionInterface::proj_head() const
00314 {
00315   return data->proj_head;
00316 }
00317 
00318 /** Get proj_head value at given index.
00319  * Head position vector.
00320  * @param index index of value
00321  * @return proj_head value
00322  * @exception Exception thrown if index is out of bounds
00323  */
00324 float
00325 HumanSkeletonProjectionInterface::proj_head(unsigned int index) const
00326 {
00327   if (index > 2) {
00328     throw Exception("Index value %u out of bounds (0..2)", index);
00329   }
00330   return data->proj_head[index];
00331 }
00332 
00333 /** Get maximum length of proj_head value.
00334  * @return length of proj_head value, can be length of the array or number of 
00335  * maximum number of characters for a string
00336  */
00337 size_t
00338 HumanSkeletonProjectionInterface::maxlenof_proj_head() const
00339 {
00340   return 2;
00341 }
00342 
00343 /** Set proj_head value.
00344  * Head position vector.
00345  * @param new_proj_head new proj_head value
00346  */
00347 void
00348 HumanSkeletonProjectionInterface::set_proj_head(const float * new_proj_head)
00349 {
00350   memcpy(data->proj_head, new_proj_head, sizeof(float) * 2);
00351   data_changed = true;
00352 }
00353 
00354 /** Set proj_head value at given index.
00355  * Head position vector.
00356  * @param new_proj_head new proj_head value
00357  * @param index index for of the value
00358  */
00359 void
00360 HumanSkeletonProjectionInterface::set_proj_head(unsigned int index, const float new_proj_head)
00361 {
00362   if (index > 2) {
00363     throw Exception("Index value %u out of bounds (0..2)", index);
00364   }
00365   data->proj_head[index] = new_proj_head;
00366   data_changed = true;
00367 }
00368 /** Get proj_neck value.
00369  * Neck position vector.
00370  * @return proj_neck value
00371  */
00372 float *
00373 HumanSkeletonProjectionInterface::proj_neck() const
00374 {
00375   return data->proj_neck;
00376 }
00377 
00378 /** Get proj_neck value at given index.
00379  * Neck position vector.
00380  * @param index index of value
00381  * @return proj_neck value
00382  * @exception Exception thrown if index is out of bounds
00383  */
00384 float
00385 HumanSkeletonProjectionInterface::proj_neck(unsigned int index) const
00386 {
00387   if (index > 2) {
00388     throw Exception("Index value %u out of bounds (0..2)", index);
00389   }
00390   return data->proj_neck[index];
00391 }
00392 
00393 /** Get maximum length of proj_neck value.
00394  * @return length of proj_neck value, can be length of the array or number of 
00395  * maximum number of characters for a string
00396  */
00397 size_t
00398 HumanSkeletonProjectionInterface::maxlenof_proj_neck() const
00399 {
00400   return 2;
00401 }
00402 
00403 /** Set proj_neck value.
00404  * Neck position vector.
00405  * @param new_proj_neck new proj_neck value
00406  */
00407 void
00408 HumanSkeletonProjectionInterface::set_proj_neck(const float * new_proj_neck)
00409 {
00410   memcpy(data->proj_neck, new_proj_neck, sizeof(float) * 2);
00411   data_changed = true;
00412 }
00413 
00414 /** Set proj_neck value at given index.
00415  * Neck position vector.
00416  * @param new_proj_neck new proj_neck value
00417  * @param index index for of the value
00418  */
00419 void
00420 HumanSkeletonProjectionInterface::set_proj_neck(unsigned int index, const float new_proj_neck)
00421 {
00422   if (index > 2) {
00423     throw Exception("Index value %u out of bounds (0..2)", index);
00424   }
00425   data->proj_neck[index] = new_proj_neck;
00426   data_changed = true;
00427 }
00428 /** Get proj_torso value.
00429  * Torso position vector.
00430  * @return proj_torso value
00431  */
00432 float *
00433 HumanSkeletonProjectionInterface::proj_torso() const
00434 {
00435   return data->proj_torso;
00436 }
00437 
00438 /** Get proj_torso value at given index.
00439  * Torso position vector.
00440  * @param index index of value
00441  * @return proj_torso value
00442  * @exception Exception thrown if index is out of bounds
00443  */
00444 float
00445 HumanSkeletonProjectionInterface::proj_torso(unsigned int index) const
00446 {
00447   if (index > 2) {
00448     throw Exception("Index value %u out of bounds (0..2)", index);
00449   }
00450   return data->proj_torso[index];
00451 }
00452 
00453 /** Get maximum length of proj_torso value.
00454  * @return length of proj_torso value, can be length of the array or number of 
00455  * maximum number of characters for a string
00456  */
00457 size_t
00458 HumanSkeletonProjectionInterface::maxlenof_proj_torso() const
00459 {
00460   return 2;
00461 }
00462 
00463 /** Set proj_torso value.
00464  * Torso position vector.
00465  * @param new_proj_torso new proj_torso value
00466  */
00467 void
00468 HumanSkeletonProjectionInterface::set_proj_torso(const float * new_proj_torso)
00469 {
00470   memcpy(data->proj_torso, new_proj_torso, sizeof(float) * 2);
00471   data_changed = true;
00472 }
00473 
00474 /** Set proj_torso value at given index.
00475  * Torso position vector.
00476  * @param new_proj_torso new proj_torso value
00477  * @param index index for of the value
00478  */
00479 void
00480 HumanSkeletonProjectionInterface::set_proj_torso(unsigned int index, const float new_proj_torso)
00481 {
00482   if (index > 2) {
00483     throw Exception("Index value %u out of bounds (0..2)", index);
00484   }
00485   data->proj_torso[index] = new_proj_torso;
00486   data_changed = true;
00487 }
00488 /** Get proj_waist value.
00489  * Waist position vector.
00490  * @return proj_waist value
00491  */
00492 float *
00493 HumanSkeletonProjectionInterface::proj_waist() const
00494 {
00495   return data->proj_waist;
00496 }
00497 
00498 /** Get proj_waist value at given index.
00499  * Waist position vector.
00500  * @param index index of value
00501  * @return proj_waist value
00502  * @exception Exception thrown if index is out of bounds
00503  */
00504 float
00505 HumanSkeletonProjectionInterface::proj_waist(unsigned int index) const
00506 {
00507   if (index > 2) {
00508     throw Exception("Index value %u out of bounds (0..2)", index);
00509   }
00510   return data->proj_waist[index];
00511 }
00512 
00513 /** Get maximum length of proj_waist value.
00514  * @return length of proj_waist value, can be length of the array or number of 
00515  * maximum number of characters for a string
00516  */
00517 size_t
00518 HumanSkeletonProjectionInterface::maxlenof_proj_waist() const
00519 {
00520   return 2;
00521 }
00522 
00523 /** Set proj_waist value.
00524  * Waist position vector.
00525  * @param new_proj_waist new proj_waist value
00526  */
00527 void
00528 HumanSkeletonProjectionInterface::set_proj_waist(const float * new_proj_waist)
00529 {
00530   memcpy(data->proj_waist, new_proj_waist, sizeof(float) * 2);
00531   data_changed = true;
00532 }
00533 
00534 /** Set proj_waist value at given index.
00535  * Waist position vector.
00536  * @param new_proj_waist new proj_waist value
00537  * @param index index for of the value
00538  */
00539 void
00540 HumanSkeletonProjectionInterface::set_proj_waist(unsigned int index, const float new_proj_waist)
00541 {
00542   if (index > 2) {
00543     throw Exception("Index value %u out of bounds (0..2)", index);
00544   }
00545   data->proj_waist[index] = new_proj_waist;
00546   data_changed = true;
00547 }
00548 /** Get proj_left_collar value.
00549  * 
00550       Left position vector.
00551  * @return proj_left_collar value
00552  */
00553 float *
00554 HumanSkeletonProjectionInterface::proj_left_collar() const
00555 {
00556   return data->proj_left_collar;
00557 }
00558 
00559 /** Get proj_left_collar value at given index.
00560  * 
00561       Left position vector.
00562  * @param index index of value
00563  * @return proj_left_collar value
00564  * @exception Exception thrown if index is out of bounds
00565  */
00566 float
00567 HumanSkeletonProjectionInterface::proj_left_collar(unsigned int index) const
00568 {
00569   if (index > 2) {
00570     throw Exception("Index value %u out of bounds (0..2)", index);
00571   }
00572   return data->proj_left_collar[index];
00573 }
00574 
00575 /** Get maximum length of proj_left_collar value.
00576  * @return length of proj_left_collar value, can be length of the array or number of 
00577  * maximum number of characters for a string
00578  */
00579 size_t
00580 HumanSkeletonProjectionInterface::maxlenof_proj_left_collar() const
00581 {
00582   return 2;
00583 }
00584 
00585 /** Set proj_left_collar value.
00586  * 
00587       Left position vector.
00588  * @param new_proj_left_collar new proj_left_collar value
00589  */
00590 void
00591 HumanSkeletonProjectionInterface::set_proj_left_collar(const float * new_proj_left_collar)
00592 {
00593   memcpy(data->proj_left_collar, new_proj_left_collar, sizeof(float) * 2);
00594   data_changed = true;
00595 }
00596 
00597 /** Set proj_left_collar value at given index.
00598  * 
00599       Left position vector.
00600  * @param new_proj_left_collar new proj_left_collar value
00601  * @param index index for of the value
00602  */
00603 void
00604 HumanSkeletonProjectionInterface::set_proj_left_collar(unsigned int index, const float new_proj_left_collar)
00605 {
00606   if (index > 2) {
00607     throw Exception("Index value %u out of bounds (0..2)", index);
00608   }
00609   data->proj_left_collar[index] = new_proj_left_collar;
00610   data_changed = true;
00611 }
00612 /** Get proj_left_shoulder value.
00613  * 
00614       Left shoulder position vector.
00615  * @return proj_left_shoulder value
00616  */
00617 float *
00618 HumanSkeletonProjectionInterface::proj_left_shoulder() const
00619 {
00620   return data->proj_left_shoulder;
00621 }
00622 
00623 /** Get proj_left_shoulder value at given index.
00624  * 
00625       Left shoulder position vector.
00626  * @param index index of value
00627  * @return proj_left_shoulder value
00628  * @exception Exception thrown if index is out of bounds
00629  */
00630 float
00631 HumanSkeletonProjectionInterface::proj_left_shoulder(unsigned int index) const
00632 {
00633   if (index > 2) {
00634     throw Exception("Index value %u out of bounds (0..2)", index);
00635   }
00636   return data->proj_left_shoulder[index];
00637 }
00638 
00639 /** Get maximum length of proj_left_shoulder value.
00640  * @return length of proj_left_shoulder value, can be length of the array or number of 
00641  * maximum number of characters for a string
00642  */
00643 size_t
00644 HumanSkeletonProjectionInterface::maxlenof_proj_left_shoulder() const
00645 {
00646   return 2;
00647 }
00648 
00649 /** Set proj_left_shoulder value.
00650  * 
00651       Left shoulder position vector.
00652  * @param new_proj_left_shoulder new proj_left_shoulder value
00653  */
00654 void
00655 HumanSkeletonProjectionInterface::set_proj_left_shoulder(const float * new_proj_left_shoulder)
00656 {
00657   memcpy(data->proj_left_shoulder, new_proj_left_shoulder, sizeof(float) * 2);
00658   data_changed = true;
00659 }
00660 
00661 /** Set proj_left_shoulder value at given index.
00662  * 
00663       Left shoulder position vector.
00664  * @param new_proj_left_shoulder new proj_left_shoulder value
00665  * @param index index for of the value
00666  */
00667 void
00668 HumanSkeletonProjectionInterface::set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder)
00669 {
00670   if (index > 2) {
00671     throw Exception("Index value %u out of bounds (0..2)", index);
00672   }
00673   data->proj_left_shoulder[index] = new_proj_left_shoulder;
00674   data_changed = true;
00675 }
00676 /** Get proj_left_elbow value.
00677  * 
00678       Left elbow position vector.
00679  * @return proj_left_elbow value
00680  */
00681 float *
00682 HumanSkeletonProjectionInterface::proj_left_elbow() const
00683 {
00684   return data->proj_left_elbow;
00685 }
00686 
00687 /** Get proj_left_elbow value at given index.
00688  * 
00689       Left elbow position vector.
00690  * @param index index of value
00691  * @return proj_left_elbow value
00692  * @exception Exception thrown if index is out of bounds
00693  */
00694 float
00695 HumanSkeletonProjectionInterface::proj_left_elbow(unsigned int index) const
00696 {
00697   if (index > 2) {
00698     throw Exception("Index value %u out of bounds (0..2)", index);
00699   }
00700   return data->proj_left_elbow[index];
00701 }
00702 
00703 /** Get maximum length of proj_left_elbow value.
00704  * @return length of proj_left_elbow value, can be length of the array or number of 
00705  * maximum number of characters for a string
00706  */
00707 size_t
00708 HumanSkeletonProjectionInterface::maxlenof_proj_left_elbow() const
00709 {
00710   return 2;
00711 }
00712 
00713 /** Set proj_left_elbow value.
00714  * 
00715       Left elbow position vector.
00716  * @param new_proj_left_elbow new proj_left_elbow value
00717  */
00718 void
00719 HumanSkeletonProjectionInterface::set_proj_left_elbow(const float * new_proj_left_elbow)
00720 {
00721   memcpy(data->proj_left_elbow, new_proj_left_elbow, sizeof(float) * 2);
00722   data_changed = true;
00723 }
00724 
00725 /** Set proj_left_elbow value at given index.
00726  * 
00727       Left elbow position vector.
00728  * @param new_proj_left_elbow new proj_left_elbow value
00729  * @param index index for of the value
00730  */
00731 void
00732 HumanSkeletonProjectionInterface::set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow)
00733 {
00734   if (index > 2) {
00735     throw Exception("Index value %u out of bounds (0..2)", index);
00736   }
00737   data->proj_left_elbow[index] = new_proj_left_elbow;
00738   data_changed = true;
00739 }
00740 /** Get proj_left_wrist value.
00741  * 
00742       Left wrist position vector.
00743  * @return proj_left_wrist value
00744  */
00745 float *
00746 HumanSkeletonProjectionInterface::proj_left_wrist() const
00747 {
00748   return data->proj_left_wrist;
00749 }
00750 
00751 /** Get proj_left_wrist value at given index.
00752  * 
00753       Left wrist position vector.
00754  * @param index index of value
00755  * @return proj_left_wrist value
00756  * @exception Exception thrown if index is out of bounds
00757  */
00758 float
00759 HumanSkeletonProjectionInterface::proj_left_wrist(unsigned int index) const
00760 {
00761   if (index > 2) {
00762     throw Exception("Index value %u out of bounds (0..2)", index);
00763   }
00764   return data->proj_left_wrist[index];
00765 }
00766 
00767 /** Get maximum length of proj_left_wrist value.
00768  * @return length of proj_left_wrist value, can be length of the array or number of 
00769  * maximum number of characters for a string
00770  */
00771 size_t
00772 HumanSkeletonProjectionInterface::maxlenof_proj_left_wrist() const
00773 {
00774   return 2;
00775 }
00776 
00777 /** Set proj_left_wrist value.
00778  * 
00779       Left wrist position vector.
00780  * @param new_proj_left_wrist new proj_left_wrist value
00781  */
00782 void
00783 HumanSkeletonProjectionInterface::set_proj_left_wrist(const float * new_proj_left_wrist)
00784 {
00785   memcpy(data->proj_left_wrist, new_proj_left_wrist, sizeof(float) * 2);
00786   data_changed = true;
00787 }
00788 
00789 /** Set proj_left_wrist value at given index.
00790  * 
00791       Left wrist position vector.
00792  * @param new_proj_left_wrist new proj_left_wrist value
00793  * @param index index for of the value
00794  */
00795 void
00796 HumanSkeletonProjectionInterface::set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist)
00797 {
00798   if (index > 2) {
00799     throw Exception("Index value %u out of bounds (0..2)", index);
00800   }
00801   data->proj_left_wrist[index] = new_proj_left_wrist;
00802   data_changed = true;
00803 }
00804 /** Get proj_left_hand value.
00805  * 
00806       Left hand position vector.
00807  * @return proj_left_hand value
00808  */
00809 float *
00810 HumanSkeletonProjectionInterface::proj_left_hand() const
00811 {
00812   return data->proj_left_hand;
00813 }
00814 
00815 /** Get proj_left_hand value at given index.
00816  * 
00817       Left hand position vector.
00818  * @param index index of value
00819  * @return proj_left_hand value
00820  * @exception Exception thrown if index is out of bounds
00821  */
00822 float
00823 HumanSkeletonProjectionInterface::proj_left_hand(unsigned int index) const
00824 {
00825   if (index > 2) {
00826     throw Exception("Index value %u out of bounds (0..2)", index);
00827   }
00828   return data->proj_left_hand[index];
00829 }
00830 
00831 /** Get maximum length of proj_left_hand value.
00832  * @return length of proj_left_hand value, can be length of the array or number of 
00833  * maximum number of characters for a string
00834  */
00835 size_t
00836 HumanSkeletonProjectionInterface::maxlenof_proj_left_hand() const
00837 {
00838   return 2;
00839 }
00840 
00841 /** Set proj_left_hand value.
00842  * 
00843       Left hand position vector.
00844  * @param new_proj_left_hand new proj_left_hand value
00845  */
00846 void
00847 HumanSkeletonProjectionInterface::set_proj_left_hand(const float * new_proj_left_hand)
00848 {
00849   memcpy(data->proj_left_hand, new_proj_left_hand, sizeof(float) * 2);
00850   data_changed = true;
00851 }
00852 
00853 /** Set proj_left_hand value at given index.
00854  * 
00855       Left hand position vector.
00856  * @param new_proj_left_hand new proj_left_hand value
00857  * @param index index for of the value
00858  */
00859 void
00860 HumanSkeletonProjectionInterface::set_proj_left_hand(unsigned int index, const float new_proj_left_hand)
00861 {
00862   if (index > 2) {
00863     throw Exception("Index value %u out of bounds (0..2)", index);
00864   }
00865   data->proj_left_hand[index] = new_proj_left_hand;
00866   data_changed = true;
00867 }
00868 /** Get proj_left_fingertip value.
00869  * 
00870       Left fingertip position vector.
00871  * @return proj_left_fingertip value
00872  */
00873 float *
00874 HumanSkeletonProjectionInterface::proj_left_fingertip() const
00875 {
00876   return data->proj_left_fingertip;
00877 }
00878 
00879 /** Get proj_left_fingertip value at given index.
00880  * 
00881       Left fingertip position vector.
00882  * @param index index of value
00883  * @return proj_left_fingertip value
00884  * @exception Exception thrown if index is out of bounds
00885  */
00886 float
00887 HumanSkeletonProjectionInterface::proj_left_fingertip(unsigned int index) const
00888 {
00889   if (index > 2) {
00890     throw Exception("Index value %u out of bounds (0..2)", index);
00891   }
00892   return data->proj_left_fingertip[index];
00893 }
00894 
00895 /** Get maximum length of proj_left_fingertip value.
00896  * @return length of proj_left_fingertip value, can be length of the array or number of 
00897  * maximum number of characters for a string
00898  */
00899 size_t
00900 HumanSkeletonProjectionInterface::maxlenof_proj_left_fingertip() const
00901 {
00902   return 2;
00903 }
00904 
00905 /** Set proj_left_fingertip value.
00906  * 
00907       Left fingertip position vector.
00908  * @param new_proj_left_fingertip new proj_left_fingertip value
00909  */
00910 void
00911 HumanSkeletonProjectionInterface::set_proj_left_fingertip(const float * new_proj_left_fingertip)
00912 {
00913   memcpy(data->proj_left_fingertip, new_proj_left_fingertip, sizeof(float) * 2);
00914   data_changed = true;
00915 }
00916 
00917 /** Set proj_left_fingertip value at given index.
00918  * 
00919       Left fingertip position vector.
00920  * @param new_proj_left_fingertip new proj_left_fingertip value
00921  * @param index index for of the value
00922  */
00923 void
00924 HumanSkeletonProjectionInterface::set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip)
00925 {
00926   if (index > 2) {
00927     throw Exception("Index value %u out of bounds (0..2)", index);
00928   }
00929   data->proj_left_fingertip[index] = new_proj_left_fingertip;
00930   data_changed = true;
00931 }
00932 /** Get proj_right_collar value.
00933  * 
00934       Right collar position vector.
00935  * @return proj_right_collar value
00936  */
00937 float *
00938 HumanSkeletonProjectionInterface::proj_right_collar() const
00939 {
00940   return data->proj_right_collar;
00941 }
00942 
00943 /** Get proj_right_collar value at given index.
00944  * 
00945       Right collar position vector.
00946  * @param index index of value
00947  * @return proj_right_collar value
00948  * @exception Exception thrown if index is out of bounds
00949  */
00950 float
00951 HumanSkeletonProjectionInterface::proj_right_collar(unsigned int index) const
00952 {
00953   if (index > 2) {
00954     throw Exception("Index value %u out of bounds (0..2)", index);
00955   }
00956   return data->proj_right_collar[index];
00957 }
00958 
00959 /** Get maximum length of proj_right_collar value.
00960  * @return length of proj_right_collar value, can be length of the array or number of 
00961  * maximum number of characters for a string
00962  */
00963 size_t
00964 HumanSkeletonProjectionInterface::maxlenof_proj_right_collar() const
00965 {
00966   return 2;
00967 }
00968 
00969 /** Set proj_right_collar value.
00970  * 
00971       Right collar position vector.
00972  * @param new_proj_right_collar new proj_right_collar value
00973  */
00974 void
00975 HumanSkeletonProjectionInterface::set_proj_right_collar(const float * new_proj_right_collar)
00976 {
00977   memcpy(data->proj_right_collar, new_proj_right_collar, sizeof(float) * 2);
00978   data_changed = true;
00979 }
00980 
00981 /** Set proj_right_collar value at given index.
00982  * 
00983       Right collar position vector.
00984  * @param new_proj_right_collar new proj_right_collar value
00985  * @param index index for of the value
00986  */
00987 void
00988 HumanSkeletonProjectionInterface::set_proj_right_collar(unsigned int index, const float new_proj_right_collar)
00989 {
00990   if (index > 2) {
00991     throw Exception("Index value %u out of bounds (0..2)", index);
00992   }
00993   data->proj_right_collar[index] = new_proj_right_collar;
00994   data_changed = true;
00995 }
00996 /** Get proj_right_shoulder value.
00997  * 
00998       Right shoulder position vector.
00999  * @return proj_right_shoulder value
01000  */
01001 float *
01002 HumanSkeletonProjectionInterface::proj_right_shoulder() const
01003 {
01004   return data->proj_right_shoulder;
01005 }
01006 
01007 /** Get proj_right_shoulder value at given index.
01008  * 
01009       Right shoulder position vector.
01010  * @param index index of value
01011  * @return proj_right_shoulder value
01012  * @exception Exception thrown if index is out of bounds
01013  */
01014 float
01015 HumanSkeletonProjectionInterface::proj_right_shoulder(unsigned int index) const
01016 {
01017   if (index > 2) {
01018     throw Exception("Index value %u out of bounds (0..2)", index);
01019   }
01020   return data->proj_right_shoulder[index];
01021 }
01022 
01023 /** Get maximum length of proj_right_shoulder value.
01024  * @return length of proj_right_shoulder value, can be length of the array or number of 
01025  * maximum number of characters for a string
01026  */
01027 size_t
01028 HumanSkeletonProjectionInterface::maxlenof_proj_right_shoulder() const
01029 {
01030   return 2;
01031 }
01032 
01033 /** Set proj_right_shoulder value.
01034  * 
01035       Right shoulder position vector.
01036  * @param new_proj_right_shoulder new proj_right_shoulder value
01037  */
01038 void
01039 HumanSkeletonProjectionInterface::set_proj_right_shoulder(const float * new_proj_right_shoulder)
01040 {
01041   memcpy(data->proj_right_shoulder, new_proj_right_shoulder, sizeof(float) * 2);
01042   data_changed = true;
01043 }
01044 
01045 /** Set proj_right_shoulder value at given index.
01046  * 
01047       Right shoulder position vector.
01048  * @param new_proj_right_shoulder new proj_right_shoulder value
01049  * @param index index for of the value
01050  */
01051 void
01052 HumanSkeletonProjectionInterface::set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder)
01053 {
01054   if (index > 2) {
01055     throw Exception("Index value %u out of bounds (0..2)", index);
01056   }
01057   data->proj_right_shoulder[index] = new_proj_right_shoulder;
01058   data_changed = true;
01059 }
01060 /** Get proj_right_elbow value.
01061  * 
01062       Right elbow position vector.
01063  * @return proj_right_elbow value
01064  */
01065 float *
01066 HumanSkeletonProjectionInterface::proj_right_elbow() const
01067 {
01068   return data->proj_right_elbow;
01069 }
01070 
01071 /** Get proj_right_elbow value at given index.
01072  * 
01073       Right elbow position vector.
01074  * @param index index of value
01075  * @return proj_right_elbow value
01076  * @exception Exception thrown if index is out of bounds
01077  */
01078 float
01079 HumanSkeletonProjectionInterface::proj_right_elbow(unsigned int index) const
01080 {
01081   if (index > 2) {
01082     throw Exception("Index value %u out of bounds (0..2)", index);
01083   }
01084   return data->proj_right_elbow[index];
01085 }
01086 
01087 /** Get maximum length of proj_right_elbow value.
01088  * @return length of proj_right_elbow value, can be length of the array or number of 
01089  * maximum number of characters for a string
01090  */
01091 size_t
01092 HumanSkeletonProjectionInterface::maxlenof_proj_right_elbow() const
01093 {
01094   return 2;
01095 }
01096 
01097 /** Set proj_right_elbow value.
01098  * 
01099       Right elbow position vector.
01100  * @param new_proj_right_elbow new proj_right_elbow value
01101  */
01102 void
01103 HumanSkeletonProjectionInterface::set_proj_right_elbow(const float * new_proj_right_elbow)
01104 {
01105   memcpy(data->proj_right_elbow, new_proj_right_elbow, sizeof(float) * 2);
01106   data_changed = true;
01107 }
01108 
01109 /** Set proj_right_elbow value at given index.
01110  * 
01111       Right elbow position vector.
01112  * @param new_proj_right_elbow new proj_right_elbow value
01113  * @param index index for of the value
01114  */
01115 void
01116 HumanSkeletonProjectionInterface::set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow)
01117 {
01118   if (index > 2) {
01119     throw Exception("Index value %u out of bounds (0..2)", index);
01120   }
01121   data->proj_right_elbow[index] = new_proj_right_elbow;
01122   data_changed = true;
01123 }
01124 /** Get proj_right_wrist value.
01125  * 
01126       Right wrist position vector.
01127  * @return proj_right_wrist value
01128  */
01129 float *
01130 HumanSkeletonProjectionInterface::proj_right_wrist() const
01131 {
01132   return data->proj_right_wrist;
01133 }
01134 
01135 /** Get proj_right_wrist value at given index.
01136  * 
01137       Right wrist position vector.
01138  * @param index index of value
01139  * @return proj_right_wrist value
01140  * @exception Exception thrown if index is out of bounds
01141  */
01142 float
01143 HumanSkeletonProjectionInterface::proj_right_wrist(unsigned int index) const
01144 {
01145   if (index > 2) {
01146     throw Exception("Index value %u out of bounds (0..2)", index);
01147   }
01148   return data->proj_right_wrist[index];
01149 }
01150 
01151 /** Get maximum length of proj_right_wrist value.
01152  * @return length of proj_right_wrist value, can be length of the array or number of 
01153  * maximum number of characters for a string
01154  */
01155 size_t
01156 HumanSkeletonProjectionInterface::maxlenof_proj_right_wrist() const
01157 {
01158   return 2;
01159 }
01160 
01161 /** Set proj_right_wrist value.
01162  * 
01163       Right wrist position vector.
01164  * @param new_proj_right_wrist new proj_right_wrist value
01165  */
01166 void
01167 HumanSkeletonProjectionInterface::set_proj_right_wrist(const float * new_proj_right_wrist)
01168 {
01169   memcpy(data->proj_right_wrist, new_proj_right_wrist, sizeof(float) * 2);
01170   data_changed = true;
01171 }
01172 
01173 /** Set proj_right_wrist value at given index.
01174  * 
01175       Right wrist position vector.
01176  * @param new_proj_right_wrist new proj_right_wrist value
01177  * @param index index for of the value
01178  */
01179 void
01180 HumanSkeletonProjectionInterface::set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist)
01181 {
01182   if (index > 2) {
01183     throw Exception("Index value %u out of bounds (0..2)", index);
01184   }
01185   data->proj_right_wrist[index] = new_proj_right_wrist;
01186   data_changed = true;
01187 }
01188 /** Get proj_right_hand value.
01189  * 
01190       Right hand position vector.
01191  * @return proj_right_hand value
01192  */
01193 float *
01194 HumanSkeletonProjectionInterface::proj_right_hand() const
01195 {
01196   return data->proj_right_hand;
01197 }
01198 
01199 /** Get proj_right_hand value at given index.
01200  * 
01201       Right hand position vector.
01202  * @param index index of value
01203  * @return proj_right_hand value
01204  * @exception Exception thrown if index is out of bounds
01205  */
01206 float
01207 HumanSkeletonProjectionInterface::proj_right_hand(unsigned int index) const
01208 {
01209   if (index > 2) {
01210     throw Exception("Index value %u out of bounds (0..2)", index);
01211   }
01212   return data->proj_right_hand[index];
01213 }
01214 
01215 /** Get maximum length of proj_right_hand value.
01216  * @return length of proj_right_hand value, can be length of the array or number of 
01217  * maximum number of characters for a string
01218  */
01219 size_t
01220 HumanSkeletonProjectionInterface::maxlenof_proj_right_hand() const
01221 {
01222   return 2;
01223 }
01224 
01225 /** Set proj_right_hand value.
01226  * 
01227       Right hand position vector.
01228  * @param new_proj_right_hand new proj_right_hand value
01229  */
01230 void
01231 HumanSkeletonProjectionInterface::set_proj_right_hand(const float * new_proj_right_hand)
01232 {
01233   memcpy(data->proj_right_hand, new_proj_right_hand, sizeof(float) * 2);
01234   data_changed = true;
01235 }
01236 
01237 /** Set proj_right_hand value at given index.
01238  * 
01239       Right hand position vector.
01240  * @param new_proj_right_hand new proj_right_hand value
01241  * @param index index for of the value
01242  */
01243 void
01244 HumanSkeletonProjectionInterface::set_proj_right_hand(unsigned int index, const float new_proj_right_hand)
01245 {
01246   if (index > 2) {
01247     throw Exception("Index value %u out of bounds (0..2)", index);
01248   }
01249   data->proj_right_hand[index] = new_proj_right_hand;
01250   data_changed = true;
01251 }
01252 /** Get proj_right_fingertip value.
01253  * 
01254       Right fingertip position vector.
01255  * @return proj_right_fingertip value
01256  */
01257 float *
01258 HumanSkeletonProjectionInterface::proj_right_fingertip() const
01259 {
01260   return data->proj_right_fingertip;
01261 }
01262 
01263 /** Get proj_right_fingertip value at given index.
01264  * 
01265       Right fingertip position vector.
01266  * @param index index of value
01267  * @return proj_right_fingertip value
01268  * @exception Exception thrown if index is out of bounds
01269  */
01270 float
01271 HumanSkeletonProjectionInterface::proj_right_fingertip(unsigned int index) const
01272 {
01273   if (index > 2) {
01274     throw Exception("Index value %u out of bounds (0..2)", index);
01275   }
01276   return data->proj_right_fingertip[index];
01277 }
01278 
01279 /** Get maximum length of proj_right_fingertip value.
01280  * @return length of proj_right_fingertip value, can be length of the array or number of 
01281  * maximum number of characters for a string
01282  */
01283 size_t
01284 HumanSkeletonProjectionInterface::maxlenof_proj_right_fingertip() const
01285 {
01286   return 2;
01287 }
01288 
01289 /** Set proj_right_fingertip value.
01290  * 
01291       Right fingertip position vector.
01292  * @param new_proj_right_fingertip new proj_right_fingertip value
01293  */
01294 void
01295 HumanSkeletonProjectionInterface::set_proj_right_fingertip(const float * new_proj_right_fingertip)
01296 {
01297   memcpy(data->proj_right_fingertip, new_proj_right_fingertip, sizeof(float) * 2);
01298   data_changed = true;
01299 }
01300 
01301 /** Set proj_right_fingertip value at given index.
01302  * 
01303       Right fingertip position vector.
01304  * @param new_proj_right_fingertip new proj_right_fingertip value
01305  * @param index index for of the value
01306  */
01307 void
01308 HumanSkeletonProjectionInterface::set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip)
01309 {
01310   if (index > 2) {
01311     throw Exception("Index value %u out of bounds (0..2)", index);
01312   }
01313   data->proj_right_fingertip[index] = new_proj_right_fingertip;
01314   data_changed = true;
01315 }
01316 /** Get proj_left_hip value.
01317  * 
01318       Left hip position vector.
01319  * @return proj_left_hip value
01320  */
01321 float *
01322 HumanSkeletonProjectionInterface::proj_left_hip() const
01323 {
01324   return data->proj_left_hip;
01325 }
01326 
01327 /** Get proj_left_hip value at given index.
01328  * 
01329       Left hip position vector.
01330  * @param index index of value
01331  * @return proj_left_hip value
01332  * @exception Exception thrown if index is out of bounds
01333  */
01334 float
01335 HumanSkeletonProjectionInterface::proj_left_hip(unsigned int index) const
01336 {
01337   if (index > 2) {
01338     throw Exception("Index value %u out of bounds (0..2)", index);
01339   }
01340   return data->proj_left_hip[index];
01341 }
01342 
01343 /** Get maximum length of proj_left_hip value.
01344  * @return length of proj_left_hip value, can be length of the array or number of 
01345  * maximum number of characters for a string
01346  */
01347 size_t
01348 HumanSkeletonProjectionInterface::maxlenof_proj_left_hip() const
01349 {
01350   return 2;
01351 }
01352 
01353 /** Set proj_left_hip value.
01354  * 
01355       Left hip position vector.
01356  * @param new_proj_left_hip new proj_left_hip value
01357  */
01358 void
01359 HumanSkeletonProjectionInterface::set_proj_left_hip(const float * new_proj_left_hip)
01360 {
01361   memcpy(data->proj_left_hip, new_proj_left_hip, sizeof(float) * 2);
01362   data_changed = true;
01363 }
01364 
01365 /** Set proj_left_hip value at given index.
01366  * 
01367       Left hip position vector.
01368  * @param new_proj_left_hip new proj_left_hip value
01369  * @param index index for of the value
01370  */
01371 void
01372 HumanSkeletonProjectionInterface::set_proj_left_hip(unsigned int index, const float new_proj_left_hip)
01373 {
01374   if (index > 2) {
01375     throw Exception("Index value %u out of bounds (0..2)", index);
01376   }
01377   data->proj_left_hip[index] = new_proj_left_hip;
01378   data_changed = true;
01379 }
01380 /** Get proj_left_knee value.
01381  * 
01382       Left knee position vector.
01383  * @return proj_left_knee value
01384  */
01385 float *
01386 HumanSkeletonProjectionInterface::proj_left_knee() const
01387 {
01388   return data->proj_left_knee;
01389 }
01390 
01391 /** Get proj_left_knee value at given index.
01392  * 
01393       Left knee position vector.
01394  * @param index index of value
01395  * @return proj_left_knee value
01396  * @exception Exception thrown if index is out of bounds
01397  */
01398 float
01399 HumanSkeletonProjectionInterface::proj_left_knee(unsigned int index) const
01400 {
01401   if (index > 2) {
01402     throw Exception("Index value %u out of bounds (0..2)", index);
01403   }
01404   return data->proj_left_knee[index];
01405 }
01406 
01407 /** Get maximum length of proj_left_knee value.
01408  * @return length of proj_left_knee value, can be length of the array or number of 
01409  * maximum number of characters for a string
01410  */
01411 size_t
01412 HumanSkeletonProjectionInterface::maxlenof_proj_left_knee() const
01413 {
01414   return 2;
01415 }
01416 
01417 /** Set proj_left_knee value.
01418  * 
01419       Left knee position vector.
01420  * @param new_proj_left_knee new proj_left_knee value
01421  */
01422 void
01423 HumanSkeletonProjectionInterface::set_proj_left_knee(const float * new_proj_left_knee)
01424 {
01425   memcpy(data->proj_left_knee, new_proj_left_knee, sizeof(float) * 2);
01426   data_changed = true;
01427 }
01428 
01429 /** Set proj_left_knee value at given index.
01430  * 
01431       Left knee position vector.
01432  * @param new_proj_left_knee new proj_left_knee value
01433  * @param index index for of the value
01434  */
01435 void
01436 HumanSkeletonProjectionInterface::set_proj_left_knee(unsigned int index, const float new_proj_left_knee)
01437 {
01438   if (index > 2) {
01439     throw Exception("Index value %u out of bounds (0..2)", index);
01440   }
01441   data->proj_left_knee[index] = new_proj_left_knee;
01442   data_changed = true;
01443 }
01444 /** Get proj_left_ankle value.
01445  * 
01446       Left ankle position vector.
01447  * @return proj_left_ankle value
01448  */
01449 float *
01450 HumanSkeletonProjectionInterface::proj_left_ankle() const
01451 {
01452   return data->proj_left_ankle;
01453 }
01454 
01455 /** Get proj_left_ankle value at given index.
01456  * 
01457       Left ankle position vector.
01458  * @param index index of value
01459  * @return proj_left_ankle value
01460  * @exception Exception thrown if index is out of bounds
01461  */
01462 float
01463 HumanSkeletonProjectionInterface::proj_left_ankle(unsigned int index) const
01464 {
01465   if (index > 2) {
01466     throw Exception("Index value %u out of bounds (0..2)", index);
01467   }
01468   return data->proj_left_ankle[index];
01469 }
01470 
01471 /** Get maximum length of proj_left_ankle value.
01472  * @return length of proj_left_ankle value, can be length of the array or number of 
01473  * maximum number of characters for a string
01474  */
01475 size_t
01476 HumanSkeletonProjectionInterface::maxlenof_proj_left_ankle() const
01477 {
01478   return 2;
01479 }
01480 
01481 /** Set proj_left_ankle value.
01482  * 
01483       Left ankle position vector.
01484  * @param new_proj_left_ankle new proj_left_ankle value
01485  */
01486 void
01487 HumanSkeletonProjectionInterface::set_proj_left_ankle(const float * new_proj_left_ankle)
01488 {
01489   memcpy(data->proj_left_ankle, new_proj_left_ankle, sizeof(float) * 2);
01490   data_changed = true;
01491 }
01492 
01493 /** Set proj_left_ankle value at given index.
01494  * 
01495       Left ankle position vector.
01496  * @param new_proj_left_ankle new proj_left_ankle value
01497  * @param index index for of the value
01498  */
01499 void
01500 HumanSkeletonProjectionInterface::set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle)
01501 {
01502   if (index > 2) {
01503     throw Exception("Index value %u out of bounds (0..2)", index);
01504   }
01505   data->proj_left_ankle[index] = new_proj_left_ankle;
01506   data_changed = true;
01507 }
01508 /** Get proj_left_foot value.
01509  * 
01510       Left foot position vector.
01511  * @return proj_left_foot value
01512  */
01513 float *
01514 HumanSkeletonProjectionInterface::proj_left_foot() const
01515 {
01516   return data->proj_left_foot;
01517 }
01518 
01519 /** Get proj_left_foot value at given index.
01520  * 
01521       Left foot position vector.
01522  * @param index index of value
01523  * @return proj_left_foot value
01524  * @exception Exception thrown if index is out of bounds
01525  */
01526 float
01527 HumanSkeletonProjectionInterface::proj_left_foot(unsigned int index) const
01528 {
01529   if (index > 2) {
01530     throw Exception("Index value %u out of bounds (0..2)", index);
01531   }
01532   return data->proj_left_foot[index];
01533 }
01534 
01535 /** Get maximum length of proj_left_foot value.
01536  * @return length of proj_left_foot value, can be length of the array or number of 
01537  * maximum number of characters for a string
01538  */
01539 size_t
01540 HumanSkeletonProjectionInterface::maxlenof_proj_left_foot() const
01541 {
01542   return 2;
01543 }
01544 
01545 /** Set proj_left_foot value.
01546  * 
01547       Left foot position vector.
01548  * @param new_proj_left_foot new proj_left_foot value
01549  */
01550 void
01551 HumanSkeletonProjectionInterface::set_proj_left_foot(const float * new_proj_left_foot)
01552 {
01553   memcpy(data->proj_left_foot, new_proj_left_foot, sizeof(float) * 2);
01554   data_changed = true;
01555 }
01556 
01557 /** Set proj_left_foot value at given index.
01558  * 
01559       Left foot position vector.
01560  * @param new_proj_left_foot new proj_left_foot value
01561  * @param index index for of the value
01562  */
01563 void
01564 HumanSkeletonProjectionInterface::set_proj_left_foot(unsigned int index, const float new_proj_left_foot)
01565 {
01566   if (index > 2) {
01567     throw Exception("Index value %u out of bounds (0..2)", index);
01568   }
01569   data->proj_left_foot[index] = new_proj_left_foot;
01570   data_changed = true;
01571 }
01572 /** Get proj_right_hip value.
01573  * 
01574       Right hip position vector.
01575  * @return proj_right_hip value
01576  */
01577 float *
01578 HumanSkeletonProjectionInterface::proj_right_hip() const
01579 {
01580   return data->proj_right_hip;
01581 }
01582 
01583 /** Get proj_right_hip value at given index.
01584  * 
01585       Right hip position vector.
01586  * @param index index of value
01587  * @return proj_right_hip value
01588  * @exception Exception thrown if index is out of bounds
01589  */
01590 float
01591 HumanSkeletonProjectionInterface::proj_right_hip(unsigned int index) const
01592 {
01593   if (index > 2) {
01594     throw Exception("Index value %u out of bounds (0..2)", index);
01595   }
01596   return data->proj_right_hip[index];
01597 }
01598 
01599 /** Get maximum length of proj_right_hip value.
01600  * @return length of proj_right_hip value, can be length of the array or number of 
01601  * maximum number of characters for a string
01602  */
01603 size_t
01604 HumanSkeletonProjectionInterface::maxlenof_proj_right_hip() const
01605 {
01606   return 2;
01607 }
01608 
01609 /** Set proj_right_hip value.
01610  * 
01611       Right hip position vector.
01612  * @param new_proj_right_hip new proj_right_hip value
01613  */
01614 void
01615 HumanSkeletonProjectionInterface::set_proj_right_hip(const float * new_proj_right_hip)
01616 {
01617   memcpy(data->proj_right_hip, new_proj_right_hip, sizeof(float) * 2);
01618   data_changed = true;
01619 }
01620 
01621 /** Set proj_right_hip value at given index.
01622  * 
01623       Right hip position vector.
01624  * @param new_proj_right_hip new proj_right_hip value
01625  * @param index index for of the value
01626  */
01627 void
01628 HumanSkeletonProjectionInterface::set_proj_right_hip(unsigned int index, const float new_proj_right_hip)
01629 {
01630   if (index > 2) {
01631     throw Exception("Index value %u out of bounds (0..2)", index);
01632   }
01633   data->proj_right_hip[index] = new_proj_right_hip;
01634   data_changed = true;
01635 }
01636 /** Get proj_right_knee value.
01637  * 
01638       Right knee position vector.
01639  * @return proj_right_knee value
01640  */
01641 float *
01642 HumanSkeletonProjectionInterface::proj_right_knee() const
01643 {
01644   return data->proj_right_knee;
01645 }
01646 
01647 /** Get proj_right_knee value at given index.
01648  * 
01649       Right knee position vector.
01650  * @param index index of value
01651  * @return proj_right_knee value
01652  * @exception Exception thrown if index is out of bounds
01653  */
01654 float
01655 HumanSkeletonProjectionInterface::proj_right_knee(unsigned int index) const
01656 {
01657   if (index > 2) {
01658     throw Exception("Index value %u out of bounds (0..2)", index);
01659   }
01660   return data->proj_right_knee[index];
01661 }
01662 
01663 /** Get maximum length of proj_right_knee value.
01664  * @return length of proj_right_knee value, can be length of the array or number of 
01665  * maximum number of characters for a string
01666  */
01667 size_t
01668 HumanSkeletonProjectionInterface::maxlenof_proj_right_knee() const
01669 {
01670   return 2;
01671 }
01672 
01673 /** Set proj_right_knee value.
01674  * 
01675       Right knee position vector.
01676  * @param new_proj_right_knee new proj_right_knee value
01677  */
01678 void
01679 HumanSkeletonProjectionInterface::set_proj_right_knee(const float * new_proj_right_knee)
01680 {
01681   memcpy(data->proj_right_knee, new_proj_right_knee, sizeof(float) * 2);
01682   data_changed = true;
01683 }
01684 
01685 /** Set proj_right_knee value at given index.
01686  * 
01687       Right knee position vector.
01688  * @param new_proj_right_knee new proj_right_knee value
01689  * @param index index for of the value
01690  */
01691 void
01692 HumanSkeletonProjectionInterface::set_proj_right_knee(unsigned int index, const float new_proj_right_knee)
01693 {
01694   if (index > 2) {
01695     throw Exception("Index value %u out of bounds (0..2)", index);
01696   }
01697   data->proj_right_knee[index] = new_proj_right_knee;
01698   data_changed = true;
01699 }
01700 /** Get proj_right_ankle value.
01701  * 
01702       Right ankle position vector.
01703  * @return proj_right_ankle value
01704  */
01705 float *
01706 HumanSkeletonProjectionInterface::proj_right_ankle() const
01707 {
01708   return data->proj_right_ankle;
01709 }
01710 
01711 /** Get proj_right_ankle value at given index.
01712  * 
01713       Right ankle position vector.
01714  * @param index index of value
01715  * @return proj_right_ankle value
01716  * @exception Exception thrown if index is out of bounds
01717  */
01718 float
01719 HumanSkeletonProjectionInterface::proj_right_ankle(unsigned int index) const
01720 {
01721   if (index > 2) {
01722     throw Exception("Index value %u out of bounds (0..2)", index);
01723   }
01724   return data->proj_right_ankle[index];
01725 }
01726 
01727 /** Get maximum length of proj_right_ankle value.
01728  * @return length of proj_right_ankle value, can be length of the array or number of 
01729  * maximum number of characters for a string
01730  */
01731 size_t
01732 HumanSkeletonProjectionInterface::maxlenof_proj_right_ankle() const
01733 {
01734   return 2;
01735 }
01736 
01737 /** Set proj_right_ankle value.
01738  * 
01739       Right ankle position vector.
01740  * @param new_proj_right_ankle new proj_right_ankle value
01741  */
01742 void
01743 HumanSkeletonProjectionInterface::set_proj_right_ankle(const float * new_proj_right_ankle)
01744 {
01745   memcpy(data->proj_right_ankle, new_proj_right_ankle, sizeof(float) * 2);
01746   data_changed = true;
01747 }
01748 
01749 /** Set proj_right_ankle value at given index.
01750  * 
01751       Right ankle position vector.
01752  * @param new_proj_right_ankle new proj_right_ankle value
01753  * @param index index for of the value
01754  */
01755 void
01756 HumanSkeletonProjectionInterface::set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle)
01757 {
01758   if (index > 2) {
01759     throw Exception("Index value %u out of bounds (0..2)", index);
01760   }
01761   data->proj_right_ankle[index] = new_proj_right_ankle;
01762   data_changed = true;
01763 }
01764 /** Get proj_right_foot value.
01765  * 
01766       Right foot position vector.
01767  * @return proj_right_foot value
01768  */
01769 float *
01770 HumanSkeletonProjectionInterface::proj_right_foot() const
01771 {
01772   return data->proj_right_foot;
01773 }
01774 
01775 /** Get proj_right_foot value at given index.
01776  * 
01777       Right foot position vector.
01778  * @param index index of value
01779  * @return proj_right_foot value
01780  * @exception Exception thrown if index is out of bounds
01781  */
01782 float
01783 HumanSkeletonProjectionInterface::proj_right_foot(unsigned int index) const
01784 {
01785   if (index > 2) {
01786     throw Exception("Index value %u out of bounds (0..2)", index);
01787   }
01788   return data->proj_right_foot[index];
01789 }
01790 
01791 /** Get maximum length of proj_right_foot value.
01792  * @return length of proj_right_foot value, can be length of the array or number of 
01793  * maximum number of characters for a string
01794  */
01795 size_t
01796 HumanSkeletonProjectionInterface::maxlenof_proj_right_foot() const
01797 {
01798   return 2;
01799 }
01800 
01801 /** Set proj_right_foot value.
01802  * 
01803       Right foot position vector.
01804  * @param new_proj_right_foot new proj_right_foot value
01805  */
01806 void
01807 HumanSkeletonProjectionInterface::set_proj_right_foot(const float * new_proj_right_foot)
01808 {
01809   memcpy(data->proj_right_foot, new_proj_right_foot, sizeof(float) * 2);
01810   data_changed = true;
01811 }
01812 
01813 /** Set proj_right_foot value at given index.
01814  * 
01815       Right foot position vector.
01816  * @param new_proj_right_foot new proj_right_foot value
01817  * @param index index for of the value
01818  */
01819 void
01820 HumanSkeletonProjectionInterface::set_proj_right_foot(unsigned int index, const float new_proj_right_foot)
01821 {
01822   if (index > 2) {
01823     throw Exception("Index value %u out of bounds (0..2)", index);
01824   }
01825   data->proj_right_foot[index] = new_proj_right_foot;
01826   data_changed = true;
01827 }
01828 /* =========== message create =========== */
01829 Message *
01830 HumanSkeletonProjectionInterface::create_message(const char *type) const
01831 {
01832   throw UnknownTypeException("The given type '%s' does not match any known "
01833                              "message type for this interface type.", type);
01834 }
01835 
01836 
01837 /** Copy values from other interface.
01838  * @param other other interface to copy values from
01839  */
01840 void
01841 HumanSkeletonProjectionInterface::copy_values(const Interface *other)
01842 {
01843   const HumanSkeletonProjectionInterface *oi = dynamic_cast<const HumanSkeletonProjectionInterface *>(other);
01844   if (oi == NULL) {
01845     throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
01846                                 type(), other->type());
01847   }
01848   memcpy(data, oi->data, sizeof(HumanSkeletonProjectionInterface_data_t));
01849 }
01850 
01851 const char *
01852 HumanSkeletonProjectionInterface::enum_tostring(const char *enumtype, int val) const
01853 {
01854   throw UnknownTypeException("Unknown enum type %s", enumtype);
01855 }
01856 
01857 /* =========== messages =========== */
01858 /** Check if message is valid and can be enqueued.
01859  * @param message Message to check
01860  * @return true if the message is valid, false otherwise.
01861  */
01862 bool
01863 HumanSkeletonProjectionInterface::message_valid(const Message *message) const
01864 {
01865   return false;
01866 }
01867 
01868 /// @cond INTERNALS
01869 EXPORT_INTERFACE(HumanSkeletonProjectionInterface)
01870 /// @endcond
01871 
01872 
01873 } // end namespace fawkes