<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile='Immersive' version='3.2 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.2.xsd '>
<head>
<meta name='titlecontent='FiftyCaliberGunFiring.x3d'/>
<meta name='descriptioncontent='Brazilian Naval Academy Training Ship 50cal firing against other Ship during night'/>
<meta name='creatorcontent='Claudio Coreixas'/>
<meta name='createdcontent='20 October 2009'/>
<meta name='modifiedcontent='2 January 2019'/>
<meta name='referencecontent=' http://www.en.mar.mil.br '/>
<meta name='subjectcontent='ships'/>
<meta name='infocontent='Headlight is off, lighting is controlled when shooting'/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/FiftyCaliberGunFiring.x3d '/>
<meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<Sound maxBack='100maxFront='100'> </Sound>
<NavigationInfo headlight='falsetype='"EXAMINE"'/>
<WorldInfo info='"an Butakov MOB scene"title='Butakov'/>
<Background skyAngle='0.7 0skyColor='0.478431 0.160784 1 0.701961 0.776471 1 0.380392 0.384314 1'/>
<Viewpoint description='toporientation='1 0 0 -1.57position='0 20 0'/>
<!-- ROUTE information for MovementTimer node:  [from fraction_changed to MovetheShip.set_fraction ] [from fraction_changed to SpinTheShip.set_fraction ] [from fraction_changed to SpinTheShip2.set_fraction ] -->
<TimeSensor DEF='MovementTimercycleInterval='60loop='true'/>
<!-- ROUTE information for spintTimer node:  [from fraction_changed to SpinTheShip3.set_fraction ] -->
<TimeSensor DEF='spintTimercycleInterval='4loop='true'/>
<!-- ROUTE information for MovetheShip node:  [from MovementTimer.fraction_changed to set_fraction ] [from value_changed to Ship3.translation ] -->
<PositionInterpolator DEF='MovetheShipkey='0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.75 0.8125 0.875 0.9375 1keyValue='10.00 0.00 0.00 9.24 0.00 3.82 7.07 0.00 7.07 3.83 0.00 9.24 0.01 0.00 10.00 -3.82 0.00 9.24 -7.06 0.00 7.08 -9.23 0.00 3.84 -10.00 0.00 0.02 -9.25 0.00 -3.81 -7.09 0.00 -7.06 -3.85 0.00 -9.23 -0.02 0.00 -10.00 3.80 0.00 -9.25 7.05 0.00 -7.09 9.23 0.00 -3.85 10.00 0.00 0.00'/>
<ROUTE fromNode='MovementTimerfromField='fraction_changedtoNode='MovetheShiptoField='set_fraction'/>
<!-- ROUTE information for SpinTheShip node:  [from MovementTimer.fraction_changed to set_fraction ] [from value_changed to Ship.rotation ] -->
<OrientationInterpolator DEF='SpinTheShipkey='0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1keyValue='1 0 0 0 1 0 0 -0.2 1 0 0 -0.1 1 0 0 -0.05 1 0 0 -0 1 0 0 -0.06 1 0 0 -0.07 1 0 0 -0.1 1 0 0 -0.12 1 0 0 -0.18 1 0 0 0'/>
<ROUTE fromNode='MovementTimerfromField='fraction_changedtoNode='SpinTheShiptoField='set_fraction'/>
<!-- ROUTE information for SpinTheShip2 node:  [from MovementTimer.fraction_changed to set_fraction ] [from value_changed to Ship2.rotation ] -->
<OrientationInterpolator DEF='SpinTheShip2key='0 0.25 0.5 0.75 1keyValue='0 1 0 -1.57 0 1 0 -3.14 0 1 0 -4.71 0 1 0 0 0 1 0 -1.57'/>
<ROUTE fromNode='MovementTimerfromField='fraction_changedtoNode='SpinTheShip2toField='set_fraction'/>
<!-- ROUTE information for SpinTheShip3 node:  [from spintTimer.fraction_changed to set_fraction ] [from value_changed to Ship4.rotation ] -->
<OrientationInterpolator DEF='SpinTheShip3key='0 0.5 1keyValue='0 0 1 -0.05 0 0 1 0.05 0 0 1 -0.05'/>
<ROUTE fromNode='spintTimerfromField='fraction_changedtoNode='SpinTheShip3toField='set_fraction'/>
<!-- ROUTE information for Ship3 node:  [from MovetheShip.value_changed to translation ] -->
<Transform DEF='Ship3'>
<ROUTE fromNode='MovetheShipfromField='value_changedtoNode='Ship3toField='translation'/>
<Viewpoint description='top Movingorientation='1 0 0 -1.57079position='0 3 0'/>
<!-- ROUTE information for Ship2 node:  [from SpinTheShip2.value_changed to rotation ] -->
<Transform DEF='Ship2'>
<ROUTE fromNode='SpinTheShip2fromField='value_changedtoNode='Ship2toField='rotation'/>
<Viewpoint description='Sternorientation='0 1 0 -1.57position='-3 0.5 0'/>
<Viewpoint description='boworientation='0 1 0 1.57position='3 0.5 0'/>
<Viewpoint description='bowCloseorientation='0 1 0 1.57position='1 0.3 0'/>
<Viewpoint description='stb Boworientation='-0.3162 0.9487 0 0.8117position='1 0.5 1'/>
<Viewpoint description='stb Bridge Outsideorientation='0 0.6247 0 0.8179position='0.5 0.2 0.6'/>
<Viewpoint description='port Boworientation='0 0.9487 0 2.3299position='1.5 0.5 -1.5'/>
<Viewpoint description='stb Quarterorientation='-0.3162 -0.9487 0 0.8117position='-1.5 0.25 1.5'/>
<Viewpoint description='port Quarterorientation='0 -0.9487 0 2.3299position='-1.5 0.25 -1.5'/>
<!-- ROUTE information for Ship node:  [from SpinTheShip.value_changed to rotation ] -->
<Transform DEF='Ship'>
<ROUTE fromNode='SpinTheShipfromField='value_changedtoNode='ShiptoField='rotation'/>
<Viewpoint description='StbRudderorientation='0 1 0 -1.57position='-0.9 -0.1 0.14'/>
<!-- ROUTE information for Ship4 node:  [from SpinTheShip3.value_changed to rotation ] -->
<Transform DEF='Ship4'>
<Viewpoint description='.50calorientation='0 1 0 1.57position='-0.05 0.28 0'/>
<Viewpoint description='BridgefieldOfView='0.43orientation='0 -0.9935 0 1.57079position='0.14 0.27 0'/>
<Viewpoint description='RadarfieldOfView='0.45orientation='-0.1888 -0.982 0 1.57079position='-0.6 0.5 0'/>
<ROUTE fromNode='SpinTheShip3fromField='value_changedtoNode='Ship4toField='rotation'/>
<Transform translation='-0.23 2.5 0'>
<!-- ROUTE information for gunLight node:  [from Converter.SFFloat_Yout to intensity ] -->
<SpotLight DEF='gunLightbeamWidth='0.05color='0.721569 0.066667 0cutOffAngle='0.03direction='0 -1 0radius='5'/>
</Transform>
<Transform scale='0.15 0.15 0.15'>
<Transform translation='-1.8 2.5 0'> </Transform>
<Transform translation='-.8 1.33 0'>
<Transform rotation='1 0 0 1.57'>
<!-- ROUTE information for dimmerAmplitude node:  [from translation_changed to Converter.SFVec3fY_SFFloat ] [from translation_changed to dimmerLightGunBox.translation ] -->
<PlaneSensor DEF='dimmerAmplitudedescription='click and drag to dimm LightmaxPosition='0 .1'/>
<!-- ROUTE information for dimmerLightGunBox node:  [from dimmerAmplitude.translation_changed to translation ] -->
<Transform DEF='dimmerLightGunBox'>
<Shape>
<Appearance>
<Material ambientIntensity='1diffuseColor='1 0 0'/>
</Appearance>
<Box size='.03 0.03 0.03'/>
</Shape>
</Transform>
<!-- ROUTE information for Converter node:  [from dimmerAmplitude.translation_changed to SFVec3fY_SFFloat ] [from SFFloat_Yout to gunLight.intensity ] -->
<Script DEF='Converter'>
<field name='SFVec3fY_SFFloattype='SFVec3faccessType='inputOnly'/>
<field name='SFFloat_Youttype='SFFloataccessType='outputOnly'/>
<![CDATA[
                    
ecmascript:
                    // Author: Claudio Coreixas
                    // Created: 19 November 2009
                    function SFVec3fY_SFFloat (value) {
                    SFFloat_Yout = 30 * value[1];
                    }

                  
]]>
</Script>
<ROUTE fromNode='dimmerAmplitudefromField='translation_changedtoNode='ConvertertoField='SFVec3fY_SFFloat'/>
<ROUTE fromNode='dimmerAmplitudefromField='translation_changedtoNode='dimmerLightGunBoxtoField='translation'/>
<ROUTE fromNode='ConverterfromField='SFFloat_YouttoNode='gunLighttoField='intensity'/>
</Transform>
</Transform>
<Transform translation='-.65 1.33 0'>
<Transform rotation='1 0 0 1.57'>
<!-- ROUTE information for dimmerGeneralLightAmplitude node:  [from translation_changed to Converter2.SFVec3fY_SFFloat ] [from translation_changed to dimmerGeneralLight.translation ] -->
<PlaneSensor DEF='dimmerGeneralLightAmplitudedescription='click and drag to dimm General LightmaxPosition='0 .1'/>
<!-- ROUTE information for dimmerGeneralLight node:  [from dimmerGeneralLightAmplitude.translation_changed to translation ] -->
<Transform DEF='dimmerGeneralLight'>
<Shape>
<Appearance>
<Material ambientIntensity='1diffuseColor='1 0 0'/>
</Appearance>
<Box size='.03 0.03 0.03'/>
</Shape>
</Transform>
</Transform>
</Transform>
<Inline
  url=' "U11.x3d" "https://savage.nps.edu/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/U11.x3d" '/>
</Transform>
</Transform>
</Transform>
</Transform>
</Transform>
<Transform scale='0.15 0.15 0.15'> </Transform>
<Transform translation='0 -5 0'>
<Shape DEF='ocean'>
<Appearance>
<Material ambientIntensity='1diffuseColor='0 0.219608 0.419608shininess='1transparency='0.16'/>
</Appearance>
<Box size='200 10 200solid='false'/>
</Shape>
</Transform>
<!-- ROUTE information for generalLight node:  [from Converter2.SFFloat_Yout to intensity ] -->
<PointLight DEF='generalLightintensity='0.05location='0 30 -1'/>
<!-- ROUTE information for Converter2 node:  [from dimmerGeneralLightAmplitude.translation_changed to SFVec3fY_SFFloat ] [from SFFloat_Yout to generalLight.intensity ] -->
<Script DEF='Converter2'>
<field name='SFVec3fY_SFFloattype='SFVec3faccessType='inputOnly'/>
<field name='SFFloat_Youttype='SFFloataccessType='outputOnly'/>
<![CDATA[
      
ecmascript:
                    // Author: Claudio Coreixas
                    // Created: 19 November 2009
                    function SFVec3fY_SFFloat (value) {
                    SFFloat_Yout = 10 * value[1];
                    }

    
]]>
</Script>
<ROUTE fromNode='dimmerGeneralLightAmplitudefromField='translation_changedtoNode='Converter2toField='SFVec3fY_SFFloat'/>
<ROUTE fromNode='dimmerGeneralLightAmplitudefromField='translation_changedtoNode='dimmerGeneralLighttoField='translation'/>
<ROUTE fromNode='Converter2fromField='SFFloat_YouttoNode='generalLighttoField='intensity'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : boat, Converter, Converter2, CoordinateAxes, dimmerAmplitude, dimmerGeneralLight, dimmerGeneralLightAmplitude, dimmerLightGunBox, generalLight, gunLight, gunLight2, MovementTimer, MovetheShip, ocean, Ship, Ship2, Ship3, Ship4, SpinTheShip, SpinTheShip2, SpinTheShip3, spintTimer

Index for Viewpoint images : Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5, Viewpoint_6, Viewpoint_7, Viewpoint_8, Viewpoint_9, Viewpoint_10, Viewpoint_11, Viewpoint_12, Viewpoint_13, Viewpoint_14
-->

<!-- 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)
-->

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