X3D Model Documentation: BeamCylinderExample.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=' BeamCylinderExample.x3d '/>
  6            <meta name='creatorcontent='Don Brutzman'/>
  7            <meta name='createdcontent='25 February 2001'/>
  8            <meta name='modifiedcontent='15 January 2020'/>
  9            <meta name='descriptioncontent='Produce wireframe or transparent beam cylinders.'/>
 10            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamCylinderExample.x3d '/>
 11            <meta name='generatorcontent='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 12            <meta name='licensecontent='../../license.html'/>
 13       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: AnimationGroup, BeamCylinderInstance, Clock, RangeInterpolator, TextTouch, TransparencyInterpolator

Index for Viewpoint node: Viewpoint_1

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

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: AnimationGroup, BeamCylinderInstance, Clock, RangeInterpolator, TextTouch, TransparencyInterpolator

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definition: BeamCylinder
-->
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, plus documentation for accessType definitions, type definitions, XML data types, and 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)
BeamCylinderInstance
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)
BeamCylinderInstance
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)
BeamCylinderInstance
ProtoInstance
transparency
SFFloat

      BeamCylinderInstance
ProtoInstance
BeamCylinder
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/CommunicationsAndSensors/Beam/BeamCylinderExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamCylinderExample.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. -->