TUIO C++ Developer API
TuioObject.h
1 /*
2  TUIO C++ Library
3  Copyright (c) 2005-2017 Martin Kaltenbrunner <martin@tuio.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 3.0 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library.
17 */
18 
19 #ifndef INCLUDED_TUIOOBJECT_H
20 #define INCLUDED_TUIOOBJECT_H
21 
22 #include "TuioContainer.h"
23 
24 namespace TUIO {
25 
32  class LIBDECL TuioObject: public TuioContainer {
33 
34  protected:
38  int symbol_id;
42  float angle;
46  float angle_sum;
55 
56  float angleThreshold;
57  OneEuroFilter *angleFilter;
58 
59  public:
61 
73  TuioObject (TuioTime ttime, long si, int sym, float xp, float yp, float a);
74 
85  TuioObject (long si, int sym, float xp, float yp, float a);
86 
93  TuioObject (TuioObject *tobj);
94 
98  virtual ~TuioObject() {
99  if (angleFilter) delete angleFilter;
100  };
101 
117  void update (TuioTime ttime, float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra);
118 
133  void update (float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra);
134 
145  void update (TuioTime ttime, float xp, float yp, float a);
146 
151  void stop (TuioTime ttime);
152 
160  void update (TuioObject *tobj);
161 
166  int getSymbolID() const;
167 
172  float getAngle() const;
173 
178  float getAngleSum() const;
179 
184  float getAngleDegrees() const;
185 
190  float getRotationSpeed() const;
191 
196  float getRotationAccel() const;
197 
202  bool isMoving() const;
203 
204  void addAngleThreshold(float thresh);
205 
206  void removeAngleThreshold();
207 
208  void addAngleFilter(float mcut, float beta);
209 
210  void removeAngleFilter();
211  };
212 }
213 #endif
Definition: OneEuroFilter.h:49
Definition: TuioContainer.h:44
int symbol_id
Definition: TuioObject.h:38
Definition: TuioTime.h:48
float rotation_speed
Definition: TuioObject.h:50
virtual ~TuioObject()
Definition: TuioObject.h:98
float angle_sum
Definition: TuioObject.h:46
Definition: FlashSender.h:166
virtual void update(TuioTime ttime, float xp, float yp)
Definition: TuioContainer.cpp:95
Definition: TuioObject.h:32
float angle
Definition: TuioObject.h:42
float rotation_accel
Definition: TuioObject.h:54