X3D Model Documentation: ViewPositionOrientationExample.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=' ViewPositionOrientationExample.x3d '/>
  6            <meta name='creatorcontent='Leonard Daly and Don Brutzman'/>
  7            <meta name='translatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='1 November 2000'/>
  9            <meta name='modifiedcontent='28 January 2024'/>
 10            <meta name='descriptioncontent='As user navigates, display local position and orientation in the console output window. Various other output formats also available.'/>
 11            <meta name='referencecontent=' ViewPositionOrientationPrototype.x3d '/>
 12            <meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/WhereAmIExample.x3d '/>
 13            <meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/WhereAmIPrototype.x3d '/>
 14            <meta name='referencecontent='http://www.realism.com/Web3D/Examples#WhereAmI'/>
 15            <meta name='referencecontent='http://www.realism.com/vrml/Example/WhereAmI/WhereAmI_Proto.wrl'/>
 16            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationExample.x3d '/>
 17            <meta name='generatorcontent='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 18            <meta name='licensecontent='../../license.html'/>
 19       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF node index: ConsoleOutputViewPositionOrientation

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definition: ViewPositionOrientation
-->
 20       <Scene>
 21            <!-- Copy the ExternProtoDeclare and ProtoInstance for ViewPositionOrientation at the top of your scene graph to add this functionality into other worlds. -->
 22            <WorldInfo title='ViewPositionOrientationExample.x3d'/>
 23            <ExternProtoDeclare name='ViewPositionOrientationappinfo='ViewPositionOrientation provides provides console output of local position and orientation as user navigates'   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" '>
 24                 <field name='enabledtype='SFBoolaccessType='inputOutput'
                appinfo='Whether or not ViewPositionOrientation sends output to console'/>
 25                 <field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
                appinfo='Output internal trace messages for debugging this node, intended for developer use only'/>
 26                 <field name='set_traceEnabledtype='SFBoolaccessType='inputOnly'
                appinfo='Ability to turn output tracing on/off at runtime'/>
 27                 <field name='position_changedtype='SFVec3faccessType='outputOnly'
                appinfo='Output local position'/>
 28                 <field name='orientation_changedtype='SFRotationaccessType='outputOnly'
                appinfo='Output local orientation'/>
 29                 <field name='outputViewpointStringtype='MFStringaccessType='outputOnly'
                appinfo='MFString value of new Viewpoint, suitable for use in string field of a Text node'/>
 30            </ExternProtoDeclare>
 31            <ProtoInstance name='ViewPositionOrientationDEF='ConsoleOutputViewPositionOrientation'>
 32                 <fieldValue name='enabledvalue='true'/>
 33            </ProtoInstance>
 34            <!-- The rest of this example scene follows. -->
 35            <Viewpoint description='ViewPositionOrientation exampleorientation='-0.6 0.8 0 0.8961position='20 15 20'/>
 36            <Billboard>
 37                 <Transform translation='0 4 2'>
 38                      <Shape>
 39                           <Text string='"Open console output window and" "navigate to see changing values for" "Viewpoint position and orientation"'>
 40                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 41                           </Text>
 42                           <Appearance>
 43                                <Material diffuseColor='0.4 0.8 0.6shininess='0.8'/>
 44                           </Appearance>
 45                      </Shape>
 46                 </Transform>
 47                 <Transform translation='0 3.5 1.8'>
 48                      <Shape>
 49                           <Box size='14 4 0.1'/>
 50                           <Appearance>
 51                                <Material diffuseColor='1 1 1'/>
 52                           </Appearance>
 53                      </Shape>
 54                 </Transform>
 55            </Billboard>
 56            <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" '/>
 57            <Transform scale='11 11 11'>
 58                 <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" '/>
 59            </Transform>
 60       </Scene>
 61  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF node index: ConsoleOutputViewPositionOrientation

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definition: ViewPositionOrientation
-->
X3D Tooltips element index: Appearance, Billboard, Box, ExternProtoDeclare, field, fieldValue, FontStyle, head, Inline, Material, meta, ProtoInstance, Scene, Shape, Text, Transform, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table with 0 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.

ConsoleOutputViewPositionOrientation
ProtoInstance
ViewPositionOrientation
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. 

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/Authoring/ViewPositionOrientationExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationExample.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. -->