org.wiigee.logic
Class ProcessingUnit

java.lang.Object
  extended by org.wiigee.logic.ProcessingUnit
All Implemented Interfaces:
java.util.EventListener, AccelerationListener, ButtonListener
Direct Known Subclasses:
TriggeredProcessingUnit

public abstract class ProcessingUnit
extends java.lang.Object
implements AccelerationListener, ButtonListener


Field Summary
protected  Classifier classifier
           
 
Constructor Summary
ProcessingUnit()
           
 
Method Summary
abstract  void accelerationReceived(AccelerationEvent event)
          This method would be called if a Device source has been accelerated.
 void addGestureListener(GestureListener g)
          Add an GestureListener to receive GestureEvents.
abstract  void buttonPressReceived(ButtonPressedEvent event)
          This method would be called if a Device button has been pressed.
abstract  void buttonReleaseReceived(ButtonReleasedEvent event)
          This method would be called if a Device button has been released.
protected  void fireGestureEvent(boolean valid, int id, double probability)
           
abstract  void loadGesture(java.lang.String filename)
           
abstract  void motionStartReceived(MotionStartEvent event)
          This method would be called if a Device is in idle state and then a motion starts or if a Device is in motion and then the motion stops and the Device is in idle state.
abstract  void motionStopReceived(MotionStopEvent event)
          This method would be called if a Device is in motion and then the motion stops and the Device is in idle state.
 void reset()
          Resets the complete gesturemodel.
abstract  void saveGesture(int id, java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classifier

protected Classifier classifier
Constructor Detail

ProcessingUnit

public ProcessingUnit()
Method Detail

addGestureListener

public void addGestureListener(GestureListener g)
Add an GestureListener to receive GestureEvents.

Parameters:
g - Class which implements GestureListener interface.

fireGestureEvent

protected void fireGestureEvent(boolean valid,
                                int id,
                                double probability)

accelerationReceived

public abstract void accelerationReceived(AccelerationEvent event)
Description copied from interface: AccelerationListener
This method would be called if a Device source has been accelerated.

Specified by:
accelerationReceived in interface AccelerationListener
Parameters:
event - The acceleration representation as an event.

buttonPressReceived

public abstract void buttonPressReceived(ButtonPressedEvent event)
Description copied from interface: ButtonListener
This method would be called if a Device button has been pressed.

Specified by:
buttonPressReceived in interface ButtonListener
Parameters:
event - The button representation as an event.

buttonReleaseReceived

public abstract void buttonReleaseReceived(ButtonReleasedEvent event)
Description copied from interface: ButtonListener
This method would be called if a Device button has been released.

Specified by:
buttonReleaseReceived in interface ButtonListener
Parameters:
event - This is actually a meta-event NOT containing which button has been released.

motionStartReceived

public abstract void motionStartReceived(MotionStartEvent event)
Description copied from interface: AccelerationListener
This method would be called if a Device is in idle state and then a motion starts or if a Device is in motion and then the motion stops and the Device is in idle state.

Specified by:
motionStartReceived in interface AccelerationListener
Parameters:
event - This is the event which contains if the Wiimote is now in motion or not.

motionStopReceived

public abstract void motionStopReceived(MotionStopEvent event)
Description copied from interface: AccelerationListener
This method would be called if a Device is in motion and then the motion stops and the Device is in idle state.

Specified by:
motionStopReceived in interface AccelerationListener
Parameters:
event - This is the event which contains if the Device is now in motion or not.

reset

public void reset()
Resets the complete gesturemodel. After reset no gesture is known to the system.


loadGesture

public abstract void loadGesture(java.lang.String filename)

saveGesture

public abstract void saveGesture(int id,
                                 java.lang.String filename)