<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<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'>
  <head>
    <meta content='HeadsUpDisplayExample.x3d' name='title'/>
    <meta content='Generic Heads Up Display (HUD) prototype to keep children on screen.' name='description'/>
    <meta content='Don Brutzman' name='creator'/>
    <meta content='9 November 2003' name='created'/>
    <meta content='28 November 2019' name='modified'/>
    <meta content='HUD Heads Up Display' name='subject'/>
    <meta content='https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayExample.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit' name='generator'/>
    <meta content='../../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='HeadsUpDisplayExample.x3d'/>
    <ExternProtoDeclare appinfo='HeadsUpDisplay positions child geometry in screen space, movable by the user' name='HeadsUpDisplay' url='"../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay"'>
      <field accessType='inputOutput' appinfo='Displayed subscene positioned as a HUD.' name='children' type='MFNode'/>
      <field accessType='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.' name='dragChildren' type='MFNode'/>
      <field accessType='initializeOnly' appinfo='Modified screen location and distance (for size).' name='locationOffset' type='SFVec3f'/>
      <field accessType='initializeOnly' appinfo='Enable/disable console output for troubleshooting.' name='traceEnabled' type='SFBool'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare appinfo='ViewPositionOrientation provides provides console output of local position and orientation as user navigates' name='ViewPositionOrientation' url='"../../Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation"'>
      <field accessType='inputOutput' appinfo='Whether or not ViewPositionOrientation sends output to console.' name='enabled' type='SFBool'/>
      <field accessType='initializeOnly' appinfo='Output internal trace messages for debugging this node - developer use only can be ignored.' name='traceEnabled' type='SFBool'/>
      <field accessType='inputOnly' appinfo='Ability to turn output tracing on/off at runtime.' name='set_traceEnabled' type='SFBool'/>
      <field accessType='outputOnly' appinfo='Output local position.' name='position_changed' type='SFVec3f'/>
      <field accessType='outputOnly' appinfo='Output local orientation.' name='orientation_changed' type='SFRotation'/>
      <field accessType='outputOnly' appinfo='MFString value of new Viewpoint' name='outputViewpointString' type='MFString'/>
    </ExternProtoDeclare>
    <!-- ==================== -->
    <Inline DEF='HelloWorld' url='"../../../HelloWorld.x3d" "https://www.web3d.org/x3d/content/examples/Basic/HelloWorld.x3d" "../../../HelloWorld.wrl" "https://www.web3d.org/x3d/content/examples/Basic/HelloWorld.wrl"'/>
    <ProtoInstance name='HeadsUpDisplay'>
      <fieldValue name='children'>
        <Shape>
          <Appearance>
            <Material diffuseColor='0 1 1' emissiveColor='0 1 1'/>
          </Appearance>
          <Text string='"HUD text"'>
            <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.8'/>
          </Text>
        </Shape>
      </fieldValue>
      <fieldValue name='dragChildren'>
        <Transform translation='0 0 -0.2'>
          <Shape>
            <Box size='4 2 0.001'/>
            <Appearance>
              <Material diffuseColor='1 1 1' transparency='0.9'/>
            </Appearance>
          </Shape>
        </Transform>
      </fieldValue>
      <fieldValue name='locationOffset' value='-4 -2 0'/>
    </ProtoInstance>
  </Scene>
</X3D>