public class VirtualInputDevice extends java.lang.Object implements InputDevice
BLOCKING, DEMAND_DRIVEN, NON_BLOCKING
Constructor and Description |
---|
VirtualInputDevice(java.lang.String[] args) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Code to process the clean up of the device and relinquish associated
resources.
|
int |
getProcessingMode()
This method retrieves the device's processing mode: one of BLOCKING,
NON_BLOCKING, or DEMAND_DRIVEN.
|
Sensor |
getSensor(int sensorIndex)
Gets the specified Sensor associated with the device.
|
int |
getSensorCount()
This method gets the number of sensors associated with the device.
|
boolean |
initialize()
This method initializes the device.
|
void |
pollAndProcessInput()
This method causes the device's sensor readings to be updated by the
device driver.
|
void |
processStreamInput()
This method will not be called by the Java 3D implementation and
should be implemented as an empty method.
|
void |
setNominalPositionAndOrientation()
This method sets the device's current position and orientation as the
devices nominal position and orientation (establish its reference
frame relative to the "Tracker base" reference frame).
|
void |
setProcessingMode(int mode)
This method sets the device's processing mode to one of: BLOCKING,
NON_BLOCKING, or DEMAND_DRIVEN.
|
public void close()
InputDevice
close
in interface InputDevice
public int getProcessingMode()
InputDevice
getProcessingMode
in interface InputDevice
public int getSensorCount()
InputDevice
getSensorCount
in interface InputDevice
public Sensor getSensor(int sensorIndex)
InputDevice
getSensor
in interface InputDevice
sensorIndex
- the sensor to retrievepublic boolean initialize()
InputDevice
initialize
in interface InputDevice
public void pollAndProcessInput()
InputDevice
pollAndProcessInput
in interface InputDevice
public void processStreamInput()
InputDevice
processStreamInput
in interface InputDevice
public void setNominalPositionAndOrientation()
InputDevice
setNominalPositionAndOrientation
in interface InputDevice
public void setProcessingMode(int mode)
InputDevice
NOTE: this method should not be called after the input device has been added to a PhysicalEnvironment. The processingMode must remain constant while a device is attached to a PhysicalEnvironment.
setProcessingMode
in interface InputDevice
mode
- One of BLOCKING, NON_BLOCKING, or DEMAND_DRIVEN