All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.j3d.View
java.lang.Object
|
+----javax.media.j3d.View
- public class View
- extends Object
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.
-
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.
-
HMD_VIEW
- Specifies that Java 3D should compute new viewpoints using
that sequence of transforms appropriate to head-mounted display
environments.
-
LEFT_EYE_VIEW
- Specifies that monoscopic view generated should be the view as seen
from the left eye.
-
NOMINAL_FEET
- Specifies that Java 3D should locate the user's virtual head
at whatever vertical position is needed to ensure that the user's
virtual feet touch the virtual ground plane
(as determined by the current head position).
-
NOMINAL_HEAD
- Specifies that Java 3D should locate the user's virtual
head at the same point as the user's physical head (as
determined by the current head position).
-
NOMINAL_SCREEN
- Specifies that Java 3D should locate the user's virtual
head at a point offset by nominalEyeDistanceFromNominalScreen from
the user's physical head (as determined by the current head
position).
-
NOMINAL_SCREEN_SCALED
- Specifies that Java 3D should locate the user's virtual
head at a point offset by nominalEyeDistanceFromNominalScreen from
the user's physical head (as determined by the current head
position).
-
PARALLEL_PROJECTION
- Specifies that Java 3D should generate a parallel projection matrix
for this View.
-
PERSPECTIVE_PROJECTION
- Specifies that Java 3D should generate a perspective projection matrix
for this View.
-
PHYSICAL_EYE
- Specifies that the associated distance is measured
from the eye in meters.
-
PHYSICAL_SCREEN
- Specifies that the associated distance is measured
from the screen in meters.
-
PHYSICAL_WORLD
- Policy for resizing and moving windows.
-
RELATIVE_TO_FIELD_OF_VIEW
- Policy for placing the eye-point in non-head-tracked modes.
-
RELATIVE_TO_SCREEN
- Policy for placing the eye-point in non-head-tracked modes.
-
RELATIVE_TO_WINDOW
- Policy for placing the eye-point in non-head-tracked modes.
-
RIGHT_EYE_VIEW
- Specifies that monoscopic view generated should be the view as seen
from the right eye.
-
SCALE_EXPLICIT
- Specifies that the scale used for a view attach policy
of NOMINAL_SCREEN_SCALED is taken from the user-provided
nominalScreenScale variable.
-
SCALE_SCREEN_SIZE
- Specifies that the scale used for for a view attach policy
of NOMINAL_SCREEN_SCALED is computed as:
min(physical_screen_width, physical_screen_height) / 2.0
-
SCREEN_VIEW
- Specifies that Java 3D should compute new viewpoints
using that sequence of transforms appropriate to screen-based
head-tracked display environments (fish-tank VR/portals/VR-desks).
-
VIRTUAL_EYE
- Specifies that the associated distance is measured
from the eye in virtual world coordinates.
-
VIRTUAL_SCREEN
- Specifies that the associated distance is measured
from the screen in virtual world coordinates.
-
VIRTUAL_WORLD
- Policy for resizing and moving windows.
-
View()
- Constructs and initializes a View object.
-
addCanvas3D(Canvas3D)
- Adds the given canvas3D at the end of the list.
-
addInputDevice(InputDevice)
- Add an input device to the list of input devices
-
allAudioDevices()
- Create an enumerator that produces all audio devices for this environment
-
allInputDevices()
- Create an enumerator that produces all input devices
-
attachViewPlatform(ViewPlatform)
- Attach viewPlatform structure to this view.
-
getAllCanvas3Ds()
- Gets the enumeration object of all the canvas3Ds.
-
getBackClipDistance()
- Returns the view model's back clip distance.
-
getBackClipPolicy()
- Returns the view model's current back clip policy.
-
getCanvas3D(int)
- Gets the canvas3D from the given index position.
-
getCompatibilityModeEnable()
- Retrieves the compatibility mode enable flag.
-
getCurrentFrameStartTime()
- This method returns the time at which the most recent rendering
frame started.
-
getDepthBufferFreezeTransparent()
- Retrieves the current value of the depth buffer freeze transparent
flag for this view.
-
getFieldOfView()
- Returns the current field of view.
-
getFrontClipDistance()
- Returns the view model's front clip distance.
-
getFrontClipPolicy()
- Returns the view model's current front clip policy.
-
getLastFrameDuration()
- This method returns the duration, in milliseconds, of the most
recently completed rendering frame.
-
getLeftProjection(Transform3D)
- Compatibility mode method that retrieves the current
compatibility mode projection transform for the left eye and
places it into the specified object.
-
getLocalEyeLightingEnable()
- Retrieves a flag that indicates whether or not local eye lighting
is enabled for this view.
-
getMonoscopicViewPolicy()
- Returns policy on how Java 3D generates monoscopic view.
-
getPhysicalBody()
- Returns a reference to the view model's PhysicalBody object.
-
getPhysicalEnvironment()
- Returns a reference to the view model's PhysicalEnvironment object.
-
getProjectionPolicy()
- Retrieves the current projection policy for this View.
-
getRightProjection(Transform3D)
- Compatibility mode method that retrieves the current
compatibility mode projection transform for the right eye and
places it into the specified object.
-
getSceneAntialiasingEnable()
- Returns a flag that indicates whether or not scene antialiasing
is enabled for this view.
-
getScreenScale()
- Returns the current screen scale value
-
getScreenScalePolicy()
- Returns the current screen scale policy, one of:
SCALE_SCREEN_SIZE or SCALE_EXPLICIT.
-
getSensorHotspotInVworld(Sensor, Point3d)
- Retrieves the position of the specified Sensor's last known
hotspot position in virtual-world coordinates
and copies that value into the vector provided.
-
getSensorHotspotInVworld(Sensor, Point3f)
- Retrieves the position of the specified Sensor's last known
hotspot position in virtual-world coordinates
and copies that value into the vector provided.
-
getSensorToVworld(Sensor, Transform3D)
- Computes the sensor to virtual-world transform
and copies that value into the transform provided.
-
getTrackingEnable()
- Returns a status flag indicating whether or not head tracking
is enabled.
-
getUserHeadToVworld(Transform3D)
- Retrieves the user-head to virtual-world transform
and copies that value into the transform provided.
-
getUserHeadToVworldEnable()
- Returns a status flag indicating whether or not
Java 3D is continuously updating the userHeadToVworldEnable transform.
-
getViewPlatform()
- Retrieves the currently attached ViewPlatform object
-
getViewPolicy()
- Retrieves the current view computation policy for this View.
-
getVpcToEc(Transform3D)
- Compatibility mode method that retrieves the current
ViewPlatform Coordinates (VPC) system to
Eye Coordinates (EC) transform and copies it into the specified
object.
-
getWindowEyepointPolicy()
- Returns the current window eye-point policy, one of:
RELATIVE_TO_SCREEN, RELATIVE_TO_WINDOW, or RELATIVE_TO_FIELD_OF_VIEW.
-
getWindowMovementPolicy()
- Returns the current window movement policy,
one of: VIRTUAL_WORLD or PHYSICAL_WORLD.
-
getWindowResizePolicy()
- Returns the current window resize policy, one of:
VIRTUAL_WORLD or PHYSICAL_WORLD.
-
insertCanvas3D(Canvas3D, int)
- Inserts the canvas3D at the given index position.
-
removeCanvas3D(Canvas3D)
- Removes the given canvas3D.
-
removeCanvas3D(int)
- Removes the canvas3D from the given index position.
-
setAudioDevice(AudioDevice)
- Add an audio device to the list of audio devices
-
setBackClipDistance(double)
- Sets the view model's back clip distance.
-
setBackClipPolicy(int)
- Sets the view model's back clip policy, the policy Java 3D uses
in computing where to place the back clip plane.
-
setCanvas3D(Canvas3D, int)
- Sets given canvas3D at the given index position.
-
setCompatibilityModeEnable(boolean)
- Sets the compatibility mode enable flag to true or false.
-
setDepthBufferFreezeTransparent(boolean)
- 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.
-
setFieldOfView(double)
- Sets the field of view used to compute the projection transform.
-
setFrontClipDistance(double)
- Sets the view model's front clip distance.
-
setFrontClipPolicy(int)
- Sets the view model's front clip policy, the policy Java 3D uses
in computing where to place the front clip plane.
-
setLeftProjection(Transform3D)
- Compatibility mode method that specifies a viewing frustum for
the left eye that transforms points in Eye Coordinates (EC) to
Clipping Coordinates (CC).
-
setLocalEyeLightingEnable(boolean)
- Sets a flag that indicates whether the local eye point is used in
lighting calculations for perspective projections.
-
setMonoscopicViewPolicy(int)
- Specifies how Java 3D generates monoscopic view.
-
setPhysicalBody(PhysicalBody)
- Sets the view model's physical body to the PhysicalBody object provided.
-
setPhysicalEnvironment(PhysicalEnvironment)
- Sets the view model's physical environment to the PhysicalEnvironment
object provided.
-
setProjectionPolicy(int)
- Sets the projection policy for this View.
-
setRightProjection(Transform3D)
- Compatibility mode method that specifies a viewing frustum for
the right eye that transforms points in Eye Coordinates (EC) to
Clipping Coordinates (CC).
-
setSceneAntialiasingEnable(boolean)
- Enables or disables scene antialiasing for this view.
-
setScreenScale(double)
- Sets the screen scale value.
-
setScreenScalePolicy(int)
- Sets the screen scale policy.
-
setTrackingEnable(boolean)
- Turns head tracking on or off for this view.
-
setUserHeadToVworldEnable(boolean)
- Turns on or off the continuous
updating of the userHeadToVworld transform.
-
setViewPolicy(int)
- Sets the policy for view computation.
-
setVpcToEc(Transform3D)
- Compatibility mode method that specifies the ViewPlatform
Coordinates (VPC) to Eye Coordinates (EC) transform.
-
setWindowEyepointPolicy(int)
- Sets the view model's window eye-point policy.
-
setWindowMovementPolicy(int)
- Sets the window movement policy.
-
setWindowResizePolicy(int)
- Sets the window resize policy.
NOMINAL_HEAD
public static final int NOMINAL_HEAD
- Specifies that Java 3D should locate the user's virtual
head at the same point as the user's physical head (as
determined by the current head position).
NOMINAL_FEET
public static final int NOMINAL_FEET
- Specifies that Java 3D should locate the user's virtual head
at whatever vertical position is needed to ensure that the user's
virtual feet touch the virtual ground plane
(as determined by the current head position).
NOMINAL_SCREEN
public static final int NOMINAL_SCREEN
- Specifies that Java 3D should locate the user's virtual
head at a point offset by nominalEyeDistanceFromNominalScreen from
the user's physical head (as determined by the current head
position).
This offset, in effect, creates a viewpoint where the user sees
an object from an optimal viewpoint.
NOMINAL_SCREEN_SCALED
public static final int NOMINAL_SCREEN_SCALED
- Specifies that Java 3D should locate the user's virtual
head at a point offset by nominalEyeDistanceFromNominalScreen from
the user's physical head (as determined by the current head
position).
This offset, in effect, creates a viewpoint where the user sees
an object from an optimal viewpoint.
Additionally, the view platform to physical coexistance
transform is scaled by a value specified in the view.
By default, this scale is derived from the screen size.
This allows an application to define a world in a normalized
[-1,1] space and view it on a screen of any size.
SCALE_SCREEN_SIZE
public static final int SCALE_SCREEN_SIZE
- Specifies that the scale used for for a view attach policy
of NOMINAL_SCREEN_SCALED is computed as:
min(physical_screen_width, physical_screen_height) / 2.0
SCALE_EXPLICIT
public static final int SCALE_EXPLICIT
- Specifies that the scale used for a view attach policy
of NOMINAL_SCREEN_SCALED is taken from the user-provided
nominalScreenScale variable.
VIRTUAL_SCREEN
public static final int VIRTUAL_SCREEN
- Specifies that the associated distance is measured
from the screen in virtual world coordinates.
Policy for interpreting clip plane distances.
Used in specifying the policy in frontClipPolicy and backClipPolicy.
PHYSICAL_SCREEN
public static final int PHYSICAL_SCREEN
- Specifies that the associated distance is measured
from the screen in meters.
Policy for interpreting clip plane distances.
Used in specifying the policy in frontClipPolicy and backClipPolicy.
VIRTUAL_EYE
public static final int VIRTUAL_EYE
- Specifies that the associated distance is measured
from the eye in virtual world coordinates.
Policy for interpreting clip plane distances.
Used in specifying the policy in frontClipPolicy and backClipPolicy.
PHYSICAL_EYE
public static final int PHYSICAL_EYE
- Specifies that the associated distance is measured
from the eye in meters.
Policy for interpreting clip plane distances.
Used in specifying the policy in frontClipPolicy and backClipPolicy.
VIRTUAL_WORLD
public static final int VIRTUAL_WORLD
- Policy for resizing and moving windows.
Used in specifying windowResizePolicy and windowMovementPolicy.
VIRTUAL_WORLD specifies that the associated action takes place
in the virtual world as well as in the physical world.
PHYSICAL_WORLD
public static final int PHYSICAL_WORLD
- Policy for resizing and moving windows.
Used in specifying windowResizePolicy and windowMovementPolicy.
PHYSICAL_WORLD specifies that the specified action takes place
only in the physical world.
RELATIVE_TO_SCREEN
public static final int RELATIVE_TO_SCREEN
- Policy for placing the eye-point in non-head-tracked modes.
Specifies that Java 3D should interpret the
given fixed eye-point position as relative to the entire screen.
This implies
that the view frustum shape will change whenever a
user moves the location of a window on the screen.
Used in specifying windowEyepointPolicy.
RELATIVE_TO_WINDOW
public static final int RELATIVE_TO_WINDOW
- Policy for placing the eye-point in non-head-tracked modes.
Specifies that Java 3D should interpret the
given fixed-eye-point position as relative to the window.
Used in specifying windowEyepointPolicy.
RELATIVE_TO_FIELD_OF_VIEW
public static final int RELATIVE_TO_FIELD_OF_VIEW
- Policy for placing the eye-point in non-head-tracked modes.
Specifies that Java 3D should
modify the position of the eye-point to match any changes in field
of view; the view frustum will change whenever the application
program changes the field of view.
Used in specifying windowEyepointPolicy.
LEFT_EYE_VIEW
public static final int LEFT_EYE_VIEW
- Specifies that monoscopic view generated should be the view as seen
from the left eye.
RIGHT_EYE_VIEW
public static final int RIGHT_EYE_VIEW
- Specifies that monoscopic view generated should be the view as seen
from the right eye.
CYCLOPEAN_EYE_VIEW
public static final 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.
SCREEN_VIEW
public static final int SCREEN_VIEW
- Specifies that Java 3D should compute new viewpoints
using that sequence of transforms appropriate to screen-based
head-tracked display environments (fish-tank VR/portals/VR-desks).
One of two policies for view computation: SCREEN_VIEW and HMD_VIEW.
HMD_VIEW
public static final int HMD_VIEW
- Specifies that Java 3D should compute new viewpoints using
that sequence of transforms appropriate to head-mounted display
environments.
One of two policies for view computation: SCREEN_VIEW and HMD_VIEW.
PARALLEL_PROJECTION
public static final int PARALLEL_PROJECTION
- Specifies that Java 3D should generate a parallel projection matrix
for this View.
PERSPECTIVE_PROJECTION
public static final int PERSPECTIVE_PROJECTION
- Specifies that Java 3D should generate a perspective projection matrix
for this View.
This is the default mode.
View
public View()
- Constructs and initializes a View object. Only some of the
attributes are fully initialized.
setViewPolicy
public final void setViewPolicy(int policy)
- Sets the policy for view computation.
This variable specifies how Java 3D uses its transforms in
computing new viewpoints.
- SCREEN_VIEW specifies that Java 3D should compute a new viewpoint
using the sequence of transforms appropriate to screen-based
head-tracked display environments (fish-tank VR/portals/VR-desks).
- HMD_VIEW specifies that Java 3D should compute a new viewpoint
using the sequence of transforms appropriate to head mounted
display environments.
The default view policy is SCREEN_VIEW.
- Parameters:
- policy - the new policy, one of SCREEN_VIEW or HMD_VIEW
getViewPolicy
public final int getViewPolicy()
- Retrieves the current view computation policy for this View.
- Returns:
- one of: SCREEN_VIEW or HMD_VIEW.
setProjectionPolicy
public final void setProjectionPolicy(int policy)
- Sets the projection policy for this View.
This variable specifies the type of projection transform that
will be generated. A value of PARALLEL_PROJECTION specifies that
a parallel projection transform is generated. A value of
PERSPECTIVE_PROJECTION specifies that
a perspective projection transform is generated.
The default projection policy is PERSPECTIVE.
- Parameters:
- policy - the new policy, one of PARALLEL_PROJECTION or
PERSPECTIVE_PROJECTION
getProjectionPolicy
public final int getProjectionPolicy()
- Retrieves the current projection policy for this View.
- Returns:
- one of: PARALLEL_PROJECTION or PERSPECTIVE_PROJECTION.
setScreenScalePolicy
public final void setScreenScalePolicy(int policy)
- Sets the screen scale policy.
This variable specifies where the scale comes from when the
view attach policy is NOMINAL_SCREEN_SCALED.
The variable can contain one of SCALE_SCREEN_SIZE or SCALE_EXPLICIT.
A value of SCALE_SCREEN_SIZE specifies that the scale is derived
from the size of the physical screen. A value of SCALE_EXPLICIT
specifies that the scale is taken directly from the screenScale
parameter.
The default screen scale policy is SCALE_SCREEN_SIZE.
- Parameters:
- policy - the new policy, one of SCALE_SCREEN_SIZE or
SCALE_EXPLICIT.
getScreenScalePolicy
public final int getScreenScalePolicy()
- Returns the current screen scale policy, one of:
SCALE_SCREEN_SIZE or SCALE_EXPLICIT.
- Returns:
- the current screen scale policy
setWindowResizePolicy
public final void setWindowResizePolicy(int policy)
- Sets the window resize policy.
This variable specifies how Java 3D modifies the view when
users resize windows. The variable can contain one of
VIRTUAL_WORLD or PHYSICAL_WORLD.
A value of VIRTUAL_WORLD implies that the original image
remains the same size on the screen but the user sees more
or less of the virtual world depending on whether the window
grew or shrank in size.
A value of PHYSICAL_WORLD implies that the original image
continues to fill the window in the same way using more or
less pixels depending on whether the window grew or shrank
in size.
The default window resize policy is PHYSICAL_WORLD.
- Parameters:
- policy - the new policy, one of VIRTUAL_WORLD or PHYSICAL_WORLD
getWindowResizePolicy
public final int getWindowResizePolicy()
- Returns the current window resize policy, one of:
VIRTUAL_WORLD or PHYSICAL_WORLD.
- Returns:
- the current window resize policy
setWindowMovementPolicy
public final void setWindowMovementPolicy(int policy)
- Sets the window movement policy.
This variable specifies what part of the virtual world Java 3D
draws as a function of window placement on the screen. The
variable can contain one of VIRTUAL_WORLD or PHYSICAL_WORLD.
A value of VIRTUAL_WORLD implies that the image seen in the
window changes as the position of the window shifts on the
screen. (This mode acts as if the window were a window into
the virtual world.)
A value of PHYSICAL_WORLD implies that the image seen in the
window remains the same no matter where the user positions
the window on the screen.
The default window movement policy is PHYSICAL_WORLD.
- Parameters:
- policy - the new policy, one of VIRTUAL_WORLD or PHYSICAL_WORLD
getWindowMovementPolicy
public final int getWindowMovementPolicy()
- Returns the current window movement policy,
one of: VIRTUAL_WORLD or PHYSICAL_WORLD.
- Returns:
- the current window movement policy
setWindowEyepointPolicy
public final void setWindowEyepointPolicy(int policy)
- Sets the view model's window eye-point policy.
This variable specifies how Java 3D handles the predefined eye
point in a non-head-tracked environment. The variable can contain
one of:
- RELATIVE_TO_SCREEN, Java 3D should interpret the
given fixed-eye-point position as relative to the screen (this
implies that the view frustum shape will change whenever a
user moves the location of a window on the screen)
- RELATIVE_TO_WINDOW, Java 3D should interpret the
given fixed-eye-point position as relative to the window. In this
mode, the X and Y values are taken as the center of the window and
the Z value is taken from the canvas eye point position.
- RELATIVE_TO_FIELD_OF_VIEW, Java 3D should
modify the position of the eye-point to match any changes in field
of view (the view frustum will change whenever the application
program changes the field of view)
The default window eyepoint policy is RELATIVE_TO_FIELD_OF_VIEW.
- Parameters:
- policy - the new policy, one of RELATIVE_TO_SCREEN,
RELATIVE_TO_WINDOW, or RELATIVE_TO_FIELD_OF_VIEW
getWindowEyepointPolicy
public final int getWindowEyepointPolicy()
- Returns the current window eye-point policy, one of:
RELATIVE_TO_SCREEN, RELATIVE_TO_WINDOW, or RELATIVE_TO_FIELD_OF_VIEW.
- Returns:
- the current window eye-point policy
setMonoscopicViewPolicy
public final void setMonoscopicViewPolicy(int policy)
- Specifies how Java 3D generates monoscopic view. If set to
LEFT_EYE_VIEW, the view generated corresponds to view as seen from
the left eye. If set to RIGHT_EYE_VIEW, the view generated corresponds
to the view as seen from the right eye. If set to CYCLOPEAN_EYE_VIEW,
the view generated corresponds to the view as seen from the 'center
eye', the fictional eye half-way between the left and right eye.
The default monoscopic view policy is CYCLOPEAN_EYE_VIEW.
- Parameters:
- policy - one of LEFT_EYE_VIEW, RIGHT_EYE_VIEW or
CYCLOPEAN_EYE_VIEW.
getMonoscopicViewPolicy
public final int getMonoscopicViewPolicy()
- Returns policy on how Java 3D generates monoscopic view.
- Returns:
- policy one of LEFT_EYE_VIEW, RIGHT_EYE_VIEW or
CYCLOPEAN_EYE_VIEW.
setCompatibilityModeEnable
public final void setCompatibilityModeEnable(boolean flag)
- Sets the compatibility mode enable flag to true or false.
Compatibility mode is disabled by default.
- Parameters:
- flag - the new compatibility mode enable flag
getCompatibilityModeEnable
public final boolean getCompatibilityModeEnable()
- Retrieves the compatibility mode enable flag.
- Returns:
- the current compatibility mode enable flag
setLeftProjection
public final 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).
If compatibility mode is disabled, then this transform is not used;
the actual projection is derived from other values.
In monoscopic mode, only the left eye projection matrix is used.
- Parameters:
- projection - the new left eye projection transform
- Throws: RestrictedAccessException
- if compatibility mode is disabled.
setRightProjection
public final 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).
If compatibility mode is disabled, then this transform is not used;
the actual projection is derived from other values.
In monoscopic mode, the right eye projection matrix is ignored.
- Parameters:
- projection - the new right eye projection transform
- Throws: RestrictedAccessException
- if compatibility mode is disabled.
getLeftProjection
public final 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.
- Parameters:
- projection - the Transform3D object that will receive the
projection
- Throws: RestrictedAccessException
- if compatibility mode is disabled.
getRightProjection
public final 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.
- Parameters:
- projection - the Transform3D object that will receive the
projection
- Throws: RestrictedAccessException
- if compatibility mode is disabled.
setVpcToEc
public final void setVpcToEc(Transform3D vpcToEc)
- Compatibility mode method that specifies the ViewPlatform
Coordinates (VPC) to Eye Coordinates (EC) transform.
If compatibility mode is disabled, then this transform
is derived from other values and is read-only.
- Parameters:
- vpcToEc - the new VPC to EC transform
- Throws: RestrictedAccessException
- if compatibility mode is disabled.
getVpcToEc
public final 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.
- Parameters:
- vpcToEc - the object that will receive the vpcToEc transform.
- Throws: RestrictedAccessException
- if compatibility mode is disabled.
setPhysicalBody
public final void setPhysicalBody(PhysicalBody physicalBody)
- Sets the view model's physical body to the PhysicalBody object provided.
Java 3D uses the parameters in the PhysicalBody to ensure accurate
image and sound generation when in head-tracked mode.
- Parameters:
- physicalBody - the new PhysicalBody object
getPhysicalBody
public final PhysicalBody getPhysicalBody()
- Returns a reference to the view model's PhysicalBody object.
- Returns:
- the view object's PhysicalBody object
setPhysicalEnvironment
public final void setPhysicalEnvironment(PhysicalEnvironment physicalEnvironment)
- Sets the view model's physical environment to the PhysicalEnvironment
object provided.
- Parameters:
- physicalEnvironment - the new PhysicalEnvironment object
getPhysicalEnvironment
public final PhysicalEnvironment getPhysicalEnvironment()
- Returns a reference to the view model's PhysicalEnvironment object.
- Returns:
- the view object's PhysicalEnvironment object
setScreenScale
public final void setScreenScale(double scale)
- Sets the screen scale value.
This is used when the view attach policy is NOMINAL_SCREEN_SCALED
and the screen scale policy is SCALE_EXPLICIT.
- Parameters:
- scale - the new screen scale
getScreenScale
public final double getScreenScale()
- Returns the current screen scale value
- Returns:
- the current screen scale value
setFieldOfView
public final void setFieldOfView(double fieldOfView)
- Sets the field of view used to compute the projection transform.
This is used when head tracking is disabled and when the Canvas3D's
windowEyepointPolicy is RELATIVE_TO_FIELD_OF_VIEW.
- Parameters:
- fieldOfView - the new field of view in radians
getFieldOfView
public final double getFieldOfView()
- Returns the current field of view.
- Returns:
- the current field of view in radians
setFrontClipDistance
public final void setFrontClipDistance(double distance)
- Sets the view model's front clip distance.
This value specifies the distance away from the clip origin
in the direction of gaze where objects stop disappearing.
Objects closer than the clip origin offset by the front clip
distance are not drawn.
- Parameters:
- distance - the new front clip distance
- See Also:
- setBackDistance
getFrontClipDistance
public final double getFrontClipDistance()
- Returns the view model's front clip distance.
- Returns:
- the current front clip distance
setBackClipDistance
public final void setBackClipDistance(double distance)
- Sets the view model's back clip distance.
The parameter specifies the distance from the clip origin
in the direction of gaze to where objects begin disappearing.
Objects farther away than the clip-origin offset by the
back-clip-distance are not drawn.
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.
- Parameters:
- distance - the new back clip distance
- See Also:
- setBackDistance
getBackClipDistance
public final double getBackClipDistance()
- Returns the view model's back clip distance.
- Returns:
- the current back clip distance
getUserHeadToVworld
public final void getUserHeadToVworld(Transform3D t)
- Retrieves the user-head to virtual-world transform
and copies that value into the transform provided.
- Parameters:
- t - the Transform3D object that will receive the transform
setFrontClipPolicy
public final 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. The variable
can contain one of:
- VIRTUAL_EYE, to specify that the associated distance is
from the eye and in units of virtual distance
- PHYSICAL_EYE, to specify that the associated distance is
from the eye and in units of physical distance (meters)
- VIRTUAL_SCREEN, to specify that the associated distance is
from the screen and in units of virtual distance
- PHYSICAL_SCREEN, to specify that the associated distance is
from the screen and in units of physical distance (meters)
The default front clip policy is PHYSICAL_EYE.
- Parameters:
- policy - the new policy, one of PHYSICAL_EYE, PHYSICAL_SCREEN,
VIRTUAL_EYE, or VIRTUAL_SCREEN
getFrontClipPolicy
public final int getFrontClipPolicy()
- Returns the view model's current front clip policy.
- Returns:
- one of:
VIRTUAL_EYE, PHYSICAL_EYE, VIRTUAL_SCREEN, or PHYSICAL_SCREEN
setBackClipPolicy
public final 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. The variable
can contain one of:
- VIRTUAL_EYE, to specify that the associated distance is
from the eye and in units of virtual distance
- PHYSICAL_EYE, to specify that the associated distance is
from the eye and in units of physical distance (meters)
- VIRTUAL_SCREEN, to specify that the associated distance is
from the screen and in units of virtual distance
- PHYSICAL_SCREEN, to specify that the associated distance is
from the screen and in units of physical distance (meters)
The default back clip policy is PHYSICAL_EYE.
- Parameters:
- policy - the new policy, one of PHYSICAL_EYE, PHYSICAL_SCREEN,
VIRTUAL_EYE, or VIRTUAL_SCREEN
getBackClipPolicy
public final int getBackClipPolicy()
- Returns the view model's current back clip policy.
- Returns:
- one of:
VIRTUAL_EYE, PHYSICAL_EYE, VIRTUAL_SCREEN, or PHYSICAL_SCREEN
setTrackingEnable
public final void setTrackingEnable(boolean flag)
- Turns head tracking on or off for this view.
- Parameters:
- flag - specifies whether head tracking is enabled or
disabled for this view
getTrackingEnable
public final boolean getTrackingEnable()
- Returns a status flag indicating whether or not head tracking
is enabled.
- Returns:
- a flag telling whether head tracking is enabled
setUserHeadToVworldEnable
public final void setUserHeadToVworldEnable(boolean flag)
- Turns on or off the continuous
updating of the userHeadToVworld transform.
- Parameters:
- flag - enables or disables continuous updating
getUserHeadToVworldEnable
public final boolean getUserHeadToVworldEnable()
- Returns a status flag indicating whether or not
Java 3D is continuously updating the userHeadToVworldEnable transform.
- Returns:
- a flag indicating if continuously updating userHeadToVworld
getSensorToVworld
public final void getSensorToVworld(Sensor sensor,
Transform3D t)
- Computes the sensor to virtual-world transform
and copies that value into the transform provided.
The computed transforms takes points in the sensor's coordinate
system and produces the point's corresponding value in
virtual-world coordinates.
- Parameters:
- sensor - the sensor in question
- t - the object that will receive the transform
getSensorHotspotInVworld
public final 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.
This value is derived from other values and is read-only.
- Parameters:
- sensor - the sensor in question
- position - the vector that will receive the position
getSensorHotspotInVworld
public final 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.
This value is derived from other values and is read-only.
- Parameters:
- sensor - the sensor in question
- position - the vector that will receive the position
setCanvas3D
public final void setCanvas3D(Canvas3D canvas3D,
int index)
- Sets given canvas3D at the given index position.
- Parameters:
- canvas3D - the given canvas3D to be set
- index - the position to be set
getCanvas3D
public final Canvas3D getCanvas3D(int index)
- Gets the canvas3D from the given index position.
- Parameters:
- index - the position from which to get Canvas3D object
- Returns:
- canvas3D the canvas3D at index position
getAllCanvas3Ds
public final Enumeration getAllCanvas3Ds()
- Gets the enumeration object of all the canvas3Ds.
- Returns:
- the enumeration object of all the canvas3Ds.
addCanvas3D
public final void addCanvas3D(Canvas3D canvas3D)
- Adds the given canvas3D at the end of the list.
- Parameters:
- canvas3D - the canvas3D to be added
insertCanvas3D
public final void insertCanvas3D(Canvas3D canvas3D,
int index)
- Inserts the canvas3D at the given index position.
- Parameters:
- canvas3D - the canvas3D to be inserted
- index - the position to be inserted at
removeCanvas3D
public final void removeCanvas3D(int index)
- Removes the canvas3D from the given index position.
- Parameters:
- index - the position of Canvas3D object to be removed
removeCanvas3D
public final void removeCanvas3D(Canvas3D canvas3D)
- Removes the given canvas3D.
- Parameters:
- canvas3D - the canvas3D to be removed
getCurrentFrameStartTime
public long getCurrentFrameStartTime()
- This method returns the time at which the most recent rendering
frame started. It is defined as the number of milliseconds
since January 1, 1970 00:00:00 GMT.
Since multiple canvases might be attached to this View,
the start of a frame is defined as the point in time just prior
to clearing any canvas attached to this view.
- Returns:
- the time at which the most recent rendering frame started
getLastFrameDuration
public long getLastFrameDuration()
- This method returns the duration, in milliseconds, of the most
recently completed rendering frame. The time taken to render
all canvases attached to this view is measured. This duration
is computed as the difference between the start of the most recently
completed frame and the end of that frame.
Since multiple canvases might be attached to this View,
the start of a frame is defined as the point in time just prior
to clearing any canvas attached to this view,
while the end of a frame is defined as the point in time
just after swapping the buffer for all canvases.
- Returns:
- the duration, in milliseconds, of the most recently
completed rendering frame
setDepthBufferFreezeTransparent
public final 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.
If enabled, depth buffer writes will be disabled during the
transparent rendering pass regardless of the value of
the depth buffer write enable flag in the RenderingAttributes
object for a particular node.
This flag is enabled by default.
- Parameters:
- flag - indicates whether automatic freezing of the depth buffer
for transparent/antialiased objects is enabled.
- See Also:
- setDepthBufferWriteEnable
getDepthBufferFreezeTransparent
public final boolean getDepthBufferFreezeTransparent()
- Retrieves the current value of the depth buffer freeze transparent
flag for this view.
- Returns:
- a flag that indicates whether or not the depth
buffer is automatically frozen during the transparent rendering pass.
setSceneAntialiasingEnable
public final void setSceneAntialiasingEnable(boolean flag)
- Enables or disables scene antialiasing for this view.
If enabled, the entire scene will be antialiased on
each canvas in which scene antialiasing is available.
Scene antialiasing is disabled by default.
- Parameters:
- flag - indicates whether scene antialiasing is enabled
getSceneAntialiasingEnable
public final boolean getSceneAntialiasingEnable()
- Returns a flag that indicates whether or not scene antialiasing
is enabled for this view.
- Returns:
- a flag that indicates whether scene antialiasing is enabled
setLocalEyeLightingEnable
public final void setLocalEyeLightingEnable(boolean flag)
- Sets a flag that indicates whether the local eye point is used in
lighting calculations for perspective projections.
If this flag is set to true, the view vector is calculated per-vertex
based on the direction from the actual eye point to the vertex.
If this flag is set to false, a single view vector is computed from
the eye point to the center of the view frustum. This is
called infinite eye lighting.
Local eye lighting is disabled by default, and is ignored for
parallel projections.
- Parameters:
- flag - indicates whether local eye lighting is enabled
getLocalEyeLightingEnable
public final boolean getLocalEyeLightingEnable()
- Retrieves a flag that indicates whether or not local eye lighting
is enabled for this view.
- Returns:
- a flag that indicates whether local eye lighting is enabled
attachViewPlatform
public final void attachViewPlatform(ViewPlatform vp)
- Attach viewPlatform structure to this view.
- Parameters:
- vp - the viewPlatform to be attached
getViewPlatform
public final ViewPlatform getViewPlatform()
- Retrieves the currently attached ViewPlatform object
- Returns:
- the currently attached ViewPlatform
addInputDevice
public final void addInputDevice(InputDevice device)
- Add an input device to the list of input devices
allInputDevices
public final Enumeration allInputDevices()
- Create an enumerator that produces all input devices
- Returns:
- an enumerator of all available devices
setAudioDevice
public final void setAudioDevice(AudioDevice device)
- Add an audio device to the list of audio devices
allAudioDevices
public final Enumeration allAudioDevices()
- Create an enumerator that produces all audio devices for this environment
- Returns:
- an enumerator of all available audio devices
All Packages Class Hierarchy This Package Previous Next Index