X3D Model Documentation: SideScanSonarExample.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent='SideScanSonarExample.x3d'/>
  6            <meta name='descriptioncontent='Produce wireframe or transparent sidescan sonar beams.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='15 March 2001'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='referencecontent='https://savage.nps.edu/Savage/Robots/UnmannedUnderwaterVehicles/RemusSideScan.x3d'/>
 11            <meta name='identifiercontent='https://savage.nps.edu/Savage/CommunicationsAndSensors/Sonar/SideScanSonarExample.x3d'/>
 12            <meta name='generatorcontent='X3D-Edit 3.3 https://savage.nps.edu/X3D-Edit'/>
 13            <meta name='licensecontent='../../license.html'/>
 14       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: AnimationGroup, RangeInterpolator, SideScanSonarBeam, SonarClock, TextTouch, TransparencyInterpolator

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definition: SideScanSonar
-->
 15       <Scene>
 16            <Background skyColor='0.2 0.2 0.4'/>
 17            <WorldInfo info='"Produce wireframe or transparent beam cones"title='BeamConeExample'/>
 18            <Viewpoint description='SideScanSonar exampleorientation='0 1 0 -1.57position='-40 0 0'/>
 19            <ExternProtoDeclare name='SideScanSonarappinfo='Produce wireframe or semi-transparent sonar sidescan beams'   url=' "../../../Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.x3d#SideScanSonar" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.x3d#SideScanSonar" "../../../Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.wrl#SideScanSonar" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.wrl#SideScanSonar" '>
 20                 <field name='altitudetype='SFFloataccessType='inputOnly'
                appinfo='vertical distance above bottom in meters along y axis'/>
 21                 <field name='defaultAltitudetype='SFFloataccessType='initializeOnly'
                appinfo='default vertical distance above bottom in meters along y axis'/>
 22                 <field name='maxAltitudetype='SFFloataccessType='initializeOnly'
                appinfo='maximum effective altitude of sidescan sonar above bottom'/>
 23                 <field name='defaultCrossTrackHalfRangetype='SFFloataccessType='initializeOnly'
                appinfo='distance in meters from nadir to rightmost/leftmost edge when operating at defaultAltitude above the bottom'/>
 24                 <field name='defaultTrackWidthMeterstype='SFFloataccessType='initializeOnly'
                appinfo='longitudinal width of a single return'/>
 25                 <field name='vehicleWidthMeterstype='SFFloataccessType='initializeOnly'
                appinfo='width (or diameter) of vehicle carrying port/starboard sidescan sonar transducers'/>
 26                 <field name='contacttype='SFBoolaccessType='inputOnly'
                appinfo='(communications) whether transmitted signal is in contact with receiver or (sensor) is a target return detected?'/>
 27                 <field name='wireframetype='SFBoolaccessType='initializeOnly'
                appinfo='draw lines for tracking shape?'/>
 28                 <field name='solidtype='SFBoolaccessType='initializeOnly'
                appinfo='draw solid tracking shape?'/>
 29                 <field name='contactColortype='SFColoraccessType='initializeOnly'
                appinfo='rendering color when contact=true'/>
 30                 <field name='noContactColortype='SFColoraccessType='initializeOnly'
                appinfo='rendering color when contact=false'/>
 31                 <field name='transparencytype='SFFloataccessType='inputOutput'
                appinfo='1 = fully transparent wireframe only'/>
 32            </ExternProtoDeclare>
 33            <!-- Viewable geometry for this scene -->
 34            <Group>
 35 
               <!-- ROUTE information for SideScanSonarBeam node:  [from TextTouch.isOver to contact ] [from RangeInterpolator.value_changed to altitude ] [from TransparencyInterpolator.value_changed to transparency ] -->
               <ProtoInstance name='SideScanSonarDEF='SideScanSonarBeam'>
 36                      <fieldValue name='defaultTrackWidthMetersvalue='1'/>
 37                      <fieldValue name='transparencyvalue='0.5'/>
 38                      <fieldValue name='wireframevalue='true'/>
 39                      <fieldValue name='solidvalue='true'/>
 40                 </ProtoInstance>
 41                 <Transform translation='0 4 0'>
 42                      <Billboard>
 43                           <Shape>
 44                                <Appearance>
 45                                     <Material diffuseColor='.8 .8 0'/>
 46                                </Appearance>
 47                                <Text string='"touch text to activate contact-mode rendering"'>
 48                                     <FontStyle justify='"MIDDLE" "MIDDLE"size='2'/>
 49                                </Text>
 50                           </Shape>
 51                           <TouchSensor description='Hover over text to activate contact mode'/>
 52                           <Shape>
 53                                <!-- transparent Box as text-selection assist -->
 54                                <Box size='32 2 .001'/>
 55                                <Appearance>
 56                                     <Material transparency='1'/>
 57                                </Appearance>
 58                           </Shape>
 59                      </Billboard>
 60 
                    <!-- ROUTE information for TextTouch node:  [from isOver to SideScanSonarBeam.contact ] -->
                    <TouchSensor DEF='TextTouchdescription='touch text to toggle contact-mode rendering'/>
 61                      < ROUTE  fromNode='TextTouch' fromField='isOver' toNode='SideScanSonarBeam' toField='contact'/>
 62                 </Transform>
 63            </Group>
 64            <Group DEF='AnimationGroup'>
 65 
               <!-- ROUTE information for SonarClock node:  [from fraction_changed to RangeInterpolator.set_fraction ] [from fraction_changed to TransparencyInterpolator.set_fraction ] -->
               <TimeSensor DEF='SonarClockcycleInterval='10loop='true'/>
 66                 <!-- note that this interpolator sets speed at (5m / 6sec) == 0.78 m/sec which is very very slow!! -->
 67                 <!-- this example is not physically realistic but it helps visualize the propagation of sound energy -->
 68 
               <!-- ROUTE information for RangeInterpolator node:  [from SonarClock.fraction_changed to set_fraction ] [from value_changed to SideScanSonarBeam.altitude ] -->
               <ScalarInterpolator DEF='RangeInterpolatorkey='0 .2 0.8 1keyValue='0 0.01 5 5'/>
 69                 < ROUTE  fromNode='SonarClock' fromField='fraction_changed' toNode='RangeInterpolator' toField='set_fraction'/>
 70                 < ROUTE  fromNode='RangeInterpolator' fromField='value_changed' toNode='SideScanSonarBeam' toField='altitude'/>
 71                 <!-- ========== -->
 72 
               <!-- ROUTE information for TransparencyInterpolator node:  [from SonarClock.fraction_changed to set_fraction ] [from value_changed to SideScanSonarBeam.transparency ] -->
               <ScalarInterpolator DEF='TransparencyInterpolatorkey='0 .2 0.8 1keyValue='0 0 1 1'/>
 73                 < ROUTE  fromNode='SonarClock' fromField='fraction_changed' toNode='TransparencyInterpolator' toField='set_fraction'/>
 74                 < ROUTE  fromNode='TransparencyInterpolator' fromField='value_changed' toNode='SideScanSonarBeam' toField='transparency'/>
 75            </Group>
 76       </Scene>
 77  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: AnimationGroup, RangeInterpolator, SideScanSonarBeam, SonarClock, TextTouch, TransparencyInterpolator

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definition: SideScanSonar
-->
X3D Tooltips element index: Appearance, Background, Billboard, Box, ExternProtoDeclare, field, fieldValue, FontStyle, Group, head, Material, meta, ProtoInstance, ROUTE, ScalarInterpolator, Scene, Shape, Text, TimeSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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


TouchSensor
description='Hover over text to activate contact mode' 
User-interaction hint for this node.(TouchSensor description is providing a tooltip)  

TextTouch
TouchSensor
isOver
SFBool

ROUTE
event to
(1)
SideScanSonarBeam
ProtoInstance
contact
SFBool

SonarClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
RangeInterpolator
ScalarInterpolator
set_fraction
SFFloat
then
 
 
 
RangeInterpolator
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(2)
SideScanSonarBeam
ProtoInstance
altitude
SFFloat
SonarClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
TransparencyInterpolator
ScalarInterpolator
set_fraction
SFFloat
then
 
 
 
TransparencyInterpolator
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(2)
SideScanSonarBeam
ProtoInstance
transparency
SFFloat

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://savage.nps.edu/Savage/CommunicationsAndSensors/Sonar/SideScanSonarExampleIndex.html -->
<!-- Version control at
https://gitlab.nps.edu/Savage/Savage/CommunicationsAndSensors/Sonar/SideScanSonarExample.x3d -->

<!-- Color 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. -->