X3D Model Documentation: FiftyCaliberGunFiring.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
  3  <X3D profile='Immersive' version='3.2 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'>
  4       <head>
  5            <meta name='titlecontent=' FiftyCaliberGunFiring.x3d '/>
  6            <meta name='descriptioncontent='Brazilian Naval Academy Training Ship 50cal firing against other Ship during night'/>
  7            <meta name='creatorcontent='Claudio Coreixas'/>
  8            <meta name='createdcontent='20 October 2009'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='referencecontent='http://www.en.mar.mil.br'/>
 11            <meta name='subjectcontent='ships'/>
 12            <meta name='infocontent='Headlight is off, lighting is controlled when shooting'/>
 13            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/FiftyCaliberGunFiring.x3d '/>
 14            <meta name='generatorcontent='X3D-Edit, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 15            <meta name='licensecontent='../../license.html'/>
 16       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: 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 nodes: 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
-->
 17       <Scene>
 18            <Sound maxBack='100maxFront='100'>
 19                 <AudioClip DEF='boatdescription='ambient sound, licensed from http://www.1soundfx.com/infopage.php#licenseloop='true'   url=' "boatSoundedit.wav" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/boatSoundedit.wav" '/>
 20            </Sound>
 21            <NavigationInfo headlight='falsetype='"EXAMINE"'/>
 22            <WorldInfo info='"an Butakov MOB scene"title='Butakov'/>
 23            <Background skyAngle='0.7 0skyColor='0.478431 0.160784 1 0.701961 0.776471 1 0.380392 0.384314 1'/>
 24            <Viewpoint description='toporientation='1 0 0 -1.57position='0 20 0'/>
 25 
          <!-- 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'/>
 26 
          <!-- ROUTE information for spintTimer node:  [from fraction_changed to SpinTheShip3.set_fraction ] -->
          <TimeSensor DEF='spintTimercycleInterval='4loop='true'/>
 27 
          <!-- 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'/>
 28            < ROUTE  fromNode='MovementTimer' fromField='fraction_changed' toNode='MovetheShip' toField='set_fraction'/>
 29 
          <!-- 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'/>
 30            < ROUTE  fromNode='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip' toField='set_fraction'/>
 31 
          <!-- 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'/>
 32            < ROUTE  fromNode='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip2' toField='set_fraction'/>
 33 
          <!-- 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'/>
 34            < ROUTE  fromNode='spintTimer' fromField='fraction_changed' toNode='SpinTheShip3' toField='set_fraction'/>
 35 
          <!-- ROUTE information for Ship3 node:  [from MovetheShip.value_changed to translation ] -->
          <Transform DEF='Ship3'>
 36                 < ROUTE  fromNode='MovetheShip' fromField='value_changed' toNode='Ship3' toField='translation'/>
 37                 <Viewpoint description='top Movingorientation='1 0 0 -1.57079position='0 3 0'/>
 38 
               <!-- ROUTE information for Ship2 node:  [from SpinTheShip2.value_changed to rotation ] -->
               <Transform DEF='Ship2'>
 39                      < ROUTE  fromNode='SpinTheShip2' fromField='value_changed' toNode='Ship2' toField='rotation'/>
 40                      <Viewpoint description='Sternorientation='0 1 0 -1.57position='-3 0.5 0'/>
 41                      <Viewpoint description='boworientation='0 1 0 1.57position='3 0.5 0'/>
 42                      <Viewpoint description='bow Closeorientation='0 1 0 1.57position='1 0.3 0'/>
 43                      <Viewpoint description='stbd Boworientation='-0.3162 0.9487 0 0.8117position='1 0.5 1'/>
 44                      <Viewpoint description='stbd Bridge Outsideorientation='0 0.6247 0 0.8179position='0.5 0.2 0.6'/>
 45                      <Viewpoint description='port Boworientation='0 0.9487 0 2.3299position='1.5 0.5 -1.5'/>
 46                      <Viewpoint description='stbd Quarterorientation='-0.3162 -0.9487 0 0.8117position='-1.5 0.25 1.5'/>
 47                      <Viewpoint description='port Quarterorientation='0 -0.9487 0 2.3299position='-1.5 0.25 -1.5'/>
 48 
                    <!-- ROUTE information for Ship node:  [from SpinTheShip.value_changed to rotation ] -->
                    <Transform DEF='Ship'>
 49                           < ROUTE  fromNode='SpinTheShip' fromField='value_changed' toNode='Ship' toField='rotation'/>
 50                           <Viewpoint description='StbRudderorientation='0 1 0 -1.57position='-0.9 -0.1 0.14'/>
 51 
                         <!-- ROUTE information for Ship4 node:  [from SpinTheShip3.value_changed to rotation ] -->
                         <Transform DEF='Ship4'>
 52                                <Viewpoint description='.50 caliber gunorientation='0 1 0 1.57position='-0.05 0.28 0'/>
 53                                <Viewpoint description='BridgefieldOfView='0.43orientation='0 -0.9935 0 1.57079position='0.14 0.27 0'/>
 54                                <Viewpoint description='RadarfieldOfView='0.45orientation='-0.1888 -0.982 0 1.57079position='-0.6 0.5 0'/>
 55                                < ROUTE  fromNode='SpinTheShip3' fromField='value_changed' toNode='Ship4' toField='rotation'/>
 56                                <Transform translation='-0.23 2.5 0'>
 57 
                                   <!-- 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'/>
 58                                </Transform>
 59                                <Transform scale='0.15 0.15 0.15'>
 60                                     <Transform translation='-1.8 2.5 0'>
 61                                          <Inline DEF='CoordinateAxes'   url=' "CoordinateAxes.x3d" "../../Basic/course/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "CoordinateAxes.wrl" "../../Basic/course/CoordinateAxes.wrl" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl" '/>
 62                                          <SpotLight DEF='gunLight2beamWidth='0.5color='0.721569 0.066667 0cutOffAngle='0.6direction='0 -1 0radius='3'/>
 63                                     </Transform>
 64                                     <Transform translation='-.8 1.33 0'>
 65                                          <Transform rotation='1 0 0 1.57'>
 66 
                                             <!-- 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'/>
 67 
                                             <!-- ROUTE information for dimmerLightGunBox node:  [from dimmerAmplitude.translation_changed to translation ] -->
                                             <Transform DEF='dimmerLightGunBox'>
 68                                                    <Shape>
 69                                                         <Appearance>
 70                                                              <Material ambientIntensity='1diffuseColor='1 0 0'/>
 71                                                         </Appearance>
 72                                                         <Box size='.03 0.03 0.03'/>
 73                                                    </Shape>
 74                                               </Transform>
 75 
                                             <!-- ROUTE information for Converter node:  [from dimmerAmplitude.translation_changed to SFVec3fY_SFFloat ] [from SFFloat_Yout to gunLight.intensity ] -->
                                             <Script DEF='Converter'>
 76                                                    <field name='SFVec3fY_SFFloattype='SFVec3faccessType='inputOnly'/>
 77                                                    <field name='SFFloat_Youttype='SFFloataccessType='outputOnly'/>
  <![CDATA[
                    
ecmascript:
                    // Author: Claudio Coreixas
                    // Created: 19 November 2009
                    function SFVec3fY_SFFloat (value) {
                    SFFloat_Yout = 30 * value[1];
                    }

                  
]]>
 79                                               </Script>
 80                                               < ROUTE  fromNode='dimmerAmplitude' fromField='translation_changed' toNode='Converter' toField='SFVec3fY_SFFloat'/>
 81                                               < ROUTE  fromNode='dimmerAmplitude' fromField='translation_changed' toNode='dimmerLightGunBox' toField='translation'/>
 82                                               < ROUTE  fromNode='Converter' fromField='SFFloat_Yout' toNode='gunLight' toField='intensity'/>
 83                                          </Transform>
 84                                     </Transform>
 85                                     <Transform translation='-.65 1.33 0'>
 86                                          <Transform rotation='1 0 0 1.57'>
 87 
                                             <!-- 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'/>
 88 
                                             <!-- ROUTE information for dimmerGeneralLight node:  [from dimmerGeneralLightAmplitude.translation_changed to translation ] -->
                                             <Transform DEF='dimmerGeneralLight'>
 89                                                    <Shape>
 90                                                         <Appearance>
 91                                                              <Material ambientIntensity='1diffuseColor='1 0 0'/>
 92                                                         </Appearance>
 93                                                         <Box size='.03 0.03 0.03'/>
 94                                                    </Shape>
 95                                               </Transform>
 96                                          </Transform>
 97                                     </Transform>
 98                                     <Inline   url=' "U11.x3d" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/U11.x3d" '/>
 99                                </Transform>
100                           </Transform>
101                      </Transform>
102                 </Transform>
103            </Transform>
104            <Transform scale='0.15 0.15 0.15'>
105                 <Inline   url=' "U11.x3d" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/U11.x3d" '/>
106            </Transform>
107            <Transform translation='0 -5 0'>
108                 <Shape DEF='ocean'>
109                      <Appearance>
110                           <Material ambientIntensity='1diffuseColor='0 0.219608 0.419608shininess='1transparency='0.16'/>
111                      </Appearance>
112                      <Box size='200 10 200solid='false'/>
113                 </Shape>
114            </Transform>
115 
          <!-- ROUTE information for generalLight node:  [from Converter2.SFFloat_Yout to intensity ] -->
          <PointLight DEF='generalLightintensity='0.05location='0 30 -1'/>
116 
          <!-- ROUTE information for Converter2 node:  [from dimmerGeneralLightAmplitude.translation_changed to SFVec3fY_SFFloat ] [from SFFloat_Yout to generalLight.intensity ] -->
          <Script DEF='Converter2'>
117                 <field name='SFVec3fY_SFFloattype='SFVec3faccessType='inputOnly'/>
118                 <field name='SFFloat_Youttype='SFFloataccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:
                    // Author: Claudio Coreixas
                    // Created: 19 November 2009
                    function SFVec3fY_SFFloat (value) {
                    SFFloat_Yout = 10 * value[1];
                    }

    
]]>
120            </Script>
121            < ROUTE  fromNode='dimmerGeneralLightAmplitude' fromField='translation_changed' toNode='Converter2' toField='SFVec3fY_SFFloat'/>
122            < ROUTE  fromNode='dimmerGeneralLightAmplitude' fromField='translation_changed' toNode='dimmerGeneralLight' toField='translation'/>
123            < ROUTE  fromNode='Converter2' fromField='SFFloat_Yout' toNode='generalLight' toField='intensity'/>
124       </Scene>
125  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: 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 nodes: 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
-->
X3D Tooltips element index: Appearance, AudioClip, Background, Box, field, head, Inline, Material, meta, NavigationInfo, OrientationInterpolator, PlaneSensor, PointLight, PositionInterpolator, ROUTE, Scene, Script, Shape, Sound, SpotLight, TimeSensor, Transform, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table entries with 14 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

MovementTimer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
MovetheShip
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
MovetheShip
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
Ship3
Transform
translation
SFVec3f
MovementTimer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
SpinTheShip
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SpinTheShip
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
Ship
Transform
rotation
SFRotation
MovementTimer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
SpinTheShip2
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SpinTheShip2
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
Ship2
Transform
rotation
SFRotation

spintTimer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
SpinTheShip3
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SpinTheShip3
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
Ship4
Transform
rotation
SFRotation

dimmerAmplitude
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
Converter
Script
SFVec3fY_SFFloat
SFVec3f
then
 
 
 
Converter
Script
SFFloat_Yout
SFFloat

ROUTE
event to
(2)
gunLight
SpotLight
intensity
SFFloat
dimmerAmplitude
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
dimmerLightGunBox
Transform
translation
SFVec3f

dimmerGeneralLightAmplitude
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
Converter2
Script
SFVec3fY_SFFloat
SFVec3f
then
 
 
 
Converter2
Script
SFFloat_Yout
SFFloat

ROUTE
event to
(2)
generalLight
PointLight
intensity
SFFloat
dimmerGeneralLightAmplitude
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
dimmerGeneralLight
Transform
translation
SFVec3f


Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/FiftyCaliberGunFiringIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/FiftyCaliberGunFiring.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

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