TUIO C++ Developer API
|
#include <TuioObject.h>
Public Member Functions | |
TuioObject (TuioTime ttime, long si, int sym, float xp, float yp, float a) | |
TuioObject (long si, int sym, float xp, float yp, float a) | |
TuioObject (TuioObject *tobj) | |
virtual | ~TuioObject () |
void | update (TuioTime ttime, float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra) |
void | update (float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra) |
void | update (TuioTime ttime, float xp, float yp, float a) |
void | stop (TuioTime ttime) |
void | update (TuioObject *tobj) |
int | getSymbolID () const |
float | getAngle () const |
float | getAngleSum () const |
float | getAngleDegrees () const |
float | getRotationSpeed () const |
float | getRotationAccel () const |
bool | isMoving () const |
void | addAngleThreshold (float thresh) |
void | removeAngleThreshold () |
void | addAngleFilter (float mcut, float beta) |
void | removeAngleFilter () |
Public Member Functions inherited from TUIO::TuioContainer | |
TuioContainer (TuioTime ttime, long si, float xp, float yp) | |
TuioContainer (long si, float xp, float yp) | |
TuioContainer (TuioContainer *tcon) | |
virtual | ~TuioContainer () |
virtual void | setTuioSource (int src_id, const char *src_name, const char *src_addr) |
virtual const char * | getTuioSourceName () const |
virtual const char * | getTuioSourceAddress () const |
virtual int | getTuioSourceID () const |
virtual void | update (TuioTime ttime, float xp, float yp) |
virtual void | update (TuioTime ttime, float xp, float yp, float xs, float ys, float ma) |
virtual void | update (float xp, float yp, float xs, float ys, float ma) |
virtual void | update (TuioContainer *tcon) |
virtual void | remove (TuioTime ttime) |
virtual long | getSessionID () const |
virtual void | setSessionID (long s_id) |
virtual float | getXSpeed () const |
virtual float | getYSpeed () const |
virtual TuioPoint | getPosition () const |
virtual std::list< TuioPoint > | getPath () const |
virtual float | getMotionSpeed () const |
virtual float | getMotionAccel () const |
virtual int | getTuioState () const |
virtual TuioPoint | predictPosition () |
Public Member Functions inherited from TUIO::TuioPoint | |
TuioPoint (float xp, float yp) | |
TuioPoint (TuioTime ttime, float xp, float yp) | |
TuioPoint (TuioPoint *tpoint) | |
virtual | ~TuioPoint () |
void | update (TuioPoint *tpoint) |
void | update (float xp, float yp) |
void | update (TuioTime ttime, float xp, float yp) |
float | getX () const |
float | getY () const |
float | getDistance (float xp, float yp) const |
float | getScreenDistance (float xp, float yp, int w, int h) const |
float | getDistance (TuioPoint *tpoint) const |
float | getAngle (float xp, float yp) const |
float | getAngle (TuioPoint *tpoint) const |
float | getAngleDegrees (float xp, float yp) const |
float | getAngleDegrees (TuioPoint *tpoint) const |
int | getScreenX (int width) const |
int | getScreenY (int height) const |
TuioTime | getTuioTime () const |
TuioTime | getStartTime () const |
void | addPositionThreshold (float thresh) |
void | removePositionThreshold () |
void | addPositionFilter (float mcut, float beta) |
void | removePositionFilter () |
Protected Attributes | |
int | symbol_id |
float | angle |
float | angle_sum |
float | rotation_speed |
float | rotation_accel |
float | angleThreshold |
OneEuroFilter * | angleFilter |
Protected Attributes inherited from TUIO::TuioContainer | |
long | session_id |
float | x_speed |
float | y_speed |
float | motion_speed |
float | motion_accel |
float | x_accel |
float | y_accel |
std::list< TuioPoint > | path |
int | state |
int | source_id |
std::string | source_name |
std::string | source_addr |
Protected Attributes inherited from TUIO::TuioPoint | |
float | xpos |
float | ypos |
TuioTime | currentTime |
TuioTime | startTime |
OneEuroFilter * | xposFilter |
OneEuroFilter * | yposFilter |
float | posThreshold |
The TuioObject class encapsulates /tuio/2Dobj TUIO objects.
TuioObject::TuioObject | ( | TuioTime | ttime, |
long | si, | ||
int | sym, | ||
float | xp, | ||
float | yp, | ||
float | a | ||
) |
This constructor takes a TuioTime argument and assigns it along with the provided Session ID, Symbol ID, X and Y coordinate and angle to the newly created TuioObject.
ttime | the TuioTime to assign |
si | the Session ID to assign |
sym | the Symbol ID to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle to assign |
TuioObject::TuioObject | ( | long | si, |
int | sym, | ||
float | xp, | ||
float | yp, | ||
float | a | ||
) |
This constructor takes the provided Session ID, Symbol ID, X and Y coordinate and angle, and assigs these values to the newly created TuioObject.
si | the Session ID to assign |
sym | the Symbol ID to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle to assign |
TuioObject::TuioObject | ( | TuioObject * | tobj | ) |
This constructor takes the atttibutes of the provided TuioObject and assigs these values to the newly created TuioObject.
tobj | the TuioObject to assign |
|
inlinevirtual |
The destructor is doing nothing in particular.
float TuioObject::getAngle | ( | ) | const |
Returns the rotation angle of this TuioObject.
float TuioObject::getAngleDegrees | ( | ) | const |
Returns the rotation angle in degrees of this TuioObject.
float TuioObject::getAngleSum | ( | ) | const |
Returns the accumulated rotation angle of this TuioObject.
float TuioObject::getRotationAccel | ( | ) | const |
Returns the rotation acceleration of this TuioObject.
float TuioObject::getRotationSpeed | ( | ) | const |
Returns the rotation speed of this TuioObject.
int TuioObject::getSymbolID | ( | ) | const |
Returns the symbol ID of this TuioObject.
|
virtual |
Returns true of this TuioObject is moving.
Reimplemented from TUIO::TuioContainer.
|
virtual |
This method is used to calculate the speed and acceleration values of a TuioObject with unchanged position and angle.
Reimplemented from TUIO::TuioContainer.
void TuioObject::update | ( | TuioTime | ttime, |
float | xp, | ||
float | yp, | ||
float | a, | ||
float | xs, | ||
float | ys, | ||
float | rs, | ||
float | ma, | ||
float | ra | ||
) |
Takes a TuioTime argument and assigns it along with the provided X and Y coordinate, angle, X and Y velocity, motion acceleration, rotation speed and rotation acceleration to the private TuioObject attributes.
ttime | the TuioTime to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle coordinate to assign |
xs | the X velocity to assign |
ys | the Y velocity to assign |
rs | the rotation velocity to assign |
ma | the motion acceleration to assign |
ra | the rotation acceleration to assign |
void TuioObject::update | ( | float | xp, |
float | yp, | ||
float | a, | ||
float | xs, | ||
float | ys, | ||
float | rs, | ||
float | ma, | ||
float | ra | ||
) |
Assigns the provided X and Y coordinate, angle, X and Y velocity, motion acceleration rotation velocity and rotation acceleration to the private TuioContainer attributes. The TuioTime time stamp remains unchanged.
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle coordinate to assign |
xs | the X velocity to assign |
ys | the Y velocity to assign |
rs | the rotation velocity to assign |
ma | the motion acceleration to assign |
ra | the rotation acceleration to assign |
void TuioObject::update | ( | TuioTime | ttime, |
float | xp, | ||
float | yp, | ||
float | a | ||
) |
Takes a TuioTime argument and assigns it along with the provided X and Y coordinate and angle to the private TuioObject attributes. The speed and accleration values are calculated accordingly.
ttime | the TuioTime to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle coordinate to assign |
void TuioObject::update | ( | TuioObject * | tobj | ) |
Takes the atttibutes of the provided TuioObject and assigs these values to this TuioObject. The TuioTime time stamp of this TuioContainer remains unchanged.
tobj | the TuioContainer to assign |
|
protected |
The rotation angle value.
|
protected |
The accumulated angle value.
|
protected |
The rotation acceleration value.
|
protected |
The rotation speed value.
|
protected |
The individual symbol ID number that is assigned to each TuioObject.