<?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='title' content='FiftyCaliberGunFiring.x3d'/>
<meta name='description' content='Brazilian Naval Academy Training Ship 50cal firing against other Ship during night'/>
<meta name='creator' content='Claudio Coreixas'/>
<meta name='created' content='20 October 2009'/>
<meta name='modified' content='14 January 2014'/>
<meta name='reference' content=' http://www.en.mar.mil.br '/>
<meta name='subject' content='ships'/>
<meta name='info' content='Headlight is off, lighting is controlled when shooting'/>
<meta name='identifier' content=' https://savage.nps.edu/Savage/ShipsMilitary/PatrolCraft-NavalAcademy-Brazil/FiftyCaliberGunFiring.x3d '/>
<meta name='generator' content='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='license' content=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<Sound maxBack='100' maxFront='100'> </Sound>
<NavigationInfo headlight='false' type='"EXAMINE"'/>
<WorldInfo info='"an Butakov MOB scene"' title='Butakov'/>
<Background skyAngle='0.7 0' skyColor='0.478431 0.160784 1 0.701961 0.776471 1 0.380392 0.384314 1'/>
<Viewpoint description='top' orientation='1 0 0 -1.57' position='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='MovementTimer' cycleInterval='60' loop='true'/>
<!-- ROUTE information for spintTimer node:  [from fraction_changed to SpinTheShip3.set_fraction ] -->
<TimeSensor DEF='spintTimer' cycleInterval='4' loop='true'/>
<!-- ROUTE information for MovetheShip node:  [from MovementTimer.fraction_changed to set_fraction ] [from value_changed to Ship3.translation ] -->
<PositionInterpolator DEF='MovetheShip' key='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 1' keyValue='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='MovementTimer' fromField='fraction_changed' toNode='MovetheShip' toField='set_fraction'/>
<!-- ROUTE information for SpinTheShip node:  [from MovementTimer.fraction_changed to set_fraction ] [from value_changed to Ship.rotation ] -->
<OrientationInterpolator DEF='SpinTheShip' key='0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1' keyValue='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='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip' toField='set_fraction'/>
<!-- ROUTE information for SpinTheShip2 node:  [from MovementTimer.fraction_changed to set_fraction ] [from value_changed to Ship2.rotation ] -->
<OrientationInterpolator DEF='SpinTheShip2' key='0 0.25 0.5 0.75 1' keyValue='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='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip2' toField='set_fraction'/>
<!-- ROUTE information for SpinTheShip3 node:  [from spintTimer.fraction_changed to set_fraction ] [from value_changed to Ship4.rotation ] -->
<OrientationInterpolator DEF='SpinTheShip3' key='0 0.5 1' keyValue='0 0 1 -0.05 0 0 1 0.05 0 0 1 -0.05'/>
<ROUTE fromNode='spintTimer' fromField='fraction_changed' toNode='SpinTheShip3' toField='set_fraction'/>
<!-- ROUTE information for Ship3 node:  [from MovetheShip.value_changed to translation ] -->
<Transform DEF='Ship3'>
<ROUTE fromNode='MovetheShip' fromField='value_changed' toNode='Ship3' toField='translation'/>
<Viewpoint description='top Moving' orientation='1 0 0 -1.57079' position='0 3 0'/>
<!-- ROUTE information for Ship2 node:  [from SpinTheShip2.value_changed to rotation ] -->
<Transform DEF='Ship2'>
<ROUTE fromNode='SpinTheShip2' fromField='value_changed' toNode='Ship2' toField='rotation'/>
<Viewpoint description='Stern' orientation='0 1 0 -1.57' position='-3 0.5 0'/>
<Viewpoint description='bow' orientation='0 1 0 1.57' position='3 0.5 0'/>
<Viewpoint description='bowClose' orientation='0 1 0 1.57' position='1 0.3 0'/>
<Viewpoint description='stb Bow' orientation='-0.3162 0.9487 0 0.8117' position='1 0.5 1'/>
<Viewpoint description='stb Bridge Outside' orientation='0 0.6247 0 0.8179' position='0.5 0.2 0.6'/>
<Viewpoint description='port Bow' orientation='0 0.9487 0 2.3299' position='1.5 0.5 -1.5'/>
<Viewpoint description='stb Quarter' orientation='-0.3162 -0.9487 0 0.8117' position='-1.5 0.25 1.5'/>
<Viewpoint description='port Quarter' orientation='0 -0.9487 0 2.3299' position='-1.5 0.25 -1.5'/>
<!-- ROUTE information for Ship node:  [from SpinTheShip.value_changed to rotation ] -->
<Transform DEF='Ship'>
<ROUTE fromNode='SpinTheShip' fromField='value_changed' toNode='Ship' toField='rotation'/>
<Viewpoint description='StbRudder' orientation='0 1 0 -1.57' position='-0.9 -0.1 0.14'/>
<!-- ROUTE information for Ship4 node:  [from SpinTheShip3.value_changed to rotation ] -->
<Transform DEF='Ship4'>
<Viewpoint description='.50cal' orientation='0 1 0 1.57' position='-0.05 0.28 0'/>
<Viewpoint description='Bridge' fieldOfView='0.43' orientation='0 -0.9935 0 1.57079' position='0.14 0.27 0'/>
<Viewpoint description='Radar' fieldOfView='0.45' orientation='-0.1888 -0.982 0 1.57079' position='-0.6 0.5 0'/>
<ROUTE fromNode='SpinTheShip3' fromField='value_changed' toNode='Ship4' toField='rotation'/>
<Transform translation='-0.23 2.5 0'>
<!-- ROUTE information for gunLight node:  [from Converter.SFFloat_Yout to intensity ] -->
<SpotLight DEF='gunLight' beamWidth='0.05' color='0.721569 0.066667 0' cutOffAngle='0.03' direction='0 -1 0' radius='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='dimmerAmplitude' description='click and drag to dimm Light' maxPosition='0 .1'/>
<!-- ROUTE information for dimmerLightGunBox node:  [from dimmerAmplitude.translation_changed to translation ] -->
<Transform DEF='dimmerLightGunBox'>
<Shape>
<Appearance>
<Material ambientIntensity='1' diffuseColor='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_SFFloat' type='SFVec3f' accessType='inputOnly'/>
<field name='SFFloat_Yout' type='SFFloat' accessType='outputOnly'/>
<![CDATA[
                    
ecmascript:
                    // Author: Claudio Coreixas
                    // Created: 19 November 2009
                    function SFVec3fY_SFFloat (value) {
                    SFFloat_Yout = 30 * value[1];
                    }

                  
]]>
</Script>
<ROUTE fromNode='dimmerAmplitude' fromField='translation_changed' toNode='Converter' toField='SFVec3fY_SFFloat'/>
<ROUTE fromNode='dimmerAmplitude' fromField='translation_changed' toNode='dimmerLightGunBox' toField='translation'/>
<ROUTE fromNode='Converter' fromField='SFFloat_Yout' toNode='gunLight' toField='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='dimmerGeneralLightAmplitude' description='click and drag to dimm General Light' maxPosition='0 .1'/>
<!-- ROUTE information for dimmerGeneralLight node:  [from dimmerGeneralLightAmplitude.translation_changed to translation ] -->
<Transform DEF='dimmerGeneralLight'>
<Shape>
<Appearance>
<Material ambientIntensity='1' diffuseColor='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/PatrolCraft-NavalAcademy-Brazil/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='1' diffuseColor='0 0.219608 0.419608' shininess='1' transparency='0.16'/>
</Appearance>
<Box size='200 10 200' solid='false'/>
</Shape>
</Transform>
<!-- ROUTE information for generalLight node:  [from Converter2.SFFloat_Yout to intensity ] -->
<PointLight DEF='generalLight' intensity='0.05' location='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_SFFloat' type='SFVec3f' accessType='inputOnly'/>
<field name='SFFloat_Yout' type='SFFloat' accessType='outputOnly'/>
<![CDATA[
      
ecmascript:
                    // Author: Claudio Coreixas
                    // Created: 19 November 2009
                    function SFVec3fY_SFFloat (value) {
                    SFFloat_Yout = 10 * value[1];
                    }

    
]]>
</Script>
<ROUTE fromNode='dimmerGeneralLightAmplitude' fromField='translation_changed' toNode='Converter2' toField='SFVec3fY_SFFloat'/>
<ROUTE fromNode='dimmerGeneralLightAmplitude' fromField='translation_changed' toNode='dimmerGeneralLight' toField='translation'/>
<ROUTE fromNode='Converter2' fromField='SFFloat_Yout' toNode='generalLight' toField='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 -->