Class Screen3D
Default values for Screen3D parameters are as follows:
-
physical screen width : 0.0254/90.0 * screen width (in pixels)
physical screen height : 0.0254/90.0 * screen height (in pixels)
tracker base to image plate transform : identity
head tracker to left image plate transform : identity
head tracker to right image plate transform : identity
off-screen size : (0,0)
Offscreen Rendering
New for Java 3D 1.2, an off-screen rendering mode allows rendering to a memory image, which is possibly larger than the screen. The setSize and getSize methods are defined specifically for this mode. Note that the off-screen size, physical width, and physical height must be set prior to rendering to the associated off-screen canvas. Failure to do so will result in an exception.
Calibration Parameters
The Screen3D object must be calibrated with the coexistence volume. The Screen3D class provides several methods for defining the calibration parameters.
- Measured Parameters
- If the view policy is SCREEN_VIEW, the tracker-base-to-image-plate coordinate system must be specified (setTrackerBaseToImagePlate method). This coordinate system must be recalibrated whenever the image plate moves relative to the tracker.
- If the view policy is HMD_VIEW, the head-tracker-to-left-image-plate and head-tracker-to-right-image-plate coordinate systems must be specified (setHeadTrackerToLeftImagePlate and setHeadTrackerToRightImagePlate methods).
The screen's (image plate's) physical width and height (in meters) is set once, typically by a browser, calibration program, system administrator, or system calibrator, not by an applet. These values must be determined by measuring the display's active image width and height. In the case of a head-mounted display, this should be the display's apparent width and height at the focal plane. These values are defined by the setPhysicalScreenWidth and setPhysicalScreenHeight methods.
Head-tracker Coordinate System
If head tracking is enabled, one of two parameters need to be specified:
Additional Information
For more information, see the Introduction to the Java 3D API and View Model documents.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Retrieves the head-tracker coordinate system to left image-plate coordinate system transform and copies it into the specified Transform3D object.void
Retrieves the head-tracker coordinate system to right image-plate coordinate system transform and copies it into the specified Transform3D object.double
Retrieves the the screen's physical height in meters.double
Retrieves the screen's physical width in meters.getSize()
Retrieves the width and height (in pixels) of this Screen3D.Retrieves the width and height (in pixels) of this Screen3D and copies it into the specified Dimension object.void
Retrieves the tracker-base coordinate system to image-plate coordinate system transform and copies it into the specified Transform3D object.void
Sets the head-tracker coordinate system to left image-plate coordinate system transform.void
Sets the head-tracker coordinate system to right image-plate coordinate system transform.void
setPhysicalScreenHeight
(double height) Sets the screen physical height in meters.void
setPhysicalScreenWidth
(double width) Sets the screen physical width in meters.void
setSize
(int width, int height) Sets the width and height (in pixels) of this off-screen Screen3D.void
Sets the width and height (in pixels) of this off-screen Screen3D.void
Sets the tracker-base coordinate system to image-plate coordinate system transform.toString()
-
Method Details
-
getSize
Retrieves the width and height (in pixels) of this Screen3D.- Returns:
- a new Dimension object containing the width and height of this Screen3D.
-
getSize
Retrieves the width and height (in pixels) of this Screen3D and copies it into the specified Dimension object.- Parameters:
rv
- Dimension object into which the size of this Screen3D is copied. Ifrv
is null, a new Dimension object is allocated.- Returns:
rv
- Since:
- Java 3D 1.2
-
setSize
public void setSize(int width, int height) Sets the width and height (in pixels) of this off-screen Screen3D. The default size for off-screen Screen3D objects is (0,0).
NOTE: the size must be set prior to rendering to the associated off-screen canvas. Failure to do so will result in an exception.- Parameters:
width
- the new width of this Screen3D objectheight
- the new height of this Screen3D object- Throws:
IllegalStateException
- if this Screen3D is not in off-screen mode.- Since:
- Java 3D 1.2
-
setSize
Sets the width and height (in pixels) of this off-screen Screen3D. The default size for off-screen Screen3D objects is (0,0).
NOTE: the size must be set prior to rendering to the associated off-screen canvas. Failure to do so will result in an exception.- Parameters:
d
- the new dimension of this Screen3D object- Throws:
IllegalStateException
- if this Screen3D is not in off-screen mode.- Since:
- Java 3D 1.2
-
setPhysicalScreenWidth
public void setPhysicalScreenWidth(double width) Sets the screen physical width in meters. In the case of a head-mounted display, this should be the apparent width at the focal plane.- Parameters:
width
- the screen's physical width in meters
-
getPhysicalScreenWidth
public double getPhysicalScreenWidth()Retrieves the screen's physical width in meters.- Returns:
- the screen's physical width in meters
-
setPhysicalScreenHeight
public void setPhysicalScreenHeight(double height) Sets the screen physical height in meters. In the case of a head-mounted display, this should be the apparent height at the focal plane.- Parameters:
height
- the screen's physical height in meters
-
getPhysicalScreenHeight
public double getPhysicalScreenHeight()Retrieves the the screen's physical height in meters.- Returns:
- the screen's physical height in meters
-
toString
-
setTrackerBaseToImagePlate
Sets the tracker-base coordinate system to image-plate coordinate system transform. This transform is typically a calibration constant. This is used only in SCREEN_VIEW mode.- Parameters:
t
- the new transform- Throws:
BadTransformException
- if the transform is not rigid
-
getTrackerBaseToImagePlate
Retrieves the tracker-base coordinate system to image-plate coordinate system transform and copies it into the specified Transform3D object.- Parameters:
t
- the object that will receive the transform
-
setHeadTrackerToLeftImagePlate
Sets the head-tracker coordinate system to left image-plate coordinate system transform. This transform is typically a calibration constant. This is used only in HMD_VIEW mode.- Parameters:
t
- the new transform- Throws:
BadTransformException
- if the transform is not rigid
-
getHeadTrackerToLeftImagePlate
Retrieves the head-tracker coordinate system to left image-plate coordinate system transform and copies it into the specified Transform3D object.- Parameters:
t
- the object that will receive the transform
-
setHeadTrackerToRightImagePlate
Sets the head-tracker coordinate system to right image-plate coordinate system transform. This transform is typically a calibration constant. This is used only in HMD_VIEW mode.- Parameters:
t
- the new transform- Throws:
BadTransformException
- if the transform is not rigid
-
getHeadTrackerToRightImagePlate
Retrieves the head-tracker coordinate system to right image-plate coordinate system transform and copies it into the specified Transform3D object.- Parameters:
t
- the object that will receive the transform
-