Fawkes API Fawkes Development Version
skel_drawer.h
1
2/***************************************************************************
3 * skel_drawer.h - Skeleton Visualization GUI: skeleton drawer
4 *
5 * Created: Wed Mar 02 11:33:29 2011
6 * Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
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.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#ifndef _PLUGINS_OPENNI_SKELGUI_SKEL_DRAWER_H_
24#define _PLUGINS_OPENNI_SKELGUI_SKEL_DRAWER_H_
25
26#include <interfaces/HumanSkeletonInterface.h>
27#include <interfaces/HumanSkeletonProjectionInterface.h>
28#include <interfaces/ObjectPositionInterface.h>
29#include <plugins/openni/utils/types.h>
30
32{
33public:
34 /** Print state enum. */
35 typedef enum {
36 PRINT_NONE, /**< Print neither ID nor state */
37 PRINT_ID, /**< Print only ID */
38 PRINT_ID_STATE /**< Print ID and state */
40
41 SkelGuiSkeletonDrawer(fawkes::openni::UserMap &users, fawkes::openni::HandMap &hands);
42
43 void draw();
44
45 void toggle_print_state();
46 void set_print_state(PrintState state);
47
48private:
49 void print_string(void *font, char *str);
50 void draw_limb(float *proj1, float conf1, float *proj2, float conf2);
51 void draw_user(fawkes::openni::UserInfo &user);
52 void draw_circle(unsigned int id, float *proj, float radius);
53
54private:
55 fawkes::openni::UserMap &users_;
56 fawkes::openni::HandMap &hands_;
57
58 PrintState print_state_;
59};
60
61#endif
Draw body skeleton using OpenGL.
Definition: skel_drawer.h:32
PrintState
Print state enum.
Definition: skel_drawer.h:35
@ PRINT_ID_STATE
Print ID and state.
Definition: skel_drawer.h:38
@ PRINT_NONE
Print neither ID nor state.
Definition: skel_drawer.h:36
@ PRINT_ID
Print only ID.
Definition: skel_drawer.h:37
void draw()
Draw skeletons.
void set_print_state(PrintState state)
Set print state.
void toggle_print_state()
Toggle the printing state.
SkelGuiSkeletonDrawer(fawkes::openni::UserMap &users, fawkes::openni::HandMap &hands)
Constructor.
Definition: skel_drawer.cpp:45
User info to pass to draw_skeletons().
Definition: types.h:38