|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.io.tuio.tuio3D.TuioPoint3D
public class TuioPoint3D
The TuioPoint3D class on the one hand is a simple container and utility class to handle TUIO positions in general, on the other hand the TuioPoint3D is the base class for the TuioCursor3D and TuioObject3D classes.
| Field Summary | |
|---|---|
protected TuioTime |
currentTime
The time stamp of the last update represented as TuioTime (time since session start) |
protected TuioTime |
startTime
The creation time of this TuioPoint3D represented as TuioTime (time since session start) |
protected float |
xpos
X coordinate, represented as a floating point value in a range of 0..1 |
static int |
XY
XY plane |
static int |
XZ
XZ plane |
protected float |
ypos
Y coordinate, represented as a floating point value in a range of 0..1 |
static int |
YZ
YZ plane |
protected float |
zpos
Z coordinate, represented as a floating point value in a range of 0..1 |
| Constructor Summary | |
|---|---|
TuioPoint3D()
The default constructor takes no arguments and sets its coordinate attributes to zero and its time stamp to the current session time. |
|
TuioPoint3D(float xp,
float yp,
float zp)
This constructor takes three floating point coordinate arguments and sets its coordinate attributes to these values and its time stamp to the current session time. |
|
TuioPoint3D(TuioPoint3D tpoint)
This constructor takes a TuioPoint3D argument and sets its coordinate attributes to the coordinates of the provided TuioPoint3D and its time stamp to the current session time. |
|
TuioPoint3D(TuioTime ttime,
float xp,
float yp,
float zp)
This constructor takes a TuioTime object and three floating point coordinate arguments and sets its coordinate attributes to these values and its time stamp to the provided TUIO time object. |
|
| Method Summary | |
|---|---|
float |
getAngle(int planes,
float ap,
float bp)
Returns the angle to the provided coordinates |
float |
getAngle(int planes,
TuioPoint3D tpoint)
Returns the angle to the provided TuioPoint3D |
float |
getAngleDegrees(int planes,
float ap,
float bp)
Returns the angle in degrees to the provided coordinates |
float |
getAngleDegrees(int planes,
TuioPoint3D tpoint)
Returns the angle in degrees to the provided TuioPoint |
float |
getDistance(float xp,
float yp,
float zp)
Returns the distance to the provided coordinates |
float |
getDistance(TuioPoint3D tpoint)
Returns the distance to the provided TuioPoint3D |
int |
getScreenX(int width)
Returns the X coordinate in pixels relative to the provided screen width. |
int |
getScreenY(int height)
Returns the Y coordinate in pixels relative to the provided screen height. |
int |
getScreenZ(int z)
|
TuioTime |
getStartTime()
Returns the start time of this TuioPoint3D as TuioTime. |
TuioTime |
getTuioTime()
Returns the time stamp of this TuioPoint3D as TuioTime. |
float |
getX()
Returns the X coordinate of this TuioPoint3D. |
float |
getY()
Returns the Y coordinate of this TuioPoint3D. |
float |
getZ()
Returns the Z coordinate of this TuioPoint3D. |
void |
update(float xp,
float yp,
float zp)
Takes three floating point coordinate arguments and updates its coordinate attributes to the coordinates of the provided TuioPoint3D and leaves its time stamp unchanged. |
void |
update(TuioPoint3D tpoint)
Takes a TuioPoint3D argument and updates its coordinate attributes to the coordinates of the provided TuioPoint3D and leaves its time stamp unchanged. |
void |
update(TuioTime ttime,
float xp,
float yp,
float zp)
Takes a TuioTime object and three floating point coordinate arguments and updates its coordinate attributes to the coordinates of the provided TuioPoint3D and its time stamp to the provided TUIO time object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int XY
public static final int XZ
public static final int YZ
protected float xpos
protected float ypos
protected float zpos
protected TuioTime currentTime
protected TuioTime startTime
| Constructor Detail |
|---|
public TuioPoint3D()
public TuioPoint3D(float xp,
float yp,
float zp)
xp - the X coordinate to assignyp - the Y coordinate to assignzp - the Z coordinate to assignpublic TuioPoint3D(TuioPoint3D tpoint)
tpoint - the TuioPoint3D to assign
public TuioPoint3D(TuioTime ttime,
float xp,
float yp,
float zp)
ttime - the TuioTime to assignxp - the X coordinate to assignyp - the Y coordinate to assignzp - the Z coordinate to assign| Method Detail |
|---|
public void update(TuioPoint3D tpoint)
tpoint - the TuioPoint to assign
public void update(float xp,
float yp,
float zp)
xp - the X coordinate to assignyp - the Y coordinate to assignzp - the Z coordinate to assign
public void update(TuioTime ttime,
float xp,
float yp,
float zp)
ttime - the TuioTime to assignxp - the X coordinate to assignyp - the Y coordinate to assignzp - the Z coordinate to assignpublic float getX()
public float getY()
public float getZ()
public float getDistance(float xp,
float yp,
float zp)
xp - the X coordinate of the distant pointyp - the Y coordinate of the distant pointzp - the Z coordinate of the distant point
public float getDistance(TuioPoint3D tpoint)
tpoint - the distant TuioPoint3D
public float getAngle(int planes,
float ap,
float bp)
planes - the planes of which to calculate the angle (XY, XZ or YZ)ap - the coordinate of the distant point in the first planebp - the coordinate of the distant point in the second plane
public float getAngle(int planes,
TuioPoint3D tpoint)
planes - the planes of which to calculate the angle (XY, XZ or YZ)tpoint - the distant TuioPoint3D
public float getAngleDegrees(int planes,
float ap,
float bp)
planes - the planes of which to calculate the angle (XY, XZ or YZ)ap - the coordinate of the first plane of the distant pointbp - the coordinate of the second plane of the distant point
public float getAngleDegrees(int planes,
TuioPoint3D tpoint)
planes - the planes of which to calculate the angle (XY, XZ or YZ)tpoint - the distant TuioPoint
public int getScreenX(int width)
width - the screen width
public int getScreenY(int height)
height - the screen height
public int getScreenZ(int z)
public TuioTime getTuioTime()
public TuioTime getStartTime()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||