<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://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 =' http://www.web3d.org/specifications/x3d-3.3.xsd '>
<head>
<meta name='titlecontent='BeamConeExample.x3d'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='11 December 2000'/>
<meta name='modifiedcontent='15 January 2020'/>
<meta name='descriptioncontent='Produce wireframe or transparent beam cones.'/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamConeExample.x3d '/>
<meta name='referencecontent=' https://www.web3d.org/WorkingGroups/vrtp/demo/auv/BeamConeExample.x3d '/>
<meta name='referencecontent=' http://faculty.nps.edu/brutzman/vrtp/demo/auv/BeamConeExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!--

Index for ExternProtoDeclare definition : BeamCone

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

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<Background skyColor='0 0.3 0.5transparency='0'/>
<WorldInfo info='"Produce wireframe or transparent beam cones"title='BeamConeExample'/>
<Viewpoint description='BeamCone exampleposition='5 0 10'/>
<ExternProtoDeclare name='BeamConeappinfo='Produce wireframe or transparent beam cones. 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=' "BeamConePrototype.x3d#BeamCone" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamConePrototype.x3d#BeamCone" "BeamConePrototype.wrl#BeamCone" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamConePrototype.wrl#BeamCone" '>
<field name='nametype='SFStringaccessType='initializeOnly'
 appinfo='BeamCone name aids in node identification and 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='beamHeightDegreestype='SFFloataccessType='initializeOnly'
 appinfo='degrees across vertical y axis'/>

<field name='beamWidthDegreestype='SFFloataccessType='initializeOnly'
 appinfo='degrees 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'/>

<field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
 appinfo='flag to turn on Script tracing'/>
</ExternProtoDeclare>
<!-- Viewable geometry for this scene -->
<Group bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<!-- ROUTE information for BeamConeInstance node:  [from TextTouch.isOver to contact ] [from RangeInterpolator.value_changed to range ] [from TransparencyInterpolator.value_changed to transparency ] -->
<ProtoInstance name='BeamConeDEF='BeamConeInstance'>
<fieldValue name='namevalue='BeamConeInstance'/>
<fieldValue name='defaultRangevalue='5'/>
<fieldValue name='beamHeightDegreesvalue='24'/>
<fieldValue name='beamWidthDegreesvalue='5'/>
<fieldValue name='transparencyvalue='0.2'/>
<fieldValue name='wireframevalue='true'/>
<fieldValue name='solidvalue='true'/>
<fieldValue name='traceEnabledvalue='true'/>
<!-- default contactColor, noContactColor -->
</ProtoInstance>
<Transform translation='5 -3 0bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Billboard axisOfRotation='0 1 0bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Shape bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<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 bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<!-- transparent Box as text-selection assist -->
<Box size='10 1 .001solid='true'/>
<Appearance>
<Material transparency='1'/>
</Appearance>
</Shape>
</Billboard>
<!-- ROUTE information for TextTouch node:  [from isOver to BeamConeInstance.contact ] -->
<TouchSensor DEF='TextTouchdescription='touch text to toggle contactColor noContactColor'/>
<ROUTE fromNode='TextTouchfromField='isOvertoNode='BeamConeInstancetoField='contact'/>
</Transform>
</Group>
<Group DEF='AnimationGroupbboxCenter='0 0 0bboxSize='-1 -1 -1'>
<!-- 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 BeamConeInstance.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='BeamConeInstancetoField='range'/>
<!-- ========== -->
<!-- ROUTE information for TransparencyInterpolator node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to BeamConeInstance.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='BeamConeInstancetoField='transparency'/>
</Group>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definition : BeamCone

Index for DEF nodes : AnimationGroup, BeamConeInstance, 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> -->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->