|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwiiusej.wiiuseapievents.WiimoteEvent
wiiusej.wiiuseapievents.WiiUseApiEvent
wiiusej.wiiuseapievents.GenericEvent
public class GenericEvent
Class that is a bean to be filled by the wiiuse API.
Field Summary | |
---|---|
(package private) ButtonsEvent |
buttonsEvent
|
(package private) IREvent |
infraredEvent
|
(package private) MotionSensingEvent |
motionSensingEvent
|
Fields inherited from class wiiusej.wiiuseapievents.WiiUseApiEvent |
---|
DISCONNECTION_EVENT, GENERIC_EVENT, STATUS_EVENT, WIIUSE_CLASSIC_CTRL_INSERTED, WIIUSE_CLASSIC_CTRL_REMOVED, WIIUSE_GUITAR_HERO_3_CTRL_INSERTED, WIIUSE_GUITAR_HERO_3_CTRL_REMOVED, WIIUSE_NUNCHUK_INSERTED, WIIUSE_NUNCHUK_REMOVED |
Constructor Summary | |
---|---|
GenericEvent(int id)
Construct the Wiimote setting up the id. |
|
GenericEvent(int id,
short buttonsJustPressed,
short buttonsJustReleased,
short buttonsHeld)
Construct the Wiimote setting up the id and the buttons. |
Method Summary | |
---|---|
void |
addIRpoint(int x,
int y,
short rx,
short ry,
short size)
Add an IR point to the generic event. |
ButtonsEvent |
getButtonsEvent()
Get buttons event. |
IREvent |
getIREvent()
Get IR event. |
MotionSensingEvent |
getMotionSensingEvent()
Get motion sensing event. |
boolean |
isThereIrEvent()
Tell if there is an IR Event. |
boolean |
isThereMotionSensingEvent()
Tell if there is a motion sensing Event. |
void |
prepareIRevent(int x,
int y,
int z,
int ax,
int ay,
int xVRes,
int yVRes,
int xOffset,
int yOffset,
short sensorBarPostion,
short screenAsPectRatio)
Prepare an IR event to populate. |
void |
setMotionSensingEvent(float orientationThreshold,
int accelerationThreshold,
boolean smoothingState,
float alphaSmooth,
float r,
float p,
float ya,
float x,
float y,
float z,
short xx,
short yy,
short zz)
Set the Motion Sensing Event. |
java.lang.String |
toString()
|
Methods inherited from class wiiusej.wiiuseapievents.WiiUseApiEvent |
---|
getEventType |
Methods inherited from class wiiusej.wiiuseapievents.WiimoteEvent |
---|
getWiimoteId, setWiimoteId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
ButtonsEvent buttonsEvent
IREvent infraredEvent
MotionSensingEvent motionSensingEvent
Constructor Detail |
---|
public GenericEvent(int id)
id
- the Wiimote idpublic GenericEvent(int id, short buttonsJustPressed, short buttonsJustReleased, short buttonsHeld)
id
- the Wiimote idbuttonsJustPressed
- buttons just pressedbuttonsJustReleased
- buttons just releasedbuttonsHeld
- buttons heldMethod Detail |
---|
public boolean isThereIrEvent()
public boolean isThereMotionSensingEvent()
public ButtonsEvent getButtonsEvent()
public IREvent getIREvent()
public MotionSensingEvent getMotionSensingEvent()
public void prepareIRevent(int x, int y, int z, int ax, int ay, int xVRes, int yVRes, int xOffset, int yOffset, short sensorBarPostion, short screenAsPectRatio)
x
- calculated X coordinate.y
- calculated Y coordinate.z
- calculated distance.ax
- absolute X coordinate.ay
- absolute Y coordinatexVRes
- IR virtual screen x resolution.yVRes
- IR virtual screen y resolution.xOffset
- IR X correction offset.yOffset
- IR Y correction offset.sensorBarPostion
- aspect ratio of the screen.screenAsPectRatio
- IR sensor bar position.public void addIRpoint(int x, int y, short rx, short ry, short size)
x
- x coordinates.y
- y coordinatesrx
- raw X coordinate (0-1023).ry
- raw Y coordinate (0-1023).size
- size of the IR dot (0-15).public void setMotionSensingEvent(float orientationThreshold, int accelerationThreshold, boolean smoothingState, float alphaSmooth, float r, float p, float ya, float x, float y, float z, short xx, short yy, short zz)
orientationThreshold
- value of the minimum angle between two events with the
accelerometeraccelerationThreshold
- value of the value variation between two events with the
accelerometersmoothingState
- true if smoothing flag is activatedalphaSmooth
- value of the alpha smoothing parameterr
- rollp
- pitchya
- yawx
- gravity force on x axisy
- gravity force on y axisz
- gravity force on z axisxx
- raw acceleration on x axisyy
- raw acceleration on y axiszz
- raw acceleration on z axispublic java.lang.String toString()
toString
in class WiiUseApiEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |