IRLight
Keywords: wiiremotej.IRLight 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
Class IRLight

    java.lang.Object
      wiiremotej.IRLight

    public class IRLight

extends java.lang.Object

A light dot seen by the IR Sensor. IRLights are immutable. In Basic mode, only the light's position is reported. In Extended mode, a rough estimate of the light's size is also reported. In Full mode, the light's bounding box and intensity (more accurate than size) are also reported.

Constructor Summary
`IRLight(int x, int y)` Creates a new IRLight (basic mode) with the given position.
`IRLight(int x, int y, int size)` Creates a new IRLight (extended mode) with the given position and size.
`IRLight(int x, int y, int size, int xMin, int yMin, int xMax, int yMax, int intensity)` Creates a new IRLight (full mode) with the given position, size, bounds, and intensity.

Method Summary
`boolean` | `equals(java.lang.Object other)` Returns `true` if this IRLight is equivalent to the given IRLight; otherwise `false`.
`double` | `getIntensity()` Returns the intensity of the light dot from 0 to 1 (percent).
`double` | `getSize()` Returns the size of the light dot from 0 to 1 (percent).
`double` | `getX()` Returns the X coordinate of the light dot from 0 to 1 (percent).
`double` | `getXMax()` Returns the maximum X coordinate of the light dot's bounding box from 0 to 1 (percent).
`double` | `getXMin()` Returns the minimum X coordinate of the light dot's bounding box from 0 to 1 (percent).
`double` | `getY()` Returns the Y coordinate of the light dot from 0 to 1 (percent).
`double` | `getYMax()` Returns the maximum Y coordinate of the light dot's bounding box from 0 to 1 (percent).
`double` | `getYMin()` Returns the minimum Y coordinate of the light dot's bounding box from 0 to 1 (percent).

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

Constructor Detail

### IRLight

    public IRLight(int x,
                   int y)

  Creates a new IRLight (basic mode) with the given position. Size is -1 (this mode doesn't report size).

  Parameters:
    `x` - X position of the light (0-1023).
    `y` - Y position of the light (0-767).

### IRLight

    public IRLight(int x,
                   int y,
                   int size)

  Creates a new IRLight (extended mode) with the given position and size.

  Parameters:
    `x` - X position of the light (0-1023).
    `y` - Y position of the light (0-767).
    `size` - size of the light (0-15).

### IRLight

    public IRLight(int x,
                   int y,
                   int size,
                   int xMin,
                   int yMin,
                   int xMax,
                   int yMax,
                   int intensity)

  Creates a new IRLight (full mode) with the given position, size, bounds, and intensity.

  Parameters:
    `x` - X position of the light (0-1023).
    `y` - Y position of the light (0-767).
    `size` - size of the light (0-15).
    `xMin` - the minimum X position of the light's bounding box (0-1023).
    `yMin` - the minimum Y position of the light's bounding box (0-767).
    `xMax` - the maximum X position of the light's bounding box (0-1023).
    `yMax` - the maximum Y position of the light's bounding box (0-767).
    `intensity` - the intensity of the light (0-255).

Method Detail

### getX

    public double getX()

  Returns the X coordinate of the light dot from 0 to 1 (percent).

  Returns:
    the X coordinate of the light dot.

### getY

    public double getY()

  Returns the Y coordinate of the light dot from 0 to 1 (percent).

  Returns:
    the Y coordinate of the light dot.

### getSize

    public double getSize()

  Returns the size of the light dot from 0 to 1 (percent). If this mode doesn't support size, this method returns -1.

  Returns:
    the size of the light dot.

### getXMin

    public double getXMin()

  Returns the minimum X coordinate of the light dot's bounding box from 0 to 1 (percent). If this mode doesn't support a bounding box, this method returns -1.

  Returns:
    the minimum X coordinate of the light dot's bouding box.

### getYMin

    public double getYMin()

  Returns the minimum Y coordinate of the light dot's bounding box from 0 to 1 (percent). If this mode doesn't support a bounding box, this method returns -1.

  Returns:
    the minimum Y coordinate of the light dot's bouding box.

### getXMax

    public double getXMax()

  Returns the maximum X coordinate of the light dot's bounding box from 0 to 1 (percent). If this mode doesn't support a bounding box, this method returns -1.

  Returns:
    the maximum X coordinate of the light dot's bouding box.

### getYMax

    public double getYMax()

  Returns the maximum Y coordinate of the light dot's bounding box from 0 to 1 (percent). If this mode doesn't support a bounding box, this method returns -1.

  Returns:
    the maximum Y coordinate of the light dot's bouding box.

### getIntensity

    public double getIntensity()

  Returns the intensity of the light dot from 0 to 1 (percent). If this mode doesn't support intensity, this method returns -1.

  Returns:
    the intensity of the light dot.

### equals

    public boolean equals(java.lang.Object other)

  Returns `true` if this IRLight is equivalent to the given IRLight; otherwise `false`. Coordinates, size, bounding box, and intensity must all match.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `other` - the other IRLight to compare to.
  Returns:
    `true` if this IRLight is equivalent to the given IRLight; otherwise `false`.

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