Public Member Functions | Protected Attributes

TUIO::TuioObject Class Reference

#include <TuioObject.h>

Inheritance diagram for TUIO::TuioObject:
TUIO::TuioContainer TUIO::TuioPoint

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:
ttimethe TuioTime to assign
sithe Session ID to assign
symthe Symbol ID to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe 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:
sithe Session ID to assign
symthe Symbol ID to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe 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:
tobjthe TuioObject to assign
TUIO::TuioObject::~TuioObject (  ) [inline]

The destructor is doing nothing in particular.


Member Function Documentation

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::getRotationAccel (  ) [inline]

Returns the rotation acceleration of this TuioObject.

Returns:
the rotation acceleration of this TuioObject
float TUIO::TuioObject::getRotationSpeed (  ) [inline]

Returns the rotation speed of this TuioObject.

Returns:
the rotation speed of this TuioObject
int TUIO::TuioObject::getSymbolID (  ) [inline]

Returns the symbol ID of this TuioObject.

Returns:
the symbol ID 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.

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 ( 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:
ttimethe TuioTime to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe angle coordinate to assign
xsthe X velocity to assign
ysthe Y velocity to assign
rsthe rotation velocity to assign
mathe motion acceleration to assign
rathe rotation acceleration to assign
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:
tobjthe TuioContainer 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:
ttimethe TuioTime to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe angle coordinate 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:
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe angle coordinate to assign
xsthe X velocity to assign
ysthe Y velocity to assign
rsthe rotation velocity to assign
mathe motion acceleration to assign
rathe rotation acceleration to assign

Member Data Documentation

float TUIO::TuioObject::angle [protected]

The rotation angle value.

The rotation acceleration value.

The rotation speed value.

int TUIO::TuioObject::symbol_id [protected]

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


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines