TUIO C++ Developer API
TUIO::TuioObject Class Reference

#include <TuioObject.h>

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

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< TuioPointgetPath () 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
 
OneEuroFilterangleFilter
 
- 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< TuioPointpath
 
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
 
OneEuroFilterxposFilter
 
OneEuroFilteryposFilter
 
float posThreshold
 

Detailed Description

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

Author
Martin Kaltenbrunner
Version
1.1.6

Constructor & Destructor Documentation

◆ TuioObject() [1/3]

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.

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

◆ TuioObject() [2/3]

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.

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

◆ TuioObject() [3/3]

TuioObject::TuioObject ( TuioObject tobj)

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

Parameters
tobjthe TuioObject to assign

◆ ~TuioObject()

virtual TUIO::TuioObject::~TuioObject ( )
inlinevirtual

The destructor is doing nothing in particular.

Member Function Documentation

◆ getAngle()

float TuioObject::getAngle ( ) const

Returns the rotation angle of this TuioObject.

Returns
the rotation angle of this TuioObject

◆ getAngleDegrees()

float TuioObject::getAngleDegrees ( ) const

Returns the rotation angle in degrees of this TuioObject.

Returns
the rotation angle in degrees of this TuioObject

◆ getAngleSum()

float TuioObject::getAngleSum ( ) const

Returns the accumulated rotation angle of this TuioObject.

Returns
the accumulated rotation angle of this TuioObject

◆ getRotationAccel()

float TuioObject::getRotationAccel ( ) const

Returns the rotation acceleration of this TuioObject.

Returns
the rotation acceleration of this TuioObject

◆ getRotationSpeed()

float TuioObject::getRotationSpeed ( ) const

Returns the rotation speed of this TuioObject.

Returns
the rotation speed of this TuioObject

◆ getSymbolID()

int TuioObject::getSymbolID ( ) const

Returns the symbol ID of this TuioObject.

Returns
the symbol ID of this TuioObject

◆ isMoving()

bool TuioObject::isMoving ( ) const
virtual

Returns true of this TuioObject is moving.

Returns
true of this TuioObject is moving

Reimplemented from TUIO::TuioContainer.

◆ stop()

void TuioObject::stop ( TuioTime  ttime)
virtual

This method is used to calculate the speed and acceleration values of a TuioObject with unchanged position and angle.

Reimplemented from TUIO::TuioContainer.

◆ update() [1/4]

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.

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

◆ update() [2/4]

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.

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

◆ update() [3/4]

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.

Parameters
ttimethe TuioTime to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe angle coordinate to assign

◆ update() [4/4]

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.

Parameters
tobjthe TuioContainer to assign

Member Data Documentation

◆ angle

float TUIO::TuioObject::angle
protected

The rotation angle value.

◆ angle_sum

float TUIO::TuioObject::angle_sum
protected

The accumulated angle value.

◆ rotation_accel

float TUIO::TuioObject::rotation_accel
protected

The rotation acceleration value.

◆ rotation_speed

float TUIO::TuioObject::rotation_speed
protected

The rotation speed value.

◆ symbol_id

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 files: