|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.io.AbstractGestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>
org.ximtec.igesture.io.tuio.TuioReader
public class TuioReader
Reader that initializes the TuioConnection and handles the events caused by the TuioConnection. There are three ways to use the TuioReader. 1) Manually After performing the gesture, you can get the gesture with getGesture() or getGesture3D() and do the recognition. 2) GestureEventListener interface Register with the TuioReader as a GestureEventListener, it will notify you when a gesture was performed. The recognition of the performed gesture can then be done. 3) Configure the TuioReader with a Recogniser When a gesture was performed, the recogniser will automatically try to recognise the gesture and notify GestureHandlers. General steps to use: 1. create the TuioReader 2. connect to a tuio service 3. In case of GestureEventListener : register as a listener In case of Recogniser : set this TuioReaders recogniser 4. set the modifiers/tuio messages to listen for Note that this class is not fully compatible with the workbench.
TuioConnection| Field Summary | |
|---|---|
protected TuioConnection |
connection
TUIO Connection used |
protected GestureSample |
gesture
|
protected GestureSample3D |
gesture3D
|
protected org.sigtec.ink.Note |
lastNoteAdded
|
protected RecordedGesture3D |
lastRecordedGesture3DAdded
|
| Constructor Summary | |
|---|---|
TuioReader()
Default Constructor |
|
TuioReader(int port)
Constructor |
|
| Method Summary | |
|---|---|
void |
addTuioCursor(AbstractTuioCursor atcur)
This callback method is invoked by the TuioClient when a new TuioCursor is added to the session. |
void |
addTuioMessages(Set<String> modifiers)
Set-up the processor to listen for and act on messages of the desired profiles. |
void |
addTuioObject(AbstractTuioObject atobj)
This callback method is invoked by the TuioClient when a new TuioObject is added to the session. |
void |
clear()
Deletes the current gesture. |
void |
connect()
Connect the device. |
void |
disconnect()
Disconnect the device. |
void |
dispose()
Disposes the device. |
List<org.sigtec.ink.Point> |
getChunks()
Returns chunks of a gesture while drawing it. |
List<Point3D> |
getChunks3D()
Returns chunks of a gesture while drawing it. |
Gesture<org.sigtec.ink.Note> |
getGesture()
Returns the gestures. |
Gesture<RecordedGesture3D> |
getGesture3D()
Returns the gestures. |
TuioReaderPanel |
getPanel()
|
TuioReaderPanel |
getPanel(Dimension dimension)
|
void |
init()
Initializes the device. |
void |
refresh(TuioTime ftime)
This callback method is invoked by the TuioClient to mark the end of a received TUIO message bundle. |
void |
removeTuioCursor(AbstractTuioCursor atcur)
This callback method is invoked by the TuioClient when an existing TuioCursor is removed from the session. |
void |
removeTuioMessages(Set<String> modifiers)
Stop the processor of listening for and act on messages of the desired profiles. |
void |
removeTuioObject(AbstractTuioObject atobj)
This callback method is invoked by the TuioClient when an existing TuioObject is removed from the session. |
void |
setRecogniser(Recogniser recogniser)
Set the recogniser to use. |
void |
updateTuioCursor(AbstractTuioCursor atcur)
This callback method is invoked by the TuioClient when an existing TuioCursor is updated during the session. |
void |
updateTuioObject(AbstractTuioObject atobj)
This callback method is invoked by the TuioClient when an existing TuioObject is updated during the session. |
| Methods inherited from class org.ximtec.igesture.io.AbstractGestureDevice |
|---|
addGestureHandler, fireGestureEvent, getConnectionType, getDeviceClass, getDeviceID, getDeviceType, getName, isConnectable, isConnected, isDefaultDevice, isDisconnectable, removeAllGestureHandler, removeAllListener, removeGestureHandler, setConnectionType, setDefaultDevice, setDeviceID, setDeviceType, setIsConnected, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ximtec.igesture.io.Gesture3DDevice |
|---|
addGestureHandler, getConnectionType, getDeviceID, getDeviceType, getName, isConnectable, isConnected, isDefaultDevice, isDisconnectable, removeGestureHandler, setConnectionType, setDefaultDevice, setDeviceID, setDeviceType, setIsConnected, setName, toString |
| Field Detail |
|---|
protected TuioConnection connection
protected GestureSample gesture
protected org.sigtec.ink.Note lastNoteAdded
protected GestureSample3D gesture3D
protected RecordedGesture3D lastRecordedGesture3DAdded
| Constructor Detail |
|---|
public TuioReader()
recogniser - Recogniser to use.public TuioReader(int port)
port - Port to listen to.| Method Detail |
|---|
public void setRecogniser(Recogniser recogniser)
recogniser - Recogniser to use.public void connect()
Device
connect in interface Deviceconnect in interface Gesture3DDevice<RecordedGesture3D,Point3D>connect in class AbstractGestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>public void disconnect()
Device
disconnect in interface Devicedisconnect in interface Gesture3DDevice<RecordedGesture3D,Point3D>disconnect in class AbstractGestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>public void clear()
Gesture3DDevice
clear in interface Gesture3DDevice<RecordedGesture3D,Point3D>clear in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>public void dispose()
Gesture3DDevice
dispose in interface Gesture3DDevice<RecordedGesture3D,Point3D>dispose in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>public List<org.sigtec.ink.Point> getChunks()
GestureDevice
getChunks in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>public List<Point3D> getChunks3D()
Gesture3DDevice
getChunks3D in interface Gesture3DDevice<RecordedGesture3D,Point3D>public Gesture<org.sigtec.ink.Note> getGesture()
GestureDevice
getGesture in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>public Gesture<RecordedGesture3D> getGesture3D()
Gesture3DDevice
getGesture3D in interface Gesture3DDevice<RecordedGesture3D,Point3D>public void init()
Gesture3DDevice
init in interface Gesture3DDevice<RecordedGesture3D,Point3D>init in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>public void addTuioMessages(Set<String> modifiers)
modifiers - the desired TUIO profilespublic void removeTuioMessages(Set<String> modifiers)
modifiers - the desired TUIO profilespublic void addTuioCursor(AbstractTuioCursor atcur)
TuioListener
addTuioCursor in interface TuioListeneratcur - the TuioCursor reference associated to the addTuioCursor eventpublic void addTuioObject(AbstractTuioObject atobj)
TuioListener
addTuioObject in interface TuioListeneratobj - the TuioObject reference associated to the addTuioObject eventpublic void refresh(TuioTime ftime)
TuioListener
refresh in interface TuioListenerftime - the TuioTime associated to the current TUIO message bundlepublic void removeTuioCursor(AbstractTuioCursor atcur)
TuioListener
removeTuioCursor in interface TuioListeneratcur - the TuioCursor reference associated to the removeTuioCursor eventpublic void removeTuioObject(AbstractTuioObject atobj)
TuioListener
removeTuioObject in interface TuioListeneratobj - the TuioObject reference associated to the removeTuioObject eventpublic void updateTuioCursor(AbstractTuioCursor atcur)
TuioListener
updateTuioCursor in interface TuioListeneratcur - the TuioCursor reference associated to the updateTuioCursor eventpublic void updateTuioObject(AbstractTuioObject atobj)
TuioListener
updateTuioObject in interface TuioListeneratobj - the TuioObject reference associated to the updateTuioObject eventpublic TuioReaderPanel getPanel()
public TuioReaderPanel getPanel(Dimension dimension)
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||