© 2006-2007 ETH Zurich

org.ximtec.igesture.io.tuio.tuio3D
Class TuioObject3D

java.lang.Object
  extended by org.ximtec.igesture.io.tuio.tuio3D.TuioPoint3D
      extended by org.ximtec.igesture.io.tuio.tuio3D.TuioObject3D
All Implemented Interfaces:
AbstractTuioContainer, AbstractTuioObject, AbstractTuioPoint

public class TuioObject3D
extends TuioPoint3D
implements AbstractTuioObject

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

Version:
1.4
Author:
Martin Kaltenbrunner, Bjorn Puype

Field Summary
protected  float angle_XY
          The rotation angle value in XY plane.
protected  float angle_XZ
          The rotation angle value in XZ plane.
protected  float angle_YZ
          The rotation angle value in YZ plane.
protected  float motion_accel
          The motion acceleration value.
protected  float motion_speed
          The motion speed value.
protected  Vector<TuioPoint3D> path
          A Vector of TuioPoint3Ds containing all the previous positions of the TUIO component.
protected  float rotation_accel
          The rotation acceleration value.
protected  float rotation_speed_XY
          The rotation speed value.
protected  float rotation_speed_XZ
           
protected  float rotation_speed_YZ
           
protected  long session_id
          The unique session ID number that is assigned to each TUIO object or cursor.
protected  int state
          Reflects the current state of the TuioComponent
protected  int symbol_id
          The individual symbol ID number that is assigned to each TuioObject.
static int TUIO_ACCELERATING
          Defines the ACCELERATING state.
static int TUIO_ADDED
          Defines the ADDED state.
static int TUIO_DECELERATING
          Defines the DECELERATING state.
static int TUIO_REMOVED
          Defines the REMOVED state.
static int TUIO_ROTATING
          Defines the ROTATING state.
static int TUIO_STOPPED
          Defines the STOPPED state.
protected  float x_speed
          The X-axis velocity value.
static int XY
          XY plane
static int XZ
          XZ plane
protected  float y_speed
          The Y-axis velocity value.
static int YZ
          YZ plane
protected  float z_speed
          The Z-axis velocity value.
 
Fields inherited from class org.ximtec.igesture.io.tuio.tuio3D.TuioPoint3D
currentTime, startTime, xpos, ypos, zpos
 
Constructor Summary
TuioObject3D(long si, int sym, float xp, float yp, float zp, float a, float b, float c)
          This constructor takes the provided Session ID, Symbol ID, X, Y and Z coordinate and angles between the different planes, and assigns these values to the newly created TuioObject3D.
TuioObject3D(TuioObject3D tobj)
          This constructor takes the attributes of the provided TuioObject3D and assigns these values to the newly created TuioObject3D.
TuioObject3D(TuioTime ttime, long si, int sym, float xp, float yp, float zp, float a, float b, float c)
          This constructor takes a TuioTime argument and assigns it along with the provided Session ID, Symbol ID, X, Y and Z coordinate and angles between the different planes to the newly created TuioObject3D.
 
Method Summary
 float getAngle(int planes)
          Returns the requested rotation angle of this TuioObject3D.
 float getAngleDegrees(int planes)
          Returns the rotation angle in degrees of this TuioObject3D.
 float getAngleXY()
           
 float getAngleXZ()
           
 float getAngleYZ()
           
 float getMotionAccel()
          Returns the motion acceleration of this TuioContainer3D.
 float getMotionSpeed()
          Returns the motion speed of this TuioContainer3D.
 Vector<TuioPoint3D> getPath()
          Returns the path of this TuioContainer3D.
 TuioPoint3D getPosition()
          Returns the position of this TuioContainer3D.
 float getRotationAccel()
          Returns the rotation acceleration of this TuioObject3D.
 float getRotationSpeedXY()
          Returns the rotation speed of this TuioObject3D.
 float getRotationSpeedXZ()
           
 float getRotationSpeedYZ()
           
 long getSessionID()
          Returns the Session ID of this TuioContainer3D.
 int getSymbol_id()
           
 int getSymbolID()
          Returns the symbol ID of this TuioObject3D.
 int getTuioState()
          Returns the TUIO state of this TuioContainer3D.
 float getXSpeed()
          Returns the X velocity of this TuioContainer3D.
 float getYSpeed()
          Returns the Y velocity of this TuioContainer3D.
 float getZSpeed()
          Returns the Z velocity of this TuioContainer3D.
 boolean isMoving()
          Returns true of this TuioObject3D is moving.
 void remove(TuioTime ttime)
          Assigns the REMOVE state to this TuioContainer3D and sets its TuioTime time stamp to the provided TuioTime argument.
 void stop(TuioTime ttime)
          This method is used to calculate the speed and acceleration values of a TuioObject3D with unchanged position and angle.
 void update(float xp, float yp, float zp, float xs, float ys, float zs, float ma)
          Assigns the provided X, Y and Z coordinate; X, Y and Z velocity and acceleration to the private TuioContainer attributes.
 void update(float xp, float yp, float zp, float a, float b, float c, float xs, float ys, float zs, float rsXY, float rsXZ, float rsYZ, float ma, float ra)
          Assigns the provided X, Y and Z coordinate, angle, X, Y and Z velocity, motion acceleration rotation velocity and rotation acceleration to the private TuioContainer3D attributes.
 void update(org.ximtec.igesture.io.tuio.tuio3D.TuioContainer3D tcon)
          Takes the attributes of the provided TuioContainer3D and assigns these values to this TuioContainer3D.
 void update(TuioObject3D tobj)
          Takes the attributes of the provided TuioObject3D and assigns these values to this TuioObject3D.
 void update(TuioTime ttime, float xp, float yp, float zp)
          Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate to the private TuioContainer3D attributes.
 void update(TuioTime ttime, float xp, float yp, float zp, float a, float b, float c)
          Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate and angles to the private TuioObject3D attributes.
 void update(TuioTime ttime, float xp, float yp, float zp, float xs, float ys, float zs, float ma)
          Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate; X, Y and Z velocity and acceleration to the private TuioContainer3D attributes.
 void update(TuioTime ttime, float xp, float yp, float zp, float a, float b, float c, float xs, float ys, float zs, float rsXY, float rsXZ, float rsYZ, float ma, float ra)
          Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate, angle, X, Y and Z velocity, motion acceleration, rotation speed and rotation acceleration to the private TuioObject3D attributes.
 
Methods inherited from class org.ximtec.igesture.io.tuio.tuio3D.TuioPoint3D
getAngle, getAngle, getAngleDegrees, getAngleDegrees, getDistance, getDistance, getScreenX, getScreenY, getScreenZ, getStartTime, getTuioTime, getX, getY, getZ, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XY

public static final int XY
XY plane

See Also:
Constant Field Values

XZ

public static final int XZ
XZ plane

See Also:
Constant Field Values

YZ

public static final int YZ
YZ plane

See Also:
Constant Field Values

symbol_id

protected int symbol_id
The individual symbol ID number that is assigned to each TuioObject.


angle_XY

protected float angle_XY
The rotation angle value in XY plane.


angle_XZ

protected float angle_XZ
The rotation angle value in XZ plane.


angle_YZ

protected float angle_YZ
The rotation angle value in YZ plane.


rotation_speed_XY

protected float rotation_speed_XY
The rotation speed value.


rotation_speed_XZ

protected float rotation_speed_XZ

rotation_speed_YZ

protected float rotation_speed_YZ

rotation_accel

protected float rotation_accel
The rotation acceleration value.


TUIO_ROTATING

public static final int TUIO_ROTATING
Defines the ROTATING state.

See Also:
Constant Field Values

session_id

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


x_speed

protected float x_speed
The X-axis velocity value.


y_speed

protected float y_speed
The Y-axis velocity value.


z_speed

protected float z_speed
The Z-axis velocity value.


motion_speed

protected float motion_speed
The motion speed value.


motion_accel

protected float motion_accel
The motion acceleration value.


path

protected Vector<TuioPoint3D> path
A Vector of TuioPoint3Ds containing all the previous positions of the TUIO component.


TUIO_ADDED

public static final int TUIO_ADDED
Defines the ADDED state.

See Also:
Constant Field Values

TUIO_ACCELERATING

public static final int TUIO_ACCELERATING
Defines the ACCELERATING state.

See Also:
Constant Field Values

TUIO_DECELERATING

public static final int TUIO_DECELERATING
Defines the DECELERATING state.

See Also:
Constant Field Values

TUIO_STOPPED

public static final int TUIO_STOPPED
Defines the STOPPED state.

See Also:
Constant Field Values

TUIO_REMOVED

public static final int TUIO_REMOVED
Defines the REMOVED state.

See Also:
Constant Field Values

state

protected int state
Reflects the current state of the TuioComponent

Constructor Detail

TuioObject3D

public TuioObject3D(TuioTime ttime,
                    long si,
                    int sym,
                    float xp,
                    float yp,
                    float zp,
                    float a,
                    float b,
                    float c)
This constructor takes a TuioTime argument and assigns it along with the provided Session ID, Symbol ID, X, Y and Z coordinate and angles between the different planes to the newly created TuioObject3D.

Parameters:
ttime - the TuioTime to assign
si - the Session ID to assign
sym - the Symbol ID to assign
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign
a - the angle of the XY plane to assign
b - the angle of the XZ plane to assign
c - the angle of the YZ plane to assign

TuioObject3D

public TuioObject3D(long si,
                    int sym,
                    float xp,
                    float yp,
                    float zp,
                    float a,
                    float b,
                    float c)
This constructor takes the provided Session ID, Symbol ID, X, Y and Z coordinate and angles between the different planes, and assigns these values to the newly created TuioObject3D.

Parameters:
si - the Session ID to assign
sym - the Symbol ID to assign
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign
a - the angle of the XY plane to assign
b - the angle of the XZ plane to assign
c - the angle of the YZ plane to assign

TuioObject3D

public TuioObject3D(TuioObject3D tobj)
This constructor takes the attributes of the provided TuioObject3D and assigns these values to the newly created TuioObject3D.

Parameters:
tobj - the TuioObject3D to assign
Method Detail

update

public void update(TuioTime ttime,
                   float xp,
                   float yp,
                   float zp,
                   float a,
                   float b,
                   float c,
                   float xs,
                   float ys,
                   float zs,
                   float rsXY,
                   float rsXZ,
                   float rsYZ,
                   float ma,
                   float ra)
Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate, angle, X, Y and Z velocity, motion acceleration, rotation speed and rotation acceleration to the private TuioObject3D attributes.

Parameters:
ttime - the TuioTime to assign
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign
a - the angle coordinate to assign (XY plane)
b - the angle coordinate to assign (XZ plane)
c - the angle coordinate to assign (YZ plane)
xs - the X velocity to assign
ys - the Y velocity to assign
zs - the Z velocity to assign
rsXY - the rotation velocity to assign in the XY plane
rsXZ - the rotation velocity to assign in the XZ plane
rsYZ - the rotation velocity to assign in the YZ plane
ma - the motion acceleration to assign
ra - the rotation acceleration to assign

update

public void update(float xp,
                   float yp,
                   float zp,
                   float a,
                   float b,
                   float c,
                   float xs,
                   float ys,
                   float zs,
                   float rsXY,
                   float rsXZ,
                   float rsYZ,
                   float ma,
                   float ra)
Assigns the provided X, Y and Z coordinate, angle, X, Y and Z velocity, motion acceleration rotation velocity and rotation acceleration to the private TuioContainer3D attributes. The TuioTime time stamp remains unchanged.

Parameters:
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign
a - the angle coordinate to assign (XY plane)
b - the angle coordinate to assign (XZ plane)
c - the angle coordinate to assign (YZ plane)
xs - the X velocity to assign
ys - the Y velocity to assign
zs - the Z velocity to assign
rsXY - the rotation velocity to assign in the XY plane
rsXZ - the rotation velocity to assign in the XZ plane
rsYZ - the rotation velocity to assign in the YZ plane
ma - the motion acceleration to assign
ra - the rotation acceleration to assign

update

public void update(TuioTime ttime,
                   float xp,
                   float yp,
                   float zp,
                   float a,
                   float b,
                   float c)
Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate and angles to the private TuioObject3D attributes. The speed and acceleration values are calculated accordingly.

Parameters:
ttime - the TuioTime to assign
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign
a - the angle coordinate to assign for XY plane
b - the angle coordinate to assign for XZ plane
c - the angle coordinate to assign for YZ plane

update

public void update(TuioObject3D tobj)
Takes the attributes of the provided TuioObject3D and assigns these values to this TuioObject3D. The TuioTime time stamp of this TuioContainer3D remains unchanged.

Parameters:
tobj - the TuioContainer3D to assign

stop

public void stop(TuioTime ttime)
This method is used to calculate the speed and acceleration values of a TuioObject3D with unchanged position and angle.

Parameters:
ttime - the TuioTime to assign

getSymbolID

public int getSymbolID()
Returns the symbol ID of this TuioObject3D.

Returns:
the symbol ID of this TuioObject3D

getAngle

public float getAngle(int planes)
Returns the requested rotation angle of this TuioObject3D.

Parameters:
planes - the planes of which to get the rotation angle.
Returns:
the requested rotation angle of this TuioObject3D

getAngleDegrees

public float getAngleDegrees(int planes)
Returns the rotation angle in degrees of this TuioObject3D.

Parameters:
planes - the planes of which to get the rotation angle.
Returns:
the rotation angle in degrees of this TuioObject3D

getRotationSpeedXY

public float getRotationSpeedXY()
Returns the rotation speed of this TuioObject3D.

Returns:
the rotation speed of this TuioObject3D

getRotationSpeedXZ

public float getRotationSpeedXZ()

getRotationSpeedYZ

public float getRotationSpeedYZ()

getRotationAccel

public float getRotationAccel()
Returns the rotation acceleration of this TuioObject3D.

Returns:
the rotation acceleration of this TuioObject3D

getSymbol_id

public int getSymbol_id()
Returns:
the symbol_id

getAngleXY

public float getAngleXY()
Returns:
the angle_XY

getAngleXZ

public float getAngleXZ()
Returns:
the angle_XZ

getAngleYZ

public float getAngleYZ()
Returns:
the angle_YZ

isMoving

public boolean isMoving()
Returns true of this TuioObject3D is moving.

Returns:
true of this TuioObject3D is moving

update

public void update(TuioTime ttime,
                   float xp,
                   float yp,
                   float zp)
Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate to the private TuioContainer3D attributes. The speed and acceleration values are calculated accordingly.

Overrides:
update in class TuioPoint3D
Parameters:
ttime - the TuioTime to assign
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign

update

public void update(TuioTime ttime,
                   float xp,
                   float yp,
                   float zp,
                   float xs,
                   float ys,
                   float zs,
                   float ma)
Takes a TuioTime argument and assigns it along with the provided X, Y and Z coordinate; X, Y and Z velocity and acceleration to the private TuioContainer3D attributes.

Parameters:
ttime - the TuioTime to assign
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign
xs - the X velocity to assign
ys - the Y velocity to assign
zs - the Z velocity to assign
ma - the acceleration to assign

update

public void update(float xp,
                   float yp,
                   float zp,
                   float xs,
                   float ys,
                   float zs,
                   float ma)
Assigns the provided X, Y and Z coordinate; X, Y and Z velocity and acceleration to the private TuioContainer attributes. The TuioTime time stamp remains unchanged.

Parameters:
xp - the X coordinate to assign
yp - the Y coordinate to assign
zp - the Z coordinate to assign
xs - the X velocity to assign
ys - the Y velocity to assign
zs - the Z velocity to assign
ma - the acceleration to assign

update

public void update(org.ximtec.igesture.io.tuio.tuio3D.TuioContainer3D tcon)
Takes the attributes of the provided TuioContainer3D and assigns these values to this TuioContainer3D. The TuioTime time stamp of this TuioContainer3D remains unchanged.

Parameters:
tcon - the TuioContainer3D to assign

remove

public void remove(TuioTime ttime)
Assigns the REMOVE state to this TuioContainer3D and sets its TuioTime time stamp to the provided TuioTime argument.

Parameters:
ttime - the TuioTime to assign

getSessionID

public long getSessionID()
Returns the Session ID of this TuioContainer3D.

Returns:
the Session ID of this TuioContainer3D

getXSpeed

public float getXSpeed()
Returns the X velocity of this TuioContainer3D.

Returns:
the X velocity of this TuioContainer3D

getYSpeed

public float getYSpeed()
Returns the Y velocity of this TuioContainer3D.

Returns:
the Y velocity of this TuioContainer3D

getZSpeed

public float getZSpeed()
Returns the Z velocity of this TuioContainer3D.

Returns:
the Z velocity of this TuioContainer3D

getPosition

public TuioPoint3D getPosition()
Returns the position of this TuioContainer3D.

Returns:
the position of this TuioContainer3D

getPath

public Vector<TuioPoint3D> getPath()
Returns the path of this TuioContainer3D.

Returns:
the path of this TuioContainer3D

getMotionSpeed

public float getMotionSpeed()
Returns the motion speed of this TuioContainer3D.

Returns:
the motion speed of this TuioContainer3D

getMotionAccel

public float getMotionAccel()
Returns the motion acceleration of this TuioContainer3D.

Returns:
the motion acceleration of this TuioContainer3D

getTuioState

public int getTuioState()
Returns the TUIO state of this TuioContainer3D.

Returns:
the TUIO state of this TuioContainer3D

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.