de.fhpotsdam.unfolding.interactions
Class TuioCursorHandler
java.lang.Object
de.fhpotsdam.unfolding.events.MapEventBroadcaster
de.fhpotsdam.unfolding.interactions.TuioCursorHandler
- All Implemented Interfaces:
- TUIO.TuioListener
public class TuioCursorHandler
- extends MapEventBroadcaster
- implements TUIO.TuioListener
Handles finger input (TUIO cursors) from the user and broadcasts MapEvents such as zoom and pan.
Field Summary |
static org.apache.log4j.Logger |
log
|
protected TUIO.TuioClient |
tuioClient
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static org.apache.log4j.Logger log
tuioClient
protected TUIO.TuioClient tuioClient
TuioCursorHandler
public TuioCursorHandler(processing.core.PApplet p,
UnfoldingMap... maps)
TuioCursorHandler
public TuioCursorHandler(processing.core.PApplet p,
boolean listenToTuio,
UnfoldingMap... maps)
TuioCursorHandler
public TuioCursorHandler(processing.core.PApplet p,
boolean listenToTuio,
java.util.List<UnfoldingMap> maps)
TuioCursorHandler
public TuioCursorHandler(processing.core.PApplet p,
java.util.List<UnfoldingMap> maps)
dispose
public void dispose()
getTuioClient
public TUIO.TuioClient getTuioClient()
updateTuioCursor
public void updateTuioCursor(TUIO.TuioCursor tcur)
- Specified by:
updateTuioCursor
in interface TUIO.TuioListener
addTuioCursor
public void addTuioCursor(TUIO.TuioCursor tuioCursor)
- Specified by:
addTuioCursor
in interface TUIO.TuioListener
removeTuioCursor
public void removeTuioCursor(TUIO.TuioCursor tuioCursor)
- Specified by:
removeTuioCursor
in interface TUIO.TuioListener
getDistance
protected float getDistance(TUIO.TuioCursor tuioCursor1,
TUIO.TuioCursor tuioCursor2)
getAngleBetween
protected float getAngleBetween(TUIO.TuioCursor tuioCursor1,
TUIO.TuioCursor tuioCursor2)
getAngleBetween
protected float getAngleBetween(float x1,
float y1,
float x2,
float y2)
addTuioObject
public void addTuioObject(TUIO.TuioObject arg0)
- Specified by:
addTuioObject
in interface TUIO.TuioListener
removeTuioObject
public void removeTuioObject(TUIO.TuioObject arg0)
- Specified by:
removeTuioObject
in interface TUIO.TuioListener
updateTuioObject
public void updateTuioObject(TUIO.TuioObject arg0)
- Specified by:
updateTuioObject
in interface TUIO.TuioListener
refresh
public void refresh(TUIO.TuioTime arg0)
- Specified by:
refresh
in interface TUIO.TuioListener
drawCursors
public void drawCursors()
- Draws all TuioCursors.
drawCursor
public void drawCursor(TUIO.TuioCursor tc)
- Draws a TuioCursor as small circle with ID as label.
- Parameters:
tc
- The cursor to draw.