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

#include <TuioContainer.h>

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

Public Member Functions

 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 stop (TuioTime ttime)
 
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 bool isMoving () 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

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 abstract TuioContainer class defines common attributes that apply to both subclasses TuioObject and TuioCursor.

Author
Martin Kaltenbrunner
Version
1.1.6

Constructor & Destructor Documentation

◆ TuioContainer() [1/3]

TuioContainer::TuioContainer ( TuioTime  ttime,
long  si,
float  xp,
float  yp 
)

This constructor takes a TuioTime argument and assigns it along with the provided Session ID, X and Y coordinate to the newly created TuioContainer.

Parameters
ttimethe TuioTime to assign
sithe Session ID to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign

◆ TuioContainer() [2/3]

TuioContainer::TuioContainer ( long  si,
float  xp,
float  yp 
)

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

Parameters
sithe Session ID to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign

◆ TuioContainer() [3/3]

TuioContainer::TuioContainer ( TuioContainer tcon)

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

Parameters
tconthe TuioContainer to assign

◆ ~TuioContainer()

virtual TUIO::TuioContainer::~TuioContainer ( )
inlinevirtual

The destructor is doing nothing in particular.

Member Function Documentation

◆ getMotionAccel()

float TuioContainer::getMotionAccel ( ) const
virtual

Returns the motion acceleration of this TuioContainer.

Returns
the motion acceleration of this TuioContainer

◆ getMotionSpeed()

float TuioContainer::getMotionSpeed ( ) const
virtual

Returns the motion speed of this TuioContainer.

Returns
the motion speed of this TuioContainer

◆ getPath()

std::list< TuioPoint > TuioContainer::getPath ( ) const
virtual

Returns the path of this TuioContainer.

Returns
the path of this TuioContainer

◆ getPosition()

TuioPoint TuioContainer::getPosition ( ) const
virtual

Returns the position of this TuioContainer.

Returns
the position of this TuioContainer

◆ getSessionID()

long TuioContainer::getSessionID ( ) const
virtual

Returns the Session ID of this TuioContainer.

Returns
the Session ID of this TuioContainer

◆ getTuioSourceAddress()

const char * TuioContainer::getTuioSourceAddress ( ) const
virtual

Returns the address of the TUIO source

◆ getTuioSourceID()

int TuioContainer::getTuioSourceID ( ) const
virtual

Returns the ID of the TUIO source

◆ getTuioSourceName()

const char * TuioContainer::getTuioSourceName ( ) const
virtual

Returns the name of the TUIO source

◆ getTuioState()

int TuioContainer::getTuioState ( ) const
virtual

Returns the TUIO state of this TuioContainer.

Returns
the TUIO state of this TuioContainer

◆ getXSpeed()

float TuioContainer::getXSpeed ( ) const
virtual

Returns the X velocity of this TuioContainer.

Returns
the X velocity of this TuioContainer

◆ getYSpeed()

float TuioContainer::getYSpeed ( ) const
virtual

Returns the Y velocity of this TuioContainer.

Returns
the Y velocity of this TuioContainer

◆ isMoving()

bool TuioContainer::isMoving ( ) const
virtual

Returns true of this TuioContainer is moving.

Returns
true of this TuioContainer is moving

Reimplemented in TUIO::TuioBlob, and TUIO::TuioObject.

◆ remove()

void TuioContainer::remove ( TuioTime  ttime)
virtual

Assigns the REMOVE state to this TuioContainer and sets its TuioTime time stamp to the provided TuioTime argument.

Parameters
ttimethe TuioTime to assign

◆ setSessionID()

void TuioContainer::setSessionID ( long  s_id)
virtual

Sets the Session ID of this TuioContainer.

Parameters
s_idthe new Session ID for this TuioContainer

◆ setTuioSource()

void TuioContainer::setTuioSource ( int  src_id,
const char *  src_name,
const char *  src_addr 
)
virtual

Sets the ID, name and address of the TUIO source

Parameters
src_idthe ID of the TUIO source
src_namethe name of the TUIO source
src_addrthe address of the TUIO source

◆ stop()

void TuioContainer::stop ( TuioTime  ttime)
virtual

This method is used to calculate the speed and acceleration values of TuioContainers with unchanged positions.

Reimplemented in TUIO::TuioBlob, and TUIO::TuioObject.

◆ update() [1/4]

void TuioContainer::update ( TuioTime  ttime,
float  xp,
float  yp 
)
virtual

Takes a TuioTime argument and assigns it along with the provided X and Y coordinate to the private TuioContainer attributes. The speed and accleration values are calculated accordingly.

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

◆ update() [2/4]

void TuioContainer::update ( TuioTime  ttime,
float  xp,
float  yp,
float  xs,
float  ys,
float  ma 
)
virtual

Takes a TuioTime argument and assigns it along with the provided X and Y coordinate, X and Y velocity and acceleration to the private TuioContainer attributes.

Parameters
ttimethe TuioTime to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
xsthe X velocity to assign
ysthe Y velocity to assign
mathe acceleration to assign

◆ update() [3/4]

void TuioContainer::update ( float  xp,
float  yp,
float  xs,
float  ys,
float  ma 
)
virtual

Assigns the provided X and Y coordinate, X and Y velocity and acceleration to the private TuioContainer attributes. The TuioTime time stamp remains unchanged.

Parameters
xpthe X coordinate to assign
ypthe Y coordinate to assign
xsthe X velocity to assign
ysthe Y velocity to assign
mathe acceleration to assign

◆ update() [4/4]

void TuioContainer::update ( TuioContainer tcon)
virtual

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

Parameters
tconthe TuioContainer to assign

Member Data Documentation

◆ motion_accel

float TUIO::TuioContainer::motion_accel
protected

The motion acceleration value.

◆ motion_speed

float TUIO::TuioContainer::motion_speed
protected

The motion speed value.

◆ path

std::list<TuioPoint> TUIO::TuioContainer::path
protected

A List of TuioPoints containing all the previous positions of the TUIO component.

◆ session_id

long TUIO::TuioContainer::session_id
protected

The unique session ID number that is assigned to each TUIO object or cursor.

◆ source_addr

std::string TUIO::TuioContainer::source_addr
protected

The address of the TUIO source

◆ source_id

int TUIO::TuioContainer::source_id
protected

The ID of the TUIO source

◆ source_name

std::string TUIO::TuioContainer::source_name
protected

The name of the TUIO source

◆ state

int TUIO::TuioContainer::state
protected

Reflects the current state of the TuioComponent

◆ x_speed

float TUIO::TuioContainer::x_speed
protected

The X-axis velocity value.

◆ y_speed

float TUIO::TuioContainer::y_speed
protected

The Y-axis velocity value.


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