<?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='ViewPositionOrientationExample.x3d' name='title'/>
    <meta content='Leonard Daly and Don Brutzman' name='creator'/>
    <meta content='Don Brutzman' name='translator'/>
    <meta content='1 November 2000' name='created'/>
    <meta content='28 January 2024' name='modified'/>
    <meta content='As user navigates, display local position and orientation in the console output window. Various other output formats also available.' name='description'/>
    <meta content='ViewPositionOrientationPrototype.x3d' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/WhereAmIExample.x3d' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/WhereAmIPrototype.x3d' name='reference'/>
    <meta content='http://www.realism.com/Web3D/Examples#WhereAmI' name='reference'/>
    <meta content='http://www.realism.com/vrml/Example/WhereAmI/WhereAmI_Proto.wrl' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationExample.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../../license.html' name='license'/>
  </head>
  <Scene>
    <!-- Copy the ExternProtoDeclare and ProtoInstance for ViewPositionOrientation at the top of your scene graph to add this functionality into other worlds. -->
    <WorldInfo title='ViewPositionOrientationExample.x3d'/>
    <ExternProtoDeclare appinfo='ViewPositionOrientation provides provides console output of local position and orientation as user navigates' name='ViewPositionOrientation' url='"ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "ViewPositionOrientationPrototype.wrl#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, intended for developer use only' 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, suitable for use in string field of a Text node' name='outputViewpointString' type='MFString'/>
    </ExternProtoDeclare>
    <ProtoInstance DEF='ConsoleOutputViewPositionOrientation' name='ViewPositionOrientation'>
      <fieldValue name='enabled' value='true'/>
    </ProtoInstance>
    <!-- The rest of this example scene follows. -->
    <Viewpoint description='ViewPositionOrientation example' orientation='-0.6 0.8 0 0.8961' position='20 15 20'/>
    <Billboard>
      <Transform translation='0 4 2'>
        <Shape>
          <Text string='"Open console output window and" "navigate to see changing values for" "Viewpoint position and orientation"'>
            <FontStyle justify='"MIDDLE" "MIDDLE"'/>
          </Text>
          <Appearance>
            <Material diffuseColor='0.4 0.8 0.6' shininess='0.8'/>
          </Appearance>
        </Shape>
      </Transform>
      <Transform translation='0 3.5 1.8'>
        <Shape>
          <Box size='14 4 0.1'/>
          <Appearance>
            <Material diffuseColor='1 1 1'/>
          </Appearance>
        </Shape>
      </Transform>
    </Billboard>
    <Inline url='"../../../Savage/Tools/Authoring/GridXZ_20x20Fixed.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Fixed.x3d" "../../../Savage/Tools/Authoring/GridXZ_20x20Fixed.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Fixed.wrl"'/>
    <Transform scale='11 11 11'>
      <Inline 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"'/>
    </Transform>
  </Scene>
</X3D>