: Class SensorRead

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

## javax.media.j3d
Class SensorRead

    java.lang.Object
      |
      +--javax.media.j3d.SensorRead

public class SensorRead
extends java.lang.Object

A SensorRead encapsulates all the information associated with a single reading of a sensor, including a timestamp, a transform, and, optionally, button values.

Field Summary
`static int` | `MAXIMUM_SENSOR_BUTTON_COUNT` The maximum number of sensor-attached buttons tracked on a per sensor basis.

Constructor Summary
`SensorRead()` Constructs a SensorRead object with default parameters.
`SensorRead(int numButtons)` Constructs a SensorRead object with the specified number of buttons.

Method Summary
`void` | `get(Transform3D result)` Retrieve the SensorRead's transform and place it in result
`int` | `getButtons()` Deprecated. Use getButtons(int[] values).
`void` | `getButtons(int[] values)` Retrieves the array of buttons for this SensorRead object.
`long` | `getTime()` Retrieve this SensorRead's associated time stamp
`void` | `set(Transform3D t1)` Set the SensorRead's transform to the value specified
`void` | `setButtons(int value)` Deprecated. Use setButtons(int[] values).
`void` | `setButtons(int[] values)` Sets the values of all buttons for this SensorRead object.
`void` | `setTime(long time)` Sets this SensorRead's time stamp to the specified argument

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

Field Detail

### MAXIMUM_SENSOR_BUTTON_COUNT

    public static final int MAXIMUM_SENSOR_BUTTON_COUNT

  The maximum number of sensor-attached buttons tracked on a per sensor basis.

Constructor Detail

### SensorRead

    public SensorRead()

  Constructs a SensorRead object with default parameters. The default values are as follows:
  number of buttons : 0
  button values : 0 (for all array elements)
  transform : identity
  time : current time

### SensorRead

    public SensorRead(int numButtons)

  Constructs a SensorRead object with the specified number of buttons.
  Parameters:
    `numButtons` - the number of buttons for this SensorRead

Method Detail

### set

    public final void set(Transform3D t1)

  Set the SensorRead's transform to the value specified
  Parameters:
    `t1` - this sensor's reading

### get

    public final void get(Transform3D result)

  Retrieve the SensorRead's transform and place it in result
  Parameters:
    `result` - the recipient of the this sensor's reading

### setTime

    public final void setTime(long time)

  Sets this SensorRead's time stamp to the specified argument
  Parameters:
    `time` - the time to associate with this reading

### getTime

    public final long getTime()

  Retrieve this SensorRead's associated time stamp
  Returns:
    the SensorRead's time as a long

### setButtons

    public final void setButtons(int value)

  Deprecated. Use setButtons(int[] values).

### setButtons

    public final void setButtons(int[] values)

  Sets the values of all buttons for this SensorRead object.
  Parameters:
    `values` - array contining the new buttons for this SensorRead
  Throws:
    ArrayIndexOutOfBoundsException - if this object has 0 buttons or if values.length is less than the number of buttons in this object.

### getButtons

    public final int getButtons()

  Deprecated. Use getButtons(int[] values).

### getButtons

    public final void getButtons(int[] values)

  Retrieves the array of buttons for this SensorRead object. This method has no effect if this SensorRead object has 0 buttons.
  Parameters:
    `values` - array that will receive the values of all buttons for this SensorRead

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