TUIO C++ Developer API
|
#include <TuioBlob.h>
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< TuioPoint > | getPath () 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 |
OneEuroFilter * | angleFilter |
float | sizeThreshold |
OneEuroFilter * | widthFilter |
OneEuroFilter * | heightFilter |
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< TuioPoint > | path |
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 |
OneEuroFilter * | xposFilter |
OneEuroFilter * | yposFilter |
float | posThreshold |
The TuioBlob class encapsulates /tuio/2Dblb TUIO objects.
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.
ttime | the TuioTime to assign |
si | the Session ID to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle to assign |
w | the width to assign |
h | the height to assign |
f | the area to assign |
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.
si | the Session ID to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle to assign |
w | the width to assign |
h | the height to assign |
f | the area to assign |
TuioBlob::TuioBlob | ( | TuioBlob * | tblb | ) |
|
inlinevirtual |
The destructor is doing nothing in particular.
float TuioBlob::getAngle | ( | ) | const |
float TuioBlob::getAngleDegrees | ( | ) | const |
float TuioBlob::getAngleSum | ( | ) | const |
float TuioBlob::getArea | ( | ) | const |
int TuioBlob::getBlobID | ( | ) | const |
float TuioBlob::getHeight | ( | ) | const |
float TuioBlob::getRotationAccel | ( | ) | const |
float TuioBlob::getRotationSpeed | ( | ) | const |
int TuioBlob::getScreenHeight | ( | int | h | ) | const |
int TuioBlob::getScreenWidth | ( | int | w | ) | const |
float TuioBlob::getWidth | ( | ) | const |
|
virtual |
Returns true of this TuioBlob is moving.
Reimplemented from TUIO::TuioContainer.
void TuioBlob::setBlobID | ( | int | bi | ) |
|
virtual |
This method is used to calculate the speed and acceleration values of a TuioBlob with unchanged position and angle.
Reimplemented from TUIO::TuioContainer.
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.
ttime | the TuioTime to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the rotation angle to assign |
w | the width to assign |
h | the height to assign |
f | the area to assign |
xs | the X velocity to assign |
ys | the Y velocity to assign |
rs | the rotation velocity to assign |
ma | the motion acceleration to assign |
ra | the rotation acceleration to assign |
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.
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle to assign |
w | the width to assign |
h | the height to assign |
f | the area to assign |
xs | the X velocity to assign |
ys | the Y velocity to assign |
rs | the rotation velocity to assign |
ma | the motion acceleration to assign |
ra | the rotation acceleration to assign |
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.
ttime | the TuioTime to assign |
xp | the X coordinate to assign |
yp | the Y coordinate to assign |
a | the angle coordinate to assign |
w | the width to assign |
h | the height to assign |
f | the area to assign |
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.
tblb | the TuioContainer to assign |
|
protected |
The rotation angle value.
|
protected |
The accumulated angle value.
|
protected |
The area value.
|
protected |
The individual blob ID number that is assigned to each TuioBlob.
|
protected |
The height value.
|
protected |
The rotation acceleration value.
|
protected |
The rotation speed value.
|
protected |
The width value.