Fawkes API  Fawkes Development Version
HumanSkeletonProjectionInterface.h
00001 
00002 /***************************************************************************
00003  *  HumanSkeletonProjectionInterface.h - 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 #ifndef __INTERFACES_HUMANSKELETONPROJECTIONINTERFACE_H_
00025 #define __INTERFACES_HUMANSKELETONPROJECTIONINTERFACE_H_
00026 
00027 #include <interface/interface.h>
00028 #include <interface/message.h>
00029 #include <interface/field_iterator.h>
00030 
00031 namespace fawkes {
00032 
00033 class HumanSkeletonProjectionInterface : public Interface
00034 {
00035  /// @cond INTERNALS
00036  INTERFACE_MGMT_FRIENDS(HumanSkeletonProjectionInterface)
00037  /// @endcond
00038  public:
00039   /* constants */
00040 
00041  private:
00042 #pragma pack(push,4)
00043   /** Internal data storage, do NOT modify! */
00044   typedef struct {
00045     int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00046     int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00047     float horizontal_fov; /**< Opening angle in radians. */
00048     float vertical_fov; /**< Opening angle in radians. */
00049     uint32_t res_x; /**< X resolution (number of columns in frame). */
00050     uint32_t res_y; /**< Y resolution (number of rows in frame). */
00051     uint16_t max_depth; /**< Maximum depth value. */
00052     float proj_com[2]; /**< Center of mass. */
00053     float proj_head[2]; /**< Head position vector. */
00054     float proj_neck[2]; /**< Neck position vector. */
00055     float proj_torso[2]; /**< Torso position vector. */
00056     float proj_waist[2]; /**< Waist position vector. */
00057     float proj_left_collar[2]; /**< 
00058       Left position vector. */
00059     float proj_left_shoulder[2]; /**< 
00060       Left shoulder position vector. */
00061     float proj_left_elbow[2]; /**< 
00062       Left elbow position vector. */
00063     float proj_left_wrist[2]; /**< 
00064       Left wrist position vector. */
00065     float proj_left_hand[2]; /**< 
00066       Left hand position vector. */
00067     float proj_left_fingertip[2]; /**< 
00068       Left fingertip position vector. */
00069     float proj_right_collar[2]; /**< 
00070       Right collar position vector. */
00071     float proj_right_shoulder[2]; /**< 
00072       Right shoulder position vector. */
00073     float proj_right_elbow[2]; /**< 
00074       Right elbow position vector. */
00075     float proj_right_wrist[2]; /**< 
00076       Right wrist position vector. */
00077     float proj_right_hand[2]; /**< 
00078       Right hand position vector. */
00079     float proj_right_fingertip[2]; /**< 
00080       Right fingertip position vector. */
00081     float proj_left_hip[2]; /**< 
00082       Left hip position vector. */
00083     float proj_left_knee[2]; /**< 
00084       Left knee position vector. */
00085     float proj_left_ankle[2]; /**< 
00086       Left ankle position vector. */
00087     float proj_left_foot[2]; /**< 
00088       Left foot position vector. */
00089     float proj_right_hip[2]; /**< 
00090       Right hip position vector. */
00091     float proj_right_knee[2]; /**< 
00092       Right knee position vector. */
00093     float proj_right_ankle[2]; /**< 
00094       Right ankle position vector. */
00095     float proj_right_foot[2]; /**< 
00096       Right foot position vector. */
00097   } HumanSkeletonProjectionInterface_data_t;
00098 #pragma pack(pop)
00099 
00100   HumanSkeletonProjectionInterface_data_t *data;
00101 
00102  public:
00103   /* messages */
00104   virtual bool message_valid(const Message *message) const;
00105  private:
00106   HumanSkeletonProjectionInterface();
00107   ~HumanSkeletonProjectionInterface();
00108 
00109  public:
00110   /* Methods */
00111   float horizontal_fov() const;
00112   void set_horizontal_fov(const float new_horizontal_fov);
00113   size_t maxlenof_horizontal_fov() const;
00114   float vertical_fov() const;
00115   void set_vertical_fov(const float new_vertical_fov);
00116   size_t maxlenof_vertical_fov() const;
00117   uint32_t res_x() const;
00118   void set_res_x(const uint32_t new_res_x);
00119   size_t maxlenof_res_x() const;
00120   uint32_t res_y() const;
00121   void set_res_y(const uint32_t new_res_y);
00122   size_t maxlenof_res_y() const;
00123   uint16_t max_depth() const;
00124   void set_max_depth(const uint16_t new_max_depth);
00125   size_t maxlenof_max_depth() const;
00126   float * proj_com() const;
00127   float proj_com(unsigned int index) const;
00128   void set_proj_com(unsigned int index, const float new_proj_com);
00129   void set_proj_com(const float * new_proj_com);
00130   size_t maxlenof_proj_com() const;
00131   float * proj_head() const;
00132   float proj_head(unsigned int index) const;
00133   void set_proj_head(unsigned int index, const float new_proj_head);
00134   void set_proj_head(const float * new_proj_head);
00135   size_t maxlenof_proj_head() const;
00136   float * proj_neck() const;
00137   float proj_neck(unsigned int index) const;
00138   void set_proj_neck(unsigned int index, const float new_proj_neck);
00139   void set_proj_neck(const float * new_proj_neck);
00140   size_t maxlenof_proj_neck() const;
00141   float * proj_torso() const;
00142   float proj_torso(unsigned int index) const;
00143   void set_proj_torso(unsigned int index, const float new_proj_torso);
00144   void set_proj_torso(const float * new_proj_torso);
00145   size_t maxlenof_proj_torso() const;
00146   float * proj_waist() const;
00147   float proj_waist(unsigned int index) const;
00148   void set_proj_waist(unsigned int index, const float new_proj_waist);
00149   void set_proj_waist(const float * new_proj_waist);
00150   size_t maxlenof_proj_waist() const;
00151   float * proj_left_collar() const;
00152   float proj_left_collar(unsigned int index) const;
00153   void set_proj_left_collar(unsigned int index, const float new_proj_left_collar);
00154   void set_proj_left_collar(const float * new_proj_left_collar);
00155   size_t maxlenof_proj_left_collar() const;
00156   float * proj_left_shoulder() const;
00157   float proj_left_shoulder(unsigned int index) const;
00158   void set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder);
00159   void set_proj_left_shoulder(const float * new_proj_left_shoulder);
00160   size_t maxlenof_proj_left_shoulder() const;
00161   float * proj_left_elbow() const;
00162   float proj_left_elbow(unsigned int index) const;
00163   void set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow);
00164   void set_proj_left_elbow(const float * new_proj_left_elbow);
00165   size_t maxlenof_proj_left_elbow() const;
00166   float * proj_left_wrist() const;
00167   float proj_left_wrist(unsigned int index) const;
00168   void set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist);
00169   void set_proj_left_wrist(const float * new_proj_left_wrist);
00170   size_t maxlenof_proj_left_wrist() const;
00171   float * proj_left_hand() const;
00172   float proj_left_hand(unsigned int index) const;
00173   void set_proj_left_hand(unsigned int index, const float new_proj_left_hand);
00174   void set_proj_left_hand(const float * new_proj_left_hand);
00175   size_t maxlenof_proj_left_hand() const;
00176   float * proj_left_fingertip() const;
00177   float proj_left_fingertip(unsigned int index) const;
00178   void set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip);
00179   void set_proj_left_fingertip(const float * new_proj_left_fingertip);
00180   size_t maxlenof_proj_left_fingertip() const;
00181   float * proj_right_collar() const;
00182   float proj_right_collar(unsigned int index) const;
00183   void set_proj_right_collar(unsigned int index, const float new_proj_right_collar);
00184   void set_proj_right_collar(const float * new_proj_right_collar);
00185   size_t maxlenof_proj_right_collar() const;
00186   float * proj_right_shoulder() const;
00187   float proj_right_shoulder(unsigned int index) const;
00188   void set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder);
00189   void set_proj_right_shoulder(const float * new_proj_right_shoulder);
00190   size_t maxlenof_proj_right_shoulder() const;
00191   float * proj_right_elbow() const;
00192   float proj_right_elbow(unsigned int index) const;
00193   void set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow);
00194   void set_proj_right_elbow(const float * new_proj_right_elbow);
00195   size_t maxlenof_proj_right_elbow() const;
00196   float * proj_right_wrist() const;
00197   float proj_right_wrist(unsigned int index) const;
00198   void set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist);
00199   void set_proj_right_wrist(const float * new_proj_right_wrist);
00200   size_t maxlenof_proj_right_wrist() const;
00201   float * proj_right_hand() const;
00202   float proj_right_hand(unsigned int index) const;
00203   void set_proj_right_hand(unsigned int index, const float new_proj_right_hand);
00204   void set_proj_right_hand(const float * new_proj_right_hand);
00205   size_t maxlenof_proj_right_hand() const;
00206   float * proj_right_fingertip() const;
00207   float proj_right_fingertip(unsigned int index) const;
00208   void set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip);
00209   void set_proj_right_fingertip(const float * new_proj_right_fingertip);
00210   size_t maxlenof_proj_right_fingertip() const;
00211   float * proj_left_hip() const;
00212   float proj_left_hip(unsigned int index) const;
00213   void set_proj_left_hip(unsigned int index, const float new_proj_left_hip);
00214   void set_proj_left_hip(const float * new_proj_left_hip);
00215   size_t maxlenof_proj_left_hip() const;
00216   float * proj_left_knee() const;
00217   float proj_left_knee(unsigned int index) const;
00218   void set_proj_left_knee(unsigned int index, const float new_proj_left_knee);
00219   void set_proj_left_knee(const float * new_proj_left_knee);
00220   size_t maxlenof_proj_left_knee() const;
00221   float * proj_left_ankle() const;
00222   float proj_left_ankle(unsigned int index) const;
00223   void set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle);
00224   void set_proj_left_ankle(const float * new_proj_left_ankle);
00225   size_t maxlenof_proj_left_ankle() const;
00226   float * proj_left_foot() const;
00227   float proj_left_foot(unsigned int index) const;
00228   void set_proj_left_foot(unsigned int index, const float new_proj_left_foot);
00229   void set_proj_left_foot(const float * new_proj_left_foot);
00230   size_t maxlenof_proj_left_foot() const;
00231   float * proj_right_hip() const;
00232   float proj_right_hip(unsigned int index) const;
00233   void set_proj_right_hip(unsigned int index, const float new_proj_right_hip);
00234   void set_proj_right_hip(const float * new_proj_right_hip);
00235   size_t maxlenof_proj_right_hip() const;
00236   float * proj_right_knee() const;
00237   float proj_right_knee(unsigned int index) const;
00238   void set_proj_right_knee(unsigned int index, const float new_proj_right_knee);
00239   void set_proj_right_knee(const float * new_proj_right_knee);
00240   size_t maxlenof_proj_right_knee() const;
00241   float * proj_right_ankle() const;
00242   float proj_right_ankle(unsigned int index) const;
00243   void set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle);
00244   void set_proj_right_ankle(const float * new_proj_right_ankle);
00245   size_t maxlenof_proj_right_ankle() const;
00246   float * proj_right_foot() const;
00247   float proj_right_foot(unsigned int index) const;
00248   void set_proj_right_foot(unsigned int index, const float new_proj_right_foot);
00249   void set_proj_right_foot(const float * new_proj_right_foot);
00250   size_t maxlenof_proj_right_foot() const;
00251   virtual Message * create_message(const char *type) const;
00252 
00253   virtual void copy_values(const Interface *other);
00254   virtual const char * enum_tostring(const char *enumtype, int val) const;
00255 
00256 };
00257 
00258 } // end namespace fawkes
00259 
00260 #endif