|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.j3d.device.input.spaceball.InputDeviceBase
Base class for input devices with one sensor. Inherited classes shall
provide the raw difference values (old absolute value - new absolute value)
to setDeltaDeviceInput(int[], int[]) for transformation calculation in the
processStimulus method. Input values will be scaled. A
difference transformation will be put into the sensor object.
The initialize method of inherited classes must call the
setSensor(javax.media.j3d.Sensor) method to set a Sensor object to be used for storing the
calculated transformation.
Before using this class an appropriate Behavior (obtained with
the getBehavior() method) must be added to the scene graph.
| Field Summary | |
protected InputDeviceBehavior |
itsBehavior
|
| Fields inherited from interface javax.media.j3d.InputDevice |
BLOCKING, DEMAND_DRIVEN, NON_BLOCKING |
| Constructor Summary | |
InputDeviceBase(int processingMode)
Constructs an InputDeviceBase object. |
|
InputDeviceBase(int processingMode,
javax.media.j3d.Sensor sensor)
Constructs an InputDeviceBase object. |
|
| Method Summary | |
void |
close()
call this method when overriding |
InputDeviceBehavior |
getBehavior()
Utility method to get the assigned Behavior for the input
device. |
int |
getProcessingMode()
|
javax.media.j3d.Sensor |
getSensor(int sensorIndex)
use only after initialisation |
int |
getSensorCount()
|
boolean |
initialize()
Inherited classes shall override this method and call this method, if their initialization was OK. |
void |
processStreamInput()
|
protected void |
setDeltaDeviceInput(int[] input,
int[] buttonValues)
Calculates the transformation and puts the result into the sensor. |
void |
setInputValueProcessingOrder(int[] inputOrder)
Define the processing order of the input values. |
void |
setNominalPositionAndOrientation()
|
void |
setProcessingMode(int mode)
not implemented |
void |
setScale(double[] scale)
|
void |
setScale(int index,
double scale)
Set individual scale. |
protected void |
setSensor(javax.media.j3d.Sensor sensor)
call this method during initialisation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.media.j3d.InputDevice |
pollAndProcessInput |
| Field Detail |
protected InputDeviceBehavior itsBehavior
| Constructor Detail |
public InputDeviceBase(int processingMode)
processingMode - use constants
InputDevice.BLOCKING
InputDevice.NON_BLOCKING
InputDevice.DEMAND_DRIVEN
public InputDeviceBase(int processingMode,
javax.media.j3d.Sensor sensor)
processingMode - use constants
InputDevice.BLOCKING
InputDevice.NON_BLOCKING
InputDevice.DEMAND_DRIVEN
sensor - sensor to be used| Method Detail |
public boolean initialize()
initialize in interface javax.media.j3d.InputDevicesetSensor(javax.media.j3d.Sensor)public void setNominalPositionAndOrientation()
setNominalPositionAndOrientation in interface javax.media.j3d.InputDevicepublic void processStreamInput()
processStreamInput in interface javax.media.j3d.InputDevicepublic void close()
close in interface javax.media.j3d.InputDevicepublic int getProcessingMode()
getProcessingMode in interface javax.media.j3d.InputDevicepublic void setProcessingMode(int mode)
setProcessingMode in interface javax.media.j3d.InputDevicepublic int getSensorCount()
getSensorCount in interface javax.media.j3d.InputDevicepublic javax.media.j3d.Sensor getSensor(int sensorIndex)
getSensor in interface javax.media.j3d.InputDevicepublic void setScale(double[] scale)
scale - value to be multiplied with the input values of the device
driver. Size of array = 6.
public void setScale(int index,
double scale)
index - 0 <= index < 6scale - value to be multiplied with the received corrsponding value
of the device driver.public InputDeviceBehavior getBehavior()
Behavior for the input
device. The Behavior will read the transformations of the
inputs device's sensor and apply them to the specified
TransformGroup.The Behavior is not added to the scene graph. This must be done by the user.
public void setInputValueProcessingOrder(int[] inputOrder)
inputOrder - The size of the array and the indizes must match with
the number of input values.setDeltaDeviceInput(int[], int[])
protected void setDeltaDeviceInput(int[] input,
int[] buttonValues)
input - new difference input values for transformation calculation.
Size of array = 6.buttonValues - set to null if input device has no
buttonsTransformationUtils#getRotationTranslationTransform3Dprotected void setSensor(javax.media.j3d.Sensor sensor)
sensor - sensor to be used
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||