org.wiigee.event
Class AccelerationEvent
java.lang.Object
java.util.EventObject
org.wiigee.event.AccelerationEvent
- All Implemented Interfaces:
- java.io.Serializable
public class AccelerationEvent
- extends java.util.EventObject
This Event would be generated if an acceleration has been detected.
It contains information about the force applied to the device in each
direction (x, y, z). Further it contains the absolute value of this
vector and the source which generated this event (Device).
- See Also:
- Serialized Form
| Fields inherited from class java.util.EventObject |
source |
|
Constructor Summary |
AccelerationEvent(Device source,
double X,
double Y,
double Z,
double absvalue)
Create an AccelerationEvent with a specific source,
all the three acceleration values and the calculated absolute
value. |
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AccelerationEvent
public AccelerationEvent(Device source,
double X,
double Y,
double Z,
double absvalue)
- Create an AccelerationEvent with a specific source,
all the three acceleration values and the calculated absolute
value.
- Parameters:
source - The source which has been accelerated (Wiimote).X - The value of acceleration in the x direction.Y - The value of acceleration in the y direction.Z - The value of acceleration in the z direction.absvalue - The absolute value of this acceleration vector.
getX
public double getX()
getY
public double getY()
getZ
public double getZ()
getAbsValue
public double getAbsValue()