| |
|
| java.lang.Object javax.media.j3d.SensorRead
SensorRead | public class SensorRead (Code) | | A SensorRead encapsulates all the information associated with a single
reading of a sensor, including a timestamp, a transform, and,
optionally, button values.
|
Constructor Summary | |
public | SensorRead() Constructs a SensorRead object with default parameters. | public | SensorRead(int numButtons) Constructs a SensorRead object with the specified number
of buttons. |
Method Summary | |
public void | get(Transform3D result) | public void | getButtons(int[] values) Copies the array of button values for this SensorRead object into
the specified array.
This method has no effect
if this SensorRead object has 0 buttons. | public int | getNumButtons() Returns the number of buttons associated with this SensorRead
object. | public long | getTime() | final void | set(SensorRead sensorRead) | public void | set(Transform3D t1) | public void | setButtons(int[] values) Sets the values of all buttons for this SensorRead object. | public void | setTime(long time) |
MAXIMUM_SENSOR_BUTTON_COUNT | final public static int MAXIMUM_SENSOR_BUTTON_COUNT(Code) | | The maximum number of sensor-attached buttons tracked on a per
sensor basis.
|
buttonValues | int[] buttonValues(Code) | | The state of the sensor's buttons
|
numButtons | int numButtons(Code) | | The number of buttons associated with this SensorRead
|
time | long time(Code) | | This reading's time stamp
|
SensorRead | public SensorRead()(Code) | | 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)(Code) | | Constructs a SensorRead object with the specified number
of buttons.
Parameters: numButtons - the number of buttons for this SensorRead |
get | public void get(Transform3D result)(Code) | | Retrieve the SensorRead's transform and place it in result
Parameters: result - the recipient of the this sensor's reading |
getButtons | public void getButtons(int[] values)(Code) | | Copies the array of button values for this SensorRead object into
the specified array.
This method has no effect
if this SensorRead object has 0 buttons. The array must be
large enough to hold all of the buttons.
Parameters: values - array that will receive the values of all buttonsfor this SensorRead |
getNumButtons | public int getNumButtons()(Code) | | Returns the number of buttons associated with this SensorRead
object.
the number of buttons associated with this SensorReadobject since: Java 3D 1.2 |
getTime | public long getTime()(Code) | | Retrieve this SensorRead's associated time stamp
the SensorRead's time as a long |
set | public void set(Transform3D t1)(Code) | | Set the SensorRead's transform to the value specified
Parameters: t1 - this sensor's reading |
setButtons | public void setButtons(int[] values)(Code) | | Sets the values of all buttons for this SensorRead object.
Parameters: values - array contining the new buttons for this SensorRead exception: ArrayIndexOutOfBoundsException - if this object has 0 buttons or if values.length is less than the number of buttons in this object. |
setTime | public void setTime(long time)(Code) | | Sets this SensorRead's time stamp to the specified argument
Parameters: time - the time to associate with this reading |
|
|
|