All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.Sensor

java.lang.Object
   |
   +----java.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 SensorReading-objects and their associated Button-state array.


Variable Index

 o HAND_PREDICTOR
Assume the sensor is predicting hand position/orientation
 o HEAD_PREDICTOR
Assume the sensor is predicting head position/orientation
 o NO_PREDICTOR
Use no prediction policy
 o PREDICT_NEXT_FRAME_TIME
Generate the value to correspond with the next frame time
 o PREDICT_NONE
Do no prediction

Constructor Index

 o Sensor()
Construct a new sensor, consisting of a set of readings and an a hot spot at (0.0, 0.0, 0.0) in its own coordinate system.
 o Sensor(double, double, double)
Construct a new sensor, consisting of a set of readings and an offset defining the sensor's hot spot in its own coordinate system.
 o Sensor(Point3d)
Construct a new sensor, consisting of a set of readings and an offset defining the sensor's hot spot in its own coordinate system.

Method Index

 o getHotspot(Point3d)
Get the sensor's hotspot offset in this sensor's coordinate system.
 o getPredictionPolicy()
 o getPredictor()
 o getRead(Transform3D)
Computes the sensor reading consistent with the prediction policy and copies that value into the specified argument.
 o getRead(Transform3D, long)
Computes the sensor reading consistent as of time deltaT in the future and copies that value into the specified argument.
 o getSensorReadCount()
Get the current sensor read count.
 o lastButtons()
Returns the state of the buttons associated with the most recent sensor reading.
 o lastButtons(int)
Returns the state of the buttons associated with the kth most recent sensor reading.
 o lastRead(Transform3D)
Extracts the most recent sensor reading and copies that value into the specified argument.
 o lastRead(Transform3D, int)
Extracts the kth most recent sensor reading and copies that value into the specified argument.
 o lastTime()
Returns the time associated with the most recent sensor reading.
 o lastTime(int)
Returns the time associated with the kth most recent sensor reading.
 o setHotspot(Point3d)
Set the sensor's hotspot offset in this sensor's coordinate system.
 o setPredictionPolicy(int)
 o setPredictor(int)
 o setSensorReadCount(int)
Set the number of sensor read objects per Sensor.

Variables

 o PREDICT_NONE
 public static final int PREDICT_NONE
Do no prediction

 o PREDICT_NEXT_FRAME_TIME
 public static final int PREDICT_NEXT_FRAME_TIME
Generate the value to correspond with the next frame time

 o NO_PREDICTOR
 public static final int NO_PREDICTOR
Use no prediction policy

 o HEAD_PREDICTOR
 public static final int HEAD_PREDICTOR
Assume the sensor is predicting head position/orientation

 o HAND_PREDICTOR
 public static final int HAND_PREDICTOR
Assume the sensor is predicting hand position/orientation

Constructors

 o Sensor
 public Sensor()
Construct a new sensor, consisting of a set of readings and an a hot spot at (0.0, 0.0, 0.0) in its own coordinate system.

 o Sensor
 public Sensor(double x,
               double y,
               double z)
Construct a new sensor, consisting of a set of readings and an offset defining the sensor's hot spot in its own coordinate system.

Parameters:
hotspot - The sensor's hotspot defined in its local coordinate system.
 o Sensor
 public Sensor(Point3d hotspot)
Construct a new sensor, consisting of a set of readings and an offset defining the sensor's hot spot in its own coordinate system.

Parameters:
hotspot - The sensor's hotspot defined in its local coordinate system.

Methods

 o setPredictor
 public void setPredictor(int predictor)
 o getPredictor
 public int getPredictor()
 o setPredictionPolicy
 public void setPredictionPolicy(int policy)
 o getPredictionPolicy
 public int getPredictionPolicy()
 o 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
 o 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
 o 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
 o 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
 o 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
 o lastTime
 public long lastTime()
Returns the time associated with the most recent sensor reading.

Returns:
the time associated with the most recent sensor reading.
 o lastButtons
 public boolean[] 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.
 o 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
 o 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.
 o lastButtons
 public boolean[] 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.
 o getSensorReadCount
 public int getSensorReadCount()
Get the current sensor read count.

Returns:
s the number of sensor read objects per sensor
 o 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

All Packages  Class Hierarchy  This Package  Previous  Next  Index