X3D Model Documentation: ViewPositionOrientationHUD.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent=' ViewPositionOrientationHUD.x3d '/>
  6            <meta name='descriptioncontent='ViewPositionOrientation Heads-Up Display (HUD) to show position and orientation on screen. Drag to move, click text to toggle console trace. Used as an Inline node, assumes local coordinate system where invoked.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='13 June 2004'/>
  9            <meta name='modifiedcontent='28 November 2019'/>
 10            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/ViewPositionOrientationHUD.x3d '/>
 11            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 12            <meta name='licensecontent='../../license.html'/>
 13       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: DisplayText, TraceToggle, TraceToggleTouchSensor, VPO

Index for ExternProtoDeclare definitions: HeadsUpDisplay, ViewPositionOrientation
-->
 14       <Scene>
 15            <WorldInfo title='ViewPositionOrientationHUD.x3d'/>
 16            <ExternProtoDeclare name='HeadsUpDisplay'   url=' "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" '>
 17                 <field name='childrentype='MFNodeaccessType='inputOutput'
                appinfo='Displayed subscene positioned as a HUD.'/>
 18                 <field name='dragChildrentype='MFNodeaccessType='inputOutput'
                appinfo='Additional HUD geometry which can be touched and dragged for repositioning. If this geometry goes offscreen (perhaps due to screen resizing) then it snaps back to original position.'/>
 19                 <field name='locationOffsettype='SFVec3faccessType='initializeOnly'
                appinfo='Modified screen location and distance (for size).'/>
 20                 <field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
                appinfo='Enable/disable console output for troubleshooting.'/>
 21            </ExternProtoDeclare>
 22            <ExternProtoDeclare name='ViewPositionOrientationappinfo='ViewPositionOrientation prototype provides local position and orientation as user navigates with optional console output'   url=' "../../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" '>
 23                 <field name='enabledtype='SFBoolaccessType='inputOutput'
                appinfo='Whether or not ViewPositionOrientation sends output to console.'/>
 24                 <field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
                appinfo='Output internal trace messages for debugging this node - developer use only can be ignored.'/>
 25                 <field name='set_traceEnabledtype='SFBoolaccessType='inputOnly'
                appinfo='Ability to turn output tracing on/off at runtime.'/>
 26                 <field name='position_changedtype='SFVec3faccessType='outputOnly'
                appinfo='Output local position.'/>
 27                 <field name='orientation_changedtype='SFRotationaccessType='outputOnly'
                appinfo='Output local orientation.'/>
 28                 <field name='outputViewpointStringtype='MFStringaccessType='outputOnly'
                appinfo='MFString value of new Viewpoint for example: <Viewpoint position="20 15 20" orientation="-0.516 0.83 0.212 0.9195"/>'/>
 29            </ExternProtoDeclare>
 30            <!-- ==================== -->
 31            <ProtoInstance name='HeadsUpDisplay'>
 32                 <fieldValue name='children'>
 33                      <Group>
 34                           <Shape>
 35                                <Appearance>
 36                                     <Material diffuseColor='0 1 1emissiveColor='0 0.1 0.1'/>
 37                                </Appearance>
 38 
                              <!-- ROUTE information for DisplayText node:  [from VPO.outputViewpointString to string ] -->
                              <Text DEF='DisplayTextstring='"ViewPositionOrientationHUD"'>
 39                                     <FontStyle justify='"MIDDLE" "MIDDLE"size='0.4'/>
 40                                </Text>
 41                           </Shape>
 42 
                         <!-- ROUTE information for TraceToggleTouchSensor node:  [from isActive to TraceToggle.set_boolean ] -->
                         <TouchSensor DEF='TraceToggleTouchSensordescription='toggle console trace'/>
 43 
                         <!-- ROUTE information for TraceToggle node:  [from TraceToggleTouchSensor.isActive to set_boolean ] [from toggle_changed to VPO.set_traceEnabled ] -->
                         <BooleanToggle DEF='TraceTogglecontainerField='children'/>
 44                      </Group>
 45                 </fieldValue>
 46                 <fieldValue name='dragChildren'>
 47                      <Transform translation='0 -0.1 -0.1'>
 48                           <Shape>
 49                                <Box size='11 0.45 0.001'/>
 50                                <Appearance>
 51                                     <Material diffuseColor='1 1 1transparency='0.95'/>
 52                                </Appearance>
 53                           </Shape>
 54                      </Transform>
 55                 </fieldValue>
 56                 <fieldValue name='locationOffsetvalue='0 -3 0'/>
 57            </ProtoInstance>
 58 
          <!-- ROUTE information for VPO node:  [from TraceToggle.toggle_changed to set_traceEnabled ] [from outputViewpointString to DisplayText.string ] -->
          <ProtoInstance name='ViewPositionOrientationDEF='VPO'>
 59                 <fieldValue name='enabledvalue='true'/>
 60                 <fieldValue name='traceEnabledvalue='false'/>
 61            </ProtoInstance>
 62            < ROUTE  fromNode='VPO' fromField='outputViewpointString' toNode='DisplayText' toField='string'/>
 63            < ROUTE  fromNode='TraceToggleTouchSensor' fromField='isActive' toNode='TraceToggle' toField='set_boolean'/>
 64            < ROUTE  fromNode='TraceToggle' fromField='toggle_changed' toNode='VPO' toField='set_traceEnabled'/>
 65       </Scene>
 66  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: DisplayText, TraceToggle, TraceToggleTouchSensor, VPO

Index for ExternProtoDeclare definitions: HeadsUpDisplay, ViewPositionOrientation
-->
X3D Tooltips element index: Appearance, BooleanToggle, Box, ExternProtoDeclare, field, fieldValue, FontStyle, Group, head, Material, meta, ProtoInstance, ROUTE, Scene, Shape, Text, TouchSensor, Transform, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table entries with 3 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

TraceToggleTouchSensor
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
TraceToggle
BooleanToggle
set_boolean
SFBool
then
 
 
 
TraceToggle
BooleanToggle
toggle_changed
SFBool

ROUTE
event to
(2)
VPO
ProtoInstance
set_traceEnabled
SFBool
then
 
 
 
VPO
ProtoInstance
outputViewpointString
MFString

ROUTE
event to
(3)
DisplayText
Text
string
MFString

line 31
ProtoInstance
HeadsUpDisplay
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      VPO
ProtoInstance
outputViewpointString
MFString

ROUTE
event to
(1)
DisplayText
Text
string
MFString

Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/ViewPositionOrientationHUDIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/ViewPositionOrientationHUD.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
    <ProtoInstance name='ProtoName'> <field name='fieldName'/> </ProtoInstance> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->