<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 '>
<head>
<meta name='titlecontent='BeamCylinderExample.x3d'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='25 February 2001'/>
<meta name='modifiedcontent='15 January 2020'/>
<meta name='descriptioncontent='Produce wireframe or transparent beam cylinders.'/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamCylinderExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!--

Index for ExternProtoDeclare definition : BeamCylinder

Index for DEF nodes : AnimationGroup, BeamCylinderInstance, Clock, RangeInterpolator, TextTouch, TransparencyInterpolator

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<Background skyColor='0 0.3 0.5'/>
<WorldInfo info='"Produce wireframe or transparent beam cylinders"title='BeamCylinderPrototype'/>
<Viewpoint description='BeamCylinder exampleposition='5 0 10'/>
<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://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamCylinderPrototype.x3d#BeamCylinder" "BeamCylinderPrototype.wrl#BeamCylinder" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamCylinderPrototype.wrl#BeamCylinder" '>
<field name='nametype='SFStringaccessType='initializeOnly'
 appinfo='Assigning a name to a BeamCylinder aids tracing'/>

<field name='contacttype='SFBoolaccessType='inputOnly'
 appinfo='(communications) is transmitted signal in contact with receiver or (sensor) is a target return detected?'/>

<field name='rangetype='SFFloataccessType='inputOnly'
 appinfo='distance in meters along x axis'/>

<field name='defaultRangetype='SFFloataccessType='initializeOnly'
 appinfo='distance in meters used until eventIn range sent'/>

<field name='wireframetype='SFBoolaccessType='initializeOnly'
 appinfo='whether wireframe beam is drawn'/>

<field name='solidtype='SFBoolaccessType='initializeOnly'
 appinfo='whether solid beam is drawn'/>

<field name='beamHeighttype='SFFloataccessType='initializeOnly'
 appinfo='meters across vertical y axis'/>

<field name='beamWidthtype='SFFloataccessType='initializeOnly'
 appinfo='meters across horizontal z axis'/>

<field name='contactColortype='SFColoraccessType='initializeOnly'
 appinfo='rendering color when contact=true'/>

<field name='noContactColortype='SFColoraccessType='initializeOnly'
 appinfo='rendering color when contact=false'/>

<field name='transparencytype='SFFloataccessType='inputOutput'
 appinfo='1 = fully transparent wireframe only'/>
</ExternProtoDeclare>
<!-- Viewable geometry for this scene -->
<Group>
<!-- 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'>
<fieldValue name='namevalue='BeamCylinderInstance'/>
<fieldValue name='defaultRangevalue='10'/>
<fieldValue name='beamHeightvalue='1'/>
<fieldValue name='beamWidthvalue='0.5'/>
<fieldValue name='transparencyvalue='0.2'/>
<fieldValue name='wireframevalue='true'/>
<fieldValue name='solidvalue='true'/>
</ProtoInstance>
<Transform translation='5 -3 0'>
<Billboard>
<Shape>
<Appearance>
<Material diffuseColor='.8 .8 0'/>
</Appearance>
<Text string='"Touch text to toggle contact-mode rendering"'>
<FontStyle justify='"MIDDLE" "MIDDLE"size='0.6'/>
</Text>
</Shape>
<Shape>
<!-- transparent Box as text-selection assist -->
<Box size='9 1 .001'/>
<Appearance>
<Material transparency='1'/>
</Appearance>
</Shape>
</Billboard>
<!-- ROUTE information for TextTouch node:  [from isOver to BeamCylinderInstance.contact ] -->
<TouchSensor DEF='TextTouchdescription='Hover over text to toggle contactColor noContactColor'/>
<ROUTE fromNode='TextTouchfromField='isOvertoNode='BeamCylinderInstancetoField='contact'/>
</Transform>
</Group>
<Group DEF='AnimationGroup'>
<!-- ROUTE information for Clock node:  [from fraction_changed to RangeInterpolator.set_fraction ] [from fraction_changed to TransparencyInterpolator.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='10loop='true'/>
<!-- 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'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='RangeInterpolatortoField='set_fraction'/>
<ROUTE fromNode='RangeInterpolatorfromField='value_changedtoNode='BeamCylinderInstancetoField='range'/>
<!-- ========== -->
<!-- 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'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='TransparencyInterpolatortoField='set_fraction'/>
<ROUTE fromNode='TransparencyInterpolatorfromField='value_changedtoNode='BeamCylinderInstancetoField='transparency'/>
</Group>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definition : BeamCylinder

Index for DEF nodes : AnimationGroup, BeamCylinderInstance, Clock, RangeInterpolator, TextTouch, TransparencyInterpolator

Index for Viewpoint image : Viewpoint_1
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
    <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources and X3D Scene Authoring Hints. -->