public class TuioCursor extends TuioPoint
Modifier and Type | Field and Description |
---|---|
protected int |
cursor_id
The individual cursor ID number that is assigned to each TuioCursor.
|
static int |
MAX_PATH_LENGTH
Defines the maximum path length.
|
protected float |
motion_accel
The motion acceleration value.
|
protected float |
motion_speed
The motion speed value.
|
protected java.util.concurrent.LinkedBlockingDeque<TuioPoint> |
path
A Vector of TuioPoints containing all the previous positions of the TUIO component.
|
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
|
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_STOPPED
Defines the STOPPED state.
|
protected float |
x_speed
The X-axis velocity value.
|
protected float |
y_speed
The Y-axis velocity value.
|
currentTime, startTime, xpos, ypos
Constructor and Description |
---|
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.
|
TuioCursor(TuioCursor tcur)
This constructor takes the atttibutes of the provided TuioCursor
and assigs these values to the newly created 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.
|
Modifier and Type | Method and Description |
---|---|
int |
getCursorID()
Returns the Cursor ID of this TuioCursor.
|
float |
getMotionAccel()
Returns the motion acceleration of this TuioContainer.
|
float |
getMotionSpeed()
Returns the motion speed of this TuioContainer.
|
java.util.ArrayList<TuioPoint> |
getPath()
Returns the path of this TuioContainer.
|
TuioPoint |
getPosition()
Returns the position of this TuioContainer.
|
long |
getSessionID()
Returns the Session ID of this TuioContainer.
|
int |
getTuioState()
Returns the TUIO state of this TuioContainer.
|
float |
getXSpeed()
Returns the X velocity of this TuioContainer.
|
float |
getYSpeed()
Returns the Y velocity of this TuioContainer.
|
boolean |
isMoving()
Returns true of this TuioContainer is moving.
|
void |
remove(TuioTime ttime)
Assigns the REMOVE state to this TuioContainer and sets
its TuioTime time stamp to the provided TuioTime argument.
|
static void |
setMaxPathLength(int length)
Sets the maximum path length
|
void |
stop(TuioTime ttime)
This method is used to calculate the speed and acceleration values of
TuioContainers with unchanged positions.
|
void |
update(float xp,
float yp,
float xs,
float ys,
float ma)
Assigns the provided X and Y coordinate, X and Y velocity and acceleration
to the private TuioContainer attributes.
|
void |
update(TUIO.TuioContainer tcon)
Takes the atttibutes of the provided TuioContainer
and assigs these values to this TuioContainer.
|
void |
update(TuioTime ttime,
float xp,
float yp)
Takes a TuioTime argument and assigns it along with the provided
X and Y coordinate to the private TuioContainer attributes.
|
void |
update(TuioTime ttime,
float xp,
float yp,
float xs,
float ys,
float ma)
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.
|
getAngle, getAngle, getAngleDegrees, getAngleDegrees, getDistance, getDistance, getScreenX, getScreenY, getStartTime, getTuioTime, getX, getY, update, update
protected int cursor_id
protected long session_id
protected float x_speed
protected float y_speed
protected float motion_speed
protected float motion_accel
protected java.util.concurrent.LinkedBlockingDeque<TuioPoint> path
public static int MAX_PATH_LENGTH
public static final int TUIO_ADDED
public static final int TUIO_ACCELERATING
public static final int TUIO_DECELERATING
public static final int TUIO_STOPPED
public static final int TUIO_REMOVED
protected int state
public TuioCursor(TuioTime ttime, long si, int ci, float xp, float yp)
ttime
- the TuioTime to assignsi
- the Session ID to assignci
- the Cursor ID to assignxp
- the X coordinate to assignyp
- the Y coordinate to assignpublic TuioCursor(long si, int ci, float xp, float yp)
si
- the Session ID to assignci
- the Cursor ID to assignxp
- the X coordinate to assignyp
- the Y coordinate to assignpublic TuioCursor(TuioCursor tcur)
tcur
- the TuioCursor to assignpublic int getCursorID()
public void update(TuioTime ttime, float xp, float yp)
public void stop(TuioTime ttime)
ttime
- the TuioTime to assignpublic void update(TuioTime ttime, float xp, float yp, float xs, float ys, float ma)
ttime
- the TuioTime to assignxp
- the X coordinate to assignyp
- the Y coordinate to assignxs
- the X velocity to assignys
- the Y velocity to assignma
- the acceleration to assignpublic void update(float xp, float yp, float xs, float ys, float ma)
xp
- the X coordinate to assignyp
- the Y coordinate to assignxs
- the X velocity to assignys
- the Y velocity to assignma
- the acceleration to assignpublic void update(TUIO.TuioContainer tcon)
tcon
- the TuioContainer to assignpublic void remove(TuioTime ttime)
ttime
- the TuioTime to assignpublic long getSessionID()
public float getXSpeed()
public float getYSpeed()
public TuioPoint getPosition()
public java.util.ArrayList<TuioPoint> getPath()
public static void setMaxPathLength(int length)
length
- the maximum path lengthpublic float getMotionSpeed()
public float getMotionAccel()
public int getTuioState()
public boolean isMoving()