X3D Model Documentation: BeamHemisphereExample.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='BeamHemisphereExample.x3d'/>
  6            <meta name='creatorcontent='Don Brutzman'/>
  7            <meta name='createdcontent='29 January 2003'/>
  8            <meta name='modifiedcontent='20 October 2019'/>
  9            <meta name='descriptioncontent='Produce wireframe or transparent beam hemispheres.'/>
 10            <meta name='identifiercontent='https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamHemisphereExample.x3d'/>
 11            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 12            <meta name='licensecontent='../../license.html'/>
 13       </head>
<!--

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

<!-- to top Index for DEF nodes: AnimationGroup, BeamHemisphereInstance, Clock, RangeInterpolator, TextTouch, TransparencyInterpolator

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2

Index for ExternProtoDeclare definition: BeamHemisphere
-->
 14       <Scene>
 15            <Background groundAngle='1.57079groundColor='0 0.15 0.25 0 0.15 0.25skyColor='0 0.3 0.5'/>
 16            <WorldInfo info='"Produce wireframe or transparent beam hemisphere"title='BeamHemispherePrototype'/>
 17            <Viewpoint description='BeamHemisphere example'/>
 18            <Viewpoint description='BeamHemisphere example from aboveorientation='1 0 0 -1.570796position='0 10 0'/>
 19            <ExternProtoDeclare name='BeamHemisphereappinfo='Produce wireframe or transparent beam hemisphere. Typical uses include sonar/radar/light beams. Negative range values invert base and apex at same relative location. Default: hemisphere with centroid at (0 0 0) and radius 1 atop x-z plane.'   url=' "BeamHemispherePrototype.x3d#BeamHemisphere" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamHemispherePrototype.x3d#BeamHemisphere" "BeamHemispherePrototype.wrl#BeamHemisphere" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamHemispherePrototype.wrl#BeamHemisphere" '>
 20                 <field name='nametype='SFStringaccessType='initializeOnly'
                appinfo='Assigning a name to a BeamHemisphere aids tracing'/>
 21                 <field name='contacttype='SFBoolaccessType='inputOnly'
                appinfo='(communications) is transmitted signal in contact with receiver or (sensor) is a target return detected?'/>
 22                 <field name='rangetype='SFFloataccessType='inputOnly'
                appinfo='distance in meters along x axis'/>
 23                 <field name='defaultRangetype='SFFloataccessType='initializeOnly'
                appinfo='distance in meters used until eventIn range sent'/>
 24                 <field name='wireframetype='SFBoolaccessType='initializeOnly'
                appinfo='whether wireframe beam is drawn'/>
 25                 <field name='solidtype='SFBoolaccessType='initializeOnly'
                appinfo='whether solid beam is drawn'/>
 26                 <field name='contactColortype='SFColoraccessType='initializeOnly'
                appinfo='rendering color when contact=true'/>
 27                 <field name='noContactColortype='SFColoraccessType='initializeOnly'
                appinfo='rendering color when contact=false'/>
 28                 <field name='transparencytype='SFFloataccessType='inputOutput'
                appinfo='1 = fully transparent wireframe only'/>
 29            </ExternProtoDeclare>
 30            <!-- Viewable geometry for this scene -->
 31            <Group>
 32 
               <!-- ROUTE information for BeamHemisphereInstance node:  [from TextTouch.isOver to contact ] [from RangeInterpolator.value_changed to range ] [from TransparencyInterpolator.value_changed to transparency ] -->
               <ProtoInstance name='BeamHemisphereDEF='BeamHemisphereInstance'>
 33                      <fieldValue name='namevalue='BeamHemisphereInstance'/>
 34                      <fieldValue name='defaultRangevalue='10'/>
 35                      <fieldValue name='transparencyvalue='0.2'/>
 36                      <fieldValue name='wireframevalue='true'/>
 37                      <fieldValue name='solidvalue='true'/>
 38                 </ProtoInstance>
 39                 <Transform translation='0 -3 0'>
 40                      <Billboard>
 41                           <Shape>
 42                                <Appearance>
 43                                     <Material diffuseColor='.8 .8 0'/>
 44                                </Appearance>
 45                                <Text string='"touch text to toggle contact-mode rendering"'>
 46                                     <FontStyle justify='"MIDDLE" "MIDDLE"size='0.6'/>
 47                                </Text>
 48                           </Shape>
 49                           <Shape>
 50                                <!-- transparent Box as text-selection assist -->
 51                                <Box size='9 1 .001'/>
 52                                <Appearance>
 53                                     <Material transparency='1'/>
 54                                </Appearance>
 55                           </Shape>
 56 
                         <!-- ROUTE information for TextTouch node:  [from isOver to BeamHemisphereInstance.contact ] -->
                         <TouchSensor DEF='TextTouchdescription='Hover over text to activate contact mode'/>
 57                           < ROUTE  fromNode='TextTouch' fromField='isOver' toNode='BeamHemisphereInstance' toField='contact'/>
 58                      </Billboard>
 59                 </Transform>
 60            </Group>
 61            <Group DEF='AnimationGroup'>
 62 
               <!-- ROUTE information for Clock node:  [from fraction_changed to RangeInterpolator.set_fraction ] [from fraction_changed to TransparencyInterpolator.set_fraction ] -->
               <TimeSensor DEF='ClockcycleInterval='10loop='true'/>
 63 
               <!-- ROUTE information for RangeInterpolator node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to BeamHemisphereInstance.range ] -->
               <ScalarInterpolator DEF='RangeInterpolatorkey='0 .4 .4 .5 .5 .9 .9 1keyValue='0.01 4 0 0 -0.01 -4 0 0'/>
 64                 < ROUTE  fromNode='Clock' fromField='fraction_changed' toNode='RangeInterpolator' toField='set_fraction'/>
 65                 < ROUTE  fromNode='RangeInterpolator' fromField='value_changed' toNode='BeamHemisphereInstance' toField='range'/>
 66                 <!-- ========== -->
 67 
               <!-- ROUTE information for TransparencyInterpolator node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to BeamHemisphereInstance.transparency ] -->
               <ScalarInterpolator DEF='TransparencyInterpolatorkey='0 .4 .4 .5 .5 .9 .9 1keyValue='0 1 1 1 0 1 1 1'/>
 68                 < ROUTE  fromNode='Clock' fromField='fraction_changed' toNode='TransparencyInterpolator' toField='set_fraction'/>
 69                 < ROUTE  fromNode='TransparencyInterpolator' fromField='value_changed' toNode='BeamHemisphereInstance' toField='transparency'/>
 70            </Group>
 71       </Scene>
 72  </X3D>
<!--

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

<!-- to top Index for DEF nodes: AnimationGroup, BeamHemisphereInstance, Clock, RangeInterpolator, TextTouch, TransparencyInterpolator

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2

Index for ExternProtoDeclare definition: BeamHemisphere
-->
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.

TextTouch
TouchSensor
isOver
SFBool

ROUTE
event to
(1)
BeamHemisphereInstance
ProtoInstance
contact
SFBool

Clock
TimeSensor
fraction_changed
SFFloat

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

ROUTE
event to
(2)
BeamHemisphereInstance
ProtoInstance
range
SFFloat
Clock
TimeSensor
fraction_changed
SFFloat

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

ROUTE
event to
(2)
BeamHemisphereInstance
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/Beam/BeamHemisphereExampleIndex.html -->
<!-- Version control at
https://gitlab.nps.edu/Savage/Savage/CommunicationsAndSensors/Beam/BeamHemisphereExample.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. -->