<?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='CameraCompass36Example.x3d' name='title'/>
    <meta content='A circular set of 36 compass bearings that follows the active viewpoint. Coordinate axis viewpoint shows that North = +X axis, East = +Z axis, up = +Y axis.' name='description'/>
    <meta content='Don Brutzman' name='creator'/>
    <meta content='17 June 2001' name='created'/>
    <meta content='28 November 2019' name='modified'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompass36Example.x3d' name='identifier'/>
    <meta content='David Colleen' name='inspiration'/>
    <meta content='http://www.planet9.com/earth/pearlharbor/vrml/tour.wrl' name='reference'/>
    <meta content='http://www.planet9.com/earth/pearlharbor/vrml/compass.wrl' name='reference'/>
    <meta content='compass display' name='subject'/>
    <meta content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='CameraCompass36Example.x3d'/>
    <ExternProtoDeclare appinfo='Circular set of compass bearings that follow the active viewpoint set at 360/36 = 10 degree intervals. North = +X axis East = +Z axis up = +Y axis.' name='CameraCompass36' url='"CameraCompassPrototypes.x3d#CameraCompass36" "../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36" "CameraCompassPrototypes.wrl#CameraCompass36" "../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36"'>
      <field accessType='inputOutput' name='enabled' type='SFBool'/>
      <field accessType='inputOutput' name='positionOffsetFromCamera' type='SFVec3f'/>
      <field accessType='inputOutput' name='markerColor' type='SFColor'/>
      <field accessType='inputOutput' name='labelColor' type='SFColor'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare appinfo='ViewPositionOrientation prototype provides local position and orientation as user navigates with optional console output' name='ViewPositionOrientation' 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"'>
      <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 for example: &lt;Viewpoint position="20 15 20" orientation="-0.516 0.83 0.212 0.9195"/>' name='outputViewpointString' type='MFString'/>
    </ExternProtoDeclare>
    <!-- ======================== -->
    <Viewpoint description='walk and rotate to test heads-up display (HUD)' position='0 0 25'/>
    <Viewpoint description='walk and rotate to test heads-up display (HUD)' orientation='0 1 0 -1.57' position='-14 0 0'/>
    <NavigationInfo speed='10' type='"FLY" "ANY"'/>
    <Background skyColor='0.7 0.7 0.9'/>
    <PointLight location='0 20 0'/>
    <!-- Test the compass prototype of interest. -->
    <ProtoInstance name='CameraCompass36'>
      <fieldValue name='enabled' value='true'/>
      <fieldValue name='positionOffsetFromCamera' value='0 5 0'/>
      <fieldValue name='markerColor' value='0.9 0.9 0.9'/>
      <fieldValue name='labelColor' value='0.9 0.9 0.9'/>
    </ProtoInstance>
    <!-- Put a coordinate axis in to display orientation -->
    <Transform translation='0 -2.5 0'>
      <Inline DEF='CoordinateAxes' url='"../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl"'/>
      <Viewpoint description='Coordinate axes: x=North, y=Up, z=East' orientation='0 1 0 -1.4' position='-3.6 0.2 0.6'/>
      <ProximitySensor DEF='AxisProximity' size='10 10 10'/>
      <NavigationInfo DEF='AxisNavigation'/>
    </Transform>
    <Transform/>
    <!-- Open the VRML console to see ViewPositionOrientation output. This demonstrates that more than one ProximitySensor can be active in the scene at a single time. -->
    <ProtoInstance DEF='ConsoleOutputViewPositionOrientation' name='ViewPositionOrientation'>
      <fieldValue name='enabled' value='true'/>
    </ProtoInstance>
    <Transform DEF='Floor' translation='0 -5 0'>
      <Shape>
        <Box size='5 0.4 5'/>
        <Appearance>
          <Material diffuseColor='0.3 0.7 0.3'/>
        </Appearance>
      </Shape>
      <Shape>
        <Box size='20 0.3 20'/>
        <Appearance>
          <Material diffuseColor='0.7 0.7 0.3'/>
        </Appearance>
      </Shape>
      <Shape>
        <Box size='50 0.2 50'/>
        <Appearance>
          <Material diffuseColor='0.8 0.8 1'/>
        </Appearance>
      </Shape>
      <Shape>
        <Box size='100 0.1 100'/>
        <Appearance>
          <Material diffuseColor='0.3 1 0.3'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform DEF='CenterInstructions' translation='0 0.75 0'>
      <Billboard>
        <Shape>
          <Text string='"Walk and rotate to move scene while" "compass heads-up display (HUD)" "CameraCompass36 stays overhead"'>
            <FontStyle justify='"MIDDLE" "MIDDLE"'/>
          </Text>
          <Appearance>
            <Material diffuseColor='0 0 0' emissiveColor='0.2 0.7 0.2'/>
          </Appearance>
        </Shape>
      </Billboard>
    </Transform>
    <ROUTE fromField='isActive' fromNode='AxisProximity' toField='set_bind' toNode='AxisNavigation'/>
  </Scene>
</X3D>