📄 config-syntax.html
字号:
left and right eye positions; there is no actual method in PhysicalBody to setstereo eye separation, but the results are exactly equivalent.</p><h4><a NAME="LeftEarPosition"></a>LeftEarPosition</h4>A 3D point which sets the left ear position relative to head coordinates.The default is (-0.08, -0.03, 0.09).<h4><a NAME="RightEarPosition"></a>RightEarPosition</h4>A 3D point which sets the right ear position relative to head coordinates.The default is (0.08, -0.03, 0.09).<h4><a NAME="HeadToHeadTracker"></a><b>HeadToHeadTracker</b></h4>A 4D matrix which transforms points from head coordinates to the localcoordinate system of the head tracking sensor. This allows the positionsof the eyes and ears to be determined from the position and orientationof the head tracker. The default is the identity matrix.<h4><a NAME="NominalEyeOffsetFromNominalScreen"></a>NominalEyeOffsetFromNominalScreen</h4>A distance in meters used as a calibration parameter for <a href="#ViewAttachPolicy">ViewAttachPolicy</a>. <i>It does not actually setthe position of the eyes</i>. The property is ignored if ViewAttachPolicy isNOMINAL_SCREEN. The default value is 0.4572 meters.<h4><a NAME="NominalEyeHeightFromGround"></a>NominalEyeHeightFromGround</h4>A distance in meters used as a calibration parameter for <a href="#ViewAttachPolicy">ViewAttachPolicy</a>.<i>It does not actually set the position of the eyes</i>. This property isignored if ViewAttachPolicy is not NOMINAL_FEET. The default value is 1.68meters.</blockquote><hr><h2><a NAME="NewView"></a>NewView</h2><b>Syntax:</b><br>(NewView <i><instance name></i>[Alias <i><alias name></i>])<p>Creates a new view and binds it to the name given by <i>instance name.</i>In the configuration file the term <i>view</i> refers to an instance of the<a href="../Viewer.html">Viewer</a> utility class, which contains both aninstance of a core Java 3D View class and an array of Canvas3D instances intowhich to render.</p><p>The last two arguments are optional and define an alias for <i>instancename</i>. This is useful in providing a longer descriptive name for theapplication to recognize, or conversely, to provide a shorter alias for alonger instance name. Either name may be used to identify the instance.</p><p>ConfiguredUniverse requires that at least one view be defined. If a viewplatform is not provided, then ConfiguredUniverse will create a default one andattach the view to that. If multiple views are defined, then at least one viewplatform must be explicitly provided by the configuration, and the ViewPlatform property must be used to attach each view to a view platform.</p><hr><h2><a NAME="ViewProperty"></a>ViewProperty</h2>Syntax: <br>(NewView <i><instance name> <property name> <property value></i>)<p>Sets a View property. The view instance is specified by <i>instance name</i>,the property to be set by <i>property name</i>, and the value to be set by<i>property value</i>. The following properties are configurable:</p><blockquote><h4><a NAME="Screen"></a>Screen<br><a NAME="Window"></a>Window</h4>These two properties are equivalent. They include a screen created by<a href="#NewScreen">NewScreen</a> or a window created by <a href="#NewWindow">NewWindow</a> intothis view. The screen or window name is specified by the <i>property value</i>string. Multiple-screen or multiple-window views are created by calling thiscommand with each window or screen to be used. If no windows or screens aredefined for this view then an IllegalArgumentException will be thrown after theconfiguration file has been processed.<h4><a NAME="PhysicalEnvironment"></a>PhysicalEnvironment</h4>Sets the PhysicalEnvironment to be used for this view. The <i>propertyvalue</i> string specifies the name of a PhysicalEnvironment instance createdby the <a href="#NewPhysicalEnvironment">NewPhysicalEnvironment</a> command.If no PhysicalEnvironment is specified for this view then one with defaultvalues will be created.<h4><a NAME="PhysicalBody"></a>PhysicalBody</h4>Sets the PhysicalBody to be used for this view. The <i>propertyvalue</i> string specifies the name of a PhysicalBody instance createdby the <a href="#NewPhysicalBody">NewPhysicalBody</a> command. Ifno PhysicalBody is specified for this view then one with default valueswill be created.<h4><a NAME="ViewPlatform"></a>ViewPlatform</h4>The <i>property value</i> string is the name of a view platform defined by aprevious <a href="#NewViewPlatform">NewViewPlatform</a> command. Thisspecifies that the view should be attached to the given view platform.ConfiguredUniverse requires that a view platform be specified for every definedview unless only a single view without a view platform is provided; in thatcase a view platform is created by default and the view is attached to that.If one or more view platforms are defined then the view attachments must bemade explicitly.<h4><a NAME="ViewPolicy"></a>ViewPolicy</h4>The <i>property value</i> string may be either <code>SCREEN_VIEW</code> or<code>HMD_VIEW</code> to indicate whether fixed room-mounted screens are beingused or a head mounted display. The default value is <code>SCREEN_VIEW</code>.<h4><a NAME="CoexistenceCenteringEnable"></a>CoexistenceCenteringEnable</h4>The <i>property value</i> is a boolean string. If true, then the origin of thecoexistence coordinate system is set to either the middle of the canvas or themiddle of the screen depending upon whether the WindowMovementPolicy is<code>PHYSICAL_WORLD</code> or <code>VIRTUAL_WORLD</code> respectively. The X,Y, and Z directions of coexistence coordinates will point in the samedirections as those of the screen's image plate.<p>This only works if a single screen is being used and if both the <a href="#TrackerBaseToImagePlate">TrackerBaseToImagePlate</a> and<a href="#CoexistenceToTrackerBase">CoexistenceToTrackerBase</a> matrices areidentity. If CoexistenceCenteringEnable is not explicitly set, and either theCoexistenceToTrackerBase transform for the view has been set orTrackerBaseToImagePlate has been set for any screen, then the centering enablewill be set to false by default; otherwise, the normal default is true. Thisproperty is also effectively false whenever the ViewPolicy is set to<code>HMD_VIEW</code>.</p><h4><a NAME="WindowEyepointPolicy"></a>WindowEyepointPolicy</h4>The string value for this property may be either <code>RELATIVE_TO_SCREEN,RELATIVE_TO_COEXISTENCE, RELATIVE_TO_WINDOW</code>, or<code>RELATIVE_TO_FIELD_OF_VIEW</code>. The normal Java 3D default is<code>RELATIVE_TO_FIELD_OF_VIEW</code>. When using a configuration file thedefault is <code>RELATIVE_TO_COEXISTENCE</code> if <a href="#CoexistenceCenteringEnable">CoexistenceCenteringEnable</a> is false,otherwise the normal default applies. See the<a href="../../../../../../javax/media/j3d/View.html#setWindowEyepointPolicy(int)">setWindowEyepointPolicy</a> View method.<p>For the <code>RELATIVE_TO_SCREEN</code> and <code>RELATIVE_TO_WINDOW</code>policies, the eyepoint is set by using the setLeftManualEyeInImagePlate() andsetRightManualEyeInImagePlate() methods of Canvas3D. The configuration filecurrently does not provide any mechanism for altering these properties fromtheir default values. These default values are (0.142, 0.135, 0.4572) for theleft eye and (0.208, 0.135, 0.4572) for the right eye.</p><p>These polices are ignored if head tracking is enabled.</p><h4><a NAME="WindowMovementPolicy"></a>WindowMovementPolicy<br><a NAME="WindowResizePolicy"></a>WindowResizePolicy</h4>The string values for these properties may be either <code>VIRTUAL_WORLD</code>or <code>PHYSICAL_WORLD</code>. The normal Java 3D default value for both is<code>PHYSICAL_WORLD</code>. When using a configuration file the defaultvalues are <code>VIRTUAL_WORLD</code> if <a href="#CoexistenceCenteringEnable">CoexistenceCenteringEnable</a> is false,otherwise the normal defaults apply. See the<a href="../../../../../../javax/media/j3d/View.html#setWindowMovementPolicy(int)">setWindowMovementPolicy</a> and <a href="../../../../../../javax/media/j3d/View.html#setWindowResizePolicy(int)">setWindowResizePolicy</a> View methods.</p><h4><a NAME="CenterEyeInCoexistence"></a>CenterEyeInCoexistence</h4>A 3D point which specifies the location of the center eye relative tocoexistence coordinates. See <a href="#CoexistenceToTrackerBase">CoexistenceToTrackerBase</a>. If stereoviewing is enabled, then the left and right eye positions are set to offsetsfrom this position using the values specified by the PhysicalBody. Thisproperty is ignored if head tracking is enabled or if WindowEyepointPolicy isnot <code>RELATIVE_TO_COEXISTENCE</code>. The default value is (0.0, 0.0,0.4572).<p>This property is a simplified interface to setting the View's leftand right manual eyes in coexistence; there is no actual method in Viewto set a center eye position.</p><h4><a NAME="ScreenScalePolicy"></a>ScreenScalePolicy</h4>The <i>property value</i> string may be either <code>SCALE_SCREEN_SIZE</code>or <code>SCALE_EXPLICIT</code> and determines the source of the <i>screenscale</i>, a factor in the scaling of view platform coordinates to physicalworld coordinates.<p>If the value is <code>SCALE_SCREEN_SIZE</code>, then the screen scale is halfthe physical screen width in meters. If WindowResizePolicy is<code>PHYSICAL_WORLD</code>, then this scale is further multiplied by the ratioof the window width to the width of the screen (the <i>window scale</i>) toproduce the scale from view platform coordinates to physical coordinates. Thisallows a virtual world which spans a normalized width of [-1.0 .. 1.0] in viewplatform coordinates to map directly to the physical width of the window orscreen, depending upon the resize policy.</p><p><code>SCALE_EXPLICIT</code> uses the value of the ScreenScale property as thescreen scale. It is also further multiplied by the window scale when using the<code>PHYSICAL_WORLD</code> window resize policy to produce the scale from viewplatform coordinates to physical coordinates. Viewing configurationsincorporating multiple screens should generally set the policy to<code>SCALE_EXPLICIT</code> and choose a screen scale based on the aggregatedisplay size, but the default value of <code>SCALE_SCREEN_SIZE</code> willusually work if all the screens are the same size and arranged in a lineararray.</p><p>The view platform is positioned in the virtual world through a chain oftransforms to the root of the scene graph; this composite transform is itslocalToVWorld transform and must be congruent. If we take the the inverse ofthe scale factor in this transform and call it the <i>view platform scale</i>,then the scale from virtual world units to physical world units can be computedas the product of this view platform scale, the screen scale, and, when using aresize policy of <code>PHYSICAL_WORLD</code>, the window scale. In the usualcase the view platform scale is 1.0.</p><h4><a NAME="ScreenScale"></a>ScreenScale</h4>The <i>property value </i>is a number specifying the explicit screen scalefactor. It is only used if ScreenScalePolicy is <code>SCALE_EXPLICIT</code>;otherwise, the screen scale is half the physical width of the screen in meters.The default value for this property is 1.0.<h4><a NAME="BackClipPolicy"></a>BackClipPolicy<br><a NAME="FrontClipPolicy"></a>FrontClipPolicy</h4>The string values of these properties may be either <code>PHYSICAL_EYE,PHYSICAL_SCREEN, VIRTUAL_EYE</code>, or <code>VIRTUAL_SCREEN</code>. Thedefault policies are <code>PHYSICAL_EYE</code>. See the<a href="../../../../../../javax/media/j3d/View.html#setFrontClipPolicy(int)">setFrontClipPolicy</a> and <a href="../../../../../../javax/media/j3d/View.html#setBackClipPolicy(int)">setBackClipPolicy</a> View methods.<h4><a NAME="FrontClipDistance"></a>FrontClipDistance<br><a NAME="BackClipDistance"></a>BackClipDistance</h4>These property values are numbers. The defaults are 0.1 and 10.0 respectively. See the <a href="../../../../../../javax/media/j3d/View.html#setFrontClipDistance(double)">setFrontClipDistance</a> and <a href="../../../../../../javax/media/j3d/View.html#setBackClipDistance(double)">setBackClipDistance</a> View methods.</p><p>With the default clip policies of <code>PHYSICAL_EYE</code> the clip distancesare measured relative to the eye in physical units, so the clip distancesspecified must be scaled to virtual world units in order to determine thedistances in the virtual world where they would effectively be applied. Asdescribed in the discussion of <a href="#ScreenScalePolicy">ScreenScalePolicy</a> above, the scale fromvirtual units to physical units is the product of the view platform scale(usually 1.0), the screen scale, and the window scale (if the window resizepolicy is <code>PHYSICAL_WORLD</code>), so normally the scale from physicalunits to virtual units would be the inverse of that product.</p><p>There is a quirk, however, with physical clip plane scaling when the<code>PHYSICAL_EYE</code> or <code>PHYSICAL_SCREEN</code> clip policies areused with the <code>PHYSICAL_WORLD</code> window resize policy. The locationsof the clip planes in physical units are not actually set to the physicaldistances as specified, but are in fact <i>scaled by the window scale</i>.This means that when determining where the specified physical clip distancesare in virtual units the scaling to be used is the inverse of the product ofthe screen scale and view platform scale only.</p><p>This quirk applies only to scaling physical clip plane distances, and only withthe <code>PHYSICAL_WORLD</code> resize policy. It was implemented in thismanner to prevent objects in the virtual world from getting clipped
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -