public class Screen3D extends Object
Default values for Screen3D parameters are as follows:
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.
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.
Canvas3D
,
Canvas3D.getScreen3D()
Modifier and Type | Method and Description |
---|---|
void |
getHeadTrackerToLeftImagePlate(Transform3D t)
Retrieves the head-tracker coordinate system to left image-plate
coordinate system transform and copies it into the specified
Transform3D object.
|
void |
getHeadTrackerToRightImagePlate(Transform3D t)
Retrieves the head-tracker coordinate system to right image-plate
coordinate system transform and copies it into the specified
Transform3D object.
|
double |
getPhysicalScreenHeight()
Retrieves the the screen's physical height in meters.
|
double |
getPhysicalScreenWidth()
Retrieves the screen's physical width in meters.
|
Dimension |
getSize()
Retrieves the width and height (in pixels) of this Screen3D.
|
Dimension |
getSize(Dimension rv)
Retrieves the width and height (in pixels) of this Screen3D
and copies it into the specified Dimension object.
|
void |
getTrackerBaseToImagePlate(Transform3D t)
Retrieves the tracker-base coordinate system to image-plate
coordinate system transform and copies it into the specified
Transform3D object.
|
void |
setHeadTrackerToLeftImagePlate(Transform3D t)
Sets the head-tracker coordinate system to left image-plate coordinate
system transform.
|
void |
setHeadTrackerToRightImagePlate(Transform3D t)
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(Dimension d)
Sets the width and height (in pixels) of this off-screen Screen3D.
|
void |
setSize(int width,
int height)
Sets the width and height (in pixels) of this off-screen Screen3D.
|
void |
setTrackerBaseToImagePlate(Transform3D t)
Sets the tracker-base coordinate system to image-plate coordinate
system transform.
|
String |
toString() |
public Dimension getSize()
public Dimension getSize(Dimension rv)
rv
- Dimension object into which the size of
this Screen3D is copied.
If rv
is null, a new Dimension object is allocated.rv
public void setSize(int width, int height)
width
- the new width of this Screen3D objectheight
- the new height of this Screen3D objectIllegalStateException
- if this Screen3D is not in
off-screen mode.public void setSize(Dimension d)
d
- the new dimension of this Screen3D objectIllegalStateException
- if this Screen3D is not in
off-screen mode.public void setPhysicalScreenWidth(double width)
width
- the screen's physical width in meterspublic double getPhysicalScreenWidth()
public void setPhysicalScreenHeight(double height)
height
- the screen's physical height in meterspublic double getPhysicalScreenHeight()
public void setTrackerBaseToImagePlate(Transform3D t)
t
- the new transformBadTransformException
- if the transform is not rigidpublic void getTrackerBaseToImagePlate(Transform3D t)
t
- the object that will receive the transformpublic void setHeadTrackerToLeftImagePlate(Transform3D t)
t
- the new transformBadTransformException
- if the transform is not rigidpublic void getHeadTrackerToLeftImagePlate(Transform3D t)
t
- the object that will receive the transformpublic void setHeadTrackerToRightImagePlate(Transform3D t)
t
- the new transformBadTransformException
- if the transform is not rigidpublic void getHeadTrackerToRightImagePlate(Transform3D t)
t
- the object that will receive the transformCopyright © 2016–2022 SciJava. All rights reserved.