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

#include <TuioCursor.h>

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

Public Member Functions

 TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp)
 
 TuioCursor (long si, int ci, float xp, float yp)
 
 TuioCursor (TuioCursor *tcur)
 
virtual ~TuioCursor ()
 
int getCursorID () const
 
- 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 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

int cursor_id
 
- 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 TuioCursor class encapsulates /tuio/2Dcur TUIO cursors.

Author
Martin Kaltenbrunner
Version
1.1.6

Constructor & Destructor Documentation

◆ TuioCursor() [1/3]

TuioCursor::TuioCursor ( TuioTime  ttime,
long  si,
int  ci,
float  xp,
float  yp 
)

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

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

◆ TuioCursor() [2/3]

TuioCursor::TuioCursor ( long  si,
int  ci,
float  xp,
float  yp 
)

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

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

◆ TuioCursor() [3/3]

TuioCursor::TuioCursor ( TuioCursor tcur)

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

Parameters
tcurthe TuioCursor to assign

◆ ~TuioCursor()

virtual TUIO::TuioCursor::~TuioCursor ( )
inlinevirtual

The destructor is doing nothing in particular.

Member Function Documentation

◆ getCursorID()

int TuioCursor::getCursorID ( ) const

Returns the Cursor ID of this TuioCursor.

Returns
the Cursor ID of this TuioCursor

Member Data Documentation

◆ cursor_id

int TUIO::TuioCursor::cursor_id
protected

The individual cursor ID number that is assigned to each TuioCursor.


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