⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config-syntax.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 5 页
字号:
application to recognize, or conversely, to provide a shorter alias for alonger instance name.  Either name may be used to identify the instance.</p><hr><h2><a NAME="ScreenProperty"></a>ScreenProperty<br><a NAME="WindowProperty"></a>WindowProperty</h2><b>Syntax:</b><br>(ScreenProperty <i>&lt;instance name&gt; &lt;property name&gt; &lt;property value></i>)<br>(WindowProperty <i>&lt;instance name&gt; &lt;property name&gt; &lt;property value></i>)<p>The above two commands are equivalent.  The screen or window instance isspecified by <i>instance name</i>, the property to be set by <i>propertyname</i>, and the value to be set by <i>property value</i>.  The followingproperties are configurable:</p><blockquote><h4><a NAME="PhysicalScreenWidth"></a>PhysicalScreenWidth</h4> A number specifying the screen's image area width in meters.  When using aconfiguration file the default is 0.365.  For head mounted displays this shouldbe the <i>apparent</i> width of the display at the focal plane.<h4><a NAME="PhysicalScreenHeight"></a>PhysicalScreenHeight</h4>A number specifying the screen's image area height in meters.  When using aconfiguration file the default is 0.292.  For head mounted displays this shouldbe the <i>apparent</i> height of the display at the focal plane.<h4><a NAME="WindowSize"></a>WindowSize</h4> This property's value can be a 2D point to create a window with the specifiedX width and Y height in pixels, or it can be either of the strings FullScreenor NoBorderFullScreen to specify a full screen canvas with visible frameborders or one with no frame borders.  A NoBorderFullScreen canvas uses theentire physical display surface for its image.  The default value is 512 x 512pixels.  For multiple screen virtual reality installations or head mounteddisplays NoBorderFullScreen should be used.<h4><a NAME="WindowPosition"></a>WindowPosition</h4> This property's value is a 2D point used to create a window with the specifiedX and Y position.  These are offsets of the window's upper left corner from thescreen's upper left corner.<h4><a NAME="TrackerBaseToImagePlate"></a>TrackerBaseToImagePlate</h4>A 4D matrix which transforms points from tracker base coordinates to the imageplate coordinates for the specified screen.  This is only used when aViewPolicy of <code>SCREEN_VIEW</code> is in effect.  The matrix value isidentity by default.<p>Image plate dimensions are expressed in meters.  The origin of the image plateis the lower left corner of the screen's image area, with X increasing to theright, Y increasing to the top, and Z increasing away from the screen.</p><p>The tracker base is somewhat abstract.  It is used as a local fixed frame ofreference for specifying the orientation and position of a screen <i>even whentracking hardware is not being used</i>.  It is also the frame of reference fordefining coexistence coordinates with the <a href="#CoexistenceToTrackerBase">CoexistenceToTrackerBase</a> matrix.</p><p>The <a href="#BuiltInCommandDetails">built-in commands</a> Translate,Rotate, RotateTranslate, and TranslateRotate are available to make it easierto create transforms of this type.<h4><a NAME="HeadTrackerToLeftImagePlate"></a>HeadTrackerToLeftImagePlate<br><a NAME="HeadTrackerToRightImagePlate"></a>HeadTrackerToRightImagePlate</h4>4D matrices which transform points in the head tracking sensor's localcoordinate system to a head mounted display's left and right image platesrespectively. The default value for each is the identity matrix.</p><p>These are only used when a ViewPolicy of <code>HMD_VIEW</code> is in effect.As with physical screen dimensions, these matrices should indicate the<i>apparent</i> location and orientation of the screen images as viewed throughthe head mounted display's optics.</p><p>The HMD manufacturer's specifications in terms of angle of view, distance tothe focal plane, aspect ratio, and percentage of image overlap between the leftand right views can be used to derive the apparent screen positions withrespect to the head, and from there the positions with respect to the headtracker mounted on the head.  In most cases there is 100% overlap between thetwo stereo images, so the matrices for both the left and right screens shouldbe identical.</p><p>Some HMD devices support field-sequential stereo and are driven as if they werea single screen.  In that case, only a single screen should be defined, but<i>both</i> the left and right head tracker to image plate transforms need tobe specified for that same screen.</p><h4><a NAME="MonoscopicViewPolicy"></a>MonoscopicViewPolicy</h4>This property may have the following string values: <code>CYCLOPEAN_EYE_VIEW,LEFT_EYE_VIEW</code>, or <code>RIGHT_EYE_VIEW</code>.  The default value is<code>CYCLOPEAN_EYE_VIEW</code>.  This default works for non-stereo displaysand field-sequential stereo displays where the two stereo images are generatedon the same canvas.</p><p>Some HMD devices can be driven as a single screen if the HMD supportsfield-sequential stereo, so the default policy will work for them as well if astereo view is enabled. If stereo is not enabled, an IllegalStateException willbe thrown when the ViewPolicy is set to <code>HMD_VIEW</code> with the default<code>CYCLOPEAN_EYE_VIEW</code> policy in effect.</p><p>The <code>LEFT_EYE_VIEW</code> and <code>RIGHT_EYE_VIEW</code> monoscopic viewpolicies are used for generating stereo pairs on separate monoscopic canvases,including the left and right canvases needed by HMD devices that are driven bytwo video channels.  When using these policies, stereo should <i>not</i> beenabled.</p></blockquote><hr><h2><a NAME="NewPhysicalEnvironment"></a>NewPhysicalEnvironment</h2><b>Syntax:</b><br>(NewPhysicalEnvironment <i>&lt;instance name&gt;</i>[Alias <i>&lt;alias name&gt;</i>])<p>Creates a new PhysicalEnvironment and binds it to the name given by <i>instancename.</i> This specifies the available input devices, which Sensor to use asthe head tracker, and defines the coexistence coordinate system.  Note thataside from the head tracker, the configuration file does not provide a way toplace Sensors into the array maintained by the PhysicalEnvironment.  See the <a href="../ConfigContainer.html#getNamedSensors()">getNamedSensors</a>method of ConfigContainer.</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><hr><h2><a NAME="PhysicalEnvironmentProperty"></a>PhysicalEnvironmentProperty</h2><b>Syntax:</b><br>(PhysicalEnvironmentProperty <i>&lt;instance name&gt;&lt;property name&gt; &lt;property value&gt;</i>)<p>Sets a PhysicalEnvironment property.  The instance is specified by <i>instancename</i>, the property to be set by <i>property name</i>, and the value to beset by <i>property value</i>.  The following properties are configurable:</p><blockquote><h4><a NAME="InputDevice"></a>InputDevice</h4>Register an InputDevice implementation instantiated by <a href="#NewDevice">NewDevice.</a> The InputDevice instance name is specifiedby the <i>property value</i> string.  If an InputDevice is not registered thenit will not be scheduled to run.<h4><a NAME="HeadTracker"></a>HeadTracker</h4>Register the Sensor which will be used for head tracking.  It must provide 6degree of freedom position and orientation reads relative to the tracker base.The Sensor instance name is specified by the <i>property value</i> string.Its corresponding input device must be registered with the InputDeviceproperty.<p>There is no actual method in the core PhysicalEnvironment class to set the headtracker.  This property is a simplified interface for setting thePhysicalEnvironment head index and assigning the head tracking sensor to thatindex.  Direct access to the PhysicalEnvironment Sensor array is not supportedby the configuration file.</p><h4><a NAME="CoexistenceToTrackerBase"></a>CoexistenceToTrackerBase</h4>A 4D matrix which transforms points in coexistence coordinates to tracker basecoordinates.  This defines the position and orientation of coexistencecoordinates relative to the tracker base.  Its default value is the identitymatrix, so if it is not set then coexistence coordinates will be the same astracker base coordinates.  See <a href="#TrackerBaseToImagePlate">TrackerBaseToImagePlate.</a><p>The coexistence origin (<i>center of coexistence</i>) positions the physicalworld with respect to the origin of the ViewPlatform in the virtual world.This is established through the <a href="#ViewAttachPolicy">ViewAttachPolicy</a>, which attaches the viewplatform to either the center of coexistence, the nominal head, or the nominalfeet.  Coexistence coordinates can essentially be thought of as physicalcoordinates, but the real purpose is to define the space in which coordinatessystems in the physical world - such as tracker base, image plate, and physicalbody - coexist and interact with the virtual world coordinate systems.</p><p>The basis vectors (X, Y, and Z directions) of coexistence coordinates arealways aligned with the basis vectors of the ViewPlatform in the virtual world,and the scale factor going from ViewPlatform coordinates to coexistencecoordinates is set by the <a href="#ScreenScalePolicy">ScreenScalePolicy</a>.Together with the ViewPlatform's view attach policy and view transform thisestablishes the complete mapping of the physical world into the virtualworld.</p><p>The positioning and orientation of coexistence coordinates with respect to thephysical environment is up to the user or application.  In a fixed screenenvironment it usually makes most sense to define it in a convenientrelationship to the primary screen or some intersection of the availablescreens, such that the coexistence origin is in front of and aligned with theuser's nominal forward gaze direction.  This is because the -Z axis ofcoexistence coordinates always points along the view direction defined by theview platform's -Z axis.</p><p>For example, when using a single screen, the most common mapping puts thecenter of coexistence in the middle of the screen with its basis vectorsaligned with the screen's image plate coordinate system.  With a dual-screensystem it is usually most convenient to place the center of coexistence in themiddle of the edge shared by both screens, with its Z axis extendingperpendicular to the shared edge and maintaining an equal angle to bothscreens.  For a 2x2 array of four screens putting the center of coexistence atthe center of the array is usually a good choice.  In a cave configurationhaving the center of coexistence in the middle of the viewing environment canfacilitate the sense of immersion.</p><p>In HMD mode the view attach policy is ignored and is always effectively<code>NOMINAL_SCREEN</code>.  Coexistence coordinates and view platformcoordinates are then equivalent except for scale.  For HMD configurationsplacing the coexistence coordinate system aligned with some nominalfront-facing user position works well.</p><p><b>Note:</b> the normal Java 3D default is to place the center of coexistencein the middle of the screen or canvas by setting <a href="#CoexistenceCenteringEnable">CoexistenceCenteringEnable</a> true bydefault.  This only works for a single screen and if both theTrackerBaseToImagePlate and CoexistenceToTrackerBase matrices are identity.  Ifeither of these matrices are set from their default identity values in theconfiguration file, and CoexistenceCenteringEnable has not been set, then thecentering property will be set false by default.<p></blockquote><hr><h2><a NAME="NewPhysicalBody"></a>NewPhysicalBody</h2><b>Syntax:</b><br>(NewPhysicalBody <i>&lt;instance name&gt;</i>[Alias <i>&lt;alias name&gt;</i>])<p>Creates a new PhysicalBody and binds it to the name given by <i>instancename</i>.  The PhysicalBody is essentiallly the users's head, with the originhalfway between the eyes in the plane of the face.  Positive X extends to theright eye, positive Y up, and positive Z extends into the skull opposite to theforward gaze direction.  Dimensions are expressed in meters.</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><hr><h2><a NAME="PhysicalBodyProperty"></a>PhysicalBodyProperty</h2><b>Syntax:</b><br>(PhysicalBodyProperty <i>&lt;instance name&gt; &lt;property name&gt;&lt;property value&gt;</i>)<p>Sets a PhysicalBody property.  The instance is specified by <i>instancename</i>, the property to be set by <i>property name</i>, and the value to beset by <i>property value</i>.  The following properties are configurable:</p><blockquote><h4><a NAME="StereoEyeSeparation"></a>StereoEyeSeparation</h4>A number indicating the interpupilary distance in meters.  This will set theleft and right eye positions to offsets of half this distance from the headorigin along its X axis.  The default is 0.066 meters.<p>This property is a simplified interface to setting the PhysicalBody's separate

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -