X3D Model Documentation: CameraCompass36Example.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=' CameraCompass36Example.x3d '/>
  6            <meta name='descriptioncontent='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.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='17 June 2001'/>
  9            <meta name='modifiedcontent='28 November 2019'/>
 10            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompass36Example.x3d '/>
 11            <meta name='inspirationcontent='David Colleen'/>
 12            <meta name='referencecontent='http://www.planet9.com/earth/pearlharbor/vrml/tour.wrl'/>
 13            <meta name='referencecontent='http://www.planet9.com/earth/pearlharbor/vrml/compass.wrl'/>
 14            <meta name='subjectcontent='compass display'/>
 15            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 16            <meta name='licensecontent='../../license.html'/>
 17       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: AxisNavigation, AxisProximity, CenterInstructions, ConsoleOutputViewPositionOrientation, CoordinateAxes, Floor

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3

Index for ExternProtoDeclare definitions: CameraCompass36, ViewPositionOrientation
-->
 18       <Scene>
 19            <WorldInfo title='CameraCompass36Example.x3d'/>
 20            <ExternProtoDeclare name='CameraCompass36appinfo='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.'   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" '>
 21                 <field name='enabledtype='SFBoolaccessType='inputOutput'/>
 22                 <field name='positionOffsetFromCameratype='SFVec3faccessType='inputOutput'/>
 23                 <field name='markerColortype='SFColoraccessType='inputOutput'/>
 24                 <field name='labelColortype='SFColoraccessType='inputOutput'/>
 25            </ExternProtoDeclare>
 26            <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" '>
 27                 <field name='enabledtype='SFBoolaccessType='inputOutput'
                appinfo='Whether or not ViewPositionOrientation sends output to console.'/>
 28                 <field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
                appinfo='Output internal trace messages for debugging this node - developer use only can be ignored.'/>
 29                 <field name='set_traceEnabledtype='SFBoolaccessType='inputOnly'
                appinfo='Ability to turn output tracing on/off at runtime.'/>
 30                 <field name='position_changedtype='SFVec3faccessType='outputOnly'
                appinfo='Output local position.'/>
 31                 <field name='orientation_changedtype='SFRotationaccessType='outputOnly'
                appinfo='Output local orientation.'/>
 32                 <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"/>'/>
 33            </ExternProtoDeclare>
 34            <!-- ======================== -->
 35            <Viewpoint description='walk and rotate to test heads-up display (HUD)position='0 0 25'/>
 36            <Viewpoint description='walk and rotate to test heads-up display (HUD)orientation='0 1 0 -1.57position='-14 0 0'/>
 37            <NavigationInfo speed='10type='"FLY" "ANY"'/>
 38            <Background skyColor='0.7 0.7 0.9'/>
 39            <PointLight location='0 20 0'/>
 40            <!-- Test the compass prototype of interest. -->
 41            <ProtoInstance name='CameraCompass36'>
 42                 <fieldValue name='enabledvalue='true'/>
 43                 <fieldValue name='positionOffsetFromCameravalue='0 5 0'/>
 44                 <fieldValue name='markerColorvalue='0.9 0.9 0.9'/>
 45                 <fieldValue name='labelColorvalue='0.9 0.9 0.9'/>
 46            </ProtoInstance>
 47            <!-- Put a coordinate axis in to display orientation -->
 48            <Transform translation='0 -2.5 0'>
 49                 <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" '/>
 50                 <Viewpoint description='Coordinate axes: x=North, y=Up, z=Eastorientation='0 1 0 -1.4position='-3.6 0.2 0.6'/>
 51 
               <!-- ROUTE information for AxisProximity node:  [from isActive to AxisNavigation.set_bind ] -->
               <ProximitySensor DEF='AxisProximitysize='10 10 10'/>
 52 
               <!-- ROUTE information for AxisNavigation node:  [from AxisProximity.isActive to set_bind ] -->
               <NavigationInfo DEF='AxisNavigation'/>
 53            </Transform>
 54            <Transform/>
 55            <!-- 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. -->
 56            <ProtoInstance name='ViewPositionOrientationDEF='ConsoleOutputViewPositionOrientation'>
 57                 <fieldValue name='enabledvalue='true'/>
 58            </ProtoInstance>
 59            <Transform DEF='Floortranslation='0 -5 0'>
 60                 <Shape>
 61                      <Box size='5 0.4 5'/>
 62                      <Appearance>
 63                           <Material diffuseColor='0.3 0.7 0.3'/>
 64                      </Appearance>
 65                 </Shape>
 66                 <Shape>
 67                      <Box size='20 0.3 20'/>
 68                      <Appearance>
 69                           <Material diffuseColor='0.7 0.7 0.3'/>
 70                      </Appearance>
 71                 </Shape>
 72                 <Shape>
 73                      <Box size='50 0.2 50'/>
 74                      <Appearance>
 75                           <Material diffuseColor='0.8 0.8 1'/>
 76                      </Appearance>
 77                 </Shape>
 78                 <Shape>
 79                      <Box size='100 0.1 100'/>
 80                      <Appearance>
 81                           <Material diffuseColor='0.3 1 0.3'/>
 82                      </Appearance>
 83                 </Shape>
 84            </Transform>
 85            <Transform DEF='CenterInstructionstranslation='0 0.75 0'>
 86                 <Billboard>
 87                      <Shape>
 88                           <Text string='"Walk and rotate to move scene while" "compass heads-up display (HUD)" "CameraCompass36 stays overhead"'>
 89                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 90                           </Text>
 91                           <Appearance>
 92                                <Material diffuseColor='0 0 0emissiveColor='0.2 0.7 0.2'/>
 93                           </Appearance>
 94                      </Shape>
 95                 </Billboard>
 96            </Transform>
 97            < ROUTE  fromNode='AxisProximity' fromField='isActive' toNode='AxisNavigation' toField='set_bind'/>
 98       </Scene>
 99  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: AxisNavigation, AxisProximity, CenterInstructions, ConsoleOutputViewPositionOrientation, CoordinateAxes, Floor

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3

Index for ExternProtoDeclare definitions: CameraCompass36, ViewPositionOrientation
-->
X3D Tooltips element index: Appearance, Background, Billboard, Box, ExternProtoDeclare, field, fieldValue, FontStyle, head, Inline, Material, meta, NavigationInfo, PointLight, ProtoInstance, ProximitySensor, ROUTE, 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 1 ROUTE connection 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.

AxisProximity
ProximitySensor
isActive
SFBool

ROUTE
event to
(1)
AxisNavigation
NavigationInfo
set_bind
SFBool

line 41
ProtoInstance
CameraCompass36
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. 

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