de.fhpotsdam.unfolding.interactions
Class TuioCursorHandler

java.lang.Object
  extended by de.fhpotsdam.unfolding.events.MapEventBroadcaster
      extended by 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
           
 
Fields inherited from class de.fhpotsdam.unfolding.events.MapEventBroadcaster
eventDispatcher, maps
 
Constructor Summary
TuioCursorHandler(processing.core.PApplet p, boolean listenToTuio, java.util.List<UnfoldingMap> maps)
           
TuioCursorHandler(processing.core.PApplet p, boolean listenToTuio, UnfoldingMap... maps)
           
TuioCursorHandler(processing.core.PApplet p, java.util.List<UnfoldingMap> maps)
           
TuioCursorHandler(processing.core.PApplet p, UnfoldingMap... maps)
           
 
Method Summary
 void addTuioCursor(TUIO.TuioCursor tuioCursor)
           
 void addTuioObject(TUIO.TuioObject arg0)
           
 void dispose()
           
 void drawCursor(TUIO.TuioCursor tc)
          Draws a TuioCursor as small circle with ID as label.
 void drawCursors()
          Draws all TuioCursors.
protected  float getAngleBetween(float x1, float y1, float x2, float y2)
           
protected  float getAngleBetween(TUIO.TuioCursor tuioCursor1, TUIO.TuioCursor tuioCursor2)
           
protected  float getDistance(TUIO.TuioCursor tuioCursor1, TUIO.TuioCursor tuioCursor2)
           
 TUIO.TuioClient getTuioClient()
           
 void refresh(TUIO.TuioTime arg0)
           
 void removeTuioCursor(TUIO.TuioCursor tuioCursor)
           
 void removeTuioObject(TUIO.TuioObject arg0)
           
 void updateTuioCursor(TUIO.TuioCursor tcur)
           
 void updateTuioObject(TUIO.TuioObject arg0)
           
 
Methods inherited from class de.fhpotsdam.unfolding.events.MapEventBroadcaster
setEventDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static org.apache.log4j.Logger log

tuioClient

protected TUIO.TuioClient tuioClient
Constructor Detail

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)
Method Detail

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.