Luz

Merge lp:~skawtus/luz/luz-body-tracker into lp:luz

Proposed by scott lee davis
Status: Merged
Merged at revision: 2057
Proposed branch: lp:~skawtus/luz/luz-body-tracker
Merge into: lp:luz
Diff against target: 9888 lines (+9781/-0)
20 files modified
body-tracker/Makefile (+4/-0)
body-tracker/README (+7/-0)
body-tracker/SceneDrawer.cpp (+356/-0)
body-tracker/SceneDrawer.h (+30/-0)
body-tracker/application.cc (+96/-0)
body-tracker/application.h (+61/-0)
body-tracker/body-icon.svg (+378/-0)
body-tracker/body-tracker-window.cc (+294/-0)
body-tracker/body-tracker-window.h (+61/-0)
body-tracker/body-tracker.cc (+862/-0)
body-tracker/body-tracker.h (+119/-0)
body-tracker/body-tracker.rc (+57/-0)
body-tracker/hands.luz (+7127/-0)
body-tracker/message-bus.cc (+63/-0)
body-tracker/message-bus.h (+31/-0)
body-tracker/my-drawing-area.cc (+44/-0)
body-tracker/my-drawing-area.h (+19/-0)
body-tracker/openni-config.xml (+32/-0)
body-tracker/utils.cc (+97/-0)
body-tracker/utils.h (+43/-0)
To merge this branch: bzr merge lp:~skawtus/luz/luz-body-tracker
Reviewer Review Type Date Requested Status
Ian McIntosh Approve
Review via email: mp+55288@code.launchpad.net

Description of the change

Added body tracker (currently, supporting the kinect device) as an osc input device into Luz.

To post a comment you must log in.
lp:~skawtus/luz/luz-body-tracker updated
2031. By scott lee davis

removed GL directories

Revision history for this message
Ian McIntosh (ian-mcintosh) wrote :

Thanks for your great work on this!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'body-tracker'
2=== added file 'body-tracker/Makefile'
3--- body-tracker/Makefile 1970-01-01 00:00:00 +0000
4+++ body-tracker/Makefile 2011-04-03 23:46:27 +0000
5@@ -0,0 +1,4 @@
6+all: body-tracker
7+
8+body-tracker: *.cc
9+ gcc -o body-tracker -IGL -Iglh -I/usr/include/ni -lOpenNI -lm -lglut *.cc `pkg-config --cflags --libs gl glu liblo gtkmm-2.4 gtkglextmm-1.2`
10
11=== added file 'body-tracker/README'
12--- body-tracker/README 1970-01-01 00:00:00 +0000
13+++ body-tracker/README 2011-04-03 23:46:27 +0000
14@@ -0,0 +1,7 @@
15+# Luz Body Tracker
16+# ================
17+#
18+# To build Body Tracker on Ubuntu use:
19+
20+sudo apt-get install build-essential libusb-1.0-0-dev liblo0-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
21+make
22
23=== added file 'body-tracker/SceneDrawer.cpp'
24--- body-tracker/SceneDrawer.cpp 1970-01-01 00:00:00 +0000
25+++ body-tracker/SceneDrawer.cpp 2011-04-03 23:46:27 +0000
26@@ -0,0 +1,356 @@
27+/*****************************************************************************
28+* *
29+* OpenNI 1.0 Alpha *
30+* Copyright (C) 2010 PrimeSense Ltd. *
31+* *
32+* This file is part of OpenNI. *
33+* *
34+* OpenNI is free software: you can redistribute it and/or modify *
35+* it under the terms of the GNU Lesser General Public License as published *
36+* by the Free Software Foundation, either version 3 of the License, or *
37+* (at your option) any later version. *
38+* *
39+* OpenNI is distributed in the hope that it will be useful, *
40+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
41+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
42+* GNU Lesser General Public License for more details. *
43+* *
44+* You should have received a copy of the GNU Lesser General Public License *
45+* along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
46+* *
47+*****************************************************************************/
48+
49+
50+
51+
52+//---------------------------------------------------------------------------
53+// Includes
54+//---------------------------------------------------------------------------
55+#include "SceneDrawer.h"
56+
57+#include <GL/glut.h>
58+
59+extern xn::UserGenerator g_UserGenerator;
60+extern xn::DepthGenerator g_DepthGenerator;
61+
62+extern XnBool g_bDrawBackground;
63+extern XnBool g_bDrawPixels;
64+extern XnBool g_bDrawSkeleton;
65+extern XnBool g_bPrintID;
66+extern XnBool g_bPrintState;
67+
68+
69+#define MAX_DEPTH 10000
70+float g_pDepthHist[MAX_DEPTH];
71+unsigned int getClosestPowerOfTwo(unsigned int n)
72+{
73+ unsigned int m = 2;
74+ while(m < n) m<<=1;
75+ return m;
76+}
77+
78+GLuint initTexture(void** buf, int& width, int& height)
79+{
80+ GLuint texID = 0;
81+ glGenTextures(1,&texID);
82+
83+ width = getClosestPowerOfTwo(width);
84+ height = getClosestPowerOfTwo(height);
85+ *buf = new unsigned char[width*height*4];
86+ glBindTexture(GL_TEXTURE_2D,texID);
87+
88+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
89+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
90+
91+ return texID;
92+}
93+
94+GLfloat texcoords[8];
95+void DrawRectangle(float topLeftX, float topLeftY, float bottomRightX, float bottomRightY)
96+{
97+ GLfloat verts[8] = { topLeftX, topLeftY,
98+ topLeftX, bottomRightY,
99+ bottomRightX, bottomRightY,
100+ bottomRightX, topLeftY
101+ };
102+ glVertexPointer(2, GL_FLOAT, 0, verts);
103+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
104+
105+ //TODO: Maybe glFinish needed here instead - if there's some bad graphics crap
106+ glFlush();
107+}
108+
109+void DrawTexture(float topLeftX, float topLeftY, float bottomRightX, float bottomRightY)
110+{
111+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
112+ glTexCoordPointer(2, GL_FLOAT, 0, texcoords);
113+ DrawRectangle(topLeftX, topLeftY, bottomRightX, bottomRightY);
114+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
115+}
116+
117+XnFloat Colors[][3] =
118+{
119+ {0,1,1},
120+ {0,0,1},
121+ {0,1,0},
122+ {1,1,0},
123+ {1,0,0},
124+ {1,.5,0},
125+ {.5,1,0},
126+ {0,.5,1},
127+ {.5,0,1},
128+ {1,1,.5},
129+ {1,1,1}
130+};
131+XnUInt32 nColors = 10;
132+
133+void glPrintString(void *font, char *str)
134+{
135+ int i,l = strlen(str);
136+
137+ for(i=0; i<l; i++)
138+ {
139+ glutBitmapCharacter(font,*str++);
140+ }
141+}
142+
143+void DrawLimb(XnUserID player, XnSkeletonJoint eJoint1, XnSkeletonJoint eJoint2)
144+{
145+ if (!g_UserGenerator.GetSkeletonCap().IsTracking(player))
146+ {
147+ printf("not tracked!\n");
148+ return;
149+ }
150+
151+ XnSkeletonJointPosition joint1, joint2;
152+ g_UserGenerator.GetSkeletonCap().GetSkeletonJointPosition(player, eJoint1, joint1);
153+ g_UserGenerator.GetSkeletonCap().GetSkeletonJointPosition(player, eJoint2, joint2);
154+
155+ //if (joint1.fConfidence < 0.5 || joint2.fConfidence < 0.5)
156+ //{
157+ // return;
158+ //}
159+
160+ XnPoint3D pt[2];
161+ pt[0] = joint1.position;
162+ pt[1] = joint2.position;
163+
164+ g_DepthGenerator.ConvertRealWorldToProjective(2, pt, pt);
165+ glVertex3i(pt[0].X, pt[0].Y, 0);
166+ glVertex3i(pt[1].X, pt[1].Y, 0);
167+}
168+
169+
170+void DrawDepthMap(const xn::DepthMetaData& dmd, const xn::SceneMetaData& smd)
171+{
172+ static bool bInitialized = false;
173+ static GLuint depthTexID;
174+ static unsigned char* pDepthTexBuf;
175+ static int texWidth, texHeight;
176+
177+ float topLeftX;
178+ float topLeftY;
179+ float bottomRightY;
180+ float bottomRightX;
181+ float texXpos;
182+ float texYpos;
183+
184+ if(!bInitialized)
185+ {
186+
187+ texWidth = getClosestPowerOfTwo(dmd.XRes());
188+ texHeight = getClosestPowerOfTwo(dmd.YRes());
189+ depthTexID = initTexture((void**)&pDepthTexBuf,texWidth, texHeight) ;
190+
191+ bInitialized = true;
192+
193+ topLeftX = dmd.XRes();
194+ topLeftY = 0;
195+ bottomRightY = dmd.YRes();
196+ bottomRightX = 0;
197+ texXpos =(float)dmd.XRes()/texWidth;
198+ texYpos =(float)dmd.YRes()/texHeight;
199+
200+ memset(texcoords, 0, 8*sizeof(float));
201+ texcoords[0] = texXpos, texcoords[1] = texYpos, texcoords[2] = texXpos, texcoords[7] = texYpos;
202+ }
203+
204+ unsigned int nValue = 0;
205+ unsigned int nHistValue = 0;
206+ unsigned int nIndex = 0;
207+ unsigned int nX = 0;
208+ unsigned int nY = 0;
209+ unsigned int nNumberOfPoints = 0;
210+ XnUInt16 g_nXRes = dmd.XRes();
211+ XnUInt16 g_nYRes = dmd.YRes();
212+
213+ unsigned char* pDestImage = pDepthTexBuf;
214+
215+ const XnDepthPixel* pDepth = dmd.Data();
216+ const XnLabel* pLabels = smd.Data();
217+
218+ // Calculate the accumulative histogram
219+ memset(g_pDepthHist, 0, MAX_DEPTH*sizeof(float));
220+ for (nY=0; nY<g_nYRes; nY++)
221+ {
222+ for (nX=0; nX<g_nXRes; nX++)
223+ {
224+ nValue = *pDepth;
225+
226+ if (nValue != 0)
227+ {
228+ g_pDepthHist[nValue]++;
229+ nNumberOfPoints++;
230+ }
231+
232+ pDepth++;
233+ }
234+ }
235+
236+ for (nIndex=1; nIndex<MAX_DEPTH; nIndex++)
237+ {
238+ g_pDepthHist[nIndex] += g_pDepthHist[nIndex-1];
239+ }
240+ if (nNumberOfPoints)
241+ {
242+ for (nIndex=1; nIndex<MAX_DEPTH; nIndex++)
243+ {
244+ g_pDepthHist[nIndex] = (unsigned int)(256 * (1.0f - (g_pDepthHist[nIndex] / nNumberOfPoints)));
245+ }
246+ }
247+
248+ pDepth = dmd.Data();
249+ if (g_bDrawPixels)
250+ {
251+ XnUInt32 nIndex = 0;
252+ // Prepare the texture map
253+ for (nY=0; nY<g_nYRes; nY++)
254+ {
255+ for (nX=0; nX < g_nXRes; nX++, nIndex++)
256+ {
257+
258+ pDestImage[0] = 0;
259+ pDestImage[1] = 0;
260+ pDestImage[2] = 0;
261+ if (g_bDrawBackground || *pLabels != 0)
262+ {
263+ nValue = *pDepth;
264+ XnLabel label = *pLabels;
265+ XnUInt32 nColorID = label % nColors;
266+ if (label == 0)
267+ {
268+ nColorID = nColors;
269+ }
270+
271+ if (nValue != 0)
272+ {
273+ nHistValue = g_pDepthHist[nValue];
274+
275+ pDestImage[0] = nHistValue * Colors[nColorID][0];
276+ pDestImage[1] = nHistValue * Colors[nColorID][1];
277+ pDestImage[2] = nHistValue * Colors[nColorID][2];
278+ }
279+ }
280+
281+ pDepth++;
282+ pLabels++;
283+ pDestImage+=3;
284+ }
285+
286+ pDestImage += (texWidth - g_nXRes) *3;
287+ }
288+ }
289+ else
290+ {
291+ xnOSMemSet(pDepthTexBuf, 0, 3*2*g_nXRes*g_nYRes);
292+ }
293+
294+ glBindTexture(GL_TEXTURE_2D, depthTexID);
295+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, texWidth, texHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, pDepthTexBuf);
296+
297+ // Display the OpenGL texture map
298+ glColor4f(0.75,0.75,0.75,1);
299+
300+ glEnable(GL_TEXTURE_2D);
301+ DrawTexture(dmd.XRes(),dmd.YRes(),0,0);
302+ glDisable(GL_TEXTURE_2D);
303+
304+ char strLabel[50] = "";
305+ XnUserID aUsers[15];
306+ XnUInt16 nUsers = 15;
307+ g_UserGenerator.GetUsers(aUsers, nUsers);
308+
309+
310+ for (int i = 0; i < nUsers; ++i)
311+ {
312+ if (g_bPrintID)
313+ {
314+ XnPoint3D com;
315+ g_UserGenerator.GetCoM(aUsers[i], com);
316+ g_DepthGenerator.ConvertRealWorldToProjective(1, &com, &com);
317+
318+ xnOSMemSet(strLabel, 0, sizeof(strLabel));
319+ if (!g_bPrintState)
320+ {
321+ // Tracking
322+ sprintf(strLabel, "%d", aUsers[i]);
323+ }
324+ else if (g_UserGenerator.GetSkeletonCap().IsTracking(aUsers[i]))
325+ {
326+ // Tracking
327+ sprintf(strLabel, "%d - Tracking", aUsers[i]);
328+ }
329+ else if (g_UserGenerator.GetSkeletonCap().IsCalibrating(aUsers[i]))
330+ {
331+ // Calibrating
332+ sprintf(strLabel, "%d - Calibrating...", aUsers[i]);
333+ }
334+ else
335+ {
336+ // Nothing
337+ sprintf(strLabel, "%d - Looking for pose", aUsers[i]);
338+ }
339+
340+ glColor4f(1-Colors[i%nColors][0], 1-Colors[i%nColors][1], 1-Colors[i%nColors][2], 1);
341+
342+ glRasterPos2i(com.X, com.Y);
343+ glPrintString(GLUT_BITMAP_HELVETICA_18, strLabel);
344+ }
345+
346+
347+
348+ if (g_bDrawSkeleton && g_UserGenerator.GetSkeletonCap().IsTracking(aUsers[i]))
349+ {
350+ glBegin(GL_LINES);
351+
352+
353+
354+ glColor4f(1-Colors[aUsers[i]%nColors][0], 1-Colors[aUsers[i]%nColors][1], 1-Colors[aUsers[i]%nColors][2], 1);
355+ DrawLimb(aUsers[i], XN_SKEL_HEAD, XN_SKEL_NECK);
356+
357+ DrawLimb(aUsers[i], XN_SKEL_NECK, XN_SKEL_LEFT_SHOULDER);
358+ DrawLimb(aUsers[i], XN_SKEL_LEFT_SHOULDER, XN_SKEL_LEFT_ELBOW);
359+ DrawLimb(aUsers[i], XN_SKEL_LEFT_ELBOW, XN_SKEL_LEFT_HAND);
360+
361+ DrawLimb(aUsers[i], XN_SKEL_NECK, XN_SKEL_RIGHT_SHOULDER);
362+ DrawLimb(aUsers[i], XN_SKEL_RIGHT_SHOULDER, XN_SKEL_RIGHT_ELBOW);
363+ DrawLimb(aUsers[i], XN_SKEL_RIGHT_ELBOW, XN_SKEL_RIGHT_HAND);
364+
365+ DrawLimb(aUsers[i], XN_SKEL_LEFT_SHOULDER, XN_SKEL_TORSO);
366+ DrawLimb(aUsers[i], XN_SKEL_RIGHT_SHOULDER, XN_SKEL_TORSO);
367+
368+ DrawLimb(aUsers[i], XN_SKEL_TORSO, XN_SKEL_LEFT_HIP);
369+ DrawLimb(aUsers[i], XN_SKEL_LEFT_HIP, XN_SKEL_LEFT_KNEE);
370+ DrawLimb(aUsers[i], XN_SKEL_LEFT_KNEE, XN_SKEL_LEFT_FOOT);
371+
372+ DrawLimb(aUsers[i], XN_SKEL_TORSO, XN_SKEL_RIGHT_HIP);
373+ DrawLimb(aUsers[i], XN_SKEL_RIGHT_HIP, XN_SKEL_RIGHT_KNEE);
374+ DrawLimb(aUsers[i], XN_SKEL_RIGHT_KNEE, XN_SKEL_RIGHT_FOOT);
375+
376+ DrawLimb(aUsers[i], XN_SKEL_LEFT_HIP, XN_SKEL_RIGHT_HIP);
377+
378+
379+ glEnd();
380+ }
381+ }
382+}
383
384=== added file 'body-tracker/SceneDrawer.h'
385--- body-tracker/SceneDrawer.h 1970-01-01 00:00:00 +0000
386+++ body-tracker/SceneDrawer.h 2011-04-03 23:46:27 +0000
387@@ -0,0 +1,30 @@
388+/*****************************************************************************
389+* *
390+* OpenNI 1.0 Alpha *
391+* Copyright (C) 2010 PrimeSense Ltd. *
392+* *
393+* This file is part of OpenNI. *
394+* *
395+* OpenNI is free software: you can redistribute it and/or modify *
396+* it under the terms of the GNU Lesser General Public License as published *
397+* by the Free Software Foundation, either version 3 of the License, or *
398+* (at your option) any later version. *
399+* *
400+* OpenNI is distributed in the hope that it will be useful, *
401+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
402+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
403+* GNU Lesser General Public License for more details. *
404+* *
405+* You should have received a copy of the GNU Lesser General Public License *
406+* along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
407+* *
408+*****************************************************************************/
409+
410+#ifndef XNV_POINT_DRAWER_H_
411+#define XNV_POINT_DRAWER_H_
412+
413+#include <XnCppWrapper.h>
414+
415+void DrawDepthMap(const xn::DepthMetaData& dmd, const xn::SceneMetaData& smd);
416+
417+#endif
418
419=== added file 'body-tracker/application.cc'
420--- body-tracker/application.cc 1970-01-01 00:00:00 +0000
421+++ body-tracker/application.cc 2011-04-03 23:46:27 +0000
422@@ -0,0 +1,96 @@
423+#include <math.h>
424+
425+#include "application.h"
426+#include "body-tracker-window.h"
427+
428+//---------------------------------------------------------------------------
429+// Globals
430+//---------------------------------------------------------------------------
431+bool g_time_to_quit = false;
432+
433+MessageBus* g_message_bus = NULL;
434+BodyTrackerWindow* g_body_tracker_window = NULL;
435+
436+bool on_tooltip_button_press_event(GdkEventButton* event)
437+{
438+ if(g_body_tracker_window->is_visible()) {
439+ g_body_tracker_window->hide();
440+ }
441+ else {
442+ g_body_tracker_window->present();
443+ }
444+}
445+
446+int main(int argc, char *argv[])
447+{
448+ chdir("body-tracker");
449+
450+ Gtk::RC::add_default_file(RC_FILE_PATH);
451+ Gtk::Main app(argc, argv);
452+ Gtk::GL::init(argc, argv);
453+ Gtk::Window::set_default_icon_from_file(SVG_ICON_FILE_PATH);
454+
455+ //
456+ // Message Bus
457+ //
458+ g_message_bus = new MessageBus();
459+
460+ //
461+ // Status Icon
462+ //
463+ Glib::RefPtr<Gtk::StatusIcon> icon = Gtk::StatusIcon::create_from_file(PNG_ICON_FILE_PATH);
464+ icon->set_tooltip_text(APPLICATION_NAME);
465+ icon->set_visible();
466+ icon->signal_button_press_event().connect(sigc::ptr_fun(&on_tooltip_button_press_event));
467+
468+ //
469+ // Main Window
470+ //
471+ g_body_tracker_window = new BodyTrackerWindow();
472+ g_body_tracker_window->show_all();
473+
474+ glutInit(&argc, argv);
475+
476+ glDisable(GL_DEPTH_TEST); // we use Painter's Algorithm
477+ glEnable(GL_TEXTURE_2D);
478+
479+ glEnable(GL_BLEND);
480+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
481+
482+ glEnableClientState(GL_VERTEX_ARRAY); // OpenNI drawing code uses vertex arrays
483+
484+ Glib::Timer* timer = new Glib::Timer();
485+ timer->start();
486+
487+ double frame_time = 1.0 / 30.0;
488+ double last_frame_time = 0.0;
489+
490+ GMainLoop* p_main_loop = g_main_loop_new(NULL, false);
491+
492+
493+ while(g_time_to_quit == false) {
494+
495+ double time = timer->elapsed();
496+
497+ // has enough time elapsed?
498+ if((time - last_frame_time) > frame_time) {
499+ g_body_tracker_window->update();
500+ g_body_tracker_window->trigger_redraw();
501+ last_frame_time = time;
502+
503+ // actual redraw happens in the Gtk callback
504+ while(Gtk::Main::events_pending()) {
505+ Gtk::Main::iteration(false);
506+ }
507+
508+ g_body_tracker_window->send();
509+ }
510+ else {
511+ // sleep for a while to avoid spiking the CPU
512+ usleep(1000000.0 * (frame_time - (time - last_frame_time)));
513+ }
514+ }
515+
516+ delete g_body_tracker_window;
517+ return 0;
518+}
519
520=== added file 'body-tracker/application.h'
521--- body-tracker/application.h 1970-01-01 00:00:00 +0000
522+++ body-tracker/application.h 2011-04-03 23:46:27 +0000
523@@ -0,0 +1,61 @@
524+/*
525+ * Copyright 2009 Ian McIntosh <ian@openanswers.org>
526+ *
527+ * This program is free software; you can redistribute it and/or
528+ * modify it under the terms of the GNU General Public License
529+ * as published by the Free Software Foundation; either version 2
530+ * of the License, or (at your option) any later version.
531+ *
532+ * This program is distributed in the hope that it will be useful,
533+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
534+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
535+ * GNU General Public License for more details.
536+ *
537+ * You should have received a copy of the GNU General Public License
538+ * along with this program; if not, write to the Free Software
539+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
540+ *
541+ */
542+
543+#include <math.h>
544+#include <vector>
545+
546+using namespace std; // saves us typing std:: before vector
547+
548+#include <GL/gl.h> // Header File For The OpenGL32 Library
549+#include <GL/glu.h> // Header File For The GLu32 Library
550+#include <GL/glut.h>
551+
552+#include <gtkmm.h>
553+#include <gtk/gtkgl.h>
554+#include <gtkmm/gl/init.h>
555+#include <gtkmm/gl/widget.h>
556+
557+#include <lo/lo.h>
558+
559+#include <XnOpenNI.h>
560+#include <XnCodecIDs.h>
561+#include <XnCppWrapper.h>
562+
563+#include "message-bus.h"
564+
565+#include "utils.h"
566+
567+#define STANDARD_WIDGET_SPACING (6)
568+
569+#define APPLICATION_NAME ("Body Tracker")
570+#define APPLICATION_VERSION ("0.13")
571+#define APPLICATION_COPYRIGHT ("Copyright 2011 Ian McIntosh, Ether Davis")
572+#define UNIQUE_APP_GUID ("org.openanswers.body-tracker")
573+
574+#define RC_FILE_PATH ("body-tracker.rc")
575+#define XML_PATH ("openni-config.xml")
576+
577+#define PNG_ICON_FILE_PATH ("body-tracker-status-icon.png")
578+#define SVG_ICON_FILE_PATH ("body-icon.svg")
579+
580+#define GL_WIN_SIZE_X 720
581+#define GL_WIN_SIZE_Y 480
582+
583+extern MessageBus* g_message_bus;
584+extern bool g_time_to_quit;
585
586=== added file 'body-tracker/body-icon.svg'
587--- body-tracker/body-icon.svg 1970-01-01 00:00:00 +0000
588+++ body-tracker/body-icon.svg 2011-04-03 23:46:27 +0000
589@@ -0,0 +1,378 @@
590+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
591+<!-- Created with Inkscape (http://www.inkscape.org/) -->
592+<svg
593+ xmlns:dc="http://purl.org/dc/elements/1.1/"
594+ xmlns:cc="http://web.resource.org/cc/"
595+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
596+ xmlns:svg="http://www.w3.org/2000/svg"
597+ xmlns="http://www.w3.org/2000/svg"
598+ xmlns:xlink="http://www.w3.org/1999/xlink"
599+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
600+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
601+ width="48"
602+ height="48"
603+ id="svg2"
604+ sodipodi:version="0.32"
605+ inkscape:version="0.45"
606+ sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/devices"
607+ sodipodi:docname="input-tablet.svg"
608+ version="1.0"
609+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
610+ inkscape:export-filename="/home/needcoffee/Desktop/grafiktablet48.png"
611+ inkscape:export-xdpi="90"
612+ inkscape:export-ydpi="90">
613+ <defs
614+ id="defs4">
615+ <linearGradient
616+ id="linearGradient5717">
617+ <stop
618+ style="stop-color:#ffffff;stop-opacity:1;"
619+ offset="0"
620+ id="stop5719" />
621+ <stop
622+ style="stop-color:#d3d7cf;stop-opacity:1;"
623+ offset="1"
624+ id="stop5721" />
625+ </linearGradient>
626+ <linearGradient
627+ id="linearGradient49731">
628+ <stop
629+ style="stop-color:#888a85;stop-opacity:0;"
630+ offset="0"
631+ id="stop49733" />
632+ <stop
633+ id="stop51687"
634+ offset="1"
635+ style="stop-color:#888a85;stop-opacity:1;" />
636+ <stop
637+ style="stop-color:#888a85;stop-opacity:1;"
638+ offset="1"
639+ id="stop49735" />
640+ </linearGradient>
641+ <linearGradient
642+ id="linearGradient23236">
643+ <stop
644+ style="stop-color:#ffffff;stop-opacity:1;"
645+ offset="0"
646+ id="stop23238" />
647+ <stop
648+ style="stop-color:#babdb6;stop-opacity:1;"
649+ offset="1"
650+ id="stop23240" />
651+ </linearGradient>
652+ <linearGradient
653+ id="linearGradient16397">
654+ <stop
655+ style="stop-color:#888a85;stop-opacity:1;"
656+ offset="0"
657+ id="stop16399" />
658+ <stop
659+ style="stop-color:#4a4b48;stop-opacity:1;"
660+ offset="1"
661+ id="stop16401" />
662+ </linearGradient>
663+ <linearGradient
664+ id="linearGradient9508">
665+ <stop
666+ style="stop-color:#2e3436;stop-opacity:0.58152175;"
667+ offset="0"
668+ id="stop9510" />
669+ <stop
670+ style="stop-color:#2e3436;stop-opacity:0;"
671+ offset="1"
672+ id="stop9512" />
673+ </linearGradient>
674+ <linearGradient
675+ id="linearGradient4625">
676+ <stop
677+ style="stop-color:#eeeeec;stop-opacity:1;"
678+ offset="0"
679+ id="stop4627" />
680+ <stop
681+ style="stop-color:#888a85;stop-opacity:1;"
682+ offset="1"
683+ id="stop4629" />
684+ </linearGradient>
685+ <linearGradient
686+ id="linearGradient3648">
687+ <stop
688+ style="stop-color:#eeeeec;stop-opacity:1;"
689+ offset="0"
690+ id="stop3650" />
691+ <stop
692+ id="stop26236"
693+ offset="0.79710144"
694+ style="stop-color:#abaca9;stop-opacity:1;" />
695+ <stop
696+ style="stop-color:#d3d7cf;stop-opacity:1;"
697+ offset="1"
698+ id="stop3652" />
699+ </linearGradient>
700+ <linearGradient
701+ inkscape:collect="always"
702+ xlink:href="#linearGradient4625"
703+ id="linearGradient2756"
704+ gradientUnits="userSpaceOnUse"
705+ gradientTransform="matrix(0.4305409,-0.5319753,0.4931292,0.4644567,18.912037,27.929845)"
706+ x1="1.5"
707+ y1="4.2648559"
708+ x2="1.5"
709+ y2="8" />
710+ <linearGradient
711+ inkscape:collect="always"
712+ xlink:href="#linearGradient16397"
713+ id="linearGradient2758"
714+ gradientUnits="userSpaceOnUse"
715+ gradientTransform="matrix(0.4305409,-0.5319753,0.4931292,0.4644567,18.912037,27.929845)"
716+ x1="46.5"
717+ y1="4"
718+ x2="46.5"
719+ y2="8" />
720+ <linearGradient
721+ inkscape:collect="always"
722+ xlink:href="#linearGradient3648"
723+ id="linearGradient2760"
724+ gradientUnits="userSpaceOnUse"
725+ gradientTransform="matrix(0.4305409,-0.5319753,0.4931292,0.4644567,18.912037,27.929845)"
726+ x1="24"
727+ y1="3.5"
728+ x2="24"
729+ y2="8.5" />
730+ <linearGradient
731+ inkscape:collect="always"
732+ xlink:href="#linearGradient16397"
733+ id="linearGradient2762"
734+ gradientUnits="userSpaceOnUse"
735+ gradientTransform="matrix(0.4305409,-0.5319753,0.4931292,0.4644567,18.912037,27.929845)"
736+ x1="6.5"
737+ y1="3"
738+ x2="6.5"
739+ y2="9" />
740+ <radialGradient
741+ inkscape:collect="always"
742+ xlink:href="#linearGradient23236"
743+ id="radialGradient2764"
744+ gradientUnits="userSpaceOnUse"
745+ gradientTransform="matrix(9.0783702,-4.3797969,0.7439951,1.45288,-269.26407,125.68742)"
746+ cx="31.332088"
747+ cy="19.154226"
748+ fx="31.332088"
749+ fy="19.154226"
750+ r="4.7440769" />
751+ <linearGradient
752+ inkscape:collect="always"
753+ xlink:href="#linearGradient9508"
754+ id="linearGradient4652"
755+ gradientUnits="userSpaceOnUse"
756+ gradientTransform="matrix(0.9557953,0,0.3203373,-0.7915548,-8.926721,48.1877)"
757+ x1="26.32226"
758+ y1="19.01865"
759+ x2="49.73465"
760+ y2="3.5158892" />
761+ <radialGradient
762+ inkscape:collect="always"
763+ xlink:href="#linearGradient5717"
764+ id="radialGradient4658"
765+ gradientUnits="userSpaceOnUse"
766+ gradientTransform="matrix(2.4615467,-1.0699271,0.7998114,1.8528198,-21.204988,5.9018902)"
767+ cx="7.6711912"
768+ cy="15.00725"
769+ fx="7.6711912"
770+ fy="15.00725"
771+ r="19.769346" />
772+ <linearGradient
773+ inkscape:collect="always"
774+ xlink:href="#linearGradient23236"
775+ id="linearGradient4661"
776+ gradientUnits="userSpaceOnUse"
777+ gradientTransform="matrix(1.0206415,0,0,0.8416288,0.4990254,7.9398705)"
778+ x1="2.4415672"
779+ y1="37.205902"
780+ x2="2.4415672"
781+ y2="43" />
782+ <radialGradient
783+ inkscape:collect="always"
784+ xlink:href="#linearGradient49731"
785+ id="radialGradient4667"
786+ gradientUnits="userSpaceOnUse"
787+ gradientTransform="matrix(0.113791,0.6773045,-0.4679608,4.7182104e-3,14.144529,6.6142105)"
788+ cx="6.5998492"
789+ cy="1.8850985"
790+ fx="6.5998492"
791+ fy="1.8850985"
792+ r="11.58128" />
793+ <filter
794+ inkscape:collect="always"
795+ x="-0.066309785"
796+ width="1.1326196"
797+ y="-0.16209375"
798+ height="1.3241875"
799+ id="filter5658">
800+ <feGaussianBlur
801+ inkscape:collect="always"
802+ stdDeviation="1.3985314"
803+ id="feGaussianBlur5660" />
804+ </filter>
805+ </defs>
806+ <sodipodi:namedview
807+ id="base"
808+ pagecolor="#ffffff"
809+ bordercolor="#666666"
810+ borderopacity="1.0"
811+ inkscape:pageopacity="0.0"
812+ inkscape:pageshadow="2"
813+ inkscape:zoom="1"
814+ inkscape:cx="76.958663"
815+ inkscape:cy="21.57038"
816+ inkscape:document-units="px"
817+ inkscape:current-layer="layer1"
818+ inkscape:window-width="872"
819+ inkscape:window-height="902"
820+ inkscape:window-x="400"
821+ inkscape:window-y="130"
822+ inkscape:showpageshadow="false"
823+ width="48px"
824+ height="48px"
825+ showgrid="false"
826+ inkscape:grid-points="true"
827+ gridtolerance="1.4"
828+ gridspacingx="0.5px"
829+ gridspacingy="0.5px" />
830+ <metadata
831+ id="metadata7">
832+ <rdf:RDF>
833+ <cc:Work
834+ rdf:about="">
835+ <dc:format>image/svg+xml</dc:format>
836+ <dc:type
837+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
838+ <dc:title>Graphic tablet</dc:title>
839+ <cc:license
840+ rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
841+ <dc:creator>
842+ <cc:Agent>
843+ <dc:title>Sebastien Kraft</dc:title>
844+ </cc:Agent>
845+ </dc:creator>
846+ <dc:subject>
847+ <rdf:Bag>
848+ <rdf:li>tablet</rdf:li>
849+ <rdf:li>pen</rdf:li>
850+ <rdf:li>input</rdf:li>
851+ <rdf:li>stylus</rdf:li>
852+ </rdf:Bag>
853+ </dc:subject>
854+ </cc:Work>
855+ <cc:License
856+ rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
857+ <cc:permits
858+ rdf:resource="http://web.resource.org/cc/Reproduction" />
859+ <cc:permits
860+ rdf:resource="http://web.resource.org/cc/Distribution" />
861+ <cc:requires
862+ rdf:resource="http://web.resource.org/cc/Notice" />
863+ <cc:permits
864+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
865+ <cc:requires
866+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
867+ <cc:requires
868+ rdf:resource="http://web.resource.org/cc/SourceCode" />
869+ </cc:License>
870+ </rdf:RDF>
871+ </metadata>
872+ <g
873+ inkscape:label="Ebene 1"
874+ inkscape:groupmode="layer"
875+ id="layer1">
876+ <path
877+ style="fill:none;fill-rule:evenodd;stroke:url(#radialGradient4667);stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
878+ d="M 13.91719,11.500001 C 11.738325,13.671032 28.288808,15.425275 29.441611,16.927577 C 32.396831,20.778743 13.808426,19.231703 10.240354,21.196732 C 5.5555129,23.067939 16.91313,22.897913 16.913132,26.522237"
879+ id="path46799"
880+ sodipodi:nodetypes="cscc" />
881+ <path
882+ style="opacity:0.27058824;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5658)"
883+ d="M 12.19393,28.500083 L 38.34636,28.500083 C 38.34636,28.500083 39.190322,28.471214 39.657664,29.48902 C 39.657664,29.48902 45.712165,43.506932 46.067164,44.310111 C 46.403002,45.069941 45.212186,45.755834 44.150175,45.755834 L 5.9180739,45.755834 C 4.8560623,45.755834 3.6652479,45.069941 4.0010855,44.310111 C 4.3560832,43.506932 10.882627,29.48902 10.882627,29.48902 C 11.194189,28.588698 12.19393,28.500083 12.19393,28.500083 z "
884+ id="path8537"
885+ sodipodi:nodetypes="ccccccccc" />
886+ <path
887+ style="fill:url(#linearGradient4661);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
888+ d="M 12.448317,25.50009 L 37.030206,25.50009 C 37.030206,25.50009 37.823486,25.470418 38.262762,26.516464 C 38.262762,26.516464 44.055001,41.756232 44.386612,42.576578 C 44.700323,43.352646 43.587961,44.053197 42.595917,44.053197 L 6.8826065,44.053197 C 5.8905618,44.053197 4.7782002,43.352646 5.0919123,42.576578 C 5.4235223,41.756232 11.215761,26.516464 11.215761,26.516464 C 11.508612,25.591162 12.448317,25.50009 12.448317,25.50009 z "
889+ id="rect2676"
890+ sodipodi:nodetypes="ccccccccc" />
891+ <path
892+ sodipodi:nodetypes="ccccccccc"
893+ id="path4736"
894+ d="M 12.448317,25.50009 L 37.030206,25.50009 C 37.030206,25.50009 37.823486,25.470418 38.262762,26.516464 C 38.262762,26.516464 44.055001,41.756232 44.386612,42.576578 C 44.700323,43.352646 43.587961,44.053197 42.595917,44.053197 L 6.8826065,44.053197 C 5.8905618,44.053197 4.7782002,43.352646 5.0919123,42.576578 C 5.4235223,41.756232 11.215761,26.516464 11.215761,26.516464 C 11.508612,25.591162 12.448317,25.50009 12.448317,25.50009 z "
895+ style="opacity:0.5;fill:url(#radialGradient4658);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
896+ <path
897+ sodipodi:nodetypes="ccccccccc"
898+ id="path5604"
899+ d="M 13.094744,26.000084 L 36.383778,26.000084 C 36.383778,26.000084 37.135337,25.972453 37.551509,26.94657 C 37.551509,26.94657 42.933566,41.674245 43.245923,42.433775 C 43.245923,42.433775 43.930498,43.500008 42.396914,43.500008 L 7.5172511,43.500008 C 5.3289587,43.500008 6.2325987,42.433775 6.2325987,42.433775 C 6.5449562,41.674245 11.927013,26.94657 11.927013,26.94657 C 12.204462,26.084894 13.094744,26.000084 13.094744,26.000084 z "
900+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.19999993;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
901+ <path
902+ sodipodi:nodetypes="ccccccccc"
903+ id="path7556"
904+ d="M 12.50006,25.520005 L 36.915824,25.520005 C 36.915824,25.520005 37.823486,25.724022 38.262762,26.755792 C 38.262762,26.755792 44.055001,41.787582 44.386612,42.596733 C 44.700323,43.36221 43.887239,44.500008 42.895195,44.500008 L 6.5206893,44.500008 C 5.5286448,44.500008 4.7782001,43.36221 5.0919123,42.596733 C 5.4235223,41.787582 11.215761,26.755792 11.215761,26.755792 C 11.508612,25.843118 12.50006,25.520005 12.50006,25.520005 z "
905+ style="fill:none;fill-opacity:1;stroke:#555753;stroke-width:1.03999984;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
906+ <path
907+ style="fill:none;fill-opacity:1;stroke:#888a85;stroke-width:0.79999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
908+ d="M 14.493184,28.485226 L 34.42442,28.485226 C 34.42442,28.485226 35.033532,28.471117 35.367676,29.099048 C 35.367675,29.099047 38.979365,37.989263 39.223628,38.466125 C 39.454709,38.917252 38.630464,39.327655 37.899724,39.327655 L 11.587102,39.327655 C 10.856361,39.327655 10.032115,38.917252 10.263196,38.466125 C 10.50746,37.989263 13.549927,29.099048 13.549927,29.099048 C 13.772689,28.543597 14.493184,28.485226 14.493184,28.485226 z "
909+ id="path41909"
910+ sodipodi:nodetypes="ccssccscc" />
911+ <path
912+ style="opacity:0.2;fill:url(#linearGradient4652);fill-opacity:1;stroke:none;stroke-width:0.8599999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
913+ d="M 22.324354,33.133396 L 23.625318,34.852059 L 24.049546,35.377207 L 31.176567,39.244199 L 32.505814,39.626124 L 38.642971,42.681525 L 42.772119,42.681525 C 42.969129,42.515043 43.098578,42.323054 43.139782,42.108637 L 36.210734,38.647441 L 35.645097,38.074553 L 27.697903,34.422394 L 26.425219,34.11208 L 22.324354,33.133396 z "
914+ id="path23244" />
915+ <g
916+ id="g2764"
917+ transform="matrix(1.1396241,0,0,1.1157384,-2.2076279,-0.6365627)">
918+ <path
919+ id="rect10493"
920+ d="M 40.070139,6.6188883 L 40.510236,6.0751053 C 40.746109,5.7836616 41.153494,5.7538826 41.423655,6.008336 L 41.92773,6.4831016 C 42.197891,6.7375551 42.225496,7.1770315 41.989624,7.4684754 L 41.549527,8.0122584 C 41.313654,8.3037022 40.906269,8.3334811 40.636107,8.0790276 L 40.132033,7.6042621 C 39.861871,7.3498086 39.834266,6.9103321 40.070139,6.6188883 z "
921+ style="fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1" />
922+ <path
923+ sodipodi:nodetypes="ccccc"
924+ id="rect10499"
925+ d="M 22.270059,29.686394 L 23.89834,26.063844 L 25.870856,27.921671 L 22.763188,30.150849 L 22.270059,29.686394 z "
926+ style="fill:url(#linearGradient2756);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1" />
927+ <path
928+ style="fill:url(#linearGradient2758);fill-opacity:1;stroke:#babdb6;stroke-width:0.88682508;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
929+ d="M 40.070139,6.6188883 L 40.510236,6.0751053 C 40.746109,5.7836616 41.153494,5.7538826 41.423655,6.008336 L 41.92773,6.4831016 C 42.197891,6.7375551 42.225496,7.1770315 41.989624,7.4684754 L 41.549527,8.0122584 C 41.313654,8.3037022 40.906269,8.3334811 40.636107,8.0790276 L 40.132033,7.6042621 C 39.861871,7.3498086 39.834266,6.9103321 40.070139,6.6188883 z "
930+ id="path12476" />
931+ <path
932+ sodipodi:nodetypes="ccccccc"
933+ id="rect10487"
934+ d="M 33.436616,19.110318 L 40.984536,9.7841254 C 41.574218,9.0555166 41.809727,8.2469255 41.508074,7.9628117 L 40.121147,6.6565272 C 39.819494,6.3724136 39.108572,6.7332326 38.51889,7.4618419 L 30.97097,16.788034 L 33.436616,19.110318 z "
935+ style="fill:url(#linearGradient2760);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1" />
936+ <path
937+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.88682508;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
938+ d="M 33.436616,19.110318 L 40.984536,9.7841254 C 41.574218,9.0555166 41.504717,8.5083326 41.203064,8.2242188 L 39.816138,6.9179343 C 39.514485,6.6338207 39.108572,6.7332326 38.51889,7.4618419 L 30.97097,16.788034 L 33.436616,19.110318 z "
939+ id="path12478"
940+ sodipodi:nodetypes="ccccccc" />
941+ <path
942+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.88682508;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
943+ d="M 22.516623,29.918622 L 23.89834,26.063844 L 25.870856,27.921671 L 22.516623,29.918622 z "
944+ id="path12484"
945+ sodipodi:nodetypes="cccc" />
946+ <path
947+ style="fill:url(#linearGradient2762);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
948+ d="M 23.683069,26.329831 L 25.655586,28.187658 L 26.332691,27.887911 L 33.037369,20.14051 L 33.436616,19.110318 L 30.97097,16.788034 L 30.078594,17.353769 L 23.867045,25.565628 L 23.683069,26.329831 z "
949+ id="path10502"
950+ sodipodi:nodetypes="ccccccccc" />
951+ <path
952+ sodipodi:nodetypes="ccccccccc"
953+ id="path12482"
954+ d="M 23.683069,26.329831 L 25.655586,28.187658 L 26.332691,27.887911 L 33.037369,20.14051 L 33.436616,19.110318 L 30.97097,16.788034 L 30.078594,17.353769 L 23.867045,25.565628 L 23.683069,26.329831 z "
955+ style="fill:none;fill-opacity:1;stroke:url(#radialGradient2764);stroke-width:0.88682508;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1" />
956+ <path
957+ id="path10496"
958+ d="M 22.054788,29.952381 C 21.935958,30.099207 21.949979,30.322407 22.086082,30.450597 C 22.222186,30.578787 22.429088,30.563663 22.547917,30.416838 L 22.978458,29.884862 L 22.485328,29.420406 L 22.054788,29.952381 z "
959+ style="color:#000000;fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
960+ <path
961+ sodipodi:nodetypes="cccccccccccccccccc"
962+ id="path12486"
963+ d="M 22.057089,30.486421 L 25.565424,28.679253 L 26.663823,28.164647 L 33.449284,20.454604 L 33.956087,19.154341 L 41.572446,9.7435849 C 42.150022,9.0299337 42.40517,8.1272222 42.10509,7.7373334 L 42.499999,7.2493837 C 42.744281,6.9475499 42.665953,6.4347834 42.326763,6.1153159 L 41.707637,5.5321883 C 41.368448,5.2127208 40.886904,5.1981668 40.642622,5.5000012 C 40.642622,5.5000012 40.400983,5.798569 40.247712,5.9879507 C 39.849116,5.7197876 39.054392,6.1142952 38.476817,6.8279471 L 30.860457,16.238703 L 29.734528,16.955839 L 23.568192,25.249009 L 23.243701,26.492524 L 22.057089,30.486421 z "
964+ style="fill:none;fill-opacity:1;stroke:#2e3436;stroke-width:0.76266938;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
965+ </g>
966+ </g>
967+</svg>
968
969=== added file 'body-tracker/body-tracker'
970Binary files body-tracker/body-tracker 1970-01-01 00:00:00 +0000 and body-tracker/body-tracker 2011-04-03 23:46:27 +0000 differ
971=== added file 'body-tracker/body-tracker-status-icon.png'
972Binary files body-tracker/body-tracker-status-icon.png 1970-01-01 00:00:00 +0000 and body-tracker/body-tracker-status-icon.png 2011-04-03 23:46:27 +0000 differ
973=== added file 'body-tracker/body-tracker-window.cc'
974--- body-tracker/body-tracker-window.cc 1970-01-01 00:00:00 +0000
975+++ body-tracker/body-tracker-window.cc 2011-04-03 23:46:27 +0000
976@@ -0,0 +1,294 @@
977+#include <gtkglmm.h>
978+#include <gtkmm/gl/widget.h>
979+
980+#include "application.h"
981+#include "body-tracker-window.h"
982+
983+#include "utils.h"
984+
985+#define WINDOW_TITLE_FORMAT ("Luz Body Tracker - Human %02d")
986+#define WINDOW_TITLE_FORMAT_RANGE ("Luz Body Tracker - Human %02d to %02d")
987+#define WINDOW_TITLE_FORMAT_UNINITIALIZED ("Luz Body Tracker - Kinect Not Found")
988+
989+#define MSG_ENABLE_BROADCAST ("Send to Network")
990+#define MSG_CONFIRM_QUIT ("Confirm Quit?")
991+
992+#define MIN_HUMAN_NUMBER (1)
993+#define MAX_HUMAN_NUMBER (8)
994+
995+#define WINDOW_MINIMUM_WIDTH (500)
996+
997+BodyTrackerWindow::BodyTrackerWindow()
998+ : m_window_vbox(),
999+ m_first_human_number_spinbutton(),
1000+ m_last_human_number_spinbutton(),
1001+ m_fullscreen_button(),
1002+ m_toolbar(),
1003+ m_first_human_number(1),
1004+ m_last_human_number(1),
1005+ m_broadcast_button(MSG_ENABLE_BROADCAST),
1006+ m_is_fullscreen(false)
1007+{
1008+ m_quit_dialog = new Gtk::Dialog(MSG_CONFIRM_QUIT, *this);
1009+ m_quit_dialog->add_button(Gtk::StockID("gtk-cancel"), FALSE);
1010+ m_quit_dialog->add_button(Gtk::StockID("gtk-quit"), TRUE);
1011+ m_quit_dialog->set_default_response(FALSE);
1012+ m_quit_dialog->signal_response().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_quit_dialog_response));
1013+
1014+ set_border_width(0);
1015+ set_resizable(true);
1016+
1017+ set_size_request(WINDOW_MINIMUM_WIDTH, (WINDOW_MINIMUM_WIDTH * 3) / 4); // this sets the startup size
1018+
1019+ // One vbox to rule them all
1020+ m_window_vbox.set_spacing(0); // aesthetics
1021+ add(m_window_vbox);
1022+
1023+ // Window dragging (in usused space)
1024+ add_events(Gdk::BUTTON_PRESS_MASK);
1025+ signal_button_press_event().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_window_button_press_event));
1026+
1027+ //
1028+ // Toolbar is the first item in vbox
1029+ //
1030+ m_toolbar.set_spacing(STANDARD_WIDGET_SPACING);
1031+ m_toolbar.set_border_width(0); // http://en.wikipedia.org/wiki/Fitts's_law
1032+
1033+ // Toolbar: First Human Number Spinbutton
1034+ m_first_human_number_spinbutton.set_tooltip_text("First Human Number");
1035+ m_first_human_number_spinbutton.set_numeric(true);
1036+ m_first_human_number_spinbutton.set_range((float)MIN_HUMAN_NUMBER, (float)MAX_HUMAN_NUMBER);
1037+ m_first_human_number_spinbutton.set_increments(1.0, 1.0);
1038+ m_first_human_number_spinbutton.set_value(m_first_human_number);
1039+ m_toolbar.pack_start(m_first_human_number_spinbutton, false, true); // booleans for expand / fill extra space
1040+ m_first_human_number_spinbutton.signal_value_changed().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_first_human_number_spinbutton_changed));
1041+
1042+ // Toolbar: spacer to push furth items to the far right
1043+ Gtk::Label* to_label = new Gtk::Label("to");
1044+ m_toolbar.pack_start(*to_label, false, false); // booleans mean: expand and fill extra space
1045+
1046+ // Toolbar: Last Human Number Spinbutton
1047+ m_last_human_number_spinbutton.set_tooltip_text("Last Human Number");
1048+ m_last_human_number_spinbutton.set_numeric(true);
1049+ m_last_human_number_spinbutton.set_range((float)MIN_HUMAN_NUMBER, (float)MAX_HUMAN_NUMBER);
1050+ m_last_human_number_spinbutton.set_increments(1.0, 1.0);
1051+ m_last_human_number_spinbutton.set_value(m_last_human_number);
1052+ m_toolbar.pack_start(m_last_human_number_spinbutton, false, true); // booleans for expand / fill extra space
1053+ m_last_human_number_spinbutton.signal_value_changed().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_last_human_number_spinbutton_changed));
1054+
1055+ // Toolbar: spacer to push furth items to the far right
1056+ Gtk::Label* spacer = new Gtk::Label();
1057+ m_toolbar.pack_start(*spacer, true, true); // booleans mean: expand and fill extra space
1058+
1059+ // Toolbar: Broadcast Togglebutton
1060+ m_broadcast_button.set_mode(true); // draw_indicator=true makes it draw as a checkbox (brilliant API here...)
1061+ m_broadcast_button.signal_clicked().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_broadcast_changed));
1062+ m_toolbar.pack_start(m_broadcast_button, false, false);
1063+
1064+ // Toolbar: Fullscreen Button
1065+ m_fullscreen_button.set_tooltip_text("Toggle Fullscreen");
1066+ m_fullscreen_button.set_image(*(new Gtk::Image(Gtk::Stock::FULLSCREEN, *(new Gtk::IconSize(Gtk::ICON_SIZE_SMALL_TOOLBAR)))));
1067+ m_fullscreen_button.set_relief(Gtk::RELIEF_NONE);
1068+ m_toolbar.pack_start(m_fullscreen_button, false, true); // booleans mean: expand and fill extra space
1069+ m_fullscreen_button.signal_clicked().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_fullscreen_button_clicked));
1070+
1071+ m_window_vbox.pack_start(m_toolbar, false, false);
1072+
1073+ //
1074+ // DrawingArea
1075+ //
1076+ m_drawing_area.set_size_request(256, 256);
1077+ m_window_vbox.pack_start(m_drawing_area, true, true);
1078+ m_drawing_area.signal_expose_event().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_drawing_area_expose_event), false);
1079+ m_drawing_area.add_events(Gdk::BUTTON_PRESS_MASK);
1080+ m_drawing_area.signal_button_press_event().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_drawing_area_button_press_event), false);
1081+ m_drawing_area.add_events(Gdk::BUTTON_RELEASE_MASK);
1082+ m_drawing_area.signal_button_release_event().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_drawing_area_button_press_event), false);
1083+ m_drawing_area.add_events(Gdk::POINTER_MOTION_MASK);
1084+ m_drawing_area.signal_motion_notify_event().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_motion_notify_event), false);
1085+
1086+ // Window dragging (in usused space)
1087+ add_events(Gdk::BUTTON_PRESS_MASK);
1088+ signal_button_press_event().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_window_button_press_event));
1089+
1090+ // Key presses
1091+ signal_key_press_event().connect(sigc::mem_fun(*this, &BodyTrackerWindow::on_key_press_event));
1092+
1093+ //
1094+ // OpenNI Tracker
1095+ //
1096+ m_body_tracker = new BodyTracker();
1097+
1098+ update_window_title();
1099+}
1100+
1101+bool BodyTrackerWindow::on_motion_notify_event(GdkEventMotion* event)
1102+{
1103+ if(event->y < m_toolbar.get_height() * 2) {
1104+ m_toolbar.show();
1105+ }
1106+}
1107+
1108+bool BodyTrackerWindow::on_key_press_event(GdkEventKey* event)
1109+{
1110+ if(event->type == GDK_KEY_PRESS && event->keyval == GDK_Escape) {
1111+ if(m_is_fullscreen) {
1112+ if(m_toolbar.get_visible()) {
1113+ m_toolbar.hide();
1114+ }
1115+ else {
1116+ m_toolbar.show();
1117+ }
1118+ }
1119+ else {
1120+ m_quit_dialog->show();
1121+ }
1122+ return true;
1123+ }
1124+ return false;
1125+}
1126+
1127+void BodyTrackerWindow::update_window_title()
1128+{
1129+ char buffer[201];
1130+ if(!m_body_tracker->is_openni_initialized())
1131+ snprintf(buffer, 200, WINDOW_TITLE_FORMAT_UNINITIALIZED);
1132+ else if(m_first_human_number == m_last_human_number)
1133+ snprintf(buffer, 200, WINDOW_TITLE_FORMAT, m_first_human_number);
1134+ else
1135+ snprintf(buffer, 200, WINDOW_TITLE_FORMAT_RANGE, m_first_human_number, m_last_human_number);
1136+
1137+ set_title(buffer);
1138+}
1139+
1140+// Track fullscreen state
1141+bool BodyTrackerWindow::on_window_state_event(GdkEventWindowState* event)
1142+{
1143+ m_is_fullscreen = (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) == GDK_WINDOW_STATE_FULLSCREEN;
1144+ return true;
1145+}
1146+
1147+//
1148+// Window interaction
1149+//
1150+void BodyTrackerWindow::on_fullscreen_button_clicked()
1151+{
1152+ if(m_is_fullscreen)
1153+ this->unfullscreen();
1154+ else
1155+ this->fullscreen();
1156+}
1157+
1158+bool BodyTrackerWindow::on_window_button_press_event(GdkEventButton* event)
1159+{
1160+ if((event->type == GDK_BUTTON_PRESS) && (event->button == 1)) {
1161+ // Clicking anywhere on the window initiates a window drag
1162+ begin_move_drag(event->button, event->x_root, event->y_root, event->time);
1163+ return true; // handled
1164+ }
1165+ else if((event->type == GDK_2BUTTON_PRESS) && (event->button == 1)) {
1166+ if(!m_is_fullscreen) {
1167+ this->fullscreen();
1168+ }
1169+ }
1170+ return false; // not handled
1171+}
1172+
1173+void BodyTrackerWindow::on_first_human_number_spinbutton_changed()
1174+{
1175+ m_first_human_number = m_first_human_number_spinbutton.get_value_as_int();
1176+ if(m_first_human_number > m_last_human_number)
1177+ m_last_human_number_spinbutton.set_value(m_first_human_number);
1178+
1179+ m_body_tracker->set_max_humans((m_last_human_number - m_first_human_number) + 1);
1180+ m_body_tracker->set_human_number_offset(m_first_human_number - 1);
1181+
1182+ update_window_title();
1183+}
1184+
1185+void BodyTrackerWindow::on_last_human_number_spinbutton_changed()
1186+{
1187+ m_last_human_number = m_last_human_number_spinbutton.get_value_as_int();
1188+ if(m_last_human_number < m_first_human_number)
1189+ m_first_human_number_spinbutton.set_value(m_last_human_number);
1190+
1191+ m_body_tracker->set_max_humans((m_last_human_number - m_first_human_number) + 1);
1192+
1193+ update_window_title();
1194+}
1195+
1196+bool BodyTrackerWindow::on_drawing_area_button_press_event(GdkEventButton* event)
1197+{
1198+ if((event->type == GDK_BUTTON_PRESS) && (event->button == 1)) {
1199+ begin_move_drag(event->button, event->x_root, event->y_root, event->time);
1200+ return true; // handled
1201+ }
1202+ return false; // not handled
1203+}
1204+
1205+void BodyTrackerWindow::on_broadcast_changed()
1206+{
1207+ g_message_bus->set_broadcast(m_broadcast_button.get_active());
1208+}
1209+
1210+//
1211+// Drawing
1212+//
1213+void BodyTrackerWindow::trigger_redraw()
1214+{
1215+ m_drawing_area.trigger_redraw();
1216+}
1217+
1218+bool BodyTrackerWindow::on_drawing_area_expose_event(GdkEventExpose* event)
1219+{
1220+ draw();
1221+ return true; // handled
1222+}
1223+
1224+//
1225+// Update Tracking
1226+//
1227+void BodyTrackerWindow::update()
1228+{
1229+ m_body_tracker->update();
1230+}
1231+
1232+//
1233+// Rendering
1234+//
1235+void BodyTrackerWindow::draw()
1236+{
1237+ m_drawing_area.gl_begin();
1238+ m_body_tracker->draw();
1239+ m_drawing_area.gl_end();
1240+}
1241+
1242+//
1243+// Send OSC
1244+//
1245+void BodyTrackerWindow::send()
1246+{
1247+ m_body_tracker->send();
1248+}
1249+
1250+//
1251+// Closing Window, Quiting
1252+//
1253+bool BodyTrackerWindow::on_delete_event(GdkEventAny *event)
1254+{
1255+ m_quit_dialog->show();
1256+ return true;
1257+}
1258+
1259+void BodyTrackerWindow::on_quit_dialog_response(int response_id)
1260+{
1261+ if(response_id == TRUE) {
1262+ hide();
1263+ g_time_to_quit = true;
1264+ }
1265+ m_quit_dialog->hide();
1266+}
1267+
1268+BodyTrackerWindow::~BodyTrackerWindow()
1269+{
1270+}
1271
1272=== added file 'body-tracker/body-tracker-window.h'
1273--- body-tracker/body-tracker-window.h 1970-01-01 00:00:00 +0000
1274+++ body-tracker/body-tracker-window.h 2011-04-03 23:46:27 +0000
1275@@ -0,0 +1,61 @@
1276+#include <gtkmm.h>
1277+#include <gtkmm/window.h>
1278+
1279+#include <vector>
1280+using namespace std;
1281+
1282+#include "my-drawing-area.h"
1283+#include "body-tracker.h"
1284+
1285+class BodyTrackerWindow : public Gtk::Window
1286+{
1287+public:
1288+ BodyTrackerWindow();
1289+ virtual ~BodyTrackerWindow();
1290+
1291+ void trigger_redraw();
1292+ void update();
1293+ void send();
1294+
1295+private:
1296+ void draw();
1297+
1298+ bool on_drawing_area_expose_event(GdkEventExpose* event);
1299+ void on_first_human_number_spinbutton_changed();
1300+ void on_last_human_number_spinbutton_changed();
1301+ void update_window_title();
1302+ void on_fullscreen_button_clicked();
1303+ bool on_window_button_press_event(GdkEventButton* event);
1304+ bool on_key_press_event(GdkEventKey* event);
1305+ bool on_motion_notify_event(GdkEventMotion* event);
1306+
1307+ virtual bool on_drawing_area_button_press_event(GdkEventButton* event);
1308+ bool on_window_state_event(GdkEventWindowState* event);
1309+ void on_quit_dialog_response(int response_id);
1310+ void on_broadcast_changed();
1311+ bool on_delete_event(GdkEventAny *event);
1312+
1313+ // Window
1314+ Gtk::VBox m_window_vbox;
1315+ Gtk::HBox m_toolbar;
1316+ MyDrawingArea m_drawing_area;
1317+
1318+ // Toolbar
1319+ Gtk::SpinButton m_first_human_number_spinbutton;
1320+ Gtk::SpinButton m_last_human_number_spinbutton;
1321+ Gtk::CheckButton m_broadcast_button;
1322+ Gtk::Button m_fullscreen_button;
1323+
1324+ // Dialogs
1325+ Gtk::Dialog* m_quit_dialog;
1326+
1327+ //
1328+ // Data
1329+ //
1330+ BodyTracker* m_body_tracker;
1331+
1332+ bool m_is_fullscreen;
1333+
1334+ gint m_first_human_number;
1335+ gint m_last_human_number;
1336+};
1337
1338=== added file 'body-tracker/body-tracker.cc'
1339--- body-tracker/body-tracker.cc 1970-01-01 00:00:00 +0000
1340+++ body-tracker/body-tracker.cc 2011-04-03 23:46:27 +0000
1341@@ -0,0 +1,862 @@
1342+#include "application.h"
1343+#include "body-tracker.h"
1344+
1345+#include <GL/gl.h>
1346+
1347+#define STARTING_JOINT_BOUNDING_BOX_WIDTH (400.0)
1348+#define DEFAULT_MAX_HUMANS (1)
1349+
1350+#define BACKGROUND_COLOR 0.0, 0.0, 0.0, 0.0
1351+#define UNINITIALIZED_BACKGROUND_COLOR 0.6, 0.1, 0.1, 0.0
1352+
1353+#define NUM_HUMAN_COLORS (9)
1354+static XnFloat HUMAN_COLORS[NUM_HUMAN_COLORS][4] = {
1355+ {0.800, 0.800, 0.800, 1.0}, // no human number assigned
1356+
1357+ {1.000, 0.000, 0.000, 0.5},
1358+ {0.000, 1.000, 0.000, 0.5},
1359+ {0.000, 0.000, 1.000, 0.5},
1360+ {1.000, 1.000, 0.000, 0.5},
1361+
1362+ {0.500, 0.000, 0.000, 1.0},
1363+ {0.000, 0.500, 0.000, 1.0},
1364+ {0.000, 0.000, 0.500, 1.0},
1365+ {0.500, 0.500, 0.000, 1.0},
1366+
1367+/*
1368+ {0.960, 0.474, 0.000, 1.0},
1369+ {0.563, 0.149, 0.630, 1.0},
1370+ {0.866, 0.039, 0.039, 1.0},
1371+ {0.450, 0.823, 0.086, 1.0},
1372+ {0.929, 0.831, 0.000, 1.0},
1373+ {0.447, 0.623, 0.811, 1.0},
1374+ {0.203, 0.396, 0.643, 1.0},
1375+ {0.936, 0.353, 0.353, 1.0}
1376+*/
1377+};
1378+
1379+//
1380+// OpenNI Callbacks forwarding to class
1381+//
1382+void XN_CALLBACK_TYPE callback_on_new_user(xn::UserGenerator& generator, XnUserID user_id, void* cookie)
1383+{
1384+ ((BodyTracker*)cookie)->on_new_user(user_id);
1385+}
1386+
1387+void XN_CALLBACK_TYPE callback_on_pose_detected(xn::PoseDetectionCapability& capability, const XnChar* strPose, XnUserID user_id, void* cookie)
1388+{
1389+ ((BodyTracker*)cookie)->on_pose_detected(user_id);
1390+}
1391+
1392+void XN_CALLBACK_TYPE callback_on_calibration_start(xn::SkeletonCapability& capability, XnUserID user_id, void* cookie)
1393+{
1394+ ((BodyTracker*)cookie)->on_calibration_start(user_id);
1395+}
1396+
1397+void XN_CALLBACK_TYPE callback_on_calibration_end(xn::SkeletonCapability& capability, XnUserID user_id, XnBool success, void* cookie)
1398+{
1399+ ((BodyTracker*)cookie)->on_calibration_end(user_id, success);
1400+}
1401+
1402+void XN_CALLBACK_TYPE callback_on_lost_user(xn::UserGenerator& generator, XnUserID user_id, void* cookie)
1403+{
1404+ ((BodyTracker*)cookie)->on_lost_user(user_id);
1405+}
1406+
1407+//
1408+// BodyTracker
1409+//
1410+BodyTracker::BodyTracker()
1411+ : m_require_pose(false),
1412+ m_draw_background(true),
1413+ m_max_humans(DEFAULT_MAX_HUMANS),
1414+ m_human_number_offset(0),
1415+ m_openni_initialized(false),
1416+ m_draw_depth_map(true)
1417+{
1418+ memset(m_pose_name, 0, sizeof(m_pose_name));
1419+ memset(m_humans, 0, sizeof(m_humans));
1420+
1421+m_draw_background = false;
1422+
1423+ m_openni_initialized = init_openni();
1424+}
1425+
1426+bool BodyTracker::init_openni()
1427+{
1428+ XnCallbackHandle hUserCallbacks, hCalibrationCallbacks, hPoseCallbacks;
1429+ XnStatus nRetVal = XN_STATUS_OK;
1430+
1431+ nRetVal = m_openni_context.InitFromXmlFile(XML_PATH);
1432+ if(nRetVal != XN_STATUS_OK) {
1433+ printf("body-tracker: init from config file (%s) failed (error %d).\n", XML_PATH, nRetVal);
1434+ }
1435+
1436+ // Depth Generator
1437+ nRetVal = m_openni_context.FindExistingNode(XN_NODE_TYPE_DEPTH, m_openni_depth_generator);
1438+
1439+ // User Generator
1440+ nRetVal = m_openni_context.FindExistingNode(XN_NODE_TYPE_USER, m_openni_user_generator);
1441+ if(nRetVal != XN_STATUS_OK) {
1442+ nRetVal = m_openni_user_generator.Create(m_openni_context);
1443+ }
1444+
1445+ // Check capabilities
1446+ if(!m_openni_user_generator.IsCapabilitySupported(XN_CAPABILITY_SKELETON)) {
1447+ printf("body-tracker: no Kinect found or incomplete OpenNI+NITE configuration, please see README file.\n");
1448+ return false;
1449+ }
1450+
1451+ m_openni_user_generator.RegisterUserCallbacks(callback_on_new_user, callback_on_lost_user, this, hUserCallbacks);
1452+ m_openni_user_generator.GetSkeletonCap().RegisterCalibrationCallbacks(callback_on_calibration_start, callback_on_calibration_end, this, hCalibrationCallbacks);
1453+
1454+ if(m_openni_user_generator.GetSkeletonCap().NeedPoseForCalibration()) {
1455+ m_require_pose = TRUE;
1456+ if(!m_openni_user_generator.IsCapabilitySupported(XN_CAPABILITY_POSE_DETECTION)) {
1457+ printf("body-tracker: user skeleton pose required, but not supported!\n");
1458+ return false;
1459+ }
1460+ m_openni_user_generator.GetPoseDetectionCap().RegisterToPoseCallbacks(callback_on_pose_detected, NULL, this, hPoseCallbacks);
1461+ m_openni_user_generator.GetSkeletonCap().GetCalibrationPose(m_pose_name);
1462+ }
1463+
1464+ m_openni_user_generator.GetSkeletonCap().SetSkeletonProfile(XN_SKEL_PROFILE_ALL);
1465+
1466+ nRetVal = m_openni_context.StartGeneratingAll();
1467+
1468+ return true;
1469+}
1470+
1471+//
1472+// UserID => Human mapping
1473+//
1474+THuman* BodyTracker::user_id_to_human(XnUserID user_id)
1475+{
1476+ return &m_humans[user_id-1];
1477+}
1478+
1479+uint BodyTracker::user_id_to_human_number(XnUserID user_id)
1480+{
1481+ THuman* human = user_id_to_human(user_id);
1482+ return(human ? human->human_number : 0);
1483+}
1484+
1485+XnUserID BodyTracker::human_number_to_user_id(uint human_number)
1486+{
1487+ for(int id=1 ; id <= MAX_USERS_TRACKED ; id++) {
1488+ if(user_id_to_human_number(id) == human_number)
1489+ return id;
1490+ }
1491+ return 0;
1492+}
1493+
1494+void BodyTracker::set_human_number_for_user_id(XnUserID id, uint human_number)
1495+{
1496+ THuman* human = user_id_to_human(id);
1497+ if(human->human_number != 0) { // TODO: and number of active humans is < max number
1498+ reassign_human_number(human->human_number);
1499+ }
1500+ memset(human, 0, sizeof(THuman));
1501+ human->human_number = human_number;
1502+}
1503+
1504+uint BodyTracker::next_human_number()
1505+{
1506+ // Look for free numbers, favoring low numbers
1507+ for(int number=1 ; number <= get_max_humans() ; number++) {
1508+ if(human_number_to_user_id(number) == 0) {
1509+ return number;
1510+ }
1511+ }
1512+ return 0;
1513+}
1514+
1515+void BodyTracker::reassign_human_number(uint human_number)
1516+{
1517+ XnUserID user_id_array[MAX_USERS_TRACKED];
1518+ XnUInt16 num_users = MAX_USERS_TRACKED;
1519+ m_openni_user_generator.GetUsers(user_id_array, num_users); // NOTE: sets num_users to number of active users
1520+
1521+ for(int i=0 ; i<num_users ; i++) {
1522+ XnUserID user_id = user_id_array[i];
1523+ if(m_openni_user_generator.GetSkeletonCap().IsTracking(user_id) && user_id_to_human_number(user_id) == 0) {
1524+ printf("body-tracker: reassigning human %d to user %d\n", human_number, user_id);
1525+ set_human_number_for_user_id(user_id, human_number);
1526+
1527+ printf("Human %02d / Tracked = %d\n", human_number, 1);
1528+ char address_buffer[ADDRESS_BUFFER_SIZE+1];
1529+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Tracked", human_number);
1530+ g_message_bus->send_int(address_buffer, 1);
1531+
1532+ return;
1533+ }
1534+ }
1535+}
1536+
1537+//
1538+// BodyTracker Callbacks
1539+//
1540+void BodyTracker::on_new_user(XnUserID user_id)
1541+{
1542+ printf("body-tracker: new user %d\n", user_id);
1543+
1544+ if(m_require_pose) {
1545+ m_openni_user_generator.GetPoseDetectionCap().StartPoseDetection(m_pose_name, user_id);
1546+ }
1547+ else {
1548+ m_openni_user_generator.GetSkeletonCap().RequestCalibration(user_id, TRUE);
1549+ }
1550+}
1551+
1552+void BodyTracker::on_pose_detected(XnUserID user_id)
1553+{
1554+ printf("body-tracker: pose detected for user %d\n", user_id);
1555+ m_openni_user_generator.GetPoseDetectionCap().StopPoseDetection(user_id);
1556+ m_openni_user_generator.GetSkeletonCap().RequestCalibration(user_id, TRUE);
1557+}
1558+
1559+void BodyTracker::on_calibration_start(XnUserID user_id)
1560+{
1561+ printf("body-tracker: calibration started for user %d\n", user_id);
1562+}
1563+
1564+void BodyTracker::on_calibration_end(XnUserID user_id, bool success)
1565+{
1566+ if(success) {
1567+ uint human_number = next_human_number();
1568+
1569+ if(human_number == 0) {
1570+ printf("body-tracker: tracking user %d, awaiting free human number\n", user_id);
1571+ }
1572+ else {
1573+ set_human_number_for_user_id(user_id, human_number);
1574+
1575+ printf("body-tracker: calibration complete, start tracking user %d, human %d\n", user_id, human_number);
1576+
1577+ // Send Tracked = 1
1578+ printf("Human %02d / Tracked = %d\n", human_number, 1);
1579+ char address_buffer[ADDRESS_BUFFER_SIZE+1];
1580+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Tracked", human_number);
1581+ g_message_bus->send_int(address_buffer, 1);
1582+ }
1583+
1584+ // Either way, keep track of them (might assign a human number later)
1585+ m_openni_user_generator.GetSkeletonCap().StartTracking(user_id);
1586+ }
1587+ else {
1588+ printf("body-tracker: calibration failed for user %d, retrying...\n", user_id);
1589+
1590+ if(m_require_pose) {
1591+ m_openni_user_generator.GetPoseDetectionCap().StartPoseDetection(m_pose_name, user_id);
1592+ }
1593+ else {
1594+ m_openni_user_generator.GetSkeletonCap().RequestCalibration(user_id, TRUE);
1595+ }
1596+ }
1597+}
1598+
1599+void BodyTracker::on_lost_user(XnUserID user_id)
1600+{
1601+ uint human_number = user_id_to_human_number(user_id);
1602+ printf("body-tracker: lost user %d, human %d\n", user_id, human_number);
1603+
1604+ if(human_number > 0) {
1605+ // Send Tracked = 0
1606+ printf("Human %02d / Tracked = %d\n", human_number, 0);
1607+ char address_buffer[ADDRESS_BUFFER_SIZE+1];
1608+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Tracked", human_number);
1609+ g_message_bus->send_int(address_buffer, 0);
1610+ }
1611+
1612+ set_human_number_for_user_id(user_id, 0);
1613+}
1614+
1615+//
1616+// Update
1617+//
1618+void BodyTracker::update()
1619+{
1620+ if(!is_openni_initialized())
1621+ return;
1622+
1623+ // Read next available data
1624+ m_openni_context.WaitAndUpdateAll();
1625+}
1626+
1627+//
1628+// Draw
1629+//
1630+void BodyTracker::draw()
1631+{
1632+ glMatrixMode(GL_PROJECTION);
1633+ glLoadIdentity();
1634+
1635+ if(!is_openni_initialized()) {
1636+ glClearColor(UNINITIALIZED_BACKGROUND_COLOR);
1637+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
1638+ return;
1639+ }
1640+
1641+ glClearColor(BACKGROUND_COLOR);
1642+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
1643+
1644+ xn::SceneMetaData sceneMD;
1645+ xn::DepthMetaData depthMD;
1646+
1647+ m_openni_depth_generator.GetMetaData(depthMD);
1648+ glOrtho(0, depthMD.XRes(), depthMD.YRes(), 0, -1.0, 1.0);
1649+
1650+ glDisable(GL_TEXTURE_2D);
1651+
1652+ //
1653+ // Depth Map
1654+ //
1655+ if(m_draw_depth_map) {
1656+ m_openni_depth_generator.GetMetaData(depthMD);
1657+ m_openni_user_generator.GetUserPixels(0, sceneMD);
1658+ openni_draw_depth_map(depthMD, sceneMD);
1659+ }
1660+ //
1661+ // Skeletons
1662+ //
1663+ openni_draw_skeletons();
1664+}
1665+
1666+//
1667+// Drawing
1668+//
1669+void BodyTracker::openni_draw_rectangle(float top_left_x, float top_left_y, float bottom_right_x, float bottom_right_y)
1670+{
1671+ GLfloat verts[8] = {
1672+ top_left_x, top_left_y,
1673+ top_left_x, bottom_right_y,
1674+ bottom_right_x, bottom_right_y,
1675+ bottom_right_x, top_left_y
1676+ };
1677+ glVertexPointer(2, GL_FLOAT, 0, verts);
1678+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
1679+
1680+ glFlush(); // TODO: this is from boilerplate code, do we need it?
1681+}
1682+
1683+void BodyTracker::openni_draw_texture(float top_left_x, float top_left_y, float bottom_right_x, float bottom_right_y)
1684+{
1685+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
1686+ glTexCoordPointer(2, GL_FLOAT, 0, m_depth_texcoords);
1687+ openni_draw_rectangle(top_left_x, top_left_y, bottom_right_x, bottom_right_y);
1688+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
1689+}
1690+
1691+void BodyTracker::openni_draw_joint(XnUserID user_id, XnSkeletonJoint eJoint, float fSize)
1692+{
1693+ XnSkeletonJointPosition joint;
1694+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, eJoint, joint);
1695+
1696+ if(joint.fConfidence < 0.5) {
1697+ return;
1698+ }
1699+
1700+ XnPoint3D pt[1];
1701+ pt[0] = joint.position;
1702+ m_openni_depth_generator.ConvertRealWorldToProjective(2, pt, pt);
1703+ draw_circle(pt[0].X, pt[0].Y, fSize);
1704+}
1705+
1706+bool BodyTracker::openni_draw_limb(XnUserID user_id, XnSkeletonJoint eJoint1, XnSkeletonJoint eJoint2)
1707+{
1708+ XnSkeletonJointPosition joint1, joint2;
1709+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, eJoint1, joint1);
1710+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, eJoint2, joint2);
1711+
1712+ if(joint1.fConfidence < 0.5 || joint2.fConfidence < 0.5) {
1713+ return false;
1714+ }
1715+
1716+ XnPoint3D pt[2];
1717+ pt[0] = joint1.position;
1718+ pt[1] = joint2.position;
1719+
1720+ m_openni_depth_generator.ConvertRealWorldToProjective(2, pt, pt);
1721+ glVertex3i(pt[0].X, pt[0].Y, 0);
1722+ glVertex3i(pt[1].X, pt[1].Y, 0);
1723+ return true;
1724+}
1725+
1726+void BodyTracker::openni_draw_depth_map(const xn::DepthMetaData& dmd, const xn::SceneMetaData& smd)
1727+{
1728+ static bool bInitialized = false;
1729+ static GLuint depthTexID;
1730+ static unsigned char* pDepthTexBuf;
1731+ static int texWidth, texHeight;
1732+
1733+ float topLeftX;
1734+ float topLeftY;
1735+ float bottomRightY;
1736+ float bottomRightX;
1737+ float texXpos;
1738+ float texYpos;
1739+
1740+ if(!bInitialized) {
1741+ texWidth = get_closest_power_of_two(dmd.XRes());
1742+ texHeight = get_closest_power_of_two(dmd.YRes());
1743+ depthTexID = init_texture((void**)&pDepthTexBuf,texWidth, texHeight) ;
1744+
1745+ bInitialized = true;
1746+
1747+ topLeftX = dmd.XRes();
1748+ topLeftY = 0;
1749+ bottomRightY = dmd.YRes();
1750+ bottomRightX = 0;
1751+ texXpos =(float)dmd.XRes()/texWidth;
1752+ texYpos =(float)dmd.YRes()/texHeight;
1753+
1754+ memset(m_depth_texcoords, 0, 8*sizeof(float));
1755+ m_depth_texcoords[0] = texXpos, m_depth_texcoords[1] = texYpos, m_depth_texcoords[2] = texXpos, m_depth_texcoords[7] = texYpos;
1756+ }
1757+
1758+ unsigned int nDepthValue = 0;
1759+ unsigned int nHistValue = 0;
1760+ unsigned int nIndex = 0;
1761+ unsigned int nX = 0;
1762+ unsigned int nY = 0;
1763+ unsigned int nNumberOfPoints = 0;
1764+ XnUInt16 nXRes = dmd.XRes();
1765+ XnUInt16 nYRes = dmd.YRes();
1766+
1767+ unsigned char* pDestImage = pDepthTexBuf;
1768+
1769+ const XnDepthPixel* pDepth = dmd.Data();
1770+ const XnLabel* pLabels = smd.Data();
1771+
1772+ // Calculate the accumulative histogram
1773+ memset(m_depth_histogram, 0, MAX_DEPTH*sizeof(float));
1774+
1775+ for(nY=0 ; nY<nYRes ; nY++) {
1776+ for(nX=0 ; nX<nXRes ; nX++) {
1777+ nDepthValue = *pDepth;
1778+
1779+ if(nDepthValue != 0) {
1780+ m_depth_histogram[nDepthValue]++;
1781+ nNumberOfPoints++;
1782+ }
1783+ pDepth++;
1784+ }
1785+ }
1786+
1787+ for(nIndex=1 ; nIndex<MAX_DEPTH ; nIndex++) {
1788+ m_depth_histogram[nIndex] += m_depth_histogram[nIndex-1];
1789+ }
1790+
1791+ if(nNumberOfPoints > 0) {
1792+ for(nIndex=1 ; nIndex<MAX_DEPTH ; nIndex++) {
1793+ m_depth_histogram[nIndex] = (unsigned int)(256 * (1.0f - (m_depth_histogram[nIndex] / (float)nNumberOfPoints)));
1794+ }
1795+ }
1796+
1797+ pDepth = dmd.Data();
1798+
1799+ //
1800+ // Create a texture map of humans in their colors
1801+ //
1802+ for(nY=0 ; nY<nYRes ; nY++) {
1803+ for(nX=0 ; nX<nXRes ; nX++, nIndex++) {
1804+ pDestImage[0] = 0;
1805+ pDestImage[1] = 0;
1806+ pDestImage[2] = 0;
1807+
1808+ XnLabel user_id = *pLabels;
1809+
1810+ if(user_id != 0) {
1811+ nDepthValue = *pDepth;
1812+
1813+ uint color_index = user_id_to_human_number(user_id); // % NUM_HUMAN_COLORS;
1814+
1815+ nHistValue = m_depth_histogram[nDepthValue];
1816+ pDestImage[0] = nHistValue * HUMAN_COLORS[color_index][0];
1817+ pDestImage[1] = nHistValue * HUMAN_COLORS[color_index][1];
1818+ pDestImage[2] = nHistValue * HUMAN_COLORS[color_index][2];
1819+ }
1820+ else if(m_draw_background) {
1821+ if(nDepthValue != 0) {
1822+ nHistValue = m_depth_histogram[nDepthValue];
1823+ pDestImage[0] = nHistValue; // * HUMAN_COLORS[color_index][0];
1824+ pDestImage[1] = nHistValue; // * HUMAN_COLORS[color_index][1];
1825+ pDestImage[2] = nHistValue; // * HUMAN_COLORS[color_index][2];
1826+ }
1827+ }
1828+ pDepth++;
1829+ pLabels++;
1830+ pDestImage += 3;
1831+ }
1832+ pDestImage += (texWidth - nXRes) * 3;
1833+ }
1834+
1835+ glBindTexture(GL_TEXTURE_2D, depthTexID);
1836+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, texWidth, texHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, pDepthTexBuf);
1837+
1838+ // Display the OpenGL texture map
1839+ //glColor4f(0.75, 0.75, 0.75, 1.0);
1840+ //glColor4f(0.8, 1.0, 0.8, 1.0);
1841+
1842+ glEnable(GL_TEXTURE_2D);
1843+ openni_draw_texture(dmd.XRes(), dmd.YRes(), 0, 0);
1844+ glDisable(GL_TEXTURE_2D);
1845+}
1846+
1847+void BodyTracker::openni_draw_skeletons()
1848+{
1849+ XnUserID user_id_array[MAX_USERS_TRACKED];
1850+ XnUInt16 num_users = MAX_USERS_TRACKED;
1851+ m_openni_user_generator.GetUsers(user_id_array, num_users); // NOTE: sets num_users to number of active users
1852+
1853+ for(int i=0 ; i<num_users ; i++) {
1854+ XnUserID user_id = user_id_array[i];
1855+ bool is_tracking = m_openni_user_generator.GetSkeletonCap().IsTracking(user_id);
1856+
1857+ //
1858+ // Print ID / status for this user
1859+ //
1860+ if(!is_tracking) {
1861+ XnPoint3D center_of_mass;
1862+ m_openni_user_generator.GetCoM(user_id, center_of_mass);
1863+ m_openni_depth_generator.ConvertRealWorldToProjective(1, &center_of_mass, &center_of_mass);
1864+
1865+ char label[50] = "";
1866+ xnOSMemSet(label, 0, sizeof(label));
1867+ if(m_openni_user_generator.GetSkeletonCap().IsCalibrating(user_id)) {
1868+ sprintf(label, "%d - Calibrating...", user_id);
1869+ }
1870+ else {
1871+ sprintf(label, "%d - Looking for pose...", user_id);
1872+ }
1873+ glColor4f(1.0,1.0,1.0,1.0);
1874+ glRasterPos2i(center_of_mass.X, center_of_mass.Y - 50);
1875+ draw_string(GLUT_BITMAP_TIMES_ROMAN_24, label);
1876+
1877+ continue; // Nothing more to draw for this user.
1878+ }
1879+
1880+ //
1881+ // Choose color by human number
1882+ //
1883+ uint human_number = user_id_to_human_number(user_id);
1884+ human_number += m_human_number_offset;
1885+ glColor4f(HUMAN_COLORS[human_number][0], HUMAN_COLORS[human_number][1], HUMAN_COLORS[human_number][2], HUMAN_COLORS[human_number][3]);
1886+
1887+ //
1888+ // Draw Skeleton
1889+ //
1890+ glLineWidth(16);
1891+
1892+ glBegin(GL_LINES);
1893+ // Head & Shoulders (...)
1894+ openni_draw_limb(user_id, XN_SKEL_HEAD, XN_SKEL_NECK);
1895+ openni_draw_limb(user_id, XN_SKEL_NECK, XN_SKEL_LEFT_SHOULDER);
1896+ openni_draw_limb(user_id, XN_SKEL_NECK, XN_SKEL_RIGHT_SHOULDER);
1897+
1898+ // Left Arm
1899+ openni_draw_limb(user_id, XN_SKEL_LEFT_SHOULDER, XN_SKEL_LEFT_ELBOW);
1900+ openni_draw_limb(user_id, XN_SKEL_LEFT_ELBOW, XN_SKEL_LEFT_HAND);
1901+
1902+ // Right Arm
1903+ openni_draw_limb(user_id, XN_SKEL_RIGHT_SHOULDER, XN_SKEL_RIGHT_ELBOW);
1904+ openni_draw_limb(user_id, XN_SKEL_RIGHT_ELBOW, XN_SKEL_RIGHT_HAND);
1905+
1906+ // Cross Torso
1907+ openni_draw_limb(user_id, XN_SKEL_LEFT_SHOULDER, XN_SKEL_TORSO);
1908+ openni_draw_limb(user_id, XN_SKEL_RIGHT_SHOULDER, XN_SKEL_TORSO);
1909+ openni_draw_limb(user_id, XN_SKEL_TORSO, XN_SKEL_LEFT_HIP);
1910+ openni_draw_limb(user_id, XN_SKEL_TORSO, XN_SKEL_RIGHT_HIP);
1911+
1912+ // Belt
1913+ openni_draw_limb(user_id, XN_SKEL_LEFT_HIP, XN_SKEL_RIGHT_HIP);
1914+
1915+ // Left Leg
1916+ openni_draw_limb(user_id, XN_SKEL_LEFT_HIP, XN_SKEL_LEFT_KNEE);
1917+ openni_draw_limb(user_id, XN_SKEL_LEFT_KNEE, XN_SKEL_LEFT_FOOT);
1918+
1919+ // Right Leg
1920+ openni_draw_limb(user_id, XN_SKEL_RIGHT_HIP, XN_SKEL_RIGHT_KNEE);
1921+ openni_draw_limb(user_id, XN_SKEL_RIGHT_KNEE, XN_SKEL_RIGHT_FOOT);
1922+ glEnd();
1923+
1924+ //
1925+ // Joint Dots
1926+ //
1927+ glColor4f(HUMAN_COLORS[human_number][0], HUMAN_COLORS[human_number][1], HUMAN_COLORS[human_number][2], 1.0);
1928+
1929+ openni_draw_joint(user_id, XN_SKEL_LEFT_SHOULDER, 4.0);
1930+ openni_draw_joint(user_id, XN_SKEL_RIGHT_SHOULDER, 4.0);
1931+ openni_draw_joint(user_id, XN_SKEL_LEFT_HIP, 4.0);
1932+ openni_draw_joint(user_id, XN_SKEL_RIGHT_HIP, 4.0);
1933+
1934+ glColor4f(0.5 + HUMAN_COLORS[human_number][0], 0.5 + HUMAN_COLORS[human_number][1], 0.5 + HUMAN_COLORS[human_number][2], HUMAN_COLORS[human_number][3]);
1935+
1936+ openni_draw_joint(user_id, XN_SKEL_HEAD, 7.0);
1937+ openni_draw_joint(user_id, XN_SKEL_LEFT_ELBOW, 7.0);
1938+ openni_draw_joint(user_id, XN_SKEL_LEFT_HAND, 7.0);
1939+ openni_draw_joint(user_id, XN_SKEL_RIGHT_ELBOW, 7.0);
1940+ openni_draw_joint(user_id, XN_SKEL_RIGHT_HAND, 7.0);
1941+ openni_draw_joint(user_id, XN_SKEL_TORSO, 7.0);
1942+ openni_draw_joint(user_id, XN_SKEL_LEFT_KNEE, 7.0);
1943+ openni_draw_joint(user_id, XN_SKEL_LEFT_FOOT, 7.0);
1944+ openni_draw_joint(user_id, XN_SKEL_RIGHT_KNEE, 7.0);
1945+ openni_draw_joint(user_id, XN_SKEL_RIGHT_FOOT, 7.0);
1946+ }
1947+}
1948+
1949+//
1950+// Send OSC
1951+//
1952+void BodyTracker::send()
1953+{
1954+ if(!is_openni_initialized())
1955+ return;
1956+
1957+ XnUserID user_id_array[MAX_USERS_TRACKED];
1958+ XnUInt16 num_users = MAX_USERS_TRACKED;
1959+ m_openni_user_generator.GetUsers(user_id_array, num_users);
1960+
1961+ char address_buffer[ADDRESS_BUFFER_SIZE+1];
1962+
1963+ for(int i=0 ; i<num_users ; i++) {
1964+ XnUserID user_id = user_id_array[i];
1965+ THuman* human = user_id_to_human(user_id);
1966+
1967+ if(!m_openni_user_generator.GetSkeletonCap().IsTracking(user_id)) {
1968+ continue;
1969+ }
1970+
1971+ uint human_number = user_id_to_human_number(user_id);
1972+ human_number += m_human_number_offset;
1973+
1974+ if(human_number == 0)
1975+ continue;
1976+
1977+ // HACK: Send Tracked = 1
1978+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Tracked", human_number);
1979+ g_message_bus->send_int(address_buffer, 1);
1980+
1981+ XnSkeletonJointPosition joint, joint2, joint3;
1982+
1983+ //
1984+ // Get main pivot points
1985+ //
1986+ XnSkeletonJointPosition left_shoulder, right_shoulder;
1987+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_SHOULDER, left_shoulder);
1988+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_SHOULDER, right_shoulder);
1989+
1990+ XnSkeletonJointPosition left_hip, right_hip;
1991+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_HIP, left_hip);
1992+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_HIP, right_hip);
1993+
1994+
1995+ // Head (absolute value-- for head tracking)
1996+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_HEAD, joint);
1997+ if(joint.fConfidence > 0.5) {
1998+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Head / X", human_number);
1999+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X, &m_limits_stage.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2000+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Head / Y", human_number);
2001+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y, &m_limits_stage.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2002+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Head / Z", human_number);
2003+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z, &m_limits_stage.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2004+ }
2005+
2006+ // Torso (absolute value-- the user's general position)
2007+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_TORSO, joint);
2008+ if(joint.fConfidence > 0.5) {
2009+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / X", human_number);
2010+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X, &m_limits_stage.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2011+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Y", human_number);
2012+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y, &m_limits_stage.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2013+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Z", human_number);
2014+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z, &m_limits_stage.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2015+ }
2016+
2017+ // Left Elbow (relative to left shoulder)
2018+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_ELBOW, joint);
2019+ if(joint.fConfidence > 0.5) {
2020+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Elbow / X", human_number);
2021+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - left_shoulder.position.X, &human->limits_left_elbow.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2022+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Elbow / Y", human_number);
2023+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - left_shoulder.position.Y, &human->limits_left_elbow.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2024+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Elbow / Z", human_number);
2025+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - left_shoulder.position.Z, &human->limits_left_elbow.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2026+ }
2027+
2028+ // Left Hand (relative to left shoulder)
2029+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_HAND, joint);
2030+ //printf("left hand: %f, %f, %f\n", joint.position.X, joint.position.Y, joint.position.Z);
2031+
2032+ if(joint.fConfidence > 0.5) {
2033+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Hand / X", human_number);
2034+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - left_shoulder.position.X, &human->limits_left_hand.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2035+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Hand / Y", human_number);
2036+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - left_shoulder.position.Y, &human->limits_left_hand.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2037+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Hand / Z", human_number);
2038+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - left_shoulder.position.Z, &human->limits_left_hand.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2039+ }
2040+
2041+ // Right Elbow (relative to right shoulder)
2042+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_ELBOW, joint);
2043+ if(joint.fConfidence > 0.5) {
2044+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Elbow / X", human_number);
2045+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - right_shoulder.position.X, &human->limits_right_elbow.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2046+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Elbow / Y", human_number);
2047+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - right_shoulder.position.Y, &human->limits_right_elbow.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2048+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Elbow / Z", human_number);
2049+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - right_shoulder.position.Z, &human->limits_right_elbow.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2050+ }
2051+
2052+ // Right Hand (relative to right shoulder)
2053+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_HAND, joint);
2054+ if(joint.fConfidence > 0.5) {
2055+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Hand / X", human_number);
2056+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - right_shoulder.position.X, &human->limits_right_hand.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2057+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Hand / Y", human_number);
2058+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - right_shoulder.position.Y, &human->limits_right_hand.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2059+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Hand / Z", human_number);
2060+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - right_shoulder.position.Z, &human->limits_right_hand.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2061+ }
2062+
2063+ // Left Knee (relative to left hip)
2064+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_KNEE, joint);
2065+ if(joint.fConfidence > 0.5) {
2066+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Knee / X", human_number);
2067+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - left_hip.position.X, &human->limits_left_knee.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2068+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Knee / Y", human_number);
2069+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - left_hip.position.Y, &human->limits_left_knee.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2070+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Knee / Z", human_number);
2071+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - left_hip.position.Z, &human->limits_left_knee.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2072+ }
2073+
2074+ // Left Foot (relative to left hip)
2075+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_FOOT, joint);
2076+ if(joint.fConfidence > 0.5) {
2077+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Foot / X", human_number);
2078+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - left_hip.position.X, &human->limits_left_foot.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2079+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Foot / Y", human_number);
2080+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - left_hip.position.Y, &human->limits_left_foot.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2081+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Foot / Z", human_number);
2082+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - left_hip.position.Z, &human->limits_left_foot.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2083+ }
2084+
2085+ // Right Knee (relative to right hip)
2086+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_KNEE, joint);
2087+ if(joint.fConfidence > 0.5) {
2088+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Knee / X", human_number);
2089+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - right_hip.position.X, &human->limits_right_knee.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2090+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Knee / Y", human_number);
2091+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - right_hip.position.Y, &human->limits_right_knee.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2092+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Knee / Z", human_number);
2093+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - right_hip.position.Z, &human->limits_right_knee.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2094+ }
2095+
2096+ // Right Foot (relative to right hip)
2097+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_FOOT, joint);
2098+ if(joint.fConfidence > 0.5) {
2099+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Foot / X", human_number);
2100+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.X - right_hip.position.X, &human->limits_right_foot.x, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2101+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Foot / Y", human_number);
2102+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Y - right_hip.position.Y, &human->limits_right_foot.y, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2103+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Foot / Z", human_number);
2104+ g_message_bus->send_float(address_buffer, scale_and_expand_limits(joint.position.Z - right_hip.position.Z, &human->limits_right_foot.z, STARTING_JOINT_BOUNDING_BOX_WIDTH));
2105+ }
2106+
2107+ //
2108+ // Shoulder Angles
2109+ //
2110+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_NECK, joint);
2111+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_SHOULDER, joint2);
2112+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_ELBOW, joint3);
2113+
2114+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2115+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_left_shoulder_angle);
2116+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Shoulder / Bend", human_number);
2117+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2118+ }
2119+
2120+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_NECK, joint);
2121+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_SHOULDER, joint2);
2122+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_ELBOW, joint3);
2123+
2124+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2125+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_right_shoulder_angle);
2126+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Shoulder / Bend", human_number);
2127+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2128+ }
2129+
2130+ //
2131+ // Hip Angles
2132+ //
2133+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_TORSO, joint);
2134+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_HIP, joint2);
2135+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_KNEE, joint3);
2136+
2137+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2138+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_left_hip_angle);
2139+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Hip / Bend", human_number);
2140+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2141+ }
2142+
2143+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_TORSO, joint);
2144+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_HIP, joint2);
2145+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_KNEE, joint3);
2146+
2147+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2148+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_right_hip_angle);
2149+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Hip / Bend", human_number);
2150+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2151+ }
2152+
2153+ //
2154+ // Elbow Angles
2155+ //
2156+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_SHOULDER, joint);
2157+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_ELBOW, joint2);
2158+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_HAND, joint3);
2159+
2160+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2161+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_left_elbow_angle);
2162+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Elbow / Bend", human_number);
2163+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2164+ }
2165+
2166+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_SHOULDER, joint);
2167+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_ELBOW, joint2);
2168+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_HAND, joint3);
2169+
2170+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2171+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_right_elbow_angle);
2172+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Elbow / Bend", human_number);
2173+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2174+ }
2175+
2176+ //
2177+ // Knee Angles
2178+ //
2179+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_HIP, joint);
2180+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_KNEE, joint2);
2181+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_LEFT_FOOT, joint3);
2182+
2183+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2184+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_left_knee_angle);
2185+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Left Knee / Bend", human_number);
2186+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2187+ }
2188+
2189+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_HIP, joint);
2190+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_KNEE, joint2);
2191+ m_openni_user_generator.GetSkeletonCap().GetSkeletonJointPosition(user_id, XN_SKEL_RIGHT_FOOT, joint3);
2192+
2193+ if(joint.fConfidence > 0.5 && joint2.fConfidence > 0.5 && joint3.fConfidence > 0.5) {
2194+ float angle_zero_to_one = scale_and_expand_limits(calculate_angle(joint.position, joint2.position, joint3.position), &human->limits_right_knee_angle);
2195+ snprintf(address_buffer, ADDRESS_BUFFER_SIZE, "Human %02d / Right Knee / Bend", human_number);
2196+ g_message_bus->send_float(address_buffer, angle_zero_to_one);
2197+ }
2198+ }
2199+}
2200+
2201+BodyTracker::~BodyTracker()
2202+{
2203+}
2204
2205=== added file 'body-tracker/body-tracker.h'
2206--- body-tracker/body-tracker.h 1970-01-01 00:00:00 +0000
2207+++ body-tracker/body-tracker.h 2011-04-03 23:46:27 +0000
2208@@ -0,0 +1,119 @@
2209+#include "utils.h"
2210+
2211+#include <XnOpenNI.h>
2212+#include <XnCodecIDs.h>
2213+#include <XnCppWrapper.h>
2214+
2215+#include "message-bus.h"
2216+
2217+#define ADDRESS_BUFFER_SIZE (1000)
2218+
2219+#define MAX_DEPTH (10000)
2220+
2221+#define MAX_USERS_TRACKED (20)
2222+
2223+//
2224+// NOTE: initializing to 0 is proper for all fields
2225+//
2226+typedef struct {
2227+ bool tracked;
2228+ uint human_number;
2229+
2230+ // Heaaaaaaaaaad, shoulders, knees and toes, knees and toes!
2231+ TLimits3
2232+ //limits_head, limits_torso,
2233+ limits_left_shoulder, limits_left_elbow, limits_left_hand,
2234+ limits_right_shoulder, limits_right_elbow, limits_right_hand,
2235+ limits_left_hip, limits_left_knee, limits_left_foot,
2236+ limits_right_hip, limits_right_knee, limits_right_foot;
2237+
2238+ TLimits
2239+ limits_left_shoulder_angle, limits_right_shoulder_angle,
2240+ limits_left_elbow_angle, limits_right_elbow_angle,
2241+ limits_left_knee_angle, limits_right_knee_angle,
2242+ limits_left_hip_angle, limits_right_hip_angle;
2243+} THuman;
2244+
2245+class BodyTracker
2246+{
2247+public:
2248+ BodyTracker();
2249+ virtual ~BodyTracker();
2250+
2251+ void update();
2252+ void draw();
2253+ void send();
2254+
2255+ //
2256+ // Callbacks
2257+ //
2258+ void on_new_user(XnUserID user_id);
2259+ void on_pose_detected(XnUserID user_id);
2260+ void on_calibration_start(XnUserID user_id);
2261+ void on_calibration_end(XnUserID user_id, bool success);
2262+ void on_lost_user(XnUserID user_id);
2263+
2264+ //
2265+ // Drawing of OpenNI data
2266+ //
2267+ void openni_draw_texture(float top_left_x, float top_left_y, float bottom_right_x, float bottom_right_y);
2268+ void openni_draw_depth_map(const xn::DepthMetaData& dmd, const xn::SceneMetaData& smd);
2269+ bool openni_draw_limb(XnUserID player, XnSkeletonJoint eJoint1, XnSkeletonJoint eJoint2);
2270+ void openni_draw_joint(XnUserID player, XnSkeletonJoint eJoint, float fSize);
2271+ void openni_draw_rectangle(float topLeftX, float topLeftY, float bottomRightX, float bottomRightY);
2272+ void openni_draw_skeletons();
2273+
2274+ uint get_max_humans() { return m_max_humans; }
2275+ void set_max_humans(uint max_humans) { m_max_humans = (max_humans <= MAX_USERS_TRACKED) ? max_humans : MAX_USERS_TRACKED; }
2276+
2277+ uint get_human_number_offset() { return m_human_number_offset; }
2278+ void set_human_number_offset(uint human_number_offset) { m_human_number_offset = human_number_offset; }
2279+
2280+ uint get_draw_depth_map() { return m_draw_depth_map; }
2281+ void set_draw_depth_map(uint draw_depth_map) { m_draw_depth_map = draw_depth_map; }
2282+
2283+ bool is_openni_initialized() { return m_openni_initialized; }
2284+
2285+private:
2286+ //
2287+ // Human Number tracking
2288+ //
2289+ uint next_human_number();
2290+ void set_human_number_for_user_id(XnUserID id, uint human_number);
2291+ uint user_id_to_human_number(XnUserID user_id);
2292+ XnUserID human_number_to_user_id(uint human_number);
2293+ THuman* user_id_to_human(XnUserID user_id);
2294+ void reassign_human_number(uint human_number);
2295+
2296+ TLimits3 m_limits_stage;
2297+
2298+ //
2299+ // OpenNI
2300+ //
2301+ bool init_openni();
2302+
2303+ xn::Context m_openni_context;
2304+ xn::DepthGenerator m_openni_depth_generator;
2305+ xn::UserGenerator m_openni_user_generator;
2306+
2307+ //
2308+ // OpenNI settings
2309+ //
2310+ XnChar m_pose_name[20];
2311+ XnBool m_require_pose;
2312+ XnBool m_draw_background;
2313+
2314+ //
2315+ // Depth Histogram
2316+ //
2317+ float m_depth_histogram[MAX_DEPTH];
2318+ GLfloat m_depth_texcoords[8];
2319+
2320+ uint m_max_humans;
2321+ THuman m_humans[MAX_USERS_TRACKED];
2322+
2323+ uint m_human_number_offset;
2324+
2325+ bool m_openni_initialized;
2326+ bool m_draw_depth_map;
2327+};
2328
2329=== added file 'body-tracker/body-tracker.rc'
2330--- body-tracker/body-tracker.rc 1970-01-01 00:00:00 +0000
2331+++ body-tracker/body-tracker.rc 2011-04-03 23:46:27 +0000
2332@@ -0,0 +1,57 @@
2333+#---------------------------------------------------------------
2334+style "common"
2335+{
2336+ GtkTreeView::vertical-padding = 0
2337+ GtkTreeView::horizontal-padding = 0
2338+
2339+ GtkTreeView::even-row-color = { 0, 0, 0 }
2340+ GtkTreeView::odd-row-color = { 0.12, 0.12, 0.12 }
2341+
2342+ fg[NORMAL] = { 0.90, 0.80, 0.80 }
2343+ fg[ACTIVE] = { 0.80, 0.80, 0.80 }
2344+ fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
2345+ fg[INSENSITIVE] = { 0.80, 0.80, 0.80 }
2346+ fg[SELECTED] = { 0.80, 0.80, 0.80 }
2347+
2348+ bg[NORMAL] = { 0.3, 0.3, 0.3 }
2349+ bg[ACTIVE] = { 0.3, 0.3, 0.3 }
2350+ bg[PRELIGHT] = { 0.4, 0.8, 0.3 }
2351+ bg[INSENSITIVE] = { 0.10, 0.10, 0.10 }
2352+ bg[SELECTED] = { 0.0, 0.0, 0.0 } #
2353+
2354+ text[NORMAL] = { 0.90, 0.90, 0.90 }
2355+ text[ACTIVE] = { 0.90, 0.90, 0.90 }
2356+ text[PRELIGHT] = { 1.0, 1.0, 1.0 }
2357+ text[INSENSITIVE] = { 0.80, 0.80, 0.80 }
2358+ text[SELECTED] = { 1.0, 1.0, 1.0 }
2359+
2360+ base[ACTIVE] = "#272a2f"
2361+ base[NORMAL] = "#1a1e20"
2362+ base[PRELIGHT] = { 0.20, 0.20, 0.20 }
2363+ base[INSENSITIVE] = "#4c5159"
2364+ base[SELECTED] = { 0.3, 0.6, 0.3 }
2365+
2366+ engine "clearlooks"
2367+ {
2368+ menubarstyle = 0 # 0 = flat, 1 = sunken, 2 = flat gradient
2369+ }
2370+}
2371+class "GtkWidget" style:highest "common"
2372+
2373+style "treeview" = "common"
2374+{
2375+ base[ACTIVE] = { 0.3, 0.4, 0.3 }
2376+}
2377+class "GtkTreeView" style:highest "treeview"
2378+
2379+style "hscale" = "common"
2380+{
2381+ bg[SELECTED] = { 0.3, 0.6, 0.3 } # This is the 'juice' an hscale has in the trough
2382+}
2383+class "GtkHScale" style:highest "hscale"
2384+
2385+style "progressbar" = "common"
2386+{
2387+ bg[SELECTED] = { 1.0, 0.6, 0.3 } # This is the 'juice' an hscale has in the trough
2388+}
2389+class "GtkProgressBar" style:highest "progressbar"
2390
2391=== added file 'body-tracker/hands.luz'
2392--- body-tracker/hands.luz 1970-01-01 00:00:00 +0000
2393+++ body-tracker/hands.luz 2011-04-03 23:46:27 +0000
2394@@ -0,0 +1,7127 @@
2395+---
2396+ :actors:
2397+ - &id091 !ruby/object:ActorRectangle
2398+ x: 0.0
2399+ y: 0.0
2400+ tags:
2401+ effects:
2402+ - !ruby/object:ActorEffectTranslateZ
2403+ conditions: !ruby/object:ChildConditions
2404+ enable_child_index: false
2405+ child_index_min: 0
2406+ child_index_max: 0
2407+ enable_event: false
2408+ event:
2409+ event_invert: false
2410+ child_index_max: 0
2411+ child_index_min: 0
2412+ enable_child_index: false
2413+ enable_event: false
2414+ event:
2415+ event_invert: false
2416+ title: Translate Z
2417+ enabled: true
2418+ amount_setting: !ruby/object:UserObjectSettingFloat
2419+ name: amount
2420+ options:
2421+ :range: !ruby/range
2422+ begin: -100.0
2423+ end: 100.0
2424+ excl: false
2425+ :default: !ruby/range
2426+ begin: 0.0
2427+ end: 1.0
2428+ excl: false
2429+ breaks_cache:
2430+ min: -100.0
2431+ max: 100.0
2432+ enter_value: 0.0
2433+ exit_value: 0.0
2434+ enable_enter_animation: false
2435+ enter_curve: &id001 !ruby/object:Curve
2436+ vector:
2437+ - 0.0
2438+ - 0.125
2439+ - 0.25
2440+ - 0.375
2441+ - 0.5
2442+ - 0.625
2443+ - 0.75
2444+ - 0.875
2445+ - 1.0
2446+ approximation:
2447+ - 0.0
2448+ - 1.0
2449+ effects: []
2450+ title: Linear
2451+ enabled: true
2452+ enable_animation: false
2453+ animation_curve: *id001
2454+ animation_min: -0.9
2455+ animation_max: 1.0
2456+ animation_repeat_number: 4
2457+ animation_repeat_unit: :beats
2458+ enable_exit_animation: false
2459+ exit_curve: *id001
2460+ enable_activation: false
2461+ activation_direction: :to
2462+ activation_curve: *id001
2463+ activation_value: 1.0
2464+ activation_variable:
2465+ - !ruby/object:ActorEffectStipple
2466+ conditions: !ruby/object:ChildConditions
2467+ enable_child_index: false
2468+ child_index_min: 0
2469+ child_index_max: 0
2470+ enable_event: false
2471+ event:
2472+ event_invert: false
2473+ child_index_max: 0
2474+ child_index_min: 0
2475+ enable_child_index: false
2476+ enable_event: false
2477+ event:
2478+ event_invert: false
2479+ title: Stipple
2480+ enabled: false
2481+ segments_setting: !ruby/object:UserObjectSettingInteger
2482+ name: segments
2483+ options:
2484+ :range: !ruby/range
2485+ begin: 1
2486+ end: 1000
2487+ excl: false
2488+ :shader: true
2489+ :default: !ruby/range
2490+ begin: 100
2491+ end: 10000
2492+ excl: false
2493+ breaks_cache:
2494+ animation_min: 80
2495+ size_setting: !ruby/object:UserObjectSettingFloat
2496+ name: size
2497+ options:
2498+ :range: !ruby/range
2499+ begin: 0.0
2500+ end: 1.0
2501+ excl: false
2502+ :shader: true
2503+ :default: !ruby/range
2504+ begin: 1.0
2505+ end: 1.0
2506+ excl: false
2507+ breaks_cache:
2508+ min: 0.0
2509+ max: 1.0
2510+ enter_value: 0.0
2511+ exit_value: 0.0
2512+ enable_enter_animation: false
2513+ enter_curve: *id001
2514+ enable_animation: false
2515+ animation_curve: *id001
2516+ animation_min: 0.722
2517+ animation_max: 1.0
2518+ animation_repeat_number: 4
2519+ animation_repeat_unit: :beats
2520+ enable_exit_animation: false
2521+ exit_curve: *id001
2522+ enable_activation: false
2523+ activation_direction: :to
2524+ activation_curve: *id001
2525+ activation_value: 1.0
2526+ activation_variable:
2527+ - !ruby/object:ActorEffectSaturate
2528+ conditions: !ruby/object:ChildConditions
2529+ enable_child_index: false
2530+ child_index_min: 0
2531+ child_index_max: 0
2532+ enable_event: false
2533+ event:
2534+ event_invert: false
2535+ child_index_max: 0
2536+ child_index_min: 0
2537+ enable_child_index: false
2538+ enable_event: false
2539+ event:
2540+ event_invert: false
2541+ title: Saturate
2542+ enabled: true
2543+ amount_setting: !ruby/object:UserObjectSettingFloat
2544+ name: amount
2545+ options:
2546+ :range: !ruby/range
2547+ begin: 0.0
2548+ end: 100.0
2549+ excl: false
2550+ :shader: true
2551+ :default: !ruby/range
2552+ begin: 1.0
2553+ end: 2.0
2554+ excl: false
2555+ breaks_cache:
2556+ min: 0.0
2557+ max: 100.0
2558+ enter_value: 0.0
2559+ exit_value: 0.0
2560+ enable_enter_animation: false
2561+ enter_curve: *id001
2562+ enable_animation: false
2563+ animation_curve: *id001
2564+ animation_min: 0.5
2565+ animation_max: 2.0
2566+ animation_repeat_number: 4
2567+ animation_repeat_unit: :beats
2568+ enable_exit_animation: false
2569+ exit_curve: *id001
2570+ enable_activation: true
2571+ activation_direction: :to
2572+ activation_curve: *id001
2573+ activation_value: 2.0
2574+ activation_variable: &id007 !ruby/object:Variable
2575+ effects:
2576+ - !ruby/object:VariableInputSlider
2577+ title: &id002 Slider
2578+ enabled: true
2579+ slider_setting: !ruby/object:UserObjectSettingSlider
2580+ slider: Human 01 / Left Hand / Y
2581+ is_inverted:
2582+ input_min: 0.5
2583+ input_max: 1.0
2584+ dead_center_size: 0.0
2585+ output_min: 0.0
2586+ output_max: 1.0
2587+ output_curve: *id001
2588+ name: &id003 slider
2589+ options: &id004
2590+
2591+ :summary: true
2592+ breaks_cache:
2593+ - !ruby/object:VariableInputSlider
2594+ title: *id002
2595+ enabled: true
2596+ slider_setting: !ruby/object:UserObjectSettingSlider
2597+ slider: Human 01 / Right Hand / Y
2598+ is_inverted:
2599+ input_min: 0.5
2600+ input_max: 1.0
2601+ dead_center_size: 0.0
2602+ output_min: 0.0
2603+ output_max: 1.0
2604+ output_curve: *id001
2605+ name: *id003
2606+ options: *id004
2607+ breaks_cache:
2608+ title: praise jebus
2609+ enabled: true
2610+ combine_method_setting: !ruby/object:UserObjectSettingSelect
2611+ selected: :product
2612+ name: &id052 combine_method
2613+ options: &id053
2614+
2615+ :options:
2616+ - - :sum
2617+ - Sum
2618+ - - :minimum
2619+ - Minimum
2620+ - - :maximum
2621+ - Maximum
2622+ - - :average
2623+ - Average
2624+ - - :product
2625+ - Multiply
2626+ :default: :sum
2627+ breaks_cache:
2628+ damper_method_setting: !ruby/object:UserObjectSettingSelect
2629+ selected: :none
2630+ name: &id054 damper_method
2631+ options: &id055
2632+
2633+ :options:
2634+ - - :none
2635+ - None
2636+ - - :very_low
2637+ - Very Low
2638+ - - :low
2639+ - Low
2640+ - - :medium
2641+ - Medium
2642+ - - :high
2643+ - High
2644+ - - :very_high
2645+ - Very High
2646+ :default: :none
2647+ breaks_cache:
2648+ - !ruby/object:ActorEffectPixelWarpHorizontal
2649+ conditions: !ruby/object:ChildConditions
2650+ enable_child_index: false
2651+ child_index_min: 0
2652+ child_index_max: 0
2653+ enable_event: false
2654+ event:
2655+ event_invert: false
2656+ child_index_max: 0
2657+ child_index_min: 0
2658+ enable_child_index: false
2659+ enable_event: false
2660+ event:
2661+ event_invert: false
2662+ title: Pixel Warp Horizontal
2663+ enabled: true
2664+ amount_setting: !ruby/object:UserObjectSettingFloat
2665+ name: amount
2666+ options:
2667+ :range: &id005 !ruby/range
2668+ begin: -1000.0
2669+ end: 1000.0
2670+ excl: false
2671+ :shader: true
2672+ :default: !ruby/range
2673+ begin: 0.0
2674+ end: 1.0
2675+ excl: false
2676+ breaks_cache:
2677+ min: -1000.0
2678+ max: 1000.0
2679+ enter_value: 0.0
2680+ exit_value: 0.0
2681+ enable_enter_animation: false
2682+ enter_curve: *id001
2683+ enable_animation: false
2684+ animation_curve: &id006 !ruby/object:Curve
2685+ vector:
2686+ - 0.0
2687+ - 0.0912469774484634
2688+ - 0.470689117908478
2689+ - 0.861580848693848
2690+ - 1.0
2691+ - 0.850959658622742
2692+ - 0.449575871229172
2693+ - 0.0877451002597809
2694+ - 0.0
2695+ approximation:
2696+ - 0.0
2697+ - 0.000754420470912009
2698+ - 0.00153714104089886
2699+ - 0.00237646163441241
2700+ - 0.00330068240873516
2701+ - 0.00433810334652662
2702+ - 0.00551702454686165
2703+ - 0.00686574634164572
2704+ - 0.0084125678986311
2705+ - 0.0101857902482152
2706+ - 0.0122137134894729
2707+ - 0.0145246367901564
2708+ - 0.0171468611806631
2709+ - 0.0201086848974228
2710+ - 0.0234384089708328
2711+ - 0.0271643362939358
2712+ - 0.0313147604465485
2713+ - 0.0359179899096489
2714+ - 0.0410023182630539
2715+ - 0.0465960465371609
2716+ - 0.0527274757623672
2717+ - 0.0594249069690704
2718+ - 0.0667166411876678
2719+ - 0.0746309757232666
2720+ - 0.0831962078809738
2721+ - 0.0924406349658966
2722+ - 0.102380022406578
2723+ - 0.112992152571678
2724+ - 0.124247647821903
2725+ - 0.136117145419121
2726+ - 0.148571252822876
2727+ - 0.161580592393875
2728+ - 0.175115793943405
2729+ - 0.189147487282753
2730+ - 0.203646287322044
2731+ - 0.218582808971405
2732+ - 0.233927682042122
2733+ - 0.249651521444321
2734+ - 0.265724986791611
2735+ - 0.282118648290634
2736+ - 0.298803150653839
2737+ - 0.315749108791351
2738+ - 0.332927167415619
2739+ - 0.350307941436768
2740+ - 0.367862045764923
2741+ - 0.385560095310211
2742+ - 0.40337273478508
2743+ - 0.421270579099655
2744+ - 0.439224243164062
2745+ - 0.457204341888428
2746+ - 0.475181549787521
2747+ - 0.493129342794418
2748+ - 0.511027991771698
2749+ - 0.528858721256256
2750+ - 0.546602606773376
2751+ - 0.5642409324646
2752+ - 0.581754863262177
2753+ - 0.599125623703003
2754+ - 0.616334319114685
2755+ - 0.633362174034119
2756+ - 0.650190412998199
2757+ - 0.666800200939178
2758+ - 0.683172702789307
2759+ - 0.699289083480835
2760+ - 0.715130627155304
2761+ - 0.73067843914032
2762+ - 0.745913743972778
2763+ - 0.76081770658493
2764+ - 0.775371551513672
2765+ - 0.789556443691254
2766+ - 0.803353548049927
2767+ - 0.816744089126587
2768+ - 0.829709231853485
2769+ - 0.842230200767517
2770+ - 0.854288101196289
2771+ - 0.865864336490631
2772+ - 0.876946985721588
2773+ - 0.887537002563477
2774+ - 0.897636294364929
2775+ - 0.907247066497803
2776+ - 0.916371285915375
2777+ - 0.925011098384857
2778+ - 0.933168590068817
2779+ - 0.940845787525177
2780+ - 0.948044776916504
2781+ - 0.954767644405365
2782+ - 0.961016416549683
2783+ - 0.966793239116669
2784+ - 0.972100138664246
2785+ - 0.97693920135498
2786+ - 0.981312453746796
2787+ - 0.985222101211548
2788+ - 0.98867005109787
2789+ - 0.991658508777618
2790+ - 0.994189500808716
2791+ - 0.996265053749084
2792+ - 0.997887313365936
2793+ - 0.999058306217194
2794+ - 0.999780178070068
2795+ - 1.0
2796+ - 1.0
2797+ - 0.999269127845764
2798+ - 0.998205959796906
2799+ - 0.996691882610321
2800+ - 0.994724035263062
2801+ - 0.992299437522888
2802+ - 0.989415049552917
2803+ - 0.986067891120911
2804+ - 0.982254981994629
2805+ - 0.977973341941833
2806+ - 0.973219931125641
2807+ - 0.967991888523102
2808+ - 0.962286114692688
2809+ - 0.956099629402161
2810+ - 0.949429512023926
2811+ - 0.9422727227211
2812+ - 0.934626281261444
2813+ - 0.92648720741272
2814+ - 0.917852580547333
2815+ - 0.908719301223755
2816+ - 0.899084389209747
2817+ - 0.888944983482361
2818+ - 0.878297984600067
2819+ - 0.867140412330627
2820+ - 0.855469286441803
2821+ - 0.843283295631409
2822+ - 0.830596745014191
2823+ - 0.817432820796967
2824+ - 0.803814649581909
2825+ - 0.789765417575836
2826+ - 0.7753084897995
2827+ - 0.760466933250427
2828+ - 0.745263993740082
2829+ - 0.729722857475281
2830+ - 0.713866829872131
2831+ - 0.697719097137451
2832+ - 0.681302785873413
2833+ - 0.664641201496124
2834+ - 0.647757470607758
2835+ - 0.63067489862442
2836+ - 0.613416612148285
2837+ - 0.596005856990814
2838+ - 0.57846587896347
2839+ - 0.560819864273071
2840+ - 0.543090999126434
2841+ - 0.525302529335022
2842+ - 0.507477641105652
2843+ - 0.489639550447464
2844+ - 0.471811503171921
2845+ - 0.45401668548584
2846+ - 0.436278313398361
2847+ - 0.418619960546494
2848+ - 0.401065170764923
2849+ - 0.383637577295303
2850+ - 0.36636084318161
2851+ - 0.34925851225853
2852+ - 0.332354247570038
2853+ - 0.315671622753143
2854+ - 0.2992342710495
2855+ - 0.28306582570076
2856+ - 0.267189890146255
2857+ - 0.251630038022995
2858+ - 0.236409932374954
2859+ - 0.221553176641464
2860+ - 0.207083359360695
2861+ - 0.193024128675461
2862+ - 0.179399058222771
2863+ - 0.1662318110466
2864+ - 0.153545945882797
2865+ - 0.141365125775337
2866+ - 0.129712924361229
2867+ - 0.118612989783287
2868+ - 0.108088910579681
2869+ - 0.0981643125414848
2870+ - 0.088862806558609
2871+ - 0.0802018269896507
2872+ - 0.0721661299467087
2873+ - 0.0647296607494354
2874+ - 0.0578663609921932
2875+ - 0.0515501871705055
2876+ - 0.0457550808787346
2877+ - 0.040454987436533
2878+ - 0.0356238596141338
2879+ - 0.0312356371432543
2880+ - 0.0272642690688372
2881+ - 0.0236837025731802
2882+ - 0.0204678848385811
2883+ - 0.0175907611846924
2884+ - 0.0150262787938118
2885+ - 0.0127483839169145
2886+ - 0.0107310237362981
2887+ - 0.00894814357161522
2888+ - 0.00737369060516357
2889+ - 0.00598161155357957
2890+ - 0.00474585359916091
2891+ - 0.0036403622943908
2892+ - 0.00263908482156694
2893+ - 0.00171596743166447
2894+ - 0.000844957015942782
2895+ - 0.0
2896+ effects: []
2897+ title: Smooth
2898+ enabled: true
2899+ animation_min: 0.0
2900+ animation_max: 0.165999999999999
2901+ animation_repeat_number: 8.0
2902+ animation_repeat_unit: :beats
2903+ enable_exit_animation: false
2904+ exit_curve: *id001
2905+ enable_activation: true
2906+ activation_direction: :to
2907+ activation_curve: *id001
2908+ activation_value: 0.1
2909+ activation_variable: &id016 !ruby/object:Variable
2910+ effects:
2911+ - !ruby/object:VariableInputSlider
2912+ title: &id074 Slider
2913+ enabled: true
2914+ slider_setting: !ruby/object:UserObjectSettingSlider
2915+ slider: Human 01 / Right Hand / X
2916+ is_inverted:
2917+ input_min: 0.0
2918+ input_max: 1.0
2919+ dead_center_size: 0.0
2920+ output_min: 0.0
2921+ output_max: 1.0
2922+ output_curve: *id001
2923+ name: &id075 slider
2924+ options: &id076
2925+
2926+ :summary: true
2927+ breaks_cache:
2928+ - !ruby/object:VariableInputSlider
2929+ title: Slider
2930+ enabled: false
2931+ slider_setting: !ruby/object:UserObjectSettingSlider
2932+ slider: Human 01 / Right Elbow / X
2933+ is_inverted:
2934+ input_min: 0.0
2935+ input_max: 1.0
2936+ dead_center_size: 0.0
2937+ output_min: 0.0
2938+ output_max: 1.0
2939+ output_curve: *id001
2940+ name: slider
2941+ options:
2942+ :summary: true
2943+ breaks_cache:
2944+ - !ruby/object:VariableInputSlider
2945+ title: Slider
2946+ enabled: false
2947+ slider_setting: !ruby/object:UserObjectSettingSlider
2948+ slider: Human 01 / Right Foot / X
2949+ is_inverted:
2950+ input_min: 0.0
2951+ input_max: 1.0
2952+ dead_center_size: 0.0
2953+ output_min: 0.0
2954+ output_max: 1.0
2955+ output_curve: *id001
2956+ name: slider
2957+ options:
2958+ :summary: true
2959+ breaks_cache:
2960+ - !ruby/object:VariableInputSlider
2961+ title: Slider
2962+ enabled: false
2963+ slider_setting: !ruby/object:UserObjectSettingSlider
2964+ slider: Human 01 / Right Knee / X
2965+ is_inverted:
2966+ input_min: 0.0
2967+ input_max: 1.0
2968+ dead_center_size: 0.0
2969+ output_min: 0.0
2970+ output_max: 1.0
2971+ output_curve: *id001
2972+ name: slider
2973+ options:
2974+ :summary: true
2975+ breaks_cache:
2976+ title: right x
2977+ enabled: true
2978+ combine_method_setting: !ruby/object:UserObjectSettingSelect
2979+ selected: :sum
2980+ name: &id077 combine_method
2981+ options: &id078
2982+
2983+ :options:
2984+ - - :sum
2985+ - Sum
2986+ - - :minimum
2987+ - Minimum
2988+ - - :maximum
2989+ - Maximum
2990+ - - :average
2991+ - Average
2992+ - - :product
2993+ - Multiply
2994+ :default: :sum
2995+ breaks_cache:
2996+ damper_method_setting: !ruby/object:UserObjectSettingSelect
2997+ selected: :none
2998+ name: &id079 damper_method
2999+ options: &id080
3000+
3001+ :options:
3002+ - - :none
3003+ - None
3004+ - - :very_low
3005+ - Very Low
3006+ - - :low
3007+ - Low
3008+ - - :medium
3009+ - Medium
3010+ - - :high
3011+ - High
3012+ - - :very_high
3013+ - Very High
3014+ :default: :none
3015+ breaks_cache:
3016+ frequency_setting: !ruby/object:UserObjectSettingFloat
3017+ name: frequency
3018+ options:
3019+ :range: *id005
3020+ :shader: true
3021+ :default: !ruby/range
3022+ begin: 0.1
3023+ end: 1.0
3024+ excl: false
3025+ breaks_cache:
3026+ min: -1000.0
3027+ max: 1000.0
3028+ enter_value: 0.0
3029+ exit_value: 0.0
3030+ enable_enter_animation: false
3031+ enter_curve: *id001
3032+ enable_animation: true
3033+ animation_curve: &id104 !ruby/object:Curve
3034+ vector:
3035+ - 0.5
3036+ - 0.850356936454773
3037+ - 1.0
3038+ - 0.842679083347321
3039+ - 0.5
3040+ - 0.166701808571815
3041+ - 0.0
3042+ - 0.152764499187469
3043+ - 0.5
3044+ approximation:
3045+ - 0.5
3046+ - 0.515496015548706
3047+ - 0.530978322029114
3048+ - 0.546433210372925
3049+ - 0.561846971511841
3050+ - 0.577205896377563
3051+ - 0.592496275901794
3052+ - 0.60770446062088
3053+ - 0.622816622257233
3054+ - 0.637819170951843
3055+ - 0.652698397636414
3056+ - 0.667440474033356
3057+ - 0.682031810283661
3058+ - 0.696458637714386
3059+ - 0.710707306861877
3060+ - 0.724764049053192
3061+ - 0.738615214824677
3062+ - 0.752247035503387
3063+ - 0.765645861625671
3064+ - 0.778797924518585
3065+ - 0.791689574718475
3066+ - 0.804307043552399
3067+ - 0.816636681556702
3068+ - 0.828664779663086
3069+ - 0.840377569198608
3070+ - 0.85176146030426
3071+ - 0.862803637981415
3072+ - 0.873494029045105
3073+ - 0.883822917938232
3074+ - 0.893780589103699
3075+ - 0.903357326984406
3076+ - 0.912543296813965
3077+ - 0.921328902244568
3078+ - 0.929704368114471
3079+ - 0.937659978866577
3080+ - 0.945185959339142
3081+ - 0.952272653579712
3082+ - 0.958910286426544
3083+ - 0.96508914232254
3084+ - 0.970799505710602
3085+ - 0.976031601428986
3086+ - 0.980775833129883
3087+ - 0.985022306442261
3088+ - 0.988761425018311
3089+ - 0.991983413696289
3090+ - 0.994678497314453
3091+ - 0.996837079524994
3092+ - 0.998449265956879
3093+ - 0.999505460262299
3094+ - 0.99999588727951
3095+ - 1.0
3096+ - 0.999248385429382
3097+ - 0.998018205165863
3098+ - 0.996231317520142
3099+ - 0.993898868560791
3100+ - 0.991031885147095
3101+ - 0.987641334533691
3102+ - 0.983738303184509
3103+ - 0.979333817958832
3104+ - 0.974438846111298
3105+ - 0.969064593315125
3106+ - 0.963221907615662
3107+ - 0.956921935081482
3108+ - 0.950175702571869
3109+ - 0.942994177341461
3110+ - 0.935388445854187
3111+ - 0.927369594573975
3112+ - 0.918948531150818
3113+ - 0.910136461257935
3114+ - 0.900944232940674
3115+ - 0.891383051872253
3116+ - 0.881463825702667
3117+ - 0.871197640895844
3118+ - 0.860595524311066
3119+ - 0.849668562412262
3120+ - 0.838427782058716
3121+ - 0.826885342597961
3122+ - 0.815054833889008
3123+ - 0.802949666976929
3124+ - 0.790583431720734
3125+ - 0.777969539165497
3126+ - 0.765121579170227
3127+ - 0.752053081989288
3128+ - 0.738777458667755
3129+ - 0.725308358669281
3130+ - 0.71165919303894
3131+ - 0.697843492031097
3132+ - 0.683874785900116
3133+ - 0.669766545295715
3134+ - 0.655532419681549
3135+ - 0.641185760498047
3136+ - 0.626740157604218
3137+ - 0.61220908164978
3138+ - 0.597606062889099
3139+ - 0.582944691181183
3140+ - 0.568238377571106
3141+ - 0.553500711917877
3142+ - 0.538745105266571
3143+ - 0.523985147476196
3144+ - 0.509234368801117
3145+ - 0.5
3146+ - 0.479812115430832
3147+ - 0.465160936117172
3148+ - 0.450561136007309
3149+ - 0.436021268367767
3150+ - 0.421549916267395
3151+ - 0.407155603170395
3152+ - 0.39284685254097
3153+ - 0.378632247447968
3154+ - 0.364520311355591
3155+ - 0.350519567728043
3156+ - 0.336638569831848
3157+ - 0.322885870933533
3158+ - 0.309270024299622
3159+ - 0.295799553394318
3160+ - 0.282483011484146
3161+ - 0.269328951835632
3162+ - 0.256345897912979
3163+ - 0.243542402982712
3164+ - 0.230927005410194
3165+ - 0.218508258461952
3166+ - 0.206294700503349
3167+ - 0.19429486989975
3168+ - 0.182517319917679
3169+ - 0.170970574021339
3170+ - 0.159663394093513
3171+ - 0.148608073592186
3172+ - 0.137820303440094
3173+ - 0.127315878868103
3174+ - 0.117110595107079
3175+ - 0.107220262289047
3176+ - 0.0976606607437134
3177+ - 0.0884476080536842
3178+ - 0.0795968845486641
3179+ - 0.0711243003606796
3180+ - 0.0630456507205963
3181+ - 0.0553767308592796
3182+ - 0.0481333397328854
3183+ - 0.0413312762975693
3184+ - 0.0349863357841969
3185+ - 0.0291143227368593
3186+ - 0.023731030523777
3187+ - 0.0188522581011057
3188+ - 0.014493802562356
3189+ - 0.0106714647263288
3190+ - 0.00740104028955102
3191+ - 0.00469832820817828
3192+ - 0.00257912673987448
3193+ - 0.00105923402588814
3194+ - 0.00015444791642949
3195+ - 0.0
3196+ - 0.000230328791076317
3197+ - 0.0011955100344494
3198+ - 0.00276151555590332
3199+ - 0.00491530634462833
3200+ - 0.00764384306967258
3201+ - 0.0109340865164995
3202+ - 0.0147729981690645
3203+ - 0.0191475376486778
3204+ - 0.02404466830194
3205+ - 0.029451347887516
3206+ - 0.0353545397520065
3207+ - 0.0417412035167217
3208+ - 0.048598300665617
3209+ - 0.0559127889573574
3210+ - 0.0636716336011887
3211+ - 0.0718617960810661
3212+ - 0.0804702341556549
3213+ - 0.0894839093089104
3214+ - 0.0988897830247879
3215+ - 0.108674816787243
3216+ - 0.11882596462965
3217+ - 0.129330202937126
3218+ - 0.140174478292465
3219+ - 0.151345759630203
3220+ - 0.162831038236618
3221+ - 0.174617663025856
3222+ - 0.18669305741787
3223+ - 0.199044689536095
3224+ - 0.211659967899323
3225+ - 0.224526360630989
3226+ - 0.237631320953369
3227+ - 0.250962257385254
3228+ - 0.264506667852402
3229+ - 0.278251945972443
3230+ - 0.292185544967651
3231+ - 0.306294947862625
3232+ - 0.320567548274994
3233+ - 0.334990829229355
3234+ - 0.349552243947983
3235+ - 0.364239186048508
3236+ - 0.379039108753204
3237+ - 0.39393949508667
3238+ - 0.408927798271179
3239+ - 0.42399138212204
3240+ - 0.439117789268494
3241+ - 0.454294383525848
3242+ - 0.469508677721024
3243+ - 0.484748065471649
3244+ - 0.5
3245+ effects: []
3246+ title: Sine
3247+ enabled: true
3248+ animation_min: 0.0299999999999999
3249+ animation_max: -0.0100000000000009
3250+ animation_repeat_number: 16.0
3251+ animation_repeat_unit: :beats
3252+ enable_exit_animation: false
3253+ exit_curve: *id001
3254+ enable_activation: false
3255+ activation_direction: :to
3256+ activation_curve: *id001
3257+ activation_value: 1.0
3258+ activation_variable:
3259+ - !ruby/object:ActorEffectPixelStorm
3260+ conditions: !ruby/object:ChildConditions
3261+ enable_child_index: false
3262+ child_index_min: 0
3263+ child_index_max: 0
3264+ enable_event: false
3265+ event:
3266+ event_invert: false
3267+ child_index_max: 0
3268+ child_index_min: 0
3269+ enable_child_index: false
3270+ enable_event: false
3271+ event:
3272+ event_invert: false
3273+ title: Pixel Storm
3274+ enabled: false
3275+ amount_setting: !ruby/object:UserObjectSettingFloat
3276+ name: amount
3277+ options:
3278+ :range: !ruby/range
3279+ begin: -1000.0
3280+ end: 1000.0
3281+ excl: false
3282+ :shader: true
3283+ :default: !ruby/range
3284+ begin: 0.0
3285+ end: 1.0
3286+ excl: false
3287+ breaks_cache:
3288+ min: -1000.0
3289+ max: 1000.0
3290+ enter_value: 0.0
3291+ exit_value: 0.0
3292+ enable_enter_animation: true
3293+ enter_curve: &id102 !ruby/object:Curve
3294+ vector:
3295+ - 0.0
3296+ - 0.269079566001892
3297+ - 0.5
3298+ - 0.688084900379181
3299+ - 0.815106570720673
3300+ - 0.896625757217407
3301+ - 0.949894666671753
3302+ - 0.981220602989197
3303+ - 1.0
3304+ approximation:
3305+ - 0.0
3306+ - 0.0110257677733898
3307+ - 0.0220495108515024
3308+ - 0.0330692045390606
3309+ - 0.0440828204154968
3310+ - 0.0550883375108242
3311+ - 0.0660837292671204
3312+ - 0.0770669728517532
3313+ - 0.0880360379815102
3314+ - 0.0989889055490494
3315+ - 0.109923548996449
3316+ - 0.120837941765785
3317+ - 0.131730049848557
3318+ - 0.142597869038582
3319+ - 0.153439357876778
3320+ - 0.164252504706383
3321+ - 0.175035268068314
3322+ - 0.185785636305809
3323+ - 0.196501567959785
3324+ - 0.207181066274643
3325+ - 0.217822074890137
3326+ - 0.228422582149506
3327+ - 0.238980576395988
3328+ - 0.249494016170502
3329+ - 0.259960860013962
3330+ - 0.27037912607193
3331+ - 0.280746757984161
3332+ - 0.291061609983444
3333+ - 0.301321655511856
3334+ - 0.311524718999863
3335+ - 0.321668744087219
3336+ - 0.331751644611359
3337+ - 0.341771245002747
3338+ - 0.351725488901138
3339+ - 0.361612290143967
3340+ - 0.37142950296402
3341+ - 0.381175071001053
3342+ - 0.390846848487854
3343+ - 0.400442749261856
3344+ - 0.40996065735817
3345+ - 0.419398486614227
3346+ - 0.42875412106514
3347+ - 0.43802547454834
3348+ - 0.447210431098938
3349+ - 0.456306904554367
3350+ - 0.465312749147415
3351+ - 0.474225908517838
3352+ - 0.483044236898422
3353+ - 0.491765677928925
3354+ - 0.500388085842133
3355+ - 0.5
3356+ - 0.517328500747681
3357+ - 0.525645911693573
3358+ - 0.533862233161926
3359+ - 0.541978240013123
3360+ - 0.549994468688965
3361+ - 0.557911574840546
3362+ - 0.565730333328247
3363+ - 0.573451280593872
3364+ - 0.581075131893158
3365+ - 0.588602542877197
3366+ - 0.596034109592438
3367+ - 0.603370547294617
3368+ - 0.610612511634827
3369+ - 0.61776065826416
3370+ - 0.624815583229065
3371+ - 0.631778001785278
3372+ - 0.638648569583893
3373+ - 0.645427882671356
3374+ - 0.652116715908051
3375+ - 0.658715605735779
3376+ - 0.665225207805634
3377+ - 0.671646296977997
3378+ - 0.677979409694672
3379+ - 0.684225261211395
3380+ - 0.690384447574615
3381+ - 0.69645756483078
3382+ - 0.702444791793823
3383+ - 0.708346486091614
3384+ - 0.714162945747375
3385+ - 0.719894468784332
3386+ - 0.725541293621063
3387+ - 0.731103837490082
3388+ - 0.736582279205322
3389+ - 0.741976976394653
3390+ - 0.747288227081299
3391+ - 0.752516329288483
3392+ - 0.757661581039429
3393+ - 0.762724220752716
3394+ - 0.767704606056213
3395+ - 0.772603034973145
3396+ - 0.777419805526733
3397+ - 0.782155156135559
3398+ - 0.78680944442749
3399+ - 0.791382968425751
3400+ - 0.79587596654892
3401+ - 0.80028885602951
3402+ - 0.804621756076813
3403+ - 0.808875143527985
3404+ - 0.81304919719696
3405+ - 0.817144274711609
3406+ - 0.821161210536957
3407+ - 0.825101494789124
3408+ - 0.828966796398163
3409+ - 0.832758665084839
3410+ - 0.836478710174561
3411+ - 0.840128481388092
3412+ - 0.843709707260132
3413+ - 0.847223877906799
3414+ - 0.850672602653503
3415+ - 0.854057490825653
3416+ - 0.857380151748657
3417+ - 0.860642194747925
3418+ - 0.863845229148865
3419+ - 0.866990804672241
3420+ - 0.870080530643463
3421+ - 0.873116016387939
3422+ - 0.876098811626434
3423+ - 0.879030644893646
3424+ - 0.88191294670105
3425+ - 0.884747445583344
3426+ - 0.887535691261292
3427+ - 0.890279293060303
3428+ - 0.892979860305786
3429+ - 0.895638942718506
3430+ - 0.898258149623871
3431+ - 0.900838196277618
3432+ - 0.903379201889038
3433+ - 0.905881226062775
3434+ - 0.908344268798828
3435+ - 0.910768389701843
3436+ - 0.91315358877182
3437+ - 0.915499925613403
3438+ - 0.917807400226593
3439+ - 0.920076131820679
3440+ - 0.92230612039566
3441+ - 0.924497365951538
3442+ - 0.926649987697601
3443+ - 0.928763926029205
3444+ - 0.930839240550995
3445+ - 0.93287605047226
3446+ - 0.934874296188354
3447+ - 0.936834037303925
3448+ - 0.938755333423615
3449+ - 0.940638244152069
3450+ - 0.942482769489288
3451+ - 0.944288969039917
3452+ - 0.946056842803955
3453+ - 0.947786450386047
3454+ - 0.949477791786194
3455+ - 0.951131045818329
3456+ - 0.952746570110321
3457+ - 0.954325079917908
3458+ - 0.955867350101471
3459+ - 0.957373976707458
3460+ - 0.958845674991608
3461+ - 0.960283160209656
3462+ - 0.96168714761734
3463+ - 0.963058352470398
3464+ - 0.964397430419922
3465+ - 0.965705037117004
3466+ - 0.966982007026672
3467+ - 0.968228936195374
3468+ - 0.9694464802742
3469+ - 0.97063547372818
3470+ - 0.97179651260376
3471+ - 0.972930312156677
3472+ - 0.97403758764267
3473+ - 0.975119054317474
3474+ - 0.976175367832184
3475+ - 0.97720730304718
3476+ - 0.978215396404266
3477+ - 0.979200541973114
3478+ - 0.980163335800171
3479+ - 0.98110443353653
3480+ - 0.982024610042572
3481+ - 0.982924699783325
3482+ - 0.983805477619171
3483+ - 0.984667837619781
3484+ - 0.985512554645538
3485+ - 0.986340463161469
3486+ - 0.987152516841888
3487+ - 0.987949430942535
3488+ - 0.988732099533081
3489+ - 0.989501297473907
3490+ - 0.990257978439331
3491+ - 0.991002917289734
3492+ - 0.991736888885498
3493+ - 0.99246084690094
3494+ - 0.993175566196442
3495+ - 0.993881940841675
3496+ - 0.994580745697021
3497+ - 0.995272815227509
3498+ - 0.995959043502808
3499+ - 0.996640205383301
3500+ - 0.99731719493866
3501+ - 0.997990846633911
3502+ - 0.998661935329437
3503+ - 0.999331414699554
3504+ - 1.0
3505+ effects: []
3506+ title: Fast
3507+ enabled: true
3508+ enable_animation: false
3509+ animation_curve: *id006
3510+ animation_min: 0.01
3511+ animation_max: 0.02
3512+ animation_repeat_number: 4
3513+ animation_repeat_unit: :beats
3514+ enable_exit_animation: false
3515+ exit_curve: *id001
3516+ enable_activation: true
3517+ activation_direction: :to
3518+ activation_curve: &id070 !ruby/object:Curve
3519+ vector:
3520+ - 0.0
3521+ - 0.0156708955764771
3522+ - 0.0909382030367851
3523+ - 0.263319939374924
3524+ - 0.5
3525+ - 0.727320730686188
3526+ - 0.90279883146286
3527+ - 0.981200814247131
3528+ - 1.0
3529+ approximation:
3530+ - 0.0
3531+ - 0.000220658504986204
3532+ - 0.000445292593212798
3533+ - 0.000677877746056765
3534+ - 0.000922389619518071
3535+ - 0.00118280376773328
3536+ - 0.00146309565752745
3537+ - 0.00176724081393331
3538+ - 0.00209921505302191
3539+ - 0.00246299360878766
3540+ - 0.00286255241371691
3541+ - 0.00330186658538878
3542+ - 0.00378491193987429
3543+ - 0.00431566406041384
3544+ - 0.00489809829741716
3545+ - 0.00553619069978595
3546+ - 0.00623391615226865
3547+ - 0.0069952504709363
3548+ - 0.00782416947185993
3549+ - 0.0087246485054493
3550+ - 0.00970066338777542
3551+ - 0.0107561890035868
3552+ - 0.0118952021002769
3553+ - 0.0131216766312718
3554+ - 0.0144395893439651
3555+ - 0.015852915123105
3556+ - 0.0173654705286026
3557+ - 0.0189806763082743
3558+ - 0.0207018852233887
3559+ - 0.0225324537605047
3560+ - 0.0244757421314716
3561+ - 0.0265351012349129
3562+ - 0.0287138931453228
3563+ - 0.0310154687613249
3564+ - 0.0334431901574135
3565+ - 0.0360004082322121
3566+ - 0.0386904813349247
3567+ - 0.0415167659521103
3568+ - 0.0444826185703278
3569+ - 0.047591395676136
3570+ - 0.050846453756094
3571+ - 0.0542511492967606
3572+ - 0.0578088387846947
3573+ - 0.0615228787064552
3574+ - 0.0653966218233109
3575+ - 0.0694334283471107
3576+ - 0.0736366510391235
3577+ - 0.0780096501111984
3578+ - 0.0825557857751846
3579+ - 0.0872784033417702
3580+ - 0.0921808332204819
3581+ - 0.0972642302513123
3582+ - 0.102526195347309
3583+ - 0.107964001595974
3584+ - 0.113574922084808
3585+ - 0.119356222450733
3586+ - 0.125305190682411
3587+ - 0.131419092416763
3588+ - 0.13769519329071
3589+ - 0.144130781292915
3590+ - 0.15072312951088
3591+ - 0.157469496130943
3592+ - 0.164367169141769
3593+ - 0.171413406729698
3594+ - 0.178605496883392
3595+ - 0.185940697789192
3596+ - 0.19341629743576
3597+ - 0.201029568910599
3598+ - 0.208777785301208
3599+ - 0.21665820479393
3600+ - 0.224668115377426
3601+ - 0.232804775238037
3602+ - 0.241065472364426
3603+ - 0.249447479844093
3604+ - 0.257948070764542
3605+ - 0.266564458608627
3606+ - 0.275292545557022
3607+ - 0.284126728773117
3608+ - 0.293061375617981
3609+ - 0.302090853452682
3610+ - 0.31120952963829
3611+ - 0.320411771535873
3612+ - 0.329691886901855
3613+ - 0.339044272899628
3614+ - 0.348463296890259
3615+ - 0.357943266630173
3616+ - 0.367478609085083
3617+ - 0.377063632011414
3618+ - 0.386692702770233
3619+ - 0.39636018872261
3620+ - 0.406060427427292
3621+ - 0.415787816047668
3622+ - 0.425536662340164
3623+ - 0.43530136346817
3624+ - 0.445076286792755
3625+ - 0.454855740070343
3626+ - 0.464634120464325
3627+ - 0.474405765533447
3628+ - 0.484165072441101
3629+ - 0.49390634894371
3630+ - 0.5
3631+ - 0.513313949108124
3632+ - 0.522974073886871
3633+ - 0.532602548599243
3634+ - 0.542197465896606
3635+ - 0.551756978034973
3636+ - 0.561279118061066
3637+ - 0.570762038230896
3638+ - 0.580203831195831
3639+ - 0.589602708816528
3640+ - 0.598956644535065
3641+ - 0.608263790607452
3642+ - 0.617522299289703
3643+ - 0.626730263233185
3644+ - 0.635885775089264
3645+ - 0.644986987113953
3646+ - 0.654031991958618
3647+ - 0.663018882274628
3648+ - 0.671945750713348
3649+ - 0.680810809135437
3650+ - 0.689612090587616
3651+ - 0.698347687721252
3652+ - 0.707015752792358
3653+ - 0.715614378452301
3654+ - 0.724141716957092
3655+ - 0.732595801353455
3656+ - 0.740973174571991
3657+ - 0.749269127845764
3658+ - 0.757478892803192
3659+ - 0.765597701072693
3660+ - 0.773620784282684
3661+ - 0.781543254852295
3662+ - 0.789360463619232
3663+ - 0.797067582607269
3664+ - 0.804659783840179
3665+ - 0.812132298946381
3666+ - 0.819480419158936
3667+ - 0.826699256896973
3668+ - 0.833784103393555
3669+ - 0.840730130672455
3670+ - 0.847532629966736
3671+ - 0.854186773300171
3672+ - 0.860687732696533
3673+ - 0.867030739784241
3674+ - 0.873211085796356
3675+ - 0.879223942756653
3676+ - 0.885064542293549
3677+ - 0.890728056430817
3678+ - 0.896209716796875
3679+ - 0.901504814624786
3680+ - 0.906608939170837
3681+ - 0.911522924900055
3682+ - 0.91625052690506
3683+ - 0.920795738697052
3684+ - 0.925162374973297
3685+ - 0.929354429244995
3686+ - 0.933375716209412
3687+ - 0.937230169773102
3688+ - 0.940921723842621
3689+ - 0.94445413351059
3690+ - 0.947831451892853
3691+ - 0.951057553291321
3692+ - 0.954136252403259
3693+ - 0.957071542739868
3694+ - 0.959867238998413
3695+ - 0.962527275085449
3696+ - 0.965055525302887
3697+ - 0.967455923557281
3698+ - 0.969732403755188
3699+ - 0.971888720989227
3700+ - 0.973928928375244
3701+ - 0.975856840610504
3702+ - 0.977676391601562
3703+ - 0.979391396045685
3704+ - 0.981005847454071
3705+ - 0.982523620128632
3706+ - 0.983948588371277
3707+ - 0.985284626483917
3708+ - 0.986535489559174
3709+ - 0.987705230712891
3710+ - 0.988797605037689
3711+ - 0.98981648683548
3712+ - 0.990765750408173
3713+ - 0.991649270057678
3714+ - 0.992470860481262
3715+ - 0.993234515190125
3716+ - 0.993943989276886
3717+ - 0.994603216648102
3718+ - 0.995216012001038
3719+ - 0.995786309242249
3720+ - 0.996317863464355
3721+ - 0.996814668178558
3722+ - 0.997280538082123
3723+ - 0.997719287872314
3724+ - 0.998134851455688
3725+ - 0.998531103134155
3726+ - 0.99891185760498
3727+ - 0.999280989170074
3728+ - 0.999642431735992
3729+ - 1.0
3730+ effects: []
3731+ title: Easy
3732+ enabled: true
3733+ activation_value: 0.2
3734+ activation_variable: *id007
3735+ - !ruby/object:ActorEffectGhost
3736+ conditions: !ruby/object:ChildConditions
3737+ enable_child_index: false
3738+ child_index_min: 0
3739+ child_index_max: 0
3740+ enable_event: false
3741+ event:
3742+ event_invert: false
3743+ child_index_max: 0
3744+ child_index_min: 0
3745+ enable_child_index: false
3746+ enable_event: false
3747+ event:
3748+ event_invert: false
3749+ title: Ghost
3750+ enabled: false
3751+ size_setting: !ruby/object:UserObjectSettingFloat
3752+ name: size
3753+ options:
3754+ :range: *id005
3755+ :default: !ruby/range
3756+ begin: 1.0
3757+ end: 2.0
3758+ excl: false
3759+ breaks_cache:
3760+ min: -1000.0
3761+ max: 1000.0
3762+ enter_value: 0.0
3763+ exit_value: 0.0
3764+ enable_enter_animation: false
3765+ enter_curve: *id001
3766+ enable_animation: false
3767+ animation_curve: *id001
3768+ animation_min: 1.2
3769+ animation_max: 2.0
3770+ animation_repeat_number: 4
3771+ animation_repeat_unit: :beats
3772+ enable_exit_animation: false
3773+ exit_curve: *id001
3774+ enable_activation: false
3775+ activation_direction: :to
3776+ activation_curve: *id001
3777+ activation_value: 1.0
3778+ activation_variable:
3779+ distance_setting: !ruby/object:UserObjectSettingFloat
3780+ name: distance
3781+ options:
3782+ :range: *id005
3783+ :default: !ruby/range
3784+ begin: 0.0
3785+ end: 1.0
3786+ excl: false
3787+ breaks_cache:
3788+ min: -1000.0
3789+ max: 1000.0
3790+ enter_value: 0.0
3791+ exit_value: 0.0
3792+ enable_enter_animation: false
3793+ enter_curve: *id001
3794+ enable_animation: false
3795+ animation_curve: *id001
3796+ animation_min: 0.0
3797+ animation_max: 1.0
3798+ animation_repeat_number: 4
3799+ animation_repeat_unit: :beats
3800+ enable_exit_animation: false
3801+ exit_curve: *id001
3802+ enable_activation: false
3803+ activation_direction: :to
3804+ activation_curve: *id001
3805+ activation_value: 1.0
3806+ activation_variable:
3807+ angle_setting: !ruby/object:UserObjectSettingFloat
3808+ name: angle
3809+ options:
3810+ :range: *id005
3811+ :default: !ruby/range
3812+ begin: 0.0
3813+ end: 1.0
3814+ excl: false
3815+ breaks_cache:
3816+ min: -1000.0
3817+ max: 1000.0
3818+ enter_value: 0.0
3819+ exit_value: 0.0
3820+ enable_enter_animation: false
3821+ enter_curve: *id001
3822+ enable_animation: false
3823+ animation_curve: *id001
3824+ animation_min: 0.0
3825+ animation_max: 1.0
3826+ animation_repeat_number: 4
3827+ animation_repeat_unit: :beats
3828+ enable_exit_animation: false
3829+ exit_curve: *id001
3830+ enable_activation: false
3831+ activation_direction: :to
3832+ activation_curve: *id001
3833+ activation_value: 1.0
3834+ activation_variable:
3835+ alpha_setting: !ruby/object:UserObjectSettingFloat
3836+ name: alpha
3837+ options:
3838+ :range: !ruby/range
3839+ begin: 0.0
3840+ end: 1.0
3841+ excl: false
3842+ :default: !ruby/range
3843+ begin: 0.25
3844+ end: 1.0
3845+ excl: false
3846+ breaks_cache:
3847+ min: 0.0
3848+ max: 1.0
3849+ enter_value: 0.0
3850+ exit_value: 0.0
3851+ enable_enter_animation: false
3852+ enter_curve: *id001
3853+ enable_animation: false
3854+ animation_curve: *id001
3855+ animation_min: 0.25
3856+ animation_max: 1.0
3857+ animation_repeat_number: 4
3858+ animation_repeat_unit: :beats
3859+ enable_exit_animation: false
3860+ exit_curve: *id001
3861+ enable_activation: false
3862+ activation_direction: :to
3863+ activation_curve: *id001
3864+ activation_value: 1.0
3865+ activation_variable:
3866+ - !ruby/object:ActorEffectDrawMethod
3867+ conditions: !ruby/object:ChildConditions
3868+ enable_child_index: false
3869+ child_index_min: 0
3870+ child_index_max: 0
3871+ enable_event: false
3872+ event:
3873+ event_invert: false
3874+ child_index_max: 0
3875+ child_index_min: 0
3876+ enable_child_index: false
3877+ enable_event: false
3878+ event:
3879+ event_invert: false
3880+ title: Draw Method
3881+ enabled: true
3882+ draw_method_setting: !ruby/object:UserObjectSettingSelect
3883+ selected: :brighten
3884+ name: draw_method
3885+ options:
3886+ :options:
3887+ - - :average
3888+ - Average
3889+ - - :brighten
3890+ - Brighten
3891+ - - :darken
3892+ - Darken
3893+ - - :multiply
3894+ - Multiply
3895+ - - :invert
3896+ - Invert
3897+ - - :min
3898+ - Min
3899+ - - :max
3900+ - Max
3901+ breaks_cache:
3902+ - !ruby/object:ActorEffectStack
3903+ conditions: !ruby/object:ChildConditions
3904+ enable_child_index: false
3905+ child_index_min: 0
3906+ child_index_max: 0
3907+ enable_event: false
3908+ event:
3909+ event_invert: false
3910+ child_index_max: 0
3911+ child_index_min: 0
3912+ enable_child_index: false
3913+ enable_event: false
3914+ event:
3915+ event_invert: false
3916+ title: Stack
3917+ enabled: true
3918+ number_setting: !ruby/object:UserObjectSettingInteger
3919+ name: number
3920+ options:
3921+ :range: !ruby/range
3922+ begin: 1
3923+ end: 1000
3924+ excl: false
3925+ :default: !ruby/range
3926+ begin: 1
3927+ end: 2
3928+ excl: false
3929+ breaks_cache:
3930+ animation_min: 5
3931+ smallest_setting: !ruby/object:UserObjectSettingFloat
3932+ name: smallest
3933+ options:
3934+ :range: !ruby/range
3935+ begin: 0.0
3936+ end: 9999.0
3937+ excl: false
3938+ :default: !ruby/range
3939+ begin: 1.0
3940+ end: 0.5
3941+ excl: false
3942+ breaks_cache:
3943+ min: 0.0
3944+ max: 9999.0
3945+ enter_value: 0.0
3946+ exit_value: 0.0
3947+ enable_enter_animation: false
3948+ enter_curve: *id001
3949+ enable_animation: false
3950+ animation_curve: *id001
3951+ animation_min: 1.0
3952+ animation_max: 0.5
3953+ animation_repeat_number: 4
3954+ animation_repeat_unit: :beats
3955+ enable_exit_animation: false
3956+ exit_curve: *id001
3957+ enable_activation: false
3958+ activation_direction: :to
3959+ activation_curve: *id001
3960+ activation_value: 1.0
3961+ activation_variable:
3962+ height_setting: !ruby/object:UserObjectSettingFloat
3963+ name: height
3964+ options:
3965+ :range: &id083 !ruby/range
3966+ begin: -1000.0
3967+ end: 1000.0
3968+ excl: false
3969+ :default: !ruby/range
3970+ begin: 0.0
3971+ end: 1.0
3972+ excl: false
3973+ breaks_cache:
3974+ min: -1000.0
3975+ max: 1000.0
3976+ enter_value: 0.0
3977+ exit_value: 0.0
3978+ enable_enter_animation: false
3979+ enter_curve: *id001
3980+ enable_animation: false
3981+ animation_curve: *id001
3982+ animation_min: 1.0
3983+ animation_max: 1.0
3984+ animation_repeat_number: 4
3985+ animation_repeat_unit: :beats
3986+ enable_exit_animation: false
3987+ exit_curve: *id001
3988+ enable_activation: false
3989+ activation_direction: :to
3990+ activation_curve: *id001
3991+ activation_value: 1.0
3992+ activation_variable:
3993+ - !ruby/object:ActorEffectScale
3994+ conditions: !ruby/object:ChildConditions
3995+ enable_child_index: false
3996+ child_index_min: 0
3997+ child_index_max: 0
3998+ enable_event: false
3999+ event:
4000+ event_invert: false
4001+ child_index_max: 0
4002+ child_index_min: 0
4003+ enable_child_index: false
4004+ enable_event: false
4005+ event:
4006+ event_invert: false
4007+ title: Scale
4008+ enabled: false
4009+ amount_setting: !ruby/object:UserObjectSettingFloat
4010+ name: amount
4011+ options:
4012+ :range: *id005
4013+ :default: !ruby/range
4014+ begin: 1.0
4015+ end: 2.0
4016+ excl: false
4017+ breaks_cache:
4018+ min: -1000.0
4019+ max: 1000.0
4020+ enter_value: 0.0
4021+ exit_value: 0.0
4022+ enable_enter_animation: false
4023+ enter_curve: *id001
4024+ enable_animation: false
4025+ animation_curve: *id001
4026+ animation_min: 1.535
4027+ animation_max: 2.0
4028+ animation_repeat_number: 4
4029+ animation_repeat_unit: :beats
4030+ enable_exit_animation: false
4031+ exit_curve: *id001
4032+ enable_activation: false
4033+ activation_direction: :to
4034+ activation_curve: *id001
4035+ activation_value: 1.0
4036+ activation_variable:
4037+ - !ruby/object:ActorEffectKScope
4038+ conditions: !ruby/object:ChildConditions
4039+ enable_child_index: false
4040+ child_index_min: 0
4041+ child_index_max: 0
4042+ enable_event: false
4043+ event:
4044+ event_invert: false
4045+ child_index_max: 0
4046+ child_index_min: 0
4047+ enable_child_index: false
4048+ enable_event: false
4049+ event:
4050+ event_invert: false
4051+ title: KScope
4052+ enabled: false
4053+ folds_setting: !ruby/object:UserObjectSettingInteger
4054+ name: folds
4055+ options:
4056+ :range: !ruby/range
4057+ begin: 0
4058+ end: 100
4059+ excl: false
4060+ :default: !ruby/range
4061+ begin: 1
4062+ end: 2
4063+ excl: false
4064+ breaks_cache:
4065+ animation_min: 8
4066+ - !ruby/object:ActorEffectRoll
4067+ conditions: !ruby/object:ChildConditions
4068+ enable_child_index: false
4069+ child_index_min: 0
4070+ child_index_max: 0
4071+ enable_event: false
4072+ event:
4073+ event_invert: false
4074+ child_index_max: 0
4075+ child_index_min: 0
4076+ enable_child_index: false
4077+ enable_event: false
4078+ event:
4079+ event_invert: false
4080+ title: Roll
4081+ enabled: false
4082+ amount_setting: !ruby/object:UserObjectSettingFloat
4083+ name: amount
4084+ options:
4085+ :range: *id005
4086+ :default: !ruby/range
4087+ begin: 0.0
4088+ end: 1.0
4089+ excl: false
4090+ breaks_cache:
4091+ min: -1000.0
4092+ max: 1000.0
4093+ enter_value: 0.0
4094+ exit_value: 0.0
4095+ enable_enter_animation: false
4096+ enter_curve: *id001
4097+ enable_animation: false
4098+ animation_curve: *id001
4099+ animation_min: -0.25
4100+ animation_max: 1.0
4101+ animation_repeat_number: 0.1
4102+ animation_repeat_unit: :minutes
4103+ enable_exit_animation: false
4104+ exit_curve: *id001
4105+ enable_activation: true
4106+ activation_direction: :to
4107+ activation_curve: *id001
4108+ activation_value: 0.25
4109+ activation_variable: &id081 !ruby/object:Variable
4110+ effects:
4111+ - !ruby/object:VariableInputSlider
4112+ title: Slider
4113+ enabled: true
4114+ slider_setting: !ruby/object:UserObjectSettingSlider
4115+ slider: Human 01 / Head / X
4116+ is_inverted:
4117+ input_min: 0.0
4118+ input_max: 1.0
4119+ dead_center_size: 0.0
4120+ output_min: 0.0
4121+ output_max: 1.0
4122+ output_curve: *id001
4123+ name: slider
4124+ options:
4125+ :summary: true
4126+ breaks_cache:
4127+ title: head x
4128+ enabled: true
4129+ combine_method_setting: !ruby/object:UserObjectSettingSelect
4130+ selected: :sum
4131+ name: combine_method
4132+ options:
4133+ :options:
4134+ - - :sum
4135+ - Sum
4136+ - - :minimum
4137+ - Minimum
4138+ - - :maximum
4139+ - Maximum
4140+ - - :average
4141+ - Average
4142+ - - :product
4143+ - Multiply
4144+ :default: :sum
4145+ breaks_cache:
4146+ damper_method_setting: !ruby/object:UserObjectSettingSelect
4147+ selected: :none
4148+ name: damper_method
4149+ options:
4150+ :options:
4151+ - - :none
4152+ - None
4153+ - - :very_low
4154+ - Very Low
4155+ - - :low
4156+ - Low
4157+ - - :medium
4158+ - Medium
4159+ - - :high
4160+ - High
4161+ - - :very_high
4162+ - Very High
4163+ :default: :none
4164+ breaks_cache:
4165+ title: renderboy
4166+ enabled: true
4167+ hole_size_setting: !ruby/object:UserObjectSettingFloat
4168+ name: hole_size
4169+ options:
4170+ :breaks_cache: true
4171+ :range: !ruby/range
4172+ begin: 0.0
4173+ end: 1.0
4174+ excl: false
4175+ :default: !ruby/range
4176+ begin: 0.0
4177+ end: 1.0
4178+ excl: false
4179+ breaks_cache:
4180+ min: 0.0
4181+ max: 1.0
4182+ enter_value: 0.0
4183+ exit_value: 0.0
4184+ enable_enter_animation: false
4185+ enter_curve: *id001
4186+ enable_animation: false
4187+ animation_curve: *id001
4188+ animation_min: 0.0
4189+ animation_max: 1.0
4190+ animation_repeat_number: 4
4191+ animation_repeat_unit: :beats
4192+ enable_exit_animation: false
4193+ exit_curve: *id001
4194+ enable_activation: false
4195+ activation_direction: :to
4196+ activation_curve: *id001
4197+ activation_value: 1.0
4198+ activation_variable:
4199+ - &id082 !ruby/object:ActorRectangle
4200+ x: 0.0
4201+ y: 0.0
4202+ tags:
4203+ effects:
4204+ - !ruby/object:ActorEffectImageOfPreviousFrame
4205+ conditions: !ruby/object:ChildConditions
4206+ enable_child_index: false
4207+ child_index_min: 0
4208+ child_index_max: 0
4209+ enable_event: false
4210+ event:
4211+ event_invert: false
4212+ child_index_max: 0
4213+ child_index_min: 0
4214+ enable_child_index: false
4215+ enable_event: false
4216+ event:
4217+ event_invert: false
4218+ title: Image of Previous Frame
4219+ enabled: true
4220+ - !ruby/object:ActorEffectScale
4221+ conditions: !ruby/object:ChildConditions
4222+ enable_child_index: false
4223+ child_index_min: 0
4224+ child_index_max: 0
4225+ enable_event: false
4226+ event:
4227+ event_invert: false
4228+ child_index_max: 0
4229+ child_index_min: 0
4230+ enable_child_index: false
4231+ enable_event: false
4232+ event:
4233+ event_invert: false
4234+ title: Scale
4235+ enabled: true
4236+ amount_setting: !ruby/object:UserObjectSettingFloat
4237+ name: amount
4238+ options:
4239+ :range: !ruby/range
4240+ begin: -1000.0
4241+ end: 1000.0
4242+ excl: false
4243+ :default: !ruby/range
4244+ begin: 1.0
4245+ end: 2.0
4246+ excl: false
4247+ breaks_cache:
4248+ min: -1000.0
4249+ max: 1000.0
4250+ enter_value: 0.0
4251+ exit_value: 0.0
4252+ enable_enter_animation: false
4253+ enter_curve: *id001
4254+ enable_animation: false
4255+ animation_curve: *id001
4256+ animation_min: 0.96
4257+ animation_max: 2.0
4258+ animation_repeat_number: 4
4259+ animation_repeat_unit: :beats
4260+ enable_exit_animation: false
4261+ exit_curve: *id001
4262+ enable_activation: false
4263+ activation_direction: :to
4264+ activation_curve: *id001
4265+ activation_value: 1.0
4266+ activation_variable:
4267+ title: previous frame
4268+ enabled: true
4269+ hole_size_setting: !ruby/object:UserObjectSettingFloat
4270+ name: hole_size
4271+ options:
4272+ :breaks_cache: true
4273+ :range: !ruby/range
4274+ begin: 0.0
4275+ end: 1.0
4276+ excl: false
4277+ :default: !ruby/range
4278+ begin: 0.0
4279+ end: 1.0
4280+ excl: false
4281+ breaks_cache:
4282+ min: 0.0
4283+ max: 1.0
4284+ enter_value: 0.0
4285+ exit_value: 0.0
4286+ enable_enter_animation: false
4287+ enter_curve: *id001
4288+ enable_animation: false
4289+ animation_curve: *id001
4290+ animation_min: 0.0
4291+ animation_max: 1.0
4292+ animation_repeat_number: 4
4293+ animation_repeat_unit: :beats
4294+ enable_exit_animation: false
4295+ exit_curve: *id001
4296+ enable_activation: false
4297+ activation_direction: :to
4298+ activation_curve: *id001
4299+ activation_value: 1.0
4300+ activation_variable:
4301+ - !ruby/object:ActorDivider
4302+ x: 0.0
4303+ y: 0.0
4304+ tags:
4305+ effects: []
4306+ title: "- - - - - - - -"
4307+ enabled: true
4308+ - &id086 !ruby/object:ActorPolygon
4309+ x: 0.0
4310+ y: 0.0
4311+ tags:
4312+ effects:
4313+ - !ruby/object:ActorEffectTranslate
4314+ conditions: !ruby/object:ChildConditions
4315+ enable_child_index: false
4316+ child_index_min: 0
4317+ child_index_max: 0
4318+ enable_event: false
4319+ event:
4320+ event_invert: false
4321+ child_index_max: 0
4322+ child_index_min: 0
4323+ enable_child_index: false
4324+ enable_event: false
4325+ event:
4326+ event_invert: false
4327+ title: Translate
4328+ enabled: true
4329+ x_setting: !ruby/object:UserObjectSettingFloat
4330+ name: x
4331+ options:
4332+ :range: &id008 !ruby/range
4333+ begin: -1000.0
4334+ end: 1000.0
4335+ excl: false
4336+ :default: !ruby/range
4337+ begin: 0.0
4338+ end: 1.0
4339+ excl: false
4340+ breaks_cache:
4341+ min: -1000.0
4342+ max: 1000.0
4343+ enter_value: 0.0
4344+ exit_value: 0.0
4345+ enable_enter_animation: false
4346+ enter_curve: *id001
4347+ enable_animation: false
4348+ animation_curve: *id001
4349+ animation_min: -0.4
4350+ animation_max: 1.0
4351+ animation_repeat_number: 4
4352+ animation_repeat_unit: :beats
4353+ enable_exit_animation: false
4354+ exit_curve: *id001
4355+ enable_activation: true
4356+ activation_direction: :to
4357+ activation_curve: *id001
4358+ activation_value: 0.2
4359+ activation_variable: &id050 !ruby/object:Variable
4360+ effects:
4361+ - !ruby/object:VariableInputSlider
4362+ title: Slider
4363+ enabled: true
4364+ slider_setting: !ruby/object:UserObjectSettingSlider
4365+ slider: Human 01 / Left Hand / X
4366+ is_inverted:
4367+ input_min: 0.0
4368+ input_max: 1.0
4369+ dead_center_size: 0.0
4370+ output_min: 0.0
4371+ output_max: 1.0
4372+ output_curve: *id001
4373+ name: slider
4374+ options:
4375+ :summary: true
4376+ breaks_cache:
4377+ - !ruby/object:VariableInputSlider
4378+ title: Slider
4379+ enabled: false
4380+ slider_setting: !ruby/object:UserObjectSettingSlider
4381+ slider: Human 02 / Left Hand / X
4382+ is_inverted:
4383+ input_min: 0.0
4384+ input_max: 1.0
4385+ dead_center_size: 0.0
4386+ output_min: 0.0
4387+ output_max: 1.0
4388+ output_curve: *id001
4389+ name: slider
4390+ options:
4391+ :summary: true
4392+ breaks_cache:
4393+ - !ruby/object:VariableInputSlider
4394+ title: Slider
4395+ enabled: false
4396+ slider_setting: !ruby/object:UserObjectSettingSlider
4397+ slider: Human 01 / Left Foot / X
4398+ is_inverted:
4399+ input_min: 0.0
4400+ input_max: 1.0
4401+ dead_center_size: 0.0
4402+ output_min: 0.0
4403+ output_max: 1.0
4404+ output_curve: *id001
4405+ name: slider
4406+ options:
4407+ :summary: true
4408+ breaks_cache:
4409+ - !ruby/object:VariableInputSlider
4410+ title: Slider
4411+ enabled: false
4412+ slider_setting: !ruby/object:UserObjectSettingSlider
4413+ slider: Human 01 / Left Knee / X
4414+ is_inverted:
4415+ input_min: 0.0
4416+ input_max: 1.0
4417+ dead_center_size: 0.0
4418+ output_min: 0.0
4419+ output_max: 1.0
4420+ output_curve: *id001
4421+ name: slider
4422+ options:
4423+ :summary: true
4424+ breaks_cache:
4425+ title: left x
4426+ enabled: true
4427+ combine_method_setting: !ruby/object:UserObjectSettingSelect
4428+ selected: :sum
4429+ name: combine_method
4430+ options:
4431+ :options:
4432+ - - :sum
4433+ - Sum
4434+ - - :minimum
4435+ - Minimum
4436+ - - :maximum
4437+ - Maximum
4438+ - - :average
4439+ - Average
4440+ - - :product
4441+ - Multiply
4442+ :default: :sum
4443+ breaks_cache:
4444+ damper_method_setting: !ruby/object:UserObjectSettingSelect
4445+ selected: :none
4446+ name: damper_method
4447+ options:
4448+ :options:
4449+ - - :none
4450+ - None
4451+ - - :very_low
4452+ - Very Low
4453+ - - :low
4454+ - Low
4455+ - - :medium
4456+ - Medium
4457+ - - :high
4458+ - High
4459+ - - :very_high
4460+ - Very High
4461+ :default: :none
4462+ breaks_cache:
4463+ y_setting: !ruby/object:UserObjectSettingFloat
4464+ name: y
4465+ options:
4466+ :range: *id008
4467+ :default: !ruby/range
4468+ begin: 0.0
4469+ end: 1.0
4470+ excl: false
4471+ breaks_cache:
4472+ min: -1000.0
4473+ max: 1000.0
4474+ enter_value: 0.0
4475+ exit_value: 0.0
4476+ enable_enter_animation: false
4477+ enter_curve: *id001
4478+ enable_animation: false
4479+ animation_curve: *id001
4480+ animation_min: -0.4
4481+ animation_max: 1.0
4482+ animation_repeat_number: 4
4483+ animation_repeat_unit: :beats
4484+ enable_exit_animation: false
4485+ exit_curve: *id001
4486+ enable_activation: true
4487+ activation_direction: :to
4488+ activation_curve: *id001
4489+ activation_value: 0.4
4490+ activation_variable: &id049 !ruby/object:Variable
4491+ effects:
4492+ - !ruby/object:VariableInputSlider
4493+ title: &id009 Slider
4494+ enabled: false
4495+ slider_setting: !ruby/object:UserObjectSettingSlider
4496+ slider: Mouse 01 / Y
4497+ is_inverted:
4498+ input_min: 0.0
4499+ input_max: 1.0
4500+ dead_center_size: 0.0
4501+ output_min: 0.0
4502+ output_max: 1.0
4503+ output_curve: *id001
4504+ name: &id010 slider
4505+ options: &id011
4506+
4507+ :summary: true
4508+ breaks_cache:
4509+ - !ruby/object:VariableInputSlider
4510+ title: *id009
4511+ enabled: true
4512+ slider_setting: !ruby/object:UserObjectSettingSlider
4513+ slider: Human 01 / Left Hand / Y
4514+ is_inverted:
4515+ input_min: 0.0
4516+ input_max: 1.0
4517+ dead_center_size: 0.0
4518+ output_min: 0.0
4519+ output_max: 1.0
4520+ output_curve: *id001
4521+ name: *id010
4522+ options: *id011
4523+ breaks_cache:
4524+ - !ruby/object:VariableInputSlider
4525+ title: *id009
4526+ enabled: false
4527+ slider_setting: !ruby/object:UserObjectSettingSlider
4528+ slider: Human 01 / Left Elbow / Y
4529+ is_inverted:
4530+ input_min: 0.0
4531+ input_max: 1.0
4532+ dead_center_size: 0.0
4533+ output_min: 0.0
4534+ output_max: 1.0
4535+ output_curve: *id001
4536+ name: *id010
4537+ options: *id011
4538+ breaks_cache:
4539+ - !ruby/object:VariableInputSlider
4540+ title: *id009
4541+ enabled: false
4542+ slider_setting: !ruby/object:UserObjectSettingSlider
4543+ slider: Human 01 / Left Foot / Y
4544+ is_inverted:
4545+ input_min: 0.0
4546+ input_max: 1.0
4547+ dead_center_size: 0.0
4548+ output_min: 0.0
4549+ output_max: 1.0
4550+ output_curve: *id001
4551+ name: *id010
4552+ options: *id011
4553+ breaks_cache:
4554+ - !ruby/object:VariableInputSlider
4555+ title: *id009
4556+ enabled: false
4557+ slider_setting: !ruby/object:UserObjectSettingSlider
4558+ slider: Human 01 / Left Knee / Y
4559+ is_inverted:
4560+ input_min: 0.0
4561+ input_max: 1.0
4562+ dead_center_size: 0.0
4563+ output_min: 0.0
4564+ output_max: 1.0
4565+ output_curve: *id001
4566+ name: *id010
4567+ options: *id011
4568+ breaks_cache:
4569+ title: left y
4570+ enabled: true
4571+ combine_method_setting: !ruby/object:UserObjectSettingSelect
4572+ selected: :sum
4573+ name: combine_method
4574+ options:
4575+ :options:
4576+ - - :sum
4577+ - Sum
4578+ - - :minimum
4579+ - Minimum
4580+ - - :maximum
4581+ - Maximum
4582+ - - :average
4583+ - Average
4584+ - - :product
4585+ - Multiply
4586+ :default: :sum
4587+ breaks_cache:
4588+ damper_method_setting: !ruby/object:UserObjectSettingSelect
4589+ selected: :none
4590+ name: damper_method
4591+ options:
4592+ :options:
4593+ - - :none
4594+ - None
4595+ - - :very_low
4596+ - Very Low
4597+ - - :low
4598+ - Low
4599+ - - :medium
4600+ - Medium
4601+ - - :high
4602+ - High
4603+ - - :very_high
4604+ - Very High
4605+ :default: :none
4606+ breaks_cache:
4607+ - !ruby/object:ActorEffectTranslateZ
4608+ conditions: !ruby/object:ChildConditions
4609+ enable_child_index: false
4610+ child_index_min: 0
4611+ child_index_max: 0
4612+ enable_event: false
4613+ event:
4614+ event_invert: false
4615+ child_index_max: 0
4616+ child_index_min: 0
4617+ enable_child_index: false
4618+ enable_event: false
4619+ event:
4620+ event_invert: false
4621+ title: &id018 Translate Z
4622+ enabled: true
4623+ amount_setting: !ruby/object:UserObjectSettingFloat
4624+ name: &id019 amount
4625+ options: &id020
4626+
4627+ :range: !ruby/range
4628+ begin: -100.0
4629+ end: 100.0
4630+ excl: false
4631+ :default: !ruby/range
4632+ begin: 0.0
4633+ end: 1.0
4634+ excl: false
4635+ breaks_cache:
4636+ min: -100.0
4637+ max: 100.0
4638+ enter_value: 0.0
4639+ exit_value: 0.0
4640+ enable_enter_animation: false
4641+ enter_curve: *id001
4642+ enable_animation: false
4643+ animation_curve: *id001
4644+ animation_min: 0.4
4645+ animation_max: 1.0
4646+ animation_repeat_number: 4
4647+ animation_repeat_unit: :beats
4648+ enable_exit_animation: false
4649+ exit_curve: *id001
4650+ enable_activation: true
4651+ activation_direction: :to
4652+ activation_curve: *id001
4653+ activation_value: -0.4
4654+ activation_variable: &id071 !ruby/object:Variable
4655+ effects:
4656+ - !ruby/object:VariableInputSlider
4657+ title: &id021 Slider
4658+ enabled: true
4659+ slider_setting: !ruby/object:UserObjectSettingSlider
4660+ slider: Human 01 / Left Hand / Z
4661+ is_inverted:
4662+ input_min: 0.0
4663+ input_max: 1.0
4664+ dead_center_size: 0.0
4665+ output_min: 0.0
4666+ output_max: 1.0
4667+ output_curve: *id001
4668+ name: &id022 slider
4669+ options: &id023
4670+
4671+ :summary: true
4672+ breaks_cache:
4673+ title: left z
4674+ enabled: true
4675+ combine_method_setting: !ruby/object:UserObjectSettingSelect
4676+ selected: :sum
4677+ name: &id024 combine_method
4678+ options: &id025
4679+
4680+ :options:
4681+ - - :sum
4682+ - Sum
4683+ - - :minimum
4684+ - Minimum
4685+ - - :maximum
4686+ - Maximum
4687+ - - :average
4688+ - Average
4689+ - - :product
4690+ - Multiply
4691+ :default: :sum
4692+ breaks_cache:
4693+ damper_method_setting: !ruby/object:UserObjectSettingSelect
4694+ selected: :none
4695+ name: &id026 damper_method
4696+ options: &id027
4697+
4698+ :options:
4699+ - - :none
4700+ - None
4701+ - - :very_low
4702+ - Very Low
4703+ - - :low
4704+ - Low
4705+ - - :medium
4706+ - Medium
4707+ - - :high
4708+ - High
4709+ - - :very_high
4710+ - Very High
4711+ :default: :none
4712+ breaks_cache:
4713+ - !ruby/object:ActorEffectScale
4714+ conditions: !ruby/object:ChildConditions
4715+ enable_child_index: false
4716+ child_index_min: 0
4717+ child_index_max: 0
4718+ enable_event: false
4719+ event:
4720+ event_invert: false
4721+ child_index_max: 0
4722+ child_index_min: 0
4723+ enable_child_index: false
4724+ enable_event: false
4725+ event:
4726+ event_invert: false
4727+ title: Scale
4728+ enabled: true
4729+ amount_setting: !ruby/object:UserObjectSettingFloat
4730+ name: amount
4731+ options:
4732+ :range: *id008
4733+ :default: !ruby/range
4734+ begin: 1.0
4735+ end: 2.0
4736+ excl: false
4737+ breaks_cache:
4738+ min: -1000.0
4739+ max: 1000.0
4740+ enter_value: 0.0
4741+ exit_value: 0.0
4742+ enable_enter_animation: false
4743+ enter_curve: *id001
4744+ enable_animation: false
4745+ animation_curve: *id001
4746+ animation_min: 0.2
4747+ animation_max: 2.0
4748+ animation_repeat_number: 4
4749+ animation_repeat_unit: :beats
4750+ enable_exit_animation: false
4751+ exit_curve: *id001
4752+ enable_activation: true
4753+ activation_direction: :to
4754+ activation_curve: *id001
4755+ activation_value: 0.4
4756+ activation_variable: &id029 !ruby/object:Variable
4757+ effects:
4758+ - !ruby/object:VariableInputSlider
4759+ title: Slider
4760+ enabled: true
4761+ slider_setting: !ruby/object:UserObjectSettingSlider
4762+ slider: Human 01 / Right Elbow / Bend
4763+ is_inverted:
4764+ input_min: 0.0
4765+ input_max: 1.0
4766+ dead_center_size: 0.0
4767+ output_min: 0.0
4768+ output_max: 1.0
4769+ output_curve: *id001
4770+ name: slider
4771+ options:
4772+ :summary: true
4773+ breaks_cache:
4774+ title: right arm bend
4775+ enabled: true
4776+ combine_method_setting: !ruby/object:UserObjectSettingSelect
4777+ selected: :sum
4778+ name: combine_method
4779+ options:
4780+ :options:
4781+ - - :sum
4782+ - Sum
4783+ - - :minimum
4784+ - Minimum
4785+ - - :maximum
4786+ - Maximum
4787+ - - :average
4788+ - Average
4789+ - - :product
4790+ - Multiply
4791+ :default: :sum
4792+ breaks_cache:
4793+ damper_method_setting: !ruby/object:UserObjectSettingSelect
4794+ selected: :none
4795+ name: damper_method
4796+ options:
4797+ :options:
4798+ - - :none
4799+ - None
4800+ - - :very_low
4801+ - Very Low
4802+ - - :low
4803+ - Low
4804+ - - :medium
4805+ - Medium
4806+ - - :high
4807+ - High
4808+ - - :very_high
4809+ - Very High
4810+ :default: :none
4811+ breaks_cache:
4812+ - !ruby/object:ActorEffectStack
4813+ conditions: !ruby/object:ChildConditions
4814+ enable_child_index: false
4815+ child_index_min: 0
4816+ child_index_max: 0
4817+ enable_event: false
4818+ event:
4819+ event_invert: false
4820+ child_index_max: 0
4821+ child_index_min: 0
4822+ enable_child_index: false
4823+ enable_event: false
4824+ event:
4825+ event_invert: false
4826+ title: &id030 Stack
4827+ enabled: true
4828+ number_setting: !ruby/object:UserObjectSettingInteger
4829+ name: &id031 number
4830+ options: &id032
4831+
4832+ :range: !ruby/range
4833+ begin: 1
4834+ end: 1000
4835+ excl: false
4836+ :default: !ruby/range
4837+ begin: 1
4838+ end: 2
4839+ excl: false
4840+ breaks_cache:
4841+ animation_min: 16
4842+ smallest_setting: !ruby/object:UserObjectSettingFloat
4843+ name: &id033 smallest
4844+ options: &id034
4845+
4846+ :range: !ruby/range
4847+ begin: 0.0
4848+ end: 9999.0
4849+ excl: false
4850+ :default: !ruby/range
4851+ begin: 1.0
4852+ end: 0.5
4853+ excl: false
4854+ breaks_cache:
4855+ min: 0.0
4856+ max: 9999.0
4857+ enter_value: 0.0
4858+ exit_value: 0.0
4859+ enable_enter_animation: false
4860+ enter_curve: *id001
4861+ enable_animation: false
4862+ animation_curve: *id001
4863+ animation_min: 0.4
4864+ animation_max: 0.5
4865+ animation_repeat_number: 4
4866+ animation_repeat_unit: :beats
4867+ enable_exit_animation: false
4868+ exit_curve: *id001
4869+ enable_activation: false
4870+ activation_direction: :to
4871+ activation_curve: *id001
4872+ activation_value: 1.0
4873+ activation_variable:
4874+ height_setting: !ruby/object:UserObjectSettingFloat
4875+ name: &id035 height
4876+ options: &id036
4877+
4878+ :range: *id008
4879+ :default: !ruby/range
4880+ begin: 0.0
4881+ end: 1.0
4882+ excl: false
4883+ breaks_cache:
4884+ min: -1000.0
4885+ max: 1000.0
4886+ enter_value: 0.0
4887+ exit_value: 0.0
4888+ enable_enter_animation: false
4889+ enter_curve: *id001
4890+ enable_animation: false
4891+ animation_curve: *id001
4892+ animation_min: 0.1
4893+ animation_max: 1.0
4894+ animation_repeat_number: 4
4895+ animation_repeat_unit: :beats
4896+ enable_exit_animation: false
4897+ exit_curve: *id001
4898+ enable_activation: false
4899+ activation_direction: :to
4900+ activation_curve: *id001
4901+ activation_value: 1.0
4902+ activation_variable:
4903+ - !ruby/object:ActorEffectThemeChildren
4904+ conditions: !ruby/object:ChildConditions
4905+ enable_child_index: false
4906+ child_index_min: 0
4907+ child_index_max: 0
4908+ enable_event: false
4909+ event:
4910+ event_invert: false
4911+ child_index_max: 0
4912+ child_index_min: 0
4913+ enable_child_index: false
4914+ enable_event: false
4915+ event:
4916+ event_invert: false
4917+ title: &id037 Theme Children
4918+ enabled: true
4919+ theme_setting: !ruby/object:UserObjectSettingTheme
4920+ theme: &id101 !ruby/object:Theme
4921+ tags:
4922+ effects:
4923+ - !ruby/object:Style
4924+ title: ""
4925+ enabled: true
4926+ color_setting: !ruby/object:UserObjectSettingColor
4927+ color: !ruby/object:Color
4928+ alpha: 1.0
4929+ blue: 0.279575799191272
4930+ green: 0.279575799191272
4931+ red: 0.946242465857938
4932+ name: &id012 color
4933+ options: &id013
4934+
4935+ :only_literal: true
4936+ :default:
4937+ - 1.0
4938+ - 1.0
4939+ - 1.0
4940+ - 1.0
4941+ breaks_cache:
4942+ image_setting: !ruby/object:UserObjectSettingImage
4943+ image_name:
4944+ name: &id014 image
4945+ options: &id015
4946+ {}
4947+ breaks_cache:
4948+ - !ruby/object:Style
4949+ title: ""
4950+ enabled: true
4951+ color_setting: !ruby/object:UserObjectSettingColor
4952+ color: !ruby/object:Color
4953+ alpha: 1.0
4954+ blue: 0.0106507972838941
4955+ green: 1.0
4956+ red: 0.909437705043107
4957+ name: *id012
4958+ options: *id013
4959+ breaks_cache:
4960+ image_setting: !ruby/object:UserObjectSettingImage
4961+ image_name:
4962+ name: *id014
4963+ options: *id015
4964+ breaks_cache:
4965+ - !ruby/object:Style
4966+ title: ""
4967+ enabled: true
4968+ color_setting: !ruby/object:UserObjectSettingColor
4969+ color: !ruby/object:Color
4970+ alpha: 1.0
4971+ blue: 0.704615854123751
4972+ green: 1.0
4973+ red: 0.0
4974+ name: *id012
4975+ options: *id013
4976+ breaks_cache:
4977+ image_setting: !ruby/object:UserObjectSettingImage
4978+ image_name:
4979+ name: *id014
4980+ options: *id015
4981+ breaks_cache:
4982+ title: New Theme
4983+ enabled: true
4984+ background_color_setting: !ruby/object:UserObjectSettingColor
4985+ color: !ruby/object:Color
4986+ alpha: 1.0
4987+ blue: 0.0
4988+ green: 0.0
4989+ red: 0.0
4990+ name: background_color
4991+ options:
4992+ :only_literal: true
4993+ :default:
4994+ - 0.0
4995+ - 0.0
4996+ - 0.0
4997+ - 1.0
4998+ breaks_cache:
4999+ name: &id042 theme
5000+ options: &id043
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: