# TUIO::TuioObject Class Reference

`#include <TuioObject.h>`

Inheritance diagram for TUIO::TuioObject:

List of all members.

## 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)
| ~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 ()
float | getAngle ()
float | getAngleDegrees ()
float | getRotationSpeed ()
float | getRotationAccel ()
virtual bool | isMoving ()

## Protected Attributes

int | symbol_id
float | angle
float | rotation_speed
float | rotation_accel

## Detailed Description

The TuioObject class encapsulates /tuio/2Dobj TUIO objects.

Author:
  Martin Kaltenbrunner

Version:
  1.4

## Constructor & Destructor Documentation

TUIO::TuioObject::TuioObject | ( | TuioTime | ttime,
|  | long | si,
|  | int | sym,
|  | float | xp,
|  | float | yp,
|  | float | a |
| ) |  |  | `[inline]`

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.

Parameters:

  | 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

TUIO::TuioObject::TuioObject | ( | long | si,
|  | int | sym,
|  | float | xp,
|  | float | yp,
|  | float | a |
| ) |  |  | `[inline]`

This constructor takes the provided Session ID, Symbol ID, X and Y coordinate and angle, and assigs these values to the newly created TuioObject.

Parameters:

  | 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

TUIO::TuioObject::TuioObject | ( | TuioObject * | tobj | ) | `[inline]`

This constructor takes the atttibutes of the provided TuioObject and assigs these values to the newly created TuioObject.

Parameters:

  | tobj | the TuioObject to assign

TUIO::TuioObject::~TuioObject | ( |  | ) | `[inline]`

The destructor is doing nothing in particular.

## Member Function Documentation

void TUIO::TuioObject::update | ( | TuioTime | ttime,
|  | float | xp,
|  | float | yp,
|  | float | a,
|  | float | xs,
|  | float | ys,
|  | float | rs,
|  | float | ma,
|  | float | ra |
| ) |  |  | `[inline]`

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.

Parameters:

  | 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 TUIO::TuioObject::update | ( | float | xp,
|  | float | yp,
|  | float | a,
|  | float | xs,
|  | float | ys,
|  | float | rs,
|  | float | ma,
|  | float | ra |
| ) |  |  | `[inline]`

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.

Parameters:

  | 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 TUIO::TuioObject::update | ( | TuioTime | ttime,
|  | float | xp,
|  | float | yp,
|  | float | a |
| ) |  |  | `[inline]`

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.

Parameters:

  | ttime | the TuioTime to assign
  | xp | the X coordinate to assign
  | yp | the Y coordinate to assign
  | a | the angle coordinate to assign

void TUIO::TuioObject::stop | ( | TuioTime | ttime | ) | `[inline, 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 TUIO::TuioObject::update | ( | TuioObject * | tobj | ) | `[inline]`

Takes the atttibutes of the provided TuioObject and assigs these values to this TuioObject. The TuioTime time stamp of this TuioContainer remains unchanged.

Parameters:

  | tobj | the TuioContainer to assign

int TUIO::TuioObject::getSymbolID | ( |  | ) | `[inline]`

Returns the symbol ID of this TuioObject.

Returns:
  the symbol ID of this TuioObject

float TUIO::TuioObject::getAngle | ( |  | ) | `[inline]`

Returns the rotation angle of this TuioObject.

Returns:
  the rotation angle of this TuioObject

float TUIO::TuioObject::getAngleDegrees | ( |  | ) | `[inline]`

Returns the rotation angle in degrees of this TuioObject.

Returns:
  the rotation angle in degrees of this TuioObject

float TUIO::TuioObject::getRotationSpeed | ( |  | ) | `[inline]`

Returns the rotation speed of this TuioObject.

Returns:
  the rotation speed of this TuioObject

float TUIO::TuioObject::getRotationAccel | ( |  | ) | `[inline]`

Returns the rotation acceleration of this TuioObject.

Returns:
  the rotation acceleration of this TuioObject

virtual bool TUIO::TuioObject::isMoving | ( |  | ) | `[inline, virtual]`

Returns true of this TuioObject is moving.

Returns:
  true of this TuioObject is moving

Reimplemented from TUIO::TuioContainer.

## Member Data Documentation

int TUIO::TuioObject::symbol_id`[protected]`

The individual symbol ID number that is assigned to each TuioObject.

float TUIO::TuioObject::angle`[protected]`

The rotation angle value.

float TUIO::TuioObject::rotation_speed`[protected]`

The rotation speed value.

float TUIO::TuioObject::rotation_accel`[protected]`

The rotation acceleration value.

The documentation for this class was generated from the following file:

- TuioObject.h