<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  <head>
    <meta content='TomahawkPrototype.x3d' name='title'/>
    <meta content='BGM109, Tomahawk Land Attack Missile prototype' name='description'/>
    <meta content='James Harney' name='creator'/>
    <meta content='4 September 2001' name='created'/>
    <meta content='28 November 2019' name='modified'/>
    <meta content='https://www.fas.org/man/dod-101/sys/smart/BGM109.htm' name='reference'/>
    <meta content='http://www.specialoperations.com/multimedia/sounds.html' name='reference'/>
    <meta content='http://www.specialoperations.com/multimedia/sounds.html' name='reference'/>
    <meta content='See url "soundpermissions.html" for copyright info and use on missile1.au and exp03.au that are converted to missile1.wav and exp03.wav for use in this file/model' name='reference'/>
    <meta content='soundpermissions.html' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/TomahawkPrototype.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='TomahawkPrototype.x3d'/>
    <ProtoDeclare name='BGM109'>
      <ProtoInterface>
        <field accessType='inputOnly' name='STARTLAUNCH' type='SFBool'/>
        <field accessType='inputOnly' name='THETIME' type='SFTime'/>
      </ProtoInterface>
      <ProtoBody>
        <Transform DEF='TLAM' rotation='0 1 0 -1.57'>
          <Transform>
            <!-- Used with permission. See soundpermissions.html for details. -->
            <Sound maxBack='50000' maxFront='50000'>
              <AudioClip DEF='TLAMSOUND' description='Tomahawk missile' url='"MISSILE1.wav" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/MISSILE1.wav"'/>
            </Sound>
            <Transform translation='0 -2.775 0'>
              <Group DEF='MISSILEBODY'>
                <Transform>
                  <Shape>
                    <Appearance DEF='TLAMCOLOR'>
                      <Material diffuseColor='1 1 1' shininess='.7' specularColor='1 1 1'/>
                    </Appearance>
                    <Cylinder height='5.56' radius='.25905'/>
                  </Shape>
                </Transform>
              </Group>
              <Transform rotation='0 0 1 -1.56' translation='-.27 2.5 0'>
                <Transform rotation='1 0 0 1.56'>
                  <Shape>
                    <Text string='"TOMAHAWK"'>
                      <FontStyle size='.225' style='BOLD'/>
                    </Text>
                    <Appearance>
                      <Material diffuseColor='0 0 0'/>
                    </Appearance>
                  </Shape>
                </Transform>
              </Transform>
              <Transform rotation='0 0 1 1.56' translation='.27 .25 0'>
                <Transform rotation='1 0 0 1.56'>
                  <Shape>
                    <Text string='"U.S. NAVY"'>
                      <FontStyle size='.225' style='BOLD'/>
                    </Text>
                    <Appearance>
                      <Material diffuseColor='0 0 0'/>
                    </Appearance>
                  </Shape>
                </Transform>
              </Transform>
            </Transform>
            <Transform>
              <Group DEF='CONE'>
                <Shape>
                  <Appearance>
                    <Material diffuseColor='1 1 1' shininess='.7' specularColor='1 1 1'/>
                  </Appearance>
                  <Extrusion creaseAngle='1.785' crossSection='0.267 0.000 0.231 -0.134 0.134 -0.231 0.0 -0.267 -0.134 -0.231 -0.231 -0.134 -0.267 0.000 -0.231 0.134 -0.134 0.231 0.0 0.267 0.134 0.231 0.231 0.134 0.267 0.0' scale='1.00 1.00 0.95 0.95 0.88 0.88 0.76 0.76 0.48 0.48' spine='0.00 0.00 0.00 0.00 0.10 0.00 0.00 0.20 0.00 0.00 0.30 0.00 0.00 0.40 0.00'/>
                </Shape>
              </Group>
            </Transform>
            <Transform>
              <Group DEF='MIDFIN'>
                <Transform DEF='STBDFIN' rotation='0 0 1 -1.57' translation='-.25905 -3.5 0'>
                  <Transform>
                    <Shape>
                      <Appearance DEF='FINCOLOR'>
                        <Material diffuseColor='.9 .9 .9'/>
                      </Appearance>
                      <IndexedFaceSet coordIndex='0 1 2 3 4 -1' solid='false'>
                        <Coordinate point='0 0 0 0 .5 0 1.2 .4 0 1.2 .1 0 0 0 0'/>
                      </IndexedFaceSet>
                    </Shape>
                  </Transform>
                </Transform>
                <Transform DEF='PORTFIN' rotation='0 0 1 1.57' translation='.25905 -3.5 0'>
                  <Transform>
                    <Shape>
                      <Appearance>
                        <Material diffuseColor='.9 .9 .9'/>
                      </Appearance>
                      <IndexedFaceSet coordIndex='0 1 2 3 4 -1' solid='false'>
                        <Coordinate point='0 0 0 0 .5 0 -1.2 .4 0 -1.2 .1 0 0 0 0'/>
                      </IndexedFaceSet>
                    </Shape>
                    <Transform/>
                  </Transform>
                </Transform>
              </Group>
            </Transform>
            <Transform DEF='BOOSTSECT'>
              <Group DEF='BOOSTER'>
                <Transform translation='0 -5.91 0'>
                  <Shape>
                    <Appearance USE='TLAMCOLOR'/>
                    <Cylinder height='.69' radius='.25905'/>
                  </Shape>
                </Transform>
                <Group DEF='BOOSTERFIN'>
                  <Transform translation='.25905 -6.27 0'>
                    <Shape DEF='BFIN'>
                      <Appearance USE='FINCOLOR'/>
                      <IndexedFaceSet coordIndex='0 1 2 3 4 -1' solid='false'>
                        <Coordinate point='0 0 0 0 .5 0 .5 .35 0 .5 0 0 0 0 0'/>
                      </IndexedFaceSet>
                    </Shape>
                  </Transform>
                  <Transform rotation='0 1 0 1.57' translation='0 -6.27 -.25905'>
                    <Shape USE='BFIN'/>
                  </Transform>
                  <Transform rotation='0 1 0 3.14' translation='-.25905 -6.27 0'>
                    <Shape USE='BFIN'/>
                  </Transform>
                  <Transform rotation='0 1 0 -1.57' translation='0 -6.27 .25905'>
                    <Shape USE='BFIN'/>
                  </Transform>
                </Group>
              </Group>
              <Transform DEF='EXHAUST' rotation='0 1 0 3.14' scale='0.5 0.5 0.5' translation='0 -8 0'>
                <!-- Exhaust flames are from the torch example in the source book. -->
                <Shape DEF='Flames'>
                  <!-- No appearance, use emissive shading -->
                  <IndexedFaceSet coordIndex='0 1 2 -1 3 4 5 -1 6 7 8 -1'>
                    <Coordinate point='0.25 0.0 0.00 0.15 1.0 0.10 0.05 0.0 0.15 0.18 0.0 0.05 0.00 1.2 0.05 -0.10 0.0 0.05 -0.00 0.0 0.15 -0.13 0.8 0.10 -0.25 -0.25 0.00'/>
                    <Color color='1.0 0.0 0.0 0.9 0.5 0 1.0 0.0 0.0 0.9 0.3 0 1.0 1.0 0.0 0.9 0.3 0 0.7 0.1 0.2 0.9 0.8 0 1.0 0.0 0.0'/>
                  </IndexedFaceSet>
                  <Appearance>
                    <Material transparency='.15'/>
                  </Appearance>
                </Shape>
                <Transform rotation='0 1 0 1.57' scale='0.9 0.9 1'>
                  <Shape USE='Flames'/>
                </Transform>
                <Transform rotation='0 1 0 -1.57' scale='0.9 0.9 1'>
                  <Shape USE='Flames'/>
                </Transform>
              </Transform>
            </Transform>
          </Transform>
          <Transform rotation='1 0 0 -.35' translation='0 -4.5 -.1'>
            <Shape>
              <Box size='.25 .5 .4'/>
              <Appearance>
                <Material diffuseColor='.91 .91 .91'/>
              </Appearance>
            </Shape>
          </Transform>
          <PositionInterpolator DEF='EXHINT' key='0 .25 .5 .75 1' keyValue='1.4 1.4 1.4 2 2 2 2.5 2.5 2.5 2 2 2 1.4 1.4 1.4'/>
          <TimeSensor DEF='EXHAUSTCLOCK' loop='true'/>
          <TimeSensor DEF='TLAMCLOCK' cycleInterval='16' enabled='false'/>
          <Script DEF='TimeFilter2'>
            <field accessType='inputOnly' name='setStart' type='SFBool'/>
            <field accessType='inputOnly' name='InputTime' type='SFTime'/>
            <field accessType='outputOnly' name='startEventTime' type='SFTime'/>
            <IS>
              <connect nodeField='setStart' protoField='STARTLAUNCH'/>
              <connect nodeField='InputTime' protoField='THETIME'/>
            </IS>
            <![CDATA[
ecmascript:


function setStart ( value, InputTime ) {
                         
	startEventTime = InputTime;
	
}
]]>
          </Script>
          <TimeSensor DEF='FINCLOCK' cycleInterval='6'/>
          <TimeSensor DEF='TCLOCK' cycleInterval='28'/>
          <OrientationInterpolator DEF='FINANGLE' key='.7 1' keyValue='0 0 1 -1.57 0 0 1 0'/>
          <PositionInterpolator DEF='FINPOSIT' key='.7 1' keyValue='-.25905 -3.5 0 .25905 -3.5 0'/>
          <PositionInterpolator DEF='FINPOSITPORT' key='.7 1' keyValue='.25905 -3.5 0 -.25905 -3.5 0'/>
          <OrientationInterpolator DEF='FINANGLEPORT' key='.7 1' keyValue='0 0 1 1.57 0 0 1 0'/>
        </Transform>
        <ROUTE fromField='startEventTime' fromNode='TimeFilter2' toField='set_startTime' toNode='TCLOCK'/>
        <ROUTE fromField='startTime' fromNode='TCLOCK' toField='startTime' toNode='TLAMSOUND'/>
        <ROUTE fromField='stopTime' fromNode='TCLOCK' toField='stopTime' toNode='TLAMSOUND'/>
        <ROUTE fromField='startEventTime' fromNode='TimeFilter2' toField='set_startTime' toNode='EXHAUSTCLOCK'/>
        <ROUTE fromField='fraction_changed' fromNode='EXHAUSTCLOCK' toField='set_fraction' toNode='EXHINT'/>
        <ROUTE fromField='value_changed' fromNode='EXHINT' toField='set_scale' toNode='EXHAUST'/>
        <ROUTE fromField='startEventTime' fromNode='TimeFilter2' toField='set_startTime' toNode='FINCLOCK'/>
        <ROUTE fromField='fraction_changed' fromNode='FINCLOCK' toField='set_fraction' toNode='FINANGLE'/>
        <ROUTE fromField='fraction_changed' fromNode='FINCLOCK' toField='set_fraction' toNode='FINPOSIT'/>
        <ROUTE fromField='fraction_changed' fromNode='FINCLOCK' toField='set_fraction' toNode='FINANGLEPORT'/>
        <ROUTE fromField='fraction_changed' fromNode='FINCLOCK' toField='set_fraction' toNode='FINPOSITPORT'/>
        <ROUTE fromField='value_changed' fromNode='FINANGLE' toField='set_rotation' toNode='STBDFIN'/>
        <ROUTE fromField='value_changed' fromNode='FINPOSIT' toField='set_translation' toNode='STBDFIN'/>
        <ROUTE fromField='value_changed' fromNode='FINANGLEPORT' toField='set_rotation' toNode='PORTFIN'/>
        <ROUTE fromField='value_changed' fromNode='FINPOSITPORT' toField='set_translation' toNode='PORTFIN'/>
      </ProtoBody>
    </ProtoDeclare>
    <!-- ==================== -->
    <Background skyColor='0.604 0.753 0.804'/>
    <Anchor description='Tomahawk Example' parameter='"target=_blank"' url='"TomahawkExample.wrl" "../../Weapons/Missiles/TomahawkExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/TomahawkExample.wrl" "TomahawkExample.x3d" "../../Weapons/Missiles/TomahawkExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/TomahawkExample.x3d"'>
      <Shape>
        <Text string='"TomahawkPrototype" "is a prototype declaration file" "" "To see an example scene" "click on this text and view" "TomahawkExample"'>
          <FontStyle justify='"MIDDLE" "MIDDLE"'/>
        </Text>
        <Appearance/>
      </Shape>
    </Anchor>
  </Scene>
</X3D>