|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--javax.media.j3d.View
The View object contains all parameters needed in rendering a three dimensional scene from one viewpoint. A view contains a list of Canvas3D objects that the view is rendered into. It exists outside of the scene graph, but attaches to a ViewPlatform leaf node object in the scene graph. It also contains a reference to a PhysicalBody and a PhysicalEnvironment object.
Canvas3D,
PhysicalBody,
PhysicalEnvironment,
ViewPlatform| Field Summary | |
static int |
CYCLOPEAN_EYE_VIEW
Specifies that monoscopic view generated should be the view as seen from the 'center eye', the fictional eye half-way between the left and right eye. |
static int |
HMD_VIEW
Specifies that the viewing environment for this view is a head-mounted display environment. |
static int |
LEFT_EYE_VIEW
Specifies that monoscopic view generated should be the view as seen from the left eye. |
static int |
NOMINAL_FEET
Specifies a policy whereby the origin of physical or virtual coordinates is relative to the position of the nominal feet. |
static int |
NOMINAL_HEAD
Specifies a policy whereby the origin of physical or virtual coordinates is relative to the position of the nominal head. |
static int |
NOMINAL_SCREEN
Specifies a policy whereby the origin of physical or virtual coordinates is relative to the screen. |
static int |
NOMINAL_SCREEN_SCALED
Deprecated. All view attach policies are now affected by the screen scale, so this policy is identical to NOMINAL_SCREEN, which should be used instead. |
static int |
PARALLEL_PROJECTION
Specifies that Java 3D should generate a parallel projection matrix for this View. |
static int |
PERSPECTIVE_PROJECTION
Specifies that Java 3D should generate a perspective projection matrix for this View. |
static int |
PHYSICAL_EYE
Specifies that the associated distance is measured from the eye in meters. |
static int |
PHYSICAL_SCREEN
Specifies that the associated distance is measured from the screen in meters. |
static int |
PHYSICAL_WORLD
Policy for resizing and moving windows. |
static int |
RELATIVE_TO_FIELD_OF_VIEW
Policy for placing the eyepoint in non-head-tracked modes. |
static int |
RELATIVE_TO_SCREEN
Policy for placing the eyepoint in non-head-tracked modes. |
static int |
RELATIVE_TO_WINDOW
Policy for placing the eyepoint in non-head-tracked modes. |
static int |
RIGHT_EYE_VIEW
Specifies that monoscopic view generated should be the view as seen from the right eye. |
static int |
SCALE_EXPLICIT
Specifies that the screen scale for this view is taken directly from the user-provided screenScale parameter. |
static int |
SCALE_SCREEN_SIZE
Specifies that the screen scale for this view is derived from the physical screen size. |
static int |
SCREEN_VIEW
Specifies that the viewing environment for this view is a standard screen-based display environment. |
static int |
VIRTUAL_EYE
Specifies that the associated distance is measured from the eye in virtual world coordinates. |
static int |
VIRTUAL_SCREEN
Specifies that the associated distance is measured from the screen in virtual world coordinates. |
static int |
VIRTUAL_WORLD
Policy for resizing and moving windows. |
| Constructor Summary | |
View()
Constructs a View object with default parameters. |
|
| Method Summary | |
void |
addAudioDevice(AudioDevice device)
Deprecated. Use PhysicalEnvironment.setAudioDevice(AudioDevice) instead of View.addAudioDevice(AudioDevice) |
void |
addCanvas3D(Canvas3D canvas3D)
Adds the given canvas3D at the end of the list. |
void |
addInputDevice(InputDevice device)
Deprecated. Use PhysicalEnvironment.addInputDevice(InputDevice) instead of View.addInputDevice(InputDevice) |
java.util.Enumeration |
allAudioDevices()
Deprecated. Use PhysicalEnvironment.getAudioDevice() instead of View.allAudioDevices() |
java.util.Enumeration |
allInputDevices()
Deprecated. Use PhysicalEnvironment.getAllInputDevices() instead of View.allInputDevices() |
void |
attachViewPlatform(ViewPlatform vp)
Attach viewPlatform structure to this view. |
java.util.Enumeration |
getAllCanvas3Ds()
Gets the enumeration object of all the canvas3Ds. |
double |
getBackClipDistance()
Returns the view model's back clip distance. |
int |
getBackClipPolicy()
Returns the view model's current back clip policy. |
Canvas3D |
getCanvas3D(int index)
Gets the canvas3D from the given index position. |
boolean |
getCompatibilityModeEnable()
Retrieves the compatibility mode enable flag. |
long |
getCurrentFrameStartTime()
This method returns the time at which the most recent rendering frame started. |
boolean |
getDepthBufferFreezeTransparent()
Retrieves the current value of the depth buffer freeze transparent flag for this view. |
double |
getFieldOfView()
Returns the current field of view. |
long |
getFrameNumber()
This method returns the frame number for this view. |
long |
getFrameStartTimes(long[] times)
Copies the last k frame start time values into the user-specified array. |
double |
getFrontClipDistance()
Returns the view model's front clip distance. |
int |
getFrontClipPolicy()
Returns the view model's current front clip policy. |
long |
getLastFrameDuration()
This method returns the duration, in milliseconds, of the most recently completed rendering frame. |
void |
getLeftProjection(Transform3D projection)
Compatibility mode method that retrieves the current compatibility mode projection transform for the left eye and places it into the specified object. |
boolean |
getLocalEyeLightingEnable()
Retrieves a flag that indicates whether or not local eye lighting is enabled for this view. |
static int |
getMaxFrameStartTimes()
Retrieves the implementation-dependent maximum number of frames whose start times will be recorded by the system. |
int |
getMonoscopicViewPolicy()
Returns policy on how Java 3D generates monoscopic view. |
PhysicalBody |
getPhysicalBody()
Returns a reference to the view model's PhysicalBody object. |
PhysicalEnvironment |
getPhysicalEnvironment()
Returns a reference to the view model's PhysicalEnvironment object. |
int |
getProjectionPolicy()
Retrieves the current projection policy for this View. |
void |
getRightProjection(Transform3D projection)
Compatibility mode method that retrieves the current compatibility mode projection transform for the right eye and places it into the specified object. |
boolean |
getSceneAntialiasingEnable()
Returns a flag that indicates whether or not scene antialiasing is enabled for this view. |
double |
getScreenScale()
Returns the current screen scale value |
int |
getScreenScalePolicy()
Returns the current screen scale policy, one of: SCALE_SCREEN_SIZE or SCALE_EXPLICIT. |
void |
getSensorHotspotInVworld(Sensor sensor,
Point3d position)
Retrieves the position of the specified Sensor's last known hotspot position in virtual-world coordinates and copies that value into the vector provided. |
void |
getSensorHotspotInVworld(Sensor sensor,
Point3f position)
Retrieves the position of the specified Sensor's last known hotspot position in virtual-world coordinates and copies that value into the vector provided. |
void |
getSensorToVworld(Sensor sensor,
Transform3D t)
Computes the sensor to virtual-world transform and copies that value into the transform provided. |
boolean |
getTrackingEnable()
Returns a status flag indicating whether or not head tracking is enabled. |
void |
getUserHeadToVworld(Transform3D t)
Retrieves the user-head to virtual-world transform and copies that value into the transform provided. |
boolean |
getUserHeadToVworldEnable()
Returns a status flag indicating whether or not Java 3D is continuously updating the userHeadToVworldEnable transform. |
ViewPlatform |
getViewPlatform()
Retrieves the currently attached ViewPlatform object |
int |
getViewPolicy()
Retrieves the current view computation policy for this View. |
void |
getVpcToEc(Transform3D vpcToEc)
Compatibility mode method that retrieves the current ViewPlatform Coordinates (VPC) system to Eye Coordinates (EC) transform and copies it into the specified object. |
int |
getWindowEyepointPolicy()
Returns the current window eyepoint policy, one of: RELATIVE_TO_SCREEN, RELATIVE_TO_WINDOW, or RELATIVE_TO_FIELD_OF_VIEW. |
int |
getWindowMovementPolicy()
Returns the current window movement policy, one of: VIRTUAL_WORLD or PHYSICAL_WORLD. |
int |
getWindowResizePolicy()
Returns the current window resize policy, one of: VIRTUAL_WORLD or PHYSICAL_WORLD. |
void |
insertCanvas3D(Canvas3D canvas3D,
int index)
Inserts the canvas3D at the given index position. |
boolean |
isBehaviorSchedulerRunning()
Retrieves a flag that indicates whether the behavior scheduler is currently running. |
boolean |
isViewRunning()
Retrieves a flag that indicates whether the traverser is currently running on this view. |
void |
removeCanvas3D(Canvas3D canvas3D)
Removes the given canvas3D. |
void |
removeCanvas3D(int index)
Removes the canvas3D from the given index position. |
void |
setBackClipDistance(double distance)
Sets the view model's back clip distance. |
void |
setBackClipPolicy(int policy)
Sets the view model's back clip policy, the policy Java 3D uses in computing where to place the back clip plane. |
void |
setCanvas3D(Canvas3D canvas3D,
int index)
Sets given canvas3D at the given index position. |
void |
setCompatibilityModeEnable(boolean flag)
Sets the compatibility mode enable flag to true or false. |
void |
setDepthBufferFreezeTransparent(boolean flag)
Enables or disables automatic freezing of the depth buffer for objects rendered during the transparent rendering pass (i.e., objects rendered using alpha blending) for this view. |
void |
setFieldOfView(double fieldOfView)
Sets the field of view used to compute the projection transform. |
void |
setFrontClipDistance(double distance)
Sets the view model's front clip distance. |
void |
setFrontClipPolicy(int policy)
Sets the view model's front clip policy, the policy Java 3D uses in computing where to place the front clip plane. |
void |
setLeftProjection(Transform3D projection)
Compatibility mode method that specifies a viewing frustum for the left eye that transforms points in Eye Coordinates (EC) to Clipping Coordinates (CC). |
void |
setLocalEyeLightingEnable(boolean flag)
Sets a flag that indicates whether the local eyepoint is used in lighting calculations for perspective projections. |
void |
setMonoscopicViewPolicy(int policy)
Specifies how Java 3D generates monoscopic view. |
void |
setPhysicalBody(PhysicalBody physicalBody)
Sets the view model's physical body to the PhysicalBody object provided. |
void |
setPhysicalEnvironment(PhysicalEnvironment physicalEnvironment)
Sets the view model's physical environment to the PhysicalEnvironment object provided. |
void |
setProjectionPolicy(int policy)
Sets the projection policy for this View. |
void |
setRightProjection(Transform3D projection)
Compatibility mode method that specifies a viewing frustum for the right eye that transforms points in Eye Coordinates (EC) to Clipping Coordinates (CC). |
void |
setSceneAntialiasingEnable(boolean flag)
Enables or disables scene antialiasing for this view. |
void |
setScreenScale(double scale)
Sets the screen scale value for this view. |
void |
setScreenScalePolicy(int policy)
Sets the screen scale policy for this view. |
void |
setTrackingEnable(boolean flag)
Turns head tracking on or off for this view. |
void |
setUserHeadToVworldEnable(boolean flag)
Turns on or off the continuous updating of the userHeadToVworld transform. |
void |
setViewPolicy(int policy)
Sets the policy for view computation. |
void |
setVpcToEc(Transform3D vpcToEc)
Compatibility mode method that specifies the ViewPlatform Coordinates (VPC) to Eye Coordinates (EC) transform. |
void |
setWindowEyepointPolicy(int policy)
Sets the view model's window eyepoint policy. |
void |
setWindowMovementPolicy(int policy)
Sets the window movement policy. |
void |
setWindowResizePolicy(int policy)
Sets the window resize policy. |
void |
startBehaviorScheduler()
Starts the behavior scheduler running after it has been stopped. |
void |
startView()
Starts traversing this view, and starts the renderers associated with all canvases attached to this view. |
long[] |
stopBehaviorScheduler()
Stops the behavior scheduler after all currently scheduled behaviors are executed. |
void |
stopView()
Stops traversing the scene graph for this view after the current state of the scene graph is reflected on all canvases attached to this view. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int NOMINAL_HEAD
ViewPlatform.setViewAttachPolicy(int),
PhysicalEnvironment.setCoexistenceCenterInPworldPolicy(int)public static final int NOMINAL_FEET
ViewPlatform.setViewAttachPolicy(int),
PhysicalEnvironment.setCoexistenceCenterInPworldPolicy(int)public static final int NOMINAL_SCREEN
ViewPlatform.setViewAttachPolicy(int),
PhysicalEnvironment.setCoexistenceCenterInPworldPolicy(int)public static final int NOMINAL_SCREEN_SCALED
public static final int SCALE_SCREEN_SIZE
setScreenScalePolicy(int)public static final int SCALE_EXPLICIT
setScreenScalePolicy(int),
setScreenScale(double)public static final int VIRTUAL_SCREEN
setFrontClipPolicy(int),
setBackClipPolicy(int)public static final int PHYSICAL_SCREEN
setFrontClipPolicy(int),
setBackClipPolicy(int)public static final int VIRTUAL_EYE
setFrontClipPolicy(int),
setBackClipPolicy(int)public static final int PHYSICAL_EYE
setFrontClipPolicy(int),
setBackClipPolicy(int)public static final int VIRTUAL_WORLD
setWindowResizePolicy(int),
setWindowMovementPolicy(int)public static final int PHYSICAL_WORLD
setWindowResizePolicy(int),
setWindowMovementPolicy(int)public static final int RELATIVE_TO_SCREEN
setWindowEyepointPolicy(int)public static final int RELATIVE_TO_WINDOW
setWindowEyepointPolicy(int)public static final int RELATIVE_TO_FIELD_OF_VIEW
NOTE: when this policy is specified, the Z coordinate of the derived eyepoint is used in place of nominalEyeOffsetFromNominalScreen.
setWindowEyepointPolicy(int)public static final int LEFT_EYE_VIEW
setMonoscopicViewPolicy(int)public static final int RIGHT_EYE_VIEW
setMonoscopicViewPolicy(int)public static final int CYCLOPEAN_EYE_VIEW
setMonoscopicViewPolicy(int)public static final int SCREEN_VIEW
setViewPolicy(int)public static final int HMD_VIEW
setViewPolicy(int)public static final int PARALLEL_PROJECTION
setProjectionPolicy(int)public static final int PERSPECTIVE_PROJECTION
setProjectionPolicy(int)| Constructor Detail |
public View()
| Method Detail |
public final void setViewPolicy(int policy)
policy - the new policy, one of SCREEN_VIEW or HMD_VIEWpublic final int getViewPolicy()
public final void setProjectionPolicy(int policy)
policy - the new policy, one of PARALLEL_PROJECTION or
PERSPECTIVE_PROJECTIONpublic final int getProjectionPolicy()
public final void setScreenScalePolicy(int policy)
policy - the new policy, one of SCALE_SCREEN_SIZE or
SCALE_EXPLICIT.public final int getScreenScalePolicy()
public final void setWindowResizePolicy(int policy)
policy - the new policy, one of VIRTUAL_WORLD or PHYSICAL_WORLDpublic final int getWindowResizePolicy()
public final void setWindowMovementPolicy(int policy)
policy - the new policy, one of VIRTUAL_WORLD or PHYSICAL_WORLDpublic final int getWindowMovementPolicy()
public final void setWindowEyepointPolicy(int policy)
policy - the new policy, one of RELATIVE_TO_SCREEN,
RELATIVE_TO_WINDOW, or RELATIVE_TO_FIELD_OF_VIEWpublic final int getWindowEyepointPolicy()
public final void setMonoscopicViewPolicy(int policy)
policy - one of LEFT_EYE_VIEW, RIGHT_EYE_VIEW or
CYCLOPEAN_EYE_VIEW.public final int getMonoscopicViewPolicy()
public final void setCompatibilityModeEnable(boolean flag)
flag - the new compatibility mode enable flagpublic final boolean getCompatibilityModeEnable()
public final void setLeftProjection(Transform3D projection)
projection - the new left eye projection transformpublic final void setRightProjection(Transform3D projection)
projection - the new right eye projection transformpublic final void getLeftProjection(Transform3D projection)
projection - the Transform3D object that will receive the
projectionpublic final void getRightProjection(Transform3D projection)
projection - the Transform3D object that will receive the
projectionpublic final void setVpcToEc(Transform3D vpcToEc)
vpcToEc - the new VPC to EC transformpublic final void getVpcToEc(Transform3D vpcToEc)
vpcToEc - the object that will receive the vpcToEc transform.public final void setPhysicalBody(PhysicalBody physicalBody)
physicalBody - the new PhysicalBody objectpublic final PhysicalBody getPhysicalBody()
public final void setPhysicalEnvironment(PhysicalEnvironment physicalEnvironment)
physicalEnvironment - the new PhysicalEnvironment objectpublic final PhysicalEnvironment getPhysicalEnvironment()
public final void setScreenScale(double scale)
scale - the new screen scalepublic final double getScreenScale()
public final void setFieldOfView(double fieldOfView)
fieldOfView - the new field of view in radianspublic final double getFieldOfView()
public final void setFrontClipDistance(double distance)
There are several considerations that need to be taken into account when choosing values for the front and back clip distances.
Float.MAX_VALUE.
In practice, since these physical eye coordinate distances are in
meters, the values should be much less than that.
distance - the new front clip distancesetBackClipDistance(double)public final double getFrontClipDistance()
public final void setBackClipDistance(double distance)
There are several considerations that need to be taken into account when choosing values for the front and back clip distances. These are enumerated in the description of setFrontClipDistance.
Note that this attribute is only used if there is no Clip node that is in scope of the view platform associated with this view.
distance - the new back clip distancesetFrontClipDistance(double),
Clip.setBackDistance(double)public final double getBackClipDistance()
public final void getUserHeadToVworld(Transform3D t)
t - the Transform3D object that will receive the transformpublic final void setFrontClipPolicy(int policy)
policy - the new policy, one of PHYSICAL_EYE, PHYSICAL_SCREEN,
VIRTUAL_EYE, or VIRTUAL_SCREENpublic final int getFrontClipPolicy()
public final void setBackClipPolicy(int policy)
policy - the new policy, one of PHYSICAL_EYE, PHYSICAL_SCREEN,
VIRTUAL_EYE, or VIRTUAL_SCREENpublic final int getBackClipPolicy()
public final void setTrackingEnable(boolean flag)
flag - specifies whether head tracking is enabled or
disabled for this view