X3D Model Documentation: CarrierGuns.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <X3D profile='Immersive' version='3.0 xmlns:xsd='https://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent=' CarrierGuns.x3d '/>
  6            <meta name='descriptioncontent='Simple guns for carrier'/>
  7            <meta name='creatorcontent='Chun Hock Sng'/>
  8            <meta name='createdcontent='1 February 2001'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/CarrierSaratogaUnitedStates/CarrierGuns.x3d '/>
 11            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 12            <meta name='licensecontent='../../license.html'/>
 13       </head>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: CLOCK1, CLOCK2, CLOCK3, CLOCK4, Gun_1, Gun_2, Gun_3, Gun_4, Gun_barrel1, Gun_barrel2, Gun_barrel3, Gun_barrel4, Gun1, Gun2, Gun3, Gun4, Guns, Rotate_Gun1, Rotate_Gun2, Rotate_Gun3, Rotate_Gun4, TouchSensor1, TouchSensor2, TouchSensor3, TouchSensor4

Index for Viewpoint node: Viewpoint_1

-->
 14       <Scene>
 15            <WorldInfo title='CarrierGuns.x3d'/>
 16            <Group DEF='Guns'>
 17 
               <!-- ROUTE information for Rotate_Gun1 node:  [from Gun_1.value_changed to set_rotation ] -->
               <Transform DEF='Rotate_Gun1center='16 0 0'>
 18                      <Shape DEF='Gun1'>
 19                           <Extrusion creaseAngle='3.14crossSection='15 1 18 1 18.5 0.5 19 0 18.5 -0.5 18 -1 15 -1 15 1scale='0.90 0.90 0.90 0.90spine='0 -2.5 0 0 -0.1 0'/>
 20                           <Appearance>
 21                                <Material diffuseColor='0.3 0.3 0.3'/>
 22                           </Appearance>
 23                      </Shape>
 24                      <Transform rotation='0 0 1 1.57079translation='13.25 -1.5 0'>
 25                           <Shape DEF='Gun_barrel1'>
 26                                <Cylinder height='3.5radius='0.1'/>
 27                                <Appearance>
 28                                     <Material diffuseColor='0.4 0.4 0.4'/>
 29                                </Appearance>
 30                           </Shape>
 31                      </Transform>
 32 
                    <!-- ROUTE information for TouchSensor1 node:  [from isOver to CLOCK1.set_enabled ] -->
                    <TouchSensor DEF='TouchSensor1enabled='false'/>
 33 
                    <!-- ROUTE information for CLOCK1 node:  [from TouchSensor1.isOver to set_enabled ] [from fraction_changed to Gun_1.set_fraction ] -->
                    <TimeSensor DEF='CLOCK1cycleInterval='10loop='trueenabled='true'/>
 34 
                    <!-- ROUTE information for Gun_1 node:  [from CLOCK1.fraction_changed to set_fraction ] [from value_changed to Rotate_Gun1.set_rotation ] -->
                    <OrientationInterpolator DEF='Gun_1key='0.0 0.25 0.5 0.75 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.78 0.0 1.0 0.0 1.57079 0.0 1 0 0.78 0 1 0 0'/>
 35                 </Transform>
 36 
               <!-- ROUTE information for Rotate_Gun2 node:  [from Gun_2.value_changed to set_rotation ] -->
               <Transform DEF='Rotate_Gun2center='27 0 0'>
 37                      <Shape DEF='Gun2'>
 38                           <Extrusion creaseAngle='3.14crossSection='27.5 0 30.5 0 31 -0.5 31.5 -1 31 -1.5 30.5 -2 27.5 -2 27.5 0scale='0.90 0.90 0.90 0.90spine='0 -2.5 0 0 -0.1 0'/>
 39                           <Appearance>
 40                                <Material diffuseColor='0.3 0.3 0.3'/>
 41                           </Appearance>
 42                      </Shape>
 43                      <Transform rotation='0 0 1 1.57079translation='24.25 -1.5 -1'>
 44                           <Shape DEF='Gun_barrel2'>
 45                                <Cylinder height='3.5radius='0.1'/>
 46                                <Appearance>
 47                                     <Material diffuseColor='0.4 0.4 0.4'/>
 48                                </Appearance>
 49                           </Shape>
 50                      </Transform>
 51 
                    <!-- ROUTE information for TouchSensor2 node:  [from isOver to CLOCK2.set_enabled ] -->
                    <TouchSensor DEF='TouchSensor2'/>
 52 
                    <!-- ROUTE information for CLOCK2 node:  [from TouchSensor2.isOver to set_enabled ] [from fraction_changed to Gun_2.set_fraction ] -->
                    <TimeSensor DEF='CLOCK2cycleInterval='10enabled='falseloop='true'/>
 53 
                    <!-- ROUTE information for Gun_2 node:  [from CLOCK2.fraction_changed to set_fraction ] [from value_changed to Rotate_Gun2.set_rotation ] -->
                    <OrientationInterpolator DEF='Gun_2key='0.0 0.25 0.5 0.75 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.78 0.0 1.0 0.0 1.57079 0.0 1 0 0.78 0 1 0 0'/>
 54                 </Transform>
 55 
               <!-- ROUTE information for Rotate_Gun3 node:  [from Gun_3.value_changed to set_rotation ] -->
               <Transform DEF='Rotate_Gun3center='16 0 -34'>
 56                      <Shape DEF='Gun3'>
 57                           <Extrusion creaseAngle='3.14crossSection='15 -36.5 18 -36.5 18.5 -37 19 -37.5 18.5 -38 18 -38.5 15 -38.5 15 -36.5scale='0.90 0.90 0.90 0.90spine='0 -2.5 0 0 -0.1 0'/>
 58                           <Appearance>
 59                                <Material diffuseColor='0.3 0.3 0.3'/>
 60                           </Appearance>
 61                      </Shape>
 62                      <Transform rotation='0 0 1 1.57079translation='13.25 -1.5 -33.6'>
 63                           <Shape DEF='Gun_barrel3'>
 64                                <Cylinder height='3.5radius='0.1'/>
 65                                <Appearance>
 66                                     <Material diffuseColor='0.4 0.4 0.4'/>
 67                                </Appearance>
 68                           </Shape>
 69                      </Transform>
 70 
                    <!-- ROUTE information for TouchSensor3 node:  [from isOver to CLOCK3.set_enabled ] -->
                    <TouchSensor DEF='TouchSensor3enabled='false'/>
 71 
                    <!-- ROUTE information for CLOCK3 node:  [from TouchSensor3.isOver to set_enabled ] [from fraction_changed to Gun_3.set_fraction ] -->
                    <TimeSensor DEF='CLOCK3cycleInterval='10loop='trueenabled='true'/>
 72 
                    <!-- ROUTE information for Gun_3 node:  [from CLOCK3.fraction_changed to set_fraction ] [from value_changed to Rotate_Gun3.set_rotation ] -->
                    <OrientationInterpolator DEF='Gun_3key='0.0 0.25 0.5 0.75 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 -0.78 0.0 1.0 0.0 -1.57079 0.0 1 0 -0.78 0 1 0 0'/>
 73                 </Transform>
 74 
               <!-- ROUTE information for Rotate_Gun4 node:  [from Gun_4.value_changed to set_rotation ] -->
               <Transform DEF='Rotate_Gun4center='27 0 -33'>
 75                      <Shape DEF='Gun4'>
 76                           <Extrusion creaseAngle='3.14crossSection='27.5 -35.5 30.5 -35.5 31 -36 31.5 -36.5 31 -37 30.5 -37.5 27.5 -37.5 27.5 -35.5scale='0.90 0.90 0.90 0.90spine='0 -2.5 0 0 -0.1 0'/>
 77                           <Appearance>
 78                                <Material diffuseColor='0.3 0.3 0.3'/>
 79                           </Appearance>
 80                      </Shape>
 81                      <Transform rotation='0 0 1 1.57079translation='24.25 -1.5 -32.6'>
 82                           <Shape DEF='Gun_barrel4'>
 83                                <Cylinder height='3.5radius='0.1'/>
 84                                <Appearance>
 85                                     <Material diffuseColor='0.4 0.4 0.4'/>
 86                                </Appearance>
 87                           </Shape>
 88                      </Transform>
 89 
                    <!-- ROUTE information for TouchSensor4 node:  [from isOver to CLOCK4.set_enabled ] -->
                    <TouchSensor DEF='TouchSensor4'/>
 90 
                    <!-- ROUTE information for Gun_4 node:  [from CLOCK4.fraction_changed to set_fraction ] [from value_changed to Rotate_Gun4.set_rotation ] -->
                    <OrientationInterpolator DEF='Gun_4key='0.0 0.25 0.5 0.75 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 -0.78 0.0 1.0 0.0 -1.57079 0.0 1 0 -0.78 0 1 0 0'/>
 91 
                    <!-- ROUTE information for CLOCK4 node:  [from TouchSensor4.isOver to set_enabled ] [from fraction_changed to Gun_4.set_fraction ] -->
                    <TimeSensor DEF='CLOCK4cycleInterval='10enabled='falseloop='true'/>
 92                 </Transform>
 93                 <Viewpoint description='CarrierGunsposition='18 5 25'/>
 94            </Group>
 95            < ROUTE  fromNode='TouchSensor1' fromField='isOver' toNode='CLOCK1' toField='set_enabled'/>
 96            < ROUTE  fromNode='CLOCK1' fromField='fraction_changed' toNode='Gun_1' toField='set_fraction'/>
 97            < ROUTE  fromNode='Gun_1' fromField='value_changed' toNode='Rotate_Gun1' toField='set_rotation'/>
 98            < ROUTE  fromNode='TouchSensor2' fromField='isOver' toNode='CLOCK2' toField='set_enabled'/>
 99            < ROUTE  fromNode='CLOCK2' fromField='fraction_changed' toNode='Gun_2' toField='set_fraction'/>
100            < ROUTE  fromNode='Gun_2' fromField='value_changed' toNode='Rotate_Gun2' toField='set_rotation'/>
101            < ROUTE  fromNode='TouchSensor3' fromField='isOver' toNode='CLOCK3' toField='set_enabled'/>
102            < ROUTE  fromNode='TouchSensor4' fromField='isOver' toNode='CLOCK4' toField='set_enabled'/>
103            < ROUTE  fromNode='CLOCK3' fromField='fraction_changed' toNode='Gun_3' toField='set_fraction'/>
104            < ROUTE  fromNode='CLOCK4' fromField='fraction_changed' toNode='Gun_4' toField='set_fraction'/>
105            < ROUTE  fromNode='Gun_3' fromField='value_changed' toNode='Rotate_Gun3' toField='set_rotation'/>
106            < ROUTE  fromNode='Gun_4' fromField='value_changed' toNode='Rotate_Gun4' toField='set_rotation'/>
107       </Scene>
108  </X3D>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: CLOCK1, CLOCK2, CLOCK3, CLOCK4, Gun_1, Gun_2, Gun_3, Gun_4, Gun_barrel1, Gun_barrel2, Gun_barrel3, Gun_barrel4, Gun1, Gun2, Gun3, Gun4, Guns, Rotate_Gun1, Rotate_Gun2, Rotate_Gun3, Rotate_Gun4, TouchSensor1, TouchSensor2, TouchSensor3, TouchSensor4

Index for Viewpoint node: Viewpoint_1

-->
X3D Tooltips element index: to top Appearance, Cylinder, Extrusion, Group, head, Material, meta, OrientationInterpolator, ROUTE, Scene, Shape, TimeSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D,
plus documentation for accessType definitions, type definitions, XML data types, and field types

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

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

TouchSensor1
TouchSensor
isOver
SFBool
→
ROUTE
event to
(1)
CLOCK1
TimeSensor
set_enabled
SFBool
then
from
same
node
CLOCK1
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(2)
Gun_1
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_1
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(3)
Rotate_Gun1
Transform
set_rotation
SFRotation

CLOCK1
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
Gun_1
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_1
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(2)
Rotate_Gun1
Transform
set_rotation
SFRotation

TouchSensor2
TouchSensor
isOver
SFBool
→
ROUTE
event to
(1)
CLOCK2
TimeSensor
set_enabled
SFBool
then
from
same
node
CLOCK2
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(2)
Gun_2
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_2
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(3)
Rotate_Gun2
Transform
set_rotation
SFRotation

CLOCK2
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
Gun_2
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_2
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(2)
Rotate_Gun2
Transform
set_rotation
SFRotation

TouchSensor3
TouchSensor
isOver
SFBool
→
ROUTE
event to
(1)
CLOCK3
TimeSensor
set_enabled
SFBool
then
from
same
node
CLOCK3
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(2)
Gun_3
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_3
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(3)
Rotate_Gun3
Transform
set_rotation
SFRotation

CLOCK3
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
Gun_3
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_3
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(2)
Rotate_Gun3
Transform
set_rotation
SFRotation

TouchSensor4
TouchSensor
isOver
SFBool
→
ROUTE
event to
(1)
CLOCK4
TimeSensor
set_enabled
SFBool
then
from
same
node
CLOCK4
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(2)
Gun_4
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_4
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(3)
Rotate_Gun4
Transform
set_rotation
SFRotation

CLOCK4
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
Gun_4
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Gun_4
OrientationInterpolator
value_changed
SFRotation
→
ROUTE
event to
(2)
Rotate_Gun4
Transform
set_rotation
SFRotation


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/CarrierSaratogaUnitedStates/CarrierGunsIndex.html -->
<!-- SourceForge version control Version control at    
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/CarrierSaratogaUnitedStates/CarrierGuns.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. -->