WRIREvent
Keywords: wiiremotej.event.WRIREvent class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## wiiremotej.event
Class WRIREvent

    java.lang.Object
      java.util.EventObject
          wiiremotej.event.WREvent
              wiiremotej.event.WRIREvent

All Implemented Interfaces:
  java.io.Serializable

    public class WRIREvent

extends WREvent

IR Event for Nintendo (R) Wii Remote (TM). Contains information on IR input. The "resolution" of the IR camera is 1024X768. Note that the camera uses a standard cartesian coordinates system, such that the point 0,0 is the BOTTOM left corner of the screen. On computer screens, 0,0 is the TOP left corner.

See Also:
  Serialized Form

Field Summary
`static int` | `BASIC` Basic mode: the IR sensor reports only position data.
`static int` | `EXTENDED` Extended mode: the IR sensor reports position and size data.
`static int` | `FULL` Full mode: the IR sensor reports position, size, bounding box, and intensity.

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`WRIREvent(WiiRemote source, int mode, byte[] data1, byte[] data2)` Creates a new WRIREvent with the WiiRemote source, interleaved data, and mode.
`WRIREvent(WiiRemote source, int mode, byte[] data, int offset)` Creates a new WRIREvent with the WiiRemote source, data, and mode.
`WRIREvent(WiiRemote source, int mode, IRLight[] IRLights)` Creates a new WRIREvent with the WiiRemote source, IRLights, and mode.

Method Summary
`IRLight[]` | `getIRLights()` Returns the array of IR lights seen by the IR sensor.
`int` | `getMode()` Returns the mode of the IR sensor.

Methods inherited from class wiiremotej.event.WREvent
`getSource`

Methods inherited from class java.util.EventObject
`toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### BASIC

    public static int BASIC

  Basic mode: the IR sensor reports only position data.

### EXTENDED

    public static int EXTENDED

  Extended mode: the IR sensor reports position and size data.

### FULL

    public static int FULL

  Full mode: the IR sensor reports position, size, bounding box, and intensity.

Constructor Detail

### WRIREvent

    public WRIREvent(WiiRemote source,
                     int mode,
                     byte[] data,
                     int offset)

  Creates a new WRIREvent with the WiiRemote source, data, and mode.

  Parameters:
    `source` - the WiiRemote triggering this event.
    `mode` - the mode the IR sensor is in.
    `data` - the data for the lights detected by the IR sensor.
    `offset` - first index of useful data in the array.

### WRIREvent

    public WRIREvent(WiiRemote source,
                     int mode,
                     byte[] data1,
                     byte[] data2)

  Creates a new WRIREvent with the WiiRemote source, interleaved data, and mode.

  Parameters:
    `source` - the WiiRemote triggering this event.
    `mode` - the mode the IR sensor is in.
    `data1` - the first data packet for the lights detected by the IR sensor.
    `data2` - the second data packet for the lights detected by the IR sensor.

### WRIREvent

    public WRIREvent(WiiRemote source,
                     int mode,
                     IRLight[] IRLights)

  Creates a new WRIREvent with the WiiRemote source, IRLights, and mode.

  Parameters:
    `source` - the WiiRemote triggering this event.
    `mode` - the mode the IR sensor is in.
    `IRLights` - the array of IRLights detected.

Method Detail

### getIRLights

    public IRLight[] getIRLights()

  Returns the array of IR lights seen by the IR sensor. Note that some or all fields of the array may be null, indicating that there is no dot there. The information contained in the lights varies based on the mode.

  Returns:
    the array of IR lights seen by the IR sensor.

### getMode

    public int getMode()

  Returns the mode of the IR sensor. The mode indicates how much information is contained in the event.

  Returns:
    the mode of the IR sensor.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD