|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwiiusej.wiiusejevents.GenericEvent
wiiusej.wiiusejevents.wiiuseapievents.WiiUseApiEvent
wiiusej.wiiusejevents.wiiuseapievents.WiimoteEvent
public class WiimoteEvent
Class that is a bean to be filled by the wiiuse API on an event that occurs on a wiimote.
Field Summary | |
---|---|
(package private) WiimoteButtonsEvent |
buttonsEvent
|
(package private) ExpansionEvent |
expansionEvent
|
(package private) IREvent |
infraredEvent
|
(package private) MotionSensingEvent |
motionSensingEvent
|
Fields inherited from class wiiusej.wiiusejevents.wiiuseapievents.WiiUseApiEvent |
---|
DISCONNECTION_EVENT, GENERIC_EVENT, NONE_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, WIIUSE_READ_DATA |
Constructor Summary | |
---|---|
WiimoteEvent(int id)
Construct the Wiimote setting up the id. |
|
WiimoteEvent(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. |
WiimoteButtonsEvent |
getButtonsEvent()
Get buttons event. |
ExpansionEvent |
getExpansionEvent()
Get the expansion event. |
IREvent |
getIREvent()
Get the IR event. |
MotionSensingEvent |
getMotionSensingEvent()
Get the motion sensing event. |
boolean |
isThereExpansionEvent()
Tell if there is an expansion 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,
float z,
int ax,
int ay,
int xVRes,
int yVRes,
int xOffset,
int yOffset,
short sensorBarPostion,
short screenAsPectRatio,
short irSensitivity,
float distance)
Prepare an IR event to populate. |
void |
setClassicControllerEvent()
|
void |
setMotionSensingEvent(float orientationThreshold,
int accelerationThreshold,
boolean smoothingState,
float alphaSmooth,
float r,
float p,
float ya,
float ar,
float ap,
float x,
float y,
float z,
short xx,
short yy,
short zz)
Set the Motion Sensing Event. |
void |
setNunchukEvent(short buttonsJustPressed,
short buttonsJustReleased,
short buttonsHeld,
float orientationThreshold,
int accelerationThreshold,
boolean smoothingState,
float alphaSmooth,
float r,
float p,
float ya,
float ar,
float ap,
float x,
float y,
float z,
short xx,
short yy,
short zz,
float angle,
float magnitude,
short max1,
short max2,
short min1,
short min2,
short center1,
short center2)
Set a NunchukEvent for the expansion event. |
java.lang.String |
toString()
|
Methods inherited from class wiiusej.wiiusejevents.wiiuseapievents.WiiUseApiEvent |
---|
getEventType |
Methods inherited from class wiiusej.wiiusejevents.GenericEvent |
---|
getWiimoteId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
WiimoteButtonsEvent buttonsEvent
IREvent infraredEvent
MotionSensingEvent motionSensingEvent
ExpansionEvent expansionEvent
Constructor Detail |
---|
public WiimoteEvent(int id)
id
- the Wiimote idpublic WiimoteEvent(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 boolean isThereExpansionEvent()
public WiimoteButtonsEvent getButtonsEvent()
public IREvent getIREvent()
public MotionSensingEvent getMotionSensingEvent()
public ExpansionEvent getExpansionEvent()
public void prepareIRevent(int x, int y, float z, int ax, int ay, int xVRes, int yVRes, int xOffset, int yOffset, short sensorBarPostion, short screenAsPectRatio, short irSensitivity, float distance)
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.irSensitivity
- Sensitivity of the infrared camera.distance
- Pixel Distance between first two dotspublic 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 ar, float ap, float x, float y, float z, short xx, short yy, short zz)
orientationThreshold
- value of the minimum angle between two events with the
accelerometer.accelerationThreshold
- value of the value variation between two events with the
accelerometer.smoothingState
- true if smoothing flag is activated.alphaSmooth
- value of the alpha smoothing parameter.r
- roll.p
- pitch.ya
- yaw.ar
- absolute roll.ap
- absolute pitch.x
- gravity force on x axis.y
- gravity force on y axis.z
- gravity force on z axis.xx
- raw acceleration on x axis.yy
- raw acceleration on y axis.zz
- raw acceleration on z axis.public void setNunchukEvent(short buttonsJustPressed, short buttonsJustReleased, short buttonsHeld, float orientationThreshold, int accelerationThreshold, boolean smoothingState, float alphaSmooth, float r, float p, float ya, float ar, float ap, float x, float y, float z, short xx, short yy, short zz, float angle, float magnitude, short max1, short max2, short min1, short min2, short center1, short center2)
buttonsJustPressed
- buttons just pressed.buttonsJustReleased
- buttons just released.buttonsHeld
- buttons just pressed.orientationThreshold
- value of the minimum angle between two events with the
accelerometer.accelerationThreshold
- value of the value variation between two events with the
accelerometer.smoothingState
- true if smoothing flag is activated.alphaSmooth
- value of the alpha smoothing parameter.r
- roll.p
- pitch.ya
- yaw.ar
- absolute roll.ap
- absolute pitch.x
- gravity force on x axis.y
- gravity force on y axis.z
- gravity force on z axis.xx
- raw acceleration on x axis.yy
- raw acceleration on y axis.zz
- raw acceleration on z axis.angle
- angle the joystick is being held.magnitude
- magnitude of the joystick (range 0-1).max1
- maximum joystick value 1.max2
- maximum joystick value 2.min1
- minimum joystick value 1.min2
- minimum joystick value 2.center1
- center joystick value 1.center2
- center joystick value 2.public void setClassicControllerEvent()
public java.lang.String toString()
toString
in class WiiUseApiEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |