© 2006-2007 ETH Zurich

org.ximtec.igesture.algorithm.rubine3d.tools
Class WiiReader

java.lang.Object
  extended by org.ximtec.igesture.io.AbstractGestureDevice<RecordedGesture3D,Point3D>
      extended by org.ximtec.igesture.algorithm.rubine3d.tools.WiiReader
All Implemented Interfaces:
EventListener, org.wiigee.event.AccelerationListener, org.wiigee.event.ButtonListener, Device, GestureDevice<RecordedGesture3D,Point3D>

public class WiiReader
extends AbstractGestureDevice<RecordedGesture3D,Point3D>
implements org.wiigee.event.ButtonListener, org.wiigee.event.AccelerationListener


Constructor Summary
WiiReader()
          Constructor
 
Method Summary
 void accelerationReceived(org.wiigee.event.AccelerationEvent event)
          This method is executed when an acceleration event is received from the wiimote.
 void buttonPressReceived(org.wiigee.event.ButtonPressedEvent event)
          When the recording button is pressed this method starts recording
 void buttonReleaseReceived(org.wiigee.event.ButtonReleasedEvent event)
          When the button is released the recoding stops and the recorded gesture is displayed on the panel
 void clear()
          Clears the WiiReader
 void connect()
          Connect the device.
 void disconnect()
          Disconnects the WiiMote
 void dispose()
          Disposes the device.
 List<Point3D> getChunks()
          Returns chunks of a gesture while drawing it.
 Gesture<RecordedGesture3D> getGesture()
          Returns a copy of the recorded gesture in a GestureSample3D
 WiiReaderPanel getPanel()
          Returns the panel with standard dimension
 WiiReaderPanel getPanel(Dimension dimension)
          Returns the panel
 void init()
          Initializes the WiiReader, starts device detection etc.
 void motionStartReceived(org.wiigee.event.MotionStartEvent event)
           
 void motionStopReceived(org.wiigee.event.MotionStopEvent event)
           
 void setRecogniser(Recogniser recogniser)
           
 
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
 

Constructor Detail

WiiReader

public WiiReader()
Constructor

Method Detail

getPanel

public WiiReaderPanel getPanel()
Returns the panel with standard dimension

Returns:

getPanel

public WiiReaderPanel getPanel(Dimension dimension)
Returns the panel

Parameters:
dimension - The dimension of the panel
Returns:
The panel belonging to this WiiReader

clear

public void clear()
Clears the WiiReader

Specified by:
clear in interface GestureDevice<RecordedGesture3D,Point3D>

dispose

public void dispose()
Description copied from interface: GestureDevice
Disposes the device. After executing this method, gestures are not captured anymore and all dependent resources are released.

Specified by:
dispose in interface GestureDevice<RecordedGesture3D,Point3D>

getChunks

public List<Point3D> getChunks()
Description copied from interface: GestureDevice
Returns chunks of a gesture while drawing it.

Specified by:
getChunks in interface GestureDevice<RecordedGesture3D,Point3D>
Returns:
chunks of a gesture.

getGesture

public Gesture<RecordedGesture3D> getGesture()
Returns a copy of the recorded gesture in a GestureSample3D

Specified by:
getGesture in interface GestureDevice<RecordedGesture3D,Point3D>
Returns:
the gesture.

init

public void init()
Initializes the WiiReader, starts device detection etc.

Specified by:
init in interface GestureDevice<RecordedGesture3D,Point3D>

disconnect

public void disconnect()
Disconnects the WiiMote

Specified by:
disconnect in interface Device
Specified by:
disconnect in class AbstractGestureDevice<RecordedGesture3D,Point3D>

buttonPressReceived

public void buttonPressReceived(org.wiigee.event.ButtonPressedEvent event)
When the recording button is pressed this method starts recording

Specified by:
buttonPressReceived in interface org.wiigee.event.ButtonListener

buttonReleaseReceived

public void buttonReleaseReceived(org.wiigee.event.ButtonReleasedEvent event)
When the button is released the recoding stops and the recorded gesture is displayed on the panel

Specified by:
buttonReleaseReceived in interface org.wiigee.event.ButtonListener

accelerationReceived

public void accelerationReceived(org.wiigee.event.AccelerationEvent event)
This method is executed when an acceleration event is received from the wiimote.

Specified by:
accelerationReceived in interface org.wiigee.event.AccelerationListener

motionStartReceived

public void motionStartReceived(org.wiigee.event.MotionStartEvent event)
Specified by:
motionStartReceived in interface org.wiigee.event.AccelerationListener

motionStopReceived

public void motionStopReceived(org.wiigee.event.MotionStopEvent event)
Specified by:
motionStopReceived in interface org.wiigee.event.AccelerationListener

setRecogniser

public void setRecogniser(Recogniser recogniser)

connect

public void connect()
Description copied from interface: Device
Connect the device.

Specified by:
connect in interface Device
Specified by:
connect in class AbstractGestureDevice<RecordedGesture3D,Point3D>

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.