📄 config-syntax.html
字号:
<table border="1" cellpadding="3" cellspacing="0" width="100%"><tr bgcolor="#eeeeff"><td><b>The Java 3D View Model</b></font></td></tr></table><p>Based on these requirements, a high-level view model should provide standardmechanisms to 1) define a screen's position and orientation in relation toother screens in the viewing environment; 2) specify the position of the user'seyes or an HMD relative to the physical space in which the screens or nominaluser position are defined, and to have them updated automatically if trackinghardware exists; and 3) describe where the whole physical space is placed andoriented in the virtual world. In such a model the appropriate images couldthen be rendered without further computation in application code.</p><p>In the Java 3D view model, screen <i>(image plate)</i> positions andorientations are defined relative to a fixed frame of reference in the physicalworld, the <i>tracker base</i>, through the<a href="#TrackerBaseToImagePlate">TrackerBaseToImagePlate</a> property. Thetracker base is somewhat abstract in that it is always used to define thatfixed frame of reference, even if no physical tracking hardware is beingused. If the <a href="#ViewPolicy">ViewPolicy</a> is HMD_VIEW, then the leftand right image plates for head mounted displays are defined relative to thehead tracking sensor, which reports head orientation and position relative tothe tracker base.</p><p><i>Coexistence coordinates</i> are defined with the <a href="#CoexistenceToTrackerBase">CoexistenceToTrackerBase</a> property. Itprovides a frame of reference in the physical world which can be set up by theuser or application in whatever way is most convenient for positioning andorienting screens, physical body attributes, and sensing devices in the virtualworld. If tracking is enabled, then the eye positions in coexistence arecomputed from the position and orientation of the head tracking sensor and the<a href="#HeadToHeadTracker">HeadToHeadTracker</a> matrix; otherwise the eyepositions in coexistence are set according to the <a href="#CenterEyeInCoexistence">CenterEyeInCoexistence</a> property. In HMDmode the eye positions are fixed with respect to the image plates.</p><p>The mapping of coexistence coordinates into the virtual world is accomplishedthrough the <a href="#ViewAttachPolicy">ViewAttachPolicy</a>, which specifiesthe point in coexistence coordinates to which the origin of the <i>viewplatform</i> should be mapped. The view platform is positioned in the virtualworld by manipulating its <i>view transform</i>, the composite of all thetransforms from the view platform up to its Locale. The basis vectors (X, Y,and Z directions) of the view platform are always aligned with coexistencecoordinates, and the scaling between view platform coordinates and physicalcoordinates is specified by the <a href="#ScreenScalePolicy">ScreenScalePolicy</a>, so thisestablishes the complete mapping of the physical world into the virtual world.The projection of the virtual world onto the physical display surfaces is thenperformed automatically by the Java 3D renderer.</p><p>By default Java 3D tries to emulate the familiar camera model as much aspossible to make it easy to run in a conventional windowed desktop displayenvironment. It accomplishes this through the following default settings:</p><ul><li><a href="#WindowEyepointPolicy">WindowEyepointPolicy</a> is set to<code>RELATIVE_TO_FIELD_OF_VIEW</code>.</li><li><a href="#WindowMovementPolicy">WindowMovementPolicy</a> is set to<code>PHYSICAL_WORLD</code>.</li><li><a href="#WindowResizePolicy">WindowResizePolicy</a> is set to<code>PHYSICAL_WORLD</code>.</li><li><a href="#ViewAttachPolicy">ViewAttachPolicy</a> is set to <code>NOMINAL_HEAD</code>.</li><li><a href="#CoexistenceCenteringEnable">CoexistenceCenteringEnable</a> is set totrue.</li></ul>When a configuration file is being used the defaults are oriented towardsmaking the setup of multiple screen environments as easy as possible. If thecoexistence centering enable has not been explicitly set, and either theCoexistenceToTrackerBase transform for the view has been set orTrackerBaseToImagePlate has been set for any screen, then the followingdefaults are used instead:</p><ul><li><a href="#WindowEyepointPolicy">WindowEyepointPolicy</a> is set to<code>RELATIVE_TO_COEXISTENCE</code>.</li><li><a href="#WindowMovementPolicy">WindowMovementPolicy</a> is set to<code>VIRTUAL_WORLD</code>.</li><li><a href="#WindowResizePolicy">WindowResizePolicy</a> is set to<code>VIRTUAL_WORLD</code>.</li><li><a href="#ViewAttachPolicy">ViewAttachPolicy</a> is set to<code>NOMINAL_SCREEN</code>.</li><li><a href="#CoexistenceCenteringEnable">CoexistenceCenteringEnable</a> is set tofalse.</li></ul>The avove defaults are also used if coexistence centering enable has beenexplictly set false.<br><br><br><a name="TopLevelCommandDetails"></a><table border="1" cellpadding="3" cellspacing="0" width="100%"><tr bgcolor="#ccccff"><td><font size="+2"><b>Top-Level Command Details</b></font></td></tr></table><p>Top-level commands can only appear at the outermost command nesting level.</p><hr><h2><a NAME="NewDevice"></a>NewDevice</h2><b>Syntax:</b><br>(NewDevice <i><instance name> <class name></i>[Alias <i><alias name></i>])<p>This command instantiates the InputDevice implementation specified by the fullyqualified <i>class name</i> and binds it to <i>instance name</i>. TheInputDevice is instantiated through introspection of the class name. Theimplementation must provide a parameterless constructor; this can usually bedone by extending or wrapping available InputDevice implementations.</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>At the conclusion of configuration file processing all InputDeviceimplementations so defined will be initialized and registered with anyPhysicalEnvironments that reference them.<p><hr><h2><a NAME="DeviceProperty"></a>DeviceProperty</h2><b>Syntax:</b><br>(DeviceProperty <i><instance name> <method name> <arg0> ... <argn></i>)<p>The details of the InputDevice implementation specified by <i>instance name</i>are not known to ConfigContainer, so any parameters to be set through theconfiguration file are passed to the InputDevice instance by invoking <i>methodname</i> through introspection. The arguments following the method name areevaluated and the results passed to the method as an array of Objects.</p><p>The required methods can usually be provided by extending or wrapping existingInputDevice implementations.</p><hr><h2><a NAME="NewSensor"></a>NewSensor</h2><b>Syntax:</b><br>(NewSensor <i><instance name> <device name> <sensor index></i> [Alias <i><alias name></i>])<p>Retrieves the Sensor at index <i>sensor index</i> in the InputDevice <i>devicename</i> and binds it to the name specified by <i>instance name</i>. Thesensor index is a number truncated to its integer value. The InputDeviceimplementation is responsible for creating its own Sensor objects, so thiscommand does not create any new instances.</p><p><i>Instance name</i> is used by other commands to reference the indicatedSensor. In addition, the name and its associated Sensor instance is madeavailable to applications through a Map returned by the ConfigContainermethod <a href="../ConfigContainer.html#getNamedSensors()">getNamedSensors</a>.</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>If the Sensor is to be used for head tracking, or tracking the position andorientation of other objects in the physical world, then it must generate 6degree of freedom data relative to the tracker base.</p><hr><h2><a NAME="SensorProperty"></a>SensorProperty</h2><b>Syntax:</b><br>(SensorProperty <i><instance name> <property name> <property value></i>)<p>Sets a Sensor property. The sensor 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 sole property may beconfigured:</p><blockquote><h4><a NAME="Hotspot"></a>Hotspot</h4>A 3D point in the sensor's local coordinate system. The hotspot specifies the"active" point which should interact with the virtual world, such as a pointused for picking or grabbing an object. Its actual interpretation is up to thesensor behavior which uses it. Its value is ignored for head tracking sensors.</blockquote><hr><h2><a NAME="NewScreen"></a>NewScreen<br><a NAME="NewWindow"></a>NewWindow</h2><b>Syntax:</b><br>(NewScreen <i><instance name> <device index></i>[Alias <i><alias name></i>])<br>(NewWindow <i><instance name> <device index></i>[Alias <i><alias name></i>])<p>The above two commands are equivalent. Both create new window resources andassociate them with the name specified by <i>instance name</i>. The <i>deviceindex</i> is a number truncated to its integer value. This integer is theindex at which the desired AWT GraphicsDevice appears in the array returned bythe static getScreenDevices() method of GraphicsEnvironment, and specifies thephysical screen upon which the window should be created. The GraphicsDeviceorder in the array is specific to the local viewing site and displaysystem.</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="ScreenProperty"></a>ScreenProperty<br><a NAME="WindowProperty"></a>WindowProperty</h2><b>Syntax:</b><br>(ScreenProperty <i><instance name> <property name> <property value></i>)<br>(WindowProperty <i><instance name> <property name> <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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -