All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.j3d.Sensor
java.lang.Object
|
+----javax.media.j3d.Sensor
- public class Sensor
- extends Object
A Sensor object containing the sensor's hotspot in that Sensor's
coordinate system, together with a series of timestamped
SensorRead-objects and their associated Button-states.
-
DEFAULT_SENSOR_READ_COUNT
- Default SensorRead object count.
-
HAND_PREDICTOR
- Assume the sensor is predicting hand position/orientation
-
HEAD_PREDICTOR
- Assume the sensor is predicting head position/orientation
-
NO_PREDICTOR
- Use no prediction policy
-
PREDICT_NEXT_FRAME_TIME
- Generate the value to correspond with the next frame time
-
PREDICT_NONE
- Do no prediction
-
Sensor(InputDevice)
- Construct a new sensor, consisting of a set of default number of
SensorRead objects, no buttons, and a hot spot at (0.0, 0.0, 0.0)
in the sensor's coordinate system.
-
Sensor(InputDevice, int)
- Construct a new sensor, consisting of the stated number of readings,
no buttons, and a hot spot at (0.0, 0.0, 0.0) in the Sensor's
coordinate system.
-
Sensor(InputDevice, int, int)
- Construct a new sensor, consisting of the stated number of readings,
the stated number of buttons, and a hot spot at (0.0, 0.0, 0.0) in
the Sensor's coordinate system.
-
Sensor(InputDevice, int, int, Point3d)
- Construct a new sensor, consisting of the specified number of
SensorRead objects, the specified number of buttons, and the specified
hot spot in the Sensor's coordinate system.
-
Sensor(InputDevice, int, Point3d)
- Construct a new sensor, consisting of the specified number of
SensorRead objects, no buttons, and the specified
hot spot in the Sensor's coordinate system.
-
Sensor(InputDevice, Point3d)
-
Construct a new sensor, consisting of a set of default number of
SensorRead objects, no buttons, and the specified
a hot spot in the Sensor's coordinate system.
-
getCurrentSensorRead()
- Get the current sensor read count.
-
getDevice()
- Retrieves the sensor's associated input device
-
getHotspot(Point3d)
- Get the sensor's hotspot offset in this sensor's coordinate system.
-
getPredictionPolicy()
- This function returns the prediction policy used by this sensor.
-
getPredictor()
- This function returns the type of predictor used by this sensor.
-
getRead(Transform3D)
- Computes the sensor reading consistent with the prediction policy
and copies that value into the specified argument.
-
getRead(Transform3D, long)
- Computes the sensor reading consistent as of time deltaT in the future
and copies that value into the specified argument.
-
getSensorButtonCount()
- This function returns the number of buttons associated with this sensor.
-
getSensorReadCount()
- This function returns the number of SensorRead objects associated with
this sensor.
-
lastButtons()
- Returns the state of the buttons associated with the most recent sensor
reading.
-
lastButtons(int)
- Returns the state of the buttons associated with the kth most recent
sensor reading.
-
lastRead(Transform3D)
- Extracts the most recent sensor reading and copies that value into
the specified argument.
-
lastRead(Transform3D, int)
- Extracts the kth most recent sensor reading and copies that value into
the specified argument.
-
lastTime()
- Returns the time associated with the most recent sensor reading.
-
lastTime(int)
- Returns the time associated with the kth most recent sensor reading.
-
setDevice(InputDevice)
- Set the sensor's associated input device
-
setHotspot(Point3d)
- Set the sensor's hotspot offset in this sensor's coordinate system.
-
setNextSensorRead(long, Transform3D, int)
- Set the next sensor read objects to the specified values
-
setPredictionPolicy(int)
- This function sets the prediction policy use by this sensor.
-
setPredictor(int)
- This function set the type of predictor to use with this sensor.
-
setSensorReadCount(int)
- Set the number of sensor read objects per Sensor.
PREDICT_NONE
public static final int PREDICT_NONE
- Do no prediction
PREDICT_NEXT_FRAME_TIME
public static final int PREDICT_NEXT_FRAME_TIME
- Generate the value to correspond with the next frame time
NO_PREDICTOR
public static final int NO_PREDICTOR
- Use no prediction policy
HEAD_PREDICTOR
public static final int HEAD_PREDICTOR
- Assume the sensor is predicting head position/orientation
HAND_PREDICTOR
public static final int HAND_PREDICTOR
- Assume the sensor is predicting hand position/orientation
DEFAULT_SENSOR_READ_COUNT
public static final int DEFAULT_SENSOR_READ_COUNT
- Default SensorRead object count. The number of SensorRead objects
constructed if no count is specified.
Sensor
public Sensor(InputDevice device)
- Construct a new sensor, consisting of a set of default number of
SensorRead objects, no buttons, and a hot spot at (0.0, 0.0, 0.0)
in the sensor's coordinate system.
- Parameters:
- the - Sensor's associated device.
Sensor
public Sensor(InputDevice device,
int sensorReadCount)
- Construct a new sensor, consisting of the stated number of readings,
no buttons, and a hot spot at (0.0, 0.0, 0.0) in the Sensor's
coordinate system.
- Parameters:
- the - Sensor's associated device.
- sensorReadCount - the number of SensorReads to associate with
this sensor.
Sensor
public Sensor(InputDevice device,
int sensorReadCount,
int sensorButtonCount)
- Construct a new sensor, consisting of the stated number of readings,
the stated number of buttons, and a hot spot at (0.0, 0.0, 0.0) in
the Sensor's coordinate system.
- Parameters:
- the - Sensor's associated device.
- sensorReadCount - the number of SensorReads to associate with
this sensor.
- sensorButtonCount - the number of buttons associated with each
sensor read.
Sensor
public Sensor(InputDevice device,
Point3d hotspot)
- Construct a new sensor, consisting of a set of default number of
SensorRead objects, no buttons, and the specified
a hot spot in the Sensor's coordinate system.
- Parameters:
- the - Sensor's associated device.
- the - Sensor's hotspot.
Sensor
public Sensor(InputDevice device,
int sensorReadCount,
Point3d hotspot)
- Construct a new sensor, consisting of the specified number of
SensorRead objects, no buttons, and the specified
hot spot in the Sensor's coordinate system.
- Parameters:
- the - Sensor's associated device.
- sensorReadCount - the number of SensorReads to associate with
this sensor.
- hotspot - The sensor's hotspot defined in its local coordinate
system.
Sensor
public Sensor(InputDevice device,
int sensorReadCount,
int sensorButtonCount,
Point3d hotspot)
- Construct a new sensor, consisting of the specified number of
SensorRead objects, the specified number of buttons, and the specified
hot spot in the Sensor's coordinate system.
- Parameters:
- the - Sensor's associated device.
- sensorReadCount - the number of SensorReads to associate with
this sensor.
- sensorButtonCount - the number of buttons associated with each
sensor read.
- hotspot - The sensor's hotspot defined in its local coordinate
system.
setPredictor
public void setPredictor(int predictor)
- This function set the type of predictor to use with this sensor.
- Parameters:
- predictor - predictor type one of PREDICT_NONE or
PREDICT_NEXT_FRAME_TIME.
getPredictor
public int getPredictor()
- This function returns the type of predictor used by this sensor.
- Returns:
- returns the predictor type. One of PREDICT_NONE or
PREDICT_NEXT_FRAME_TIME.
setPredictionPolicy
public void setPredictionPolicy(int policy)
- This function sets the prediction policy use by this sensor.
- Parameters:
- policy - prediction policy one of NO_PREDICTOR, HEAD_PREDICTOR,
or HAND_PREDICTOR.
getPredictionPolicy
public int getPredictionPolicy()
- This function returns the prediction policy used by this sensor.
- Returns:
- returns the prediction policy. one of NO_PREDICTOR,
HEAD_PREDICTOR, or HAND_PREDICTOR.
setHotspot
public void setHotspot(Point3d hotspot)
- Set the sensor's hotspot offset in this sensor's coordinate system.
- Parameters:
- hotspot - the sensor's new hotspot
getHotspot
public void getHotspot(Point3d hotspot)
- Get the sensor's hotspot offset in this sensor's coordinate system.
- Parameters:
- hotspot - the variable to receive the sensor's hotspot
setDevice
public void setDevice(InputDevice device)
- Set the sensor's associated input device
- Parameters:
- device - the sensor's new device
getDevice
public InputDevice getDevice()
- Retrieves the sensor's associated input device
- Returns:
- the sensor's device
getRead
public void getRead(Transform3D read)
- Computes the sensor reading consistent with the prediction policy
and copies that value into the specified argument.
- Parameters:
- read - The matrix that will receive the predicted sensor reading
getRead
public void getRead(Transform3D read,
long deltaT)
- Computes the sensor reading consistent as of time deltaT in the future
and copies that value into the specified argument.
- Parameters:
- read - The matrix that will receive the predicted sensor reading
- deltaT - The time delta into the future for this read
lastRead
public void lastRead(Transform3D read)
- Extracts the most recent sensor reading and copies that value into
the specified argument.
- Parameters:
- read - The matrix that will receive the most recent sensor reading
lastRead
public void lastRead(Transform3D read,
int kth)
- Extracts the kth most recent sensor reading and copies that value into
the specified argument.
- Parameters:
- read - The matrix that will receive the most recent sensor reading
lastTime
public long lastTime()
- Returns the time associated with the most recent sensor reading.
- Returns:
- the time associated with the most recent sensor reading.
lastTime
public long lastTime(int k)
- Returns the time associated with the kth most recent sensor reading.
- Returns:
- the time associated with the kthmost recent sensor reading.
lastButtons
public int lastButtons()
- Returns the state of the buttons associated with the most recent sensor
reading.
- Returns:
- the state of the buttons associated with the most recent sensor
reading.
lastButtons
public int lastButtons(int k)
- Returns the state of the buttons associated with the kth most recent
sensor reading.
- Returns:
- the state of the buttons associated with the kth most recent
sensor reading.
getSensorReadCount
public final int getSensorReadCount()
- This function returns the number of SensorRead objects associated with
this sensor.
- Returns:
- the number of SensorReadObjects associated with this sensor.
setSensorReadCount
public void setSensorReadCount(int count)
- Set the number of sensor read objects per Sensor. This is a
calibration parameter that should be set before initializing Java 3D.
- Parameters:
- count - the new sensor read count
getSensorButtonCount
public final int getSensorButtonCount()
- This function returns the number of buttons associated with this sensor.
- Returns:
- the number of buttons associated with this sensor.
getCurrentSensorRead
public SensorRead getCurrentSensorRead()
- Get the current sensor read count.
- Returns:
- s the number of sensor read objects per sensor
setNextSensorRead
public void setNextSensorRead(long time,
Transform3D transform,
int buttons)
- Set the next sensor read objects to the specified values
- Parameters:
- time - The next SensorRead's associated time
- transform - The next SensorRead's transformation
- buttons - the next SensorRead's button state
All Packages Class Hierarchy This Package Previous Next Index