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

#include <TuioBlob.h>

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

Public Member Functions

 TuioBlob (TuioTime ttime, long si, int bi, float xp, float yp, float a, float w, float h, float f)
 
 TuioBlob (long si, int bi, float xp, float yp, float a, float w, float h, float f)
 
 TuioBlob (TuioBlob *tblb)
 
virtual ~TuioBlob ()
 
int getBlobID () const
 
void setBlobID (int bi)
 
void update (TuioTime ttime, float xp, float yp, float a, float w, float h, float f, float xs, float ys, float rs, float ma, float ra)
 
void update (float xp, float yp, float a, float w, float h, float f, float xs, float ys, float rs, float ma, float ra)
 
void update (TuioTime ttime, float xp, float yp, float a, float w, float h, float f)
 
void stop (TuioTime ttime)
 
void update (TuioBlob *tblb)
 
float getWidth () const
 
float getHeight () const
 
int getScreenWidth (int w) const
 
int getScreenHeight (int h) const
 
float getArea () 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 ()
 
void addSizeThreshold (float thresh)
 
void removeSizeThreshold ()
 
void addSizeFilter (float mcut, float beta)
 
void removeSizeFilter ()
 
- 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 blob_id
 
float angle
 
float angle_sum
 
float width
 
float height
 
float area
 
float rotation_speed
 
float rotation_accel
 
float angleThreshold
 
OneEuroFilterangleFilter
 
float sizeThreshold
 
OneEuroFilterwidthFilter
 
OneEuroFilterheightFilter
 
- 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 TuioBlob class encapsulates /tuio/2Dblb TUIO objects.

Author
Martin Kaltenbrunner
Version
1.1.6

Constructor & Destructor Documentation

◆ TuioBlob() [1/3]

TuioBlob::TuioBlob ( TuioTime  ttime,
long  si,
int  bi,
float  xp,
float  yp,
float  a,
float  w,
float  h,
float  f 
)

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

Parameters
ttimethe TuioTime to assign
sithe Session ID to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe angle to assign
wthe width to assign
hthe height to assign
fthe area to assign

◆ TuioBlob() [2/3]

TuioBlob::TuioBlob ( long  si,
int  bi,
float  xp,
float  yp,
float  a,
float  w,
float  h,
float  f 
)

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

Parameters
sithe Session ID to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe angle to assign
wthe width to assign
hthe height to assign
fthe area to assign

◆ TuioBlob() [3/3]

TuioBlob::TuioBlob ( TuioBlob tblb)

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

Parameters
tblbthe TuioBlob to assign

◆ ~TuioBlob()

virtual TUIO::TuioBlob::~TuioBlob ( )
inlinevirtual

The destructor is doing nothing in particular.

Member Function Documentation

◆ getAngle()

float TuioBlob::getAngle ( ) const

Returns the rotation angle of this TuioBlob.

Returns
the rotation angle of this TuioBlob

◆ getAngleDegrees()

float TuioBlob::getAngleDegrees ( ) const

Returns the rotation angle in degrees of this TuioBlob.

Returns
the rotation angle in degrees of this TuioBlob

◆ getAngleSum()

float TuioBlob::getAngleSum ( ) const

Returns the accumulated rotation angle of this TuioBlob.

Returns
the accumulated rotation angle of this TuioBlob

◆ getArea()

float TuioBlob::getArea ( ) const

Returns the area of this TuioBlob.

Returns
the area of this TuioBlob

◆ getBlobID()

int TuioBlob::getBlobID ( ) const

Returns the Blob ID of this TuioBlob.

Returns
the Blob ID of this TuioBlob

◆ getHeight()

float TuioBlob::getHeight ( ) const

Returns the height of this TuioBlob.

Returns
the height of this TuioBlob

◆ getRotationAccel()

float TuioBlob::getRotationAccel ( ) const

Returns the rotation acceleration of this TuioBlob.

Returns
the rotation acceleration of this TuioBlob

◆ getRotationSpeed()

float TuioBlob::getRotationSpeed ( ) const

Returns the rotation speed of this TuioBlob.

Returns
the rotation speed of this TuioBlob

◆ getScreenHeight()

int TuioBlob::getScreenHeight ( int  h) const

Returns the height of this TuioBlob.

Returns
the height of this TuioBlob

◆ getScreenWidth()

int TuioBlob::getScreenWidth ( int  w) const

Returns the width of this TuioBlob.

Returns
the width of this TuioBlob

◆ getWidth()

float TuioBlob::getWidth ( ) const

Returns the width of this TuioBlob.

Returns
the width of this TuioBlob

◆ isMoving()

bool TuioBlob::isMoving ( ) const
virtual

Returns true of this TuioBlob is moving.

Returns
true of this TuioBlob is moving

Reimplemented from TUIO::TuioContainer.

◆ setBlobID()

void TuioBlob::setBlobID ( int  bi)

Sets the Blob ID of this TuioBlob.

Parameters
bithe new Blob ID for this TuioBlob

◆ stop()

void TuioBlob::stop ( TuioTime  ttime)
virtual

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

Reimplemented from TUIO::TuioContainer.

◆ update() [1/4]

void TuioBlob::update ( TuioTime  ttime,
float  xp,
float  yp,
float  a,
float  w,
float  h,
float  f,
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 TuioBlob attributes.

Parameters
ttimethe TuioTime to assign
xpthe X coordinate to assign
ypthe Y coordinate to assign
athe rotation angle to assign
wthe width to assign
hthe height to assign
fthe area 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 TuioBlob::update ( float  xp,
float  yp,
float  a,
float  w,
float  h,
float  f,
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 to assign
wthe width to assign
hthe height to assign
fthe area 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 TuioBlob::update ( TuioTime  ttime,
float  xp,
float  yp,
float  a,
float  w,
float  h,
float  f 
)

Takes a TuioTime argument and assigns it along with the provided X and Y coordinate and angle to the private TuioBlob 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
wthe width to assign
hthe height to assign
fthe area to assign

◆ update() [4/4]

void TuioBlob::update ( TuioBlob tblb)

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

Parameters
tblbthe TuioContainer to assign

Member Data Documentation

◆ angle

float TUIO::TuioBlob::angle
protected

The rotation angle value.

◆ angle_sum

float TUIO::TuioBlob::angle_sum
protected

The accumulated angle value.

◆ area

float TUIO::TuioBlob::area
protected

The area value.

◆ blob_id

int TUIO::TuioBlob::blob_id
protected

The individual blob ID number that is assigned to each TuioBlob.

◆ height

float TUIO::TuioBlob::height
protected

The height value.

◆ rotation_accel

float TUIO::TuioBlob::rotation_accel
protected

The rotation acceleration value.

◆ rotation_speed

float TUIO::TuioBlob::rotation_speed
protected

The rotation speed value.

◆ width

float TUIO::TuioBlob::width
protected

The width value.


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