public class PhysicalEnvironment extends Object(Code)
This object contains a specification of the physical environment in
which the view will be generated. It is used to set up input
devices (sensors) for head-tracking and other uses, and the audio
output device. Sensors are indexed starting at zero.
See Also:View
getCoexistenceToTrackerBase(Transform3D t) Retrieves the coexistence coordinate system to tracker-base
coordinate system transform and copies it into the specified
Transform3D object.
setAudioDevice(AudioDevice device) Sets the specified AudioDevice object as the device through
which audio rendering for this PhysicalEnvironment will be
performed.
Constructs a PhysicalEnvironment object with default parameters.
The default values are as follows:
sensor count : 3
sensors : null (for all array elements)
head index : 0
right hand index : 1
left hand index : 2
dominant hand index : 1
nondominant hand index : 2
tracking available : false
audio device : null
input device list : empty
coexistence to tracker base transform : identity
coexistence center in pworld policy : View.NOMINAL_SCREEN
Constructs and initializes a PhysicalEnvironment object with
the specified number of sensors.
Parameters: sensorCount - the number of sensors to create.
Add an input device to the list of input devices. User is
responsible for initializing the device and setting the
processing mode (streaming or polling).
Parameters: device - the device to be added to the list of input devices exception: IllegalArgumentException - if InputDevice.getProcessingMode()does not return one of BLOCKING, NON_BLOCKING, or DEMAND_DRIVEN.
Retrieves the coexistence coordinate system to tracker-base
coordinate system transform and copies it into the specified
Transform3D object.
Parameters: t - the object that will receive the transform
Remove an input device from the list of input devices.
User is responsible for closing out the device and releasing
the device resources.
Parameters: device - the device to be removed
Sets the specified AudioDevice object as the device through
which audio rendering for this PhysicalEnvironment will be
performed.
Parameters: device - audio device object to be associated with this PhysicalEnvironment
setCoexistenceCenterInPworldPolicy
public void setCoexistenceCenterInPworldPolicy(int policy)(Code)
Sets the coexistence center in physical world policy.
This setting determines how Java 3D places the
user's eye point as a function of head position during the
calibration process, one of View.NOMINAL_SCREEN,
View.NOMINAL_HEAD, or View.NOMINAL_FEET.
The default policy is View.NOMINAL_SCREEN.
Parameters: policy - the new policy
Sets the coexistence coordinate system to tracker-base coordinate
system transform. If head tracking is enabled, this transform
is a calibration constant. If head tracking is not enabled,
this transform is not used.
This is used in both SCREEN_VIEW and HMD_VIEW modes.
Parameters: t - the new transform exception: BadTransformException - if the transform is not rigid
Sets the index of the right hand to the specified sensor index.
Parameters: index - the new sensor index of the right hand
setSensor
public void setSensor(int index, Sensor sensor)(Code)
Set the sensor specified by the index to sensor provided; sensors are
indexed starting at 0. All sensors must be registered via this
method.
Parameters: index - the sensor's index Parameters: sensor - the new sensor
Set the number of sensor objects per PhysicalEnvironmnet. This is a
calibration parameter that should be set before setting any sensors
in the PhysicalEnvironment object. This call associates 'count'
Sensors with this object, and they are indexed from 0 to count-1.
Parameters: count - the new sensor count