org.wiigee.logic
Class Gesture

java.lang.Object
  extended by org.wiigee.logic.Gesture
All Implemented Interfaces:
java.lang.Cloneable

public class Gesture
extends java.lang.Object
implements java.lang.Cloneable

This class represents ONE movement trajectory in a concrete instance.


Constructor Summary
Gesture()
          Create an empty Gesture.
Gesture(Gesture original)
          Make a deep copy of another Gesture object.
 
Method Summary
 void add(AccelerationEvent event)
          Adds a new acceleration event to this gesture.
 int getCountOfData()
           
 java.util.Vector<AccelerationEvent> getData()
          Returns the whole chronological sequence of accelerations as a vector.
 AccelerationEvent getLastData()
          Returns the last acceleration added to this gesture.
 double getMaxAcceleration()
           
 double getMinAcceleration()
           
 void removeFirstData()
          Removes the first element of the acceleration queue of a gesture
 void setMaxAndMinAcceleration(double max, double min)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gesture

public Gesture()
Create an empty Gesture.


Gesture

public Gesture(Gesture original)
Make a deep copy of another Gesture object.

Parameters:
original - Another Gesture object
Method Detail

add

public void add(AccelerationEvent event)
Adds a new acceleration event to this gesture.

Parameters:
event - The WiimoteAccelerationEvent to add.

getLastData

public AccelerationEvent getLastData()
Returns the last acceleration added to this gesture.

Returns:
the last acceleration event added.

getData

public java.util.Vector<AccelerationEvent> getData()
Returns the whole chronological sequence of accelerations as a vector.

Returns:
chronological sequence of accelerations.

removeFirstData

public void removeFirstData()
Removes the first element of the acceleration queue of a gesture


getCountOfData

public int getCountOfData()

setMaxAndMinAcceleration

public void setMaxAndMinAcceleration(double max,
                                     double min)

getMaxAcceleration

public double getMaxAcceleration()

getMinAcceleration

public double getMinAcceleration()