X3D Model Documentation: SeaStateExtrusionPrototype.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='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='title' content='SeaStateExtrusionPrototype.x3d'/>
  6            <meta name='creator' content='Marcus V. da S. Simoes'/>
  7            <meta name='created' content='11 January 2001'/>
  8            <meta name='modified' content='20 October 2019'/>
  9            <meta name='description' content='Sea state rendering of ocean wave motion: prototype for reproducing sea state surface in other scenes.'/>
 10            <meta name='identifier' content='https://savage.nps.edu/Savage/Environment/SeaState/SeaStateExtrusionPrototype.x3d'/>
 11            <meta name='generator' content='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
 12            <meta name='license' content='../../license.html'/>
 13       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: Basic, BasicExtrusion, BasicWave, Box1, Box2, Box3, Box4, Box5, Box6, Box7, Box8, BoxSensor, CoordinateInterpolator, Ondulation, Option1, Option2, Option3, Option4, Option5, Option6, Option7, Option8, OrientationInterpolators, PitchandRollClock, PitchInterpolator, RollInterpolator, ScriptsForWaveMovement, SeaColor, SeaState_1, SeaState_2, SeaState_3, SeaState_4, SeaState_5, SeaState_6, SeaState_7, SeaState_8, SeaStateAndDirection, SeaStateChoice, SeaStateChoiceToValue, SeaStateNumber, Text1, Text2, Text3, Text4, Text5, Text6, Text7, Text8, TheSea, TimeSensors, TouchSensorSeaState1, TouchSensorSeaState2, TouchSensorSeaState3, TouchSensorSeaState4, TouchSensorSeaState5, TouchSensorSeaState6, TouchSensorSeaState7, TouchSensorSeaState8, WaveClock

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definition: SeaStateExtrusion
-->
 14       <Scene>
 15            <WorldInfo title='SeaStateExtrusionPrototype.x3d'/>
 16            <ProtoDeclare name='SeaStateExtrusion'>
 17                 <ProtoInterface>
 18                      <field name='shipPitch' type='SFRotation' accessType='outputOnly'/>
 19                      <field name='shipRoll' type='SFRotation' accessType='outputOnly'/>
 20                 </ProtoInterface>
 21                 <ProtoBody>
 22                      <Group>
 23                           <!-- AnimationClock -->
 24                           <!-- ================================================= -->
 25                           <Group DEF='TimeSensors'>
 26 
                              <!-- ROUTE information for WaveClock node:  [from fraction_changed to Ondulation.set_fraction ] -->
                              <TimeSensor DEF='WaveClock' cycleInterval='15' loop='true'/>
 27 
                              <!-- ROUTE information for PitchandRollClock node:  [from fraction_changed to PitchInterpolator.set_fraction ] [from fraction_changed to RollInterpolator.set_fraction ] -->
                              <TimeSensor DEF='PitchandRollClock' cycleInterval='10' loop='true'/>
 28                           </Group>
 29                           <!-- ================================================= -->
 30                           <!-- Interpolators -->
 31                           <!-- ================================================= -->
 32                           <!-- MovingTheShip -->
 33                           <Group DEF='OrientationInterpolators'>
 34 
                              <!-- ROUTE information for PitchInterpolator node:  [from PitchandRollClock.fraction_changed to set_fraction ] -->
                              <OrientationInterpolator DEF='PitchInterpolator' key='0.0 0.5 1.0' keyValue='0 0 1 -0.05 0 0 1 0.0 0 0 1 -0.05'>
 35                                     <IS>
 36                                          <connect nodeField='value_changed' protoField='shipPitch'/>
 37                                     </IS>
 38                                </OrientationInterpolator>
 39 
                              <!-- ROUTE information for RollInterpolator node:  [from PitchandRollClock.fraction_changed to set_fraction ] -->
                              <OrientationInterpolator DEF='RollInterpolator' key='0.0 0.5 1.0' keyValue='1 0 0 -0.05 1 0 0 0.0 1 0 0 -0.05'>
 40                                     <IS>
 41                                          <connect nodeField='value_changed' protoField='shipRoll'/>
 42                                     </IS>
 43                                </OrientationInterpolator>
 44                           </Group>
 45                           <!-- ================================================= -->
 46                           <!-- MovingTheSea -->
 47                           <Group DEF='CoordinateInterpolator'>
 48 
                              <!-- ROUTE information for Ondulation node:  [from WaveClock.fraction_changed to set_fraction ] [from value_changed to BasicExtrusion.set_spine ] -->
                              <CoordinateInterpolator DEF='Ondulation' key='0.0 0.25 0.50 0.75 1.0' keyValue='-4.100 0.0 0 -4.0 0.0 0 -3.529 0.674 0 -3.059 0.996 0 -2.588 0.798 0 -2.118 0.184 0 -1.647 -0.526 0 -1.176 -0.962 0 -0.706 -0.895 0 -0.235 -0.361 0 0.235 0.361 0 0.706 0.895 0 1.176 0.962 0 1.647 0.526 0 2.118 -0.184 0 2.588 -0.798 0 3.059 -0.996 0 3.529 -0.674 0 4.0 0.0 0 -4.100 -1.0 0 -4.0 -1.0 0 -3.529 -0.739 0 -3.059 -0.092 0 -2.588 0.603 0 -2.118 0.983 0 -1.647 0.850 0 -1.176 0.274 0 -0.706 -0.446 0 -0.235 -0.932 0 0.235 -0.932 0 0.706 -0.446 0 1.176 0.274 0 1.647 0.850 0 2.118 0.983 0 2.588 0.603 0 3.059 -0.092 0 3.529 -0.739 0 4.0 -1.0 0 -4.100 0.0 0 -4.0 0.0 0 -3.529 -0.674 0 -3.059 -0.996 0 -2.588 -0.798 0 -2.118 -0.184 0 -1.647 0.526 0 -1.176 0.962 0 -0.706 0.895 0 -0.235 0.361 0 0.235 -0.361 0 0.706 -0.895 0 1.176 -0.962 0 1.647 -0.526 0 2.118 0.184 0 2.588 0.798 0 3.059 0.996 0 3.529 0.674 0 4.0 0.0 0 -4.100 1.0 0 -4.0 1.0 0 -3.529 0.739 0 -3.059 0.092 0 -2.588 -0.603 0 -2.118 -0.983 0 -1.647 -0.850 0 -1.176 -0.274 0 -0.706 0.446 0 -0.235 0.932 0 0.235 0.932 0 0.706 0.446 0 1.176 -0.274 0 1.647 -0.850 0 2.118 -0.983 0 2.588 -0.603 0 3.059 0.092 0 3.529 0.739 0 4.0 1.0 0 -4.100 0.0 0 -4.0 0.0 0 -3.529 0.674 0 -3.059 0.996 0 -2.588 0.798 0 -2.118 0.184 0 -1.647 -0.526 0 -1.176 -0.962 0 -0.706 -0.895 0 -0.235 -0.361 0 0.235 0.361 0 0.706 0.895 0 1.176 0.962 0 1.647 0.526 0 2.118 -0.184 0 2.588 -0.798 0 3.059 -0.996 0 3.529 -0.674 0 4.0 0.0 0'/>
 49                           </Group>
 50                           <!-- ================================================= -->
 51                           <!-- SeaLevelChoiceGroup -->
 52 
                         <!-- ROUTE information for SeaStateNumber node:  [from SeaStateChoiceToValue.SeaStateValue to whichChoice ] -->
                         <Switch DEF='SeaStateNumber' whichChoice='0'>
 53 
                              <!-- Group SeaState_1 is a DEF node that has 7 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6, USE_7 -->
                              <Group DEF='SeaState_1'>
 54                                     <Transform>
 55                                          <Transform DEF='TheSea'>
 56                                               <!-- BasicWave -->
 57                                               <Transform DEF='Basic' scale='250 1 10'>
 58                                                    <Shape DEF='BasicWave'>
 59                                                         <Appearance DEF='SeaColor'>
 60                                                              <ImageTexture   url=' "../../Environment/SeaState/pool.jpg " "https://savage.nps.edu/Savage/Environment/SeaState/pool.jpg " '/>
 61                                                              <Material diffuseColor='0 0 0' transparency='0.3'/>
 62                                                         </Appearance>
 63 
                                                       <!-- ROUTE information for BasicExtrusion node:  [from Ondulation.value_changed to set_spine ] -->
                                                       <Extrusion DEF='BasicExtrusion' beginCap='false' convex='false' creaseAngle='0.01' crossSection='0 0 0 200 0 0' endCap='false' solid='false' spine='0.0 0.0 0.0000 1.0 0.0204 1.0000 2.0 0.0161 2.0000 3.0 -0.0218 3.0000 4.0 -0.0791 4.0000 5.0 -0.1237 5.0000 6.0 -0.1224 6.0000 7.0 -0.0598 7.0000 8.0 0.0503 8.0000 9.0 0.1661 9.0000 10.0 0.2348 10.0000 11.0 0.2163 11.0000 12.0 0.1041 12.0000 13.0 -0.0672 13.0000 14.0 -0.2326 14.0000 15.0 -0.3224 15.0000 16.0 -0.2920 16.0000 17.0 -0.1434 17.0000 18.0 0.0723 18.0000 19.0 0.2728 19.0000 20.0 0.3776 20.0000 21.0 0.3408 21.0000 22.0 0.1718 22.0000 23.0 -0.0670 23.0000 24.0 -0.2840 24.0000 25.0 -0.3951 25.0000 26.0 -0.3568 26.0000 27.0 -0.1846 27.0000 28.0 0.0541 28.0000 29.0 0.2668 29.0000 30.0 0.3734 30.0000 31.0 0.3373 31.0000 32.0 0.1782 32.0000 33.0 -0.0373 33.0000 34.0 -0.2246 34.0000 35.0 -0.3153 35.0000 36.0 -0.2831 36.0000 37.0 -0.1513 37.0000 38.0 0.0205 38.0000 39.0 0.1632 39.0000 40.0 0.2269 40.0000 41.0 0.1990 41.0000 42.0 0.1048 42.0000 43.0 -0.0074 43.0000 44.0 -0.0903 44.0000 45.0 -0.1177 45.0000 46.0 -0.0928 46.0000 47.0 -0.0423 47.0000 48.0 0.0006 48.0000 49.0 0.0142 49.0000 50.0 -0.0012 50.0000 51.0 -0.0251 51.0000 52.0 -0.0307 52.0000 53.0 -0.0015 53.0000 54.0 0.0571 54.0000 55.0 0.1175 55.0000 56.0 0.1429 56.0000 57.0 0.1069 57.0000 58.0 0.0098 58.0000 59.0 -0.1166 59.0000 60.0 -0.2197 60.0000 61.0 -0.2485 61.0000 62.0 -0.1780 62.0000 63.0 -0.0240 63.0000 64.0 0.1590 64.0000 65.0 0.2978 65.0000 66.0 0.3309 66.0000 67.0 0.2357 67.0000 68.0 0.0411 68.0000 69.0 -0.1814 69.0000 70.0 -0.3446 70.0000 71.0 -0.3815 71.0000 72.0 -0.2729 72.0000 73.0 -0.0574 73.0000 74.0 0.1834 74.0000 75.0 0.3563 75.0000 76.0 0.3946 76.0000 77.0 0.2841 77.0000 78.0 0.0689 78.0000 79.0 -0.1668 79.0000 80.0 -0.3327 80.0000 81.0 -0.3686 81.0000 82.0 -0.2664 82.0000 83.0 -0.0721 83.0000 84.0 0.1355 84.0000 85.0 0.2774 85.0000 86.0 0.3057 86.0000 87.0 0.2201 87.0000 88.0 0.0645 88.0000 89.0 -0.0946 89.0000 90.0 -0.1969 90.0000 91.0 -0.2121 91.0000 92.0 -0.1485 92.0000 93.0 -0.0450 93.0000 94.0 0.0499 94.0000 95.0 0.1004 95.0000 96.0 0.0972 96.0000 97.0 0.0580 97.0000 98.0 0.0142 98.0000 99.0 -0.0071 99.0000 100.0 0.0020 100.0'/>
 64                                                    </Shape>
 65                                               </Transform>
 66                                          </Transform>
 67                                     </Transform>
 68                                </Group>
 69                                <Group DEF='SeaState_2'>
 70                                     <Transform scale='1 5 1'>
 71                                          <Group USE='SeaState_1'/>
 72                                     </Transform>
 73                                </Group>
 74                                <Group DEF='SeaState_3'>
 75                                     <Transform scale='1 8 1'>
 76                                          <Group USE='SeaState_1'/>
 77                                     </Transform>
 78                                </Group>
 79                                <Group DEF='SeaState_4'>
 80                                     <Transform scale='1 12 1'>
 81                                          <Group USE='SeaState_1'/>
 82                                     </Transform>
 83                                </Group>
 84                                <Group DEF='SeaState_5'>
 85                                     <Transform scale='1 15 1'>
 86                                          <Group USE='SeaState_1'/>
 87                                     </Transform>
 88                                </Group>
 89                                <Group DEF='SeaState_6'>
 90                                     <Transform scale='1 20 1'>
 91                                          <Group USE='SeaState_1'/>
 92                                     </Transform>
 93                                </Group>
 94                                <Group DEF='SeaState_7'>
 95                                     <Transform scale='1 25 1'>
 96                                          <Group USE='SeaState_1'/>
 97                                     </Transform>
 98                                </Group>
 99                                <Group DEF='SeaState_8'>
100                                     <Transform scale='1 32 1'>
101                                          <Group USE='SeaState_1'/>
102                                     </Transform>
103                                </Group>
104                           </Switch>
105                           <!-- ================================================= -->
106                           <!-- Sea State Control Panel -->
107                           <Group DEF='SeaStateAndDirection'>
108                                <Transform translation='0 100 4000'>
109                                     <Viewpoint description='Sea State Control Panel' position='-2 0 6'/>
110                                     <Billboard>
111                                          <Group DEF='SeaStateChoice'>
112                                               <Transform DEF='Option1' translation='0 -2.0 0'>
113                                                    <Transform DEF='Box1' translation='0 .1 0'>
114                                                         <Shape DEF='BoxSensor'>
115                                                              <Box size='1 .4 .1'/>
116                                                              <Appearance>
117                                                                   <Material diffuseColor='0 0 1' specularColor='0 0 1' transparency='.9'/>
118                                                              </Appearance>
119                                                         </Shape>
120 
                                                       <!-- ROUTE information for TouchSensorSeaState1 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice1 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState1' description='click to select sea state'/>
121                                                         <Transform DEF='Text1' scale='.25 .25 .25' translation='0 0 .1'>
122                                                              <Shape>
123                                                                   <Text string='"SST 1"'>
124                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
125                                                                   </Text>
126                                                                   <Appearance>
127                                                                        <Material emissiveColor='.8 .8 .8'/>
128                                                                   </Appearance>
129                                                              </Shape>
130                                                         </Transform>
131                                                    </Transform>
132                                               </Transform>
133                                               <Transform DEF='Option2' translation='0 -1.5 0'>
134                                                    <Transform DEF='Box2' translation='0 .1 0'>
135                                                         <Shape>
136                                                              <Box size='1 .4 .1'/>
137                                                              <Appearance>
138                                                                   <Material diffuseColor='0 0 .8' transparency='.7'/>
139                                                              </Appearance>
140                                                         </Shape>
141 
                                                       <!-- ROUTE information for TouchSensorSeaState2 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice2 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState2' description='click to select sea state'/>
142                                                         <Transform DEF='Text2' scale='.25 .25 .25' translation='0 0 .1'>
143                                                              <Shape>
144                                                                   <Text string='"SST 2"'>
145                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
146                                                                   </Text>
147                                                                   <Appearance>
148                                                                        <Material emissiveColor='.8 .8 .8'/>
149                                                                   </Appearance>
150                                                              </Shape>
151                                                         </Transform>
152                                                    </Transform>
153                                               </Transform>
154                                               <Transform DEF='Option3' translation='0 -1.0 0'>
155                                                    <Transform DEF='Box3' translation='0 .1 0'>
156                                                         <Shape>
157                                                              <Box size='1 .4 .1'/>
158                                                              <Appearance>
159                                                                   <Material diffuseColor='0 0 .8' transparency='.7'/>
160                                                              </Appearance>
161                                                         </Shape>
162 
                                                       <!-- ROUTE information for TouchSensorSeaState3 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice3 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState3' description='click to select sea state'/>
163                                                         <Transform DEF='Text3' scale='.25 .25 .25' translation='0 0 .1'>
164                                                              <Shape>
165                                                                   <Text string='"SST 3"'>
166                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
167                                                                   </Text>
168                                                                   <Appearance>
169                                                                        <Material emissiveColor='.8 .8 .8'/>
170                                                                   </Appearance>
171                                                              </Shape>
172                                                         </Transform>
173                                                    </Transform>
174                                               </Transform>
175                                               <Transform DEF='Option4' translation='0 -0.5 0'>
176                                                    <Transform DEF='Box4' translation='0 .1 0'>
177                                                         <Shape>
178                                                              <Box size='1 .4 .1'/>
179                                                              <Appearance>
180                                                                   <Material diffuseColor='0 0.8 0' transparency='0.8'/>
181                                                              </Appearance>
182                                                         </Shape>
183 
                                                       <!-- ROUTE information for TouchSensorSeaState4 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice4 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState4' description='click to select sea state'/>
184                                                         <Transform DEF='Text4' scale='.25 .25 .25' translation='0 0 .1'>
185                                                              <Shape>
186                                                                   <Text string='"SST 4"'>
187                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
188                                                                   </Text>
189                                                                   <Appearance>
190                                                                        <Material emissiveColor='.8 .8 .8'/>
191                                                                   </Appearance>
192                                                              </Shape>
193                                                         </Transform>
194                                                    </Transform>
195                                               </Transform>
196                                               <Transform DEF='Option5'>
197                                                    <Transform DEF='Box5' translation='0 .1 0'>
198                                                         <Shape>
199                                                              <Box size='1 .4 .1'/>
200                                                              <Appearance>
201                                                                   <Material diffuseColor='0 .5 0' transparency='.4'/>
202                                                              </Appearance>
203                                                         </Shape>
204                                                         <Transform DEF='Text5' scale='.25 .25 .25' translation='0 0 .1'>
205                                                              <Shape>
206                                                                   <Text string='"SST 5"'>
207                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
208                                                                   </Text>
209                                                                   <Appearance>
210                                                                        <Material emissiveColor='.8 .8 .8'/>
211                                                                   </Appearance>
212                                                              </Shape>
213                                                         </Transform>
214 
                                                       <!-- ROUTE information for TouchSensorSeaState5 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice5 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState5' description='click to select sea state'/>
215                                                    </Transform>
216                                               </Transform>
217                                               <Transform DEF='Option6' translation='0 .5 0'>
218                                                    <Transform DEF='Box6' translation='0 .1 0'>
219                                                         <Transform DEF='Text6' scale='.25 .25 .25' translation='0 0 .1'>
220                                                              <Shape>
221                                                                   <Text string='"SST 6"'>
222                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
223                                                                   </Text>
224                                                                   <Appearance>
225                                                                        <Material emissiveColor='.8 .8 .8'/>
226                                                                   </Appearance>
227                                                              </Shape>
228                                                         </Transform>
229                                                         <Shape>
230                                                              <Box size='1 .4 .1'/>
231                                                              <Appearance>
232                                                                   <Material diffuseColor='.2 0 0' transparency='0.8'/>
233                                                              </Appearance>
234                                                         </Shape>
235 
                                                       <!-- ROUTE information for TouchSensorSeaState6 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice6 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState6' description='click to select sea state'/>
236                                                    </Transform>
237                                               </Transform>
238                                               <Transform DEF='Option7' translation='0 1.0 0'>
239                                                    <Transform DEF='Box7' translation='0 .1 0'>
240                                                         <Transform DEF='Text7' scale='.25 .25 .25' translation='0 0 .1'>
241                                                              <Shape>
242                                                                   <Text string='"SST 7"'>
243                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
244                                                                   </Text>
245                                                                   <Appearance>
246                                                                        <Material emissiveColor='.8 .8 .8'/>
247                                                                   </Appearance>
248                                                              </Shape>
249                                                         </Transform>
250                                                         <Shape>
251                                                              <Box size='1 .4 .1'/>
252                                                              <Appearance>
253                                                                   <Material diffuseColor='.5 0 0' transparency='0.7'/>
254                                                              </Appearance>
255                                                         </Shape>
256 
                                                       <!-- ROUTE information for TouchSensorSeaState7 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice7 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState7' description='click to select sea state'/>
257                                                    </Transform>
258                                               </Transform>
259                                               <Transform DEF='Option8' translation='0 1.5 0'>
260                                                    <Transform DEF='Box8' translation='0 .1 0'>
261                                                         <Transform DEF='Text8' scale='.25 .25 .25' translation='0 0 .1'>
262                                                              <Shape>
263                                                                   <Text string='"SST 8"'>
264                                                                        <FontStyle justify='"MIDDLE" "MIDDLE"'/>
265                                                                   </Text>
266                                                                   <Appearance>
267                                                                        <Material emissiveColor='.8 .8 .8'/>
268                                                                   </Appearance>
269                                                              </Shape>
270                                                         </Transform>
271                                                         <Shape>
272                                                              <Box size='1 .4 .1'/>
273                                                              <Appearance>
274                                                                   <Material diffuseColor='1 0 0' transparency='0.5'/>
275                                                              </Appearance>
276                                                         </Shape>
277 
                                                       <!-- ROUTE information for TouchSensorSeaState8 node:  [from isActive to SeaStateChoiceToValue.SeaStateChoice8 ] -->
                                                       <TouchSensor DEF='TouchSensorSeaState8' description='click to select sea state'/>
278                                                    </Transform>
279                                               </Transform>
280                                               <Transform translation='0 0 -3'>
281                                                    <Shape>
282                                                         <Box size='2 6.5 0.2'/>
283                                                         <Appearance>
284                                                              <Material diffuseColor='.3 .3 .3'/>
285                                                              <ImageTexture/>
286                                                         </Appearance>
287                                                    </Shape>
288                                               </Transform>
289                                          </Group>
290                                     </Billboard>
291                                </Transform>
292                           </Group>
293                           <Group DEF='ScriptsForWaveMovement'>
294 
295                                     <field name='SeaStateChoice0' type='SFBool' accessType='inputOnly'/>
296                                     <field name='SeaStateChoice1' type='SFBool' accessType='inputOnly'/>
297                                     <field name='SeaStateChoice2' type='SFBool' accessType='inputOnly'/>
298                                     <field name='SeaStateChoice3' type='SFBool' accessType='inputOnly'/>
299                                     <field name='SeaStateChoice4' type='SFBool' accessType='inputOnly'/>
300                                     <field name='SeaStateChoice5' type='SFBool' accessType='inputOnly'/>
301                                     <field name='SeaStateChoice6' type='SFBool' accessType='inputOnly'/>
302                                     <field name='SeaStateChoice7' type='SFBool' accessType='inputOnly'/>
303                                     <field name='SeaStateChoice8' type='SFBool' accessType='inputOnly'/>
304                                     <field name='SeaStateValue' type='SFInt32' accessType='outputOnly'/>
  <![CDATA[
              
ecmascript:

// Return the numeric value of SST button clicked

function initialize ()
{
	SeaStateValue = 2;


}
function SeaStateChoice1 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 0;
}
function SeaStateChoice2 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 1;
}
function SeaStateChoice3 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 2;
}
function SeaStateChoice4 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 3;
}
function SeaStateChoice5 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 4;
}
function SeaStateChoice6 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 5;
}
function SeaStateChoice7 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 6;
}
function SeaStateChoice8 (inputBoolean, timestamp)
{
	if (inputBoolean) SeaStateValue = 7;
}

            
]]>
306                                </Script>
307                           </Group>
308                      </Group>
309                      <!-- ================================================= -->
310                      <!-- RoutesToChooseSST -->
311                      < ROUTE  fromNode='TouchSensorSeaState1' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice1'/>
312                      < ROUTE  fromNode='TouchSensorSeaState2' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice2'/>
313                      < ROUTE  fromNode='TouchSensorSeaState3' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice3'/>
314                      < ROUTE  fromNode='TouchSensorSeaState4' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice4'/>
315                      < ROUTE  fromNode='TouchSensorSeaState5' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice5'/>
316                      < ROUTE  fromNode='TouchSensorSeaState6' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice6'/>
317                      < ROUTE  fromNode='TouchSensorSeaState7' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice7'/>
318                      < ROUTE  fromNode='TouchSensorSeaState8' fromField='isActive' toNode='SeaStateChoiceToValue' toField='SeaStateChoice8'/>
319                      < ROUTE  fromNode='SeaStateChoiceToValue' fromField='SeaStateValue' toNode='SeaStateNumber' toField='whichChoice'/>
320                      <!-- ================================================= -->
321                      <!-- RoutesToMoveTheSea -->
322                      < ROUTE  fromNode='WaveClock' fromField='fraction_changed' toNode='Ondulation' toField='set_fraction'/>
323                      < ROUTE  fromNode='PitchandRollClock' fromField='fraction_changed' toNode='PitchInterpolator' toField='set_fraction'/>
324                      < ROUTE  fromNode='PitchandRollClock' fromField='fraction_changed' toNode='RollInterpolator' toField='set_fraction'/>
325                      < ROUTE  fromNode='Ondulation' fromField='value_changed' toNode='BasicExtrusion' toField='set_spine'/>
326                 </ProtoBody>
327            </ProtoDeclare>
328            <!-- ================================================= -->
329            <NavigationInfo speed='100'/>
330            <Background groundAngle='1.309 1.570796' groundColor='0.0 0.2 0.7 0.0 0.5 1.0 0.6 0.6 0.6' skyAngle='1.309 1.571' skyColor='0.0 0.2 0.7 0.0 0.5 1.0 0.6 0.6 0.6'/>
331            <Anchor description='Sea State Extrusion Example' parameter='"target=_blank"'   url=' "SeaStateExtrusionExample.x3d" "https://savage.nps.edu/Savage/Environment/SeaState/SeaStateExtrusionExample.x3d" "SeaStateExtrusionExample.wrl" "https://savage.nps.edu/Savage/Environment/SeaState/SeaStateExtrusionExample.wrl" '>
332                 <Shape>
333                      <Text string='"SeaStateExtrusionPrototype" "is a prototype definition file" "" "To see an example scene" "click on this text and view" "SeaStateExtrusionExample"'>
334                           <FontStyle justify='"MIDDLE" "MIDDLE"'/>
335                      </Text>
336                      <Appearance>
337                           <Material diffuseColor='1 1 0'/>
338                      </Appearance>
339                 </Shape>
340            </Anchor>
341       </Scene>
342  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: Basic, BasicExtrusion, BasicWave, Box1, Box2, Box3, Box4, Box5, Box6, Box7, Box8, BoxSensor, CoordinateInterpolator, Ondulation, Option1, Option2, Option3, Option4, Option5, Option6, Option7, Option8, OrientationInterpolators, PitchandRollClock, PitchInterpolator, RollInterpolator, ScriptsForWaveMovement, SeaColor, SeaState_1, SeaState_2, SeaState_3, SeaState_4, SeaState_5, SeaState_6, SeaState_7, SeaState_8, SeaStateAndDirection, SeaStateChoice, SeaStateChoiceToValue, SeaStateNumber, Text1, Text2, Text3, Text4, Text5, Text6, Text7, Text8, TheSea, TimeSensors, TouchSensorSeaState1, TouchSensorSeaState2, TouchSensorSeaState3, TouchSensorSeaState4, TouchSensorSeaState5, TouchSensorSeaState6, TouchSensorSeaState7, TouchSensorSeaState8, WaveClock

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definition: SeaStateExtrusion
-->
X3D Tooltips element index: Anchor, Appearance, Background, Billboard, Box, connect, CoordinateInterpolator, Extrusion, field, FontStyle, Group, head, ImageTexture, IS, Material, meta, NavigationInfo, OrientationInterpolator, ProtoBody, ProtoDeclare, ProtoInterface, ROUTE, Scene, Script, Shape, Switch, Text, 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 13 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.

TouchSensorSeaState1
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice1
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

TouchSensorSeaState2
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice2
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

TouchSensorSeaState3
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice3
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

TouchSensorSeaState4
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice4
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

TouchSensorSeaState5
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice5
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

TouchSensorSeaState6
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice6
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

TouchSensorSeaState7
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice7
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

TouchSensorSeaState8
TouchSensor
isActive
SFBool
→
ROUTE
event to
(1)
SeaStateChoiceToValue
Script
SeaStateChoice8
SFBool
then
 
 
 
SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(2)
SeaStateNumber
Switch
whichChoice
SFInt32

PitchandRollClock
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
PitchInterpolator
OrientationInterpolator
set_fraction
SFFloat
PitchandRollClock
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
RollInterpolator
OrientationInterpolator
set_fraction
SFFloat

WaveClock
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
Ondulation
CoordinateInterpolator
set_fraction
SFFloat
then
 
 
 
Ondulation
CoordinateInterpolator
value_changed
MFVec3f
→
ROUTE
event to
(2)
BasicExtrusion
Extrusion
set_spine
MFVec3f

      SeaStateChoiceToValue
Script
SeaStateValue
SFInt32
→
ROUTE
event to
(1)
SeaStateNumber
Switch
whichChoice
SFInt32

line 331
Anchor
description='Sea State Extrusion Example' 
User-interaction hint for this node. 

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://savage.nps.edu/Savage/Environment/SeaState/SeaStateExtrusionPrototypeIndex.html -->
<!-- Version control at
https://gitlab.nps.edu/Savage/Savage/Environment/SeaState/SeaStateExtrusionPrototype.x3d -->

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

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