X3D Model Documentation: Swing.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='titlecontent='Swing.x3d'/>
  6            <meta name='descriptioncontent='This file draw the swing in the playground with animation.'/>
  7            <meta name='creatorcontent='Kok Keng Ng'/>
  8            <meta name='createdcontent='20 September 2002'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='identifiercontent='https://savage.nps.edu/Savage/Buildings/PlayGround/Swing.x3d'/>
 11            <meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
 12            <meta name='licensecontent='../../license.html'/>
 13       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: LOOPGP, ROPEApp, ROPELeft, ROPELeft2, SWINGCBarSH, SWINGSEAT1GP, SWINGSEAT1Inter, SWINGSEAT1Sensor, SWINGSEAT1Timer, SWINGSEAT1TX, SWINGSEAT2GP, SWINGSEAT2Inter, SWINGSEAT2Sensor, SWINGSEAT2Timer, SWINGSEAT2TX, SWINGSensor, SWINGVBarGP, SWINRING

Index for Viewpoint node: Viewpoint_1
-->
 14       <Scene>
 15            <WorldInfo title='Swing.x3d'/>
 16            <Transform>
 17                 <Group>
 18                      <Transform center='0 1 0rotation='1 0 0 0.5translation='-2 0 0'>
 19 
                         <!-- Shape SWINGVBarGP is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                         <Shape DEF='SWINGVBarGP'>
 20                                <Cylinder radius='0.1'/>
 21                                <Appearance>
 22                                     <Material diffuseColor='0.1 0.7 0.3emissiveColor='0.1 0.7 0.3shininess='0.7specularColor='0.5 0.5 0.5'/>
 23                                     <ImageTexture   url=' "wood.jpg " "https://savage.nps.edu/Savage/Buildings/PlayGround/wood.jpg " '/>
 24                                </Appearance>
 25                           </Shape>
 26                      </Transform>
 27                      <Transform center='0 1 0rotation='1 0 0 -0.5translation='-2 0 0'>
 28                           <Shape USE='SWINGVBarGP'/>
 29                      </Transform>
 30                      <Transform center='0 1 0rotation='1 0 0 0.5translation='2 0 0'>
 31                           <Shape USE='SWINGVBarGP'/>
 32                      </Transform>
 33                      <Transform center='0 1 0rotation='1 0 0 -0.5translation='2 0 0'>
 34                           <Shape USE='SWINGVBarGP'/>
 35                      </Transform>
 36                      <Transform rotation='0 0 1 1.57translation='0 1 0'>
 37                           <Shape DEF='SWINGCBarSH'>
 38                                <Cylinder height='4.2radius='0.1'/>
 39                                <Appearance>
 40                                     <Material/>
 41                                </Appearance>
 42                           </Shape>
 43                      </Transform>
 44                      <Transform translation='-1 0.85 0'>
 45 
                         <!-- Group LOOPGP is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                         <Group DEF='LOOPGP'>
 46                                <Transform rotation='0 0 1 1.57scale='0.03 0.03 0.03'>
 47                                     <Shape>
 48                                          <Appearance>
 49                                               <Material diffuseColor='1 1 1'/>
 50                                          </Appearance>
 51                                          <Extrusion beginCap='falseconvex='falsecreaseAngle='1.57crossSection='1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00 -0.92 0.38 -0.71 0.71 -0.38 0.92 0.00 1.00 0.38 0.92 0.71 0.71 0.92 0.38 1.00 0.00endCap='falsespine='2.00 0.0 0.00 1.85 0.0 0.77 1.41 0.0 1.41 0.77 0.0 1.85 0.00 0.0 2.00 -0.77 0.0 1.85 -1.41 0.0 1.41 -1.85 0.0 0.77 -2.00 0.0 0.00 -1.85 0.0 -0.77 -1.41 0.0 -1.41 -0.77 0.0 -1.85 0.00 0.0 -2.00 0.77 0.0 -1.85 1.41 0.0 -1.41 1.85 0.0 -0.77 2.00 0.0 0.00'/>
 52                                     </Shape>
 53                                </Transform>
 54                           </Group>
 55                      </Transform>
 56                      <Transform translation='-0.5 0.85 0'>
 57                           <Group USE='LOOPGP'/>
 58                      </Transform>
 59                      <Transform translation='0.5 0.85 0'>
 60                           <Group USE='LOOPGP'/>
 61                      </Transform>
 62                      <Transform translation='1 0.85 0'>
 63                           <Group USE='LOOPGP'/>
 64                      </Transform>
 65 
                    <!-- ROUTE information for SWINGSensor node:  [from touchTime to SWINGSEAT1Timer.set_startTime ] [from touchTime to SWINGSEAT2Timer.set_startTime ] -->
                    <TouchSensor DEF='SWINGSensor'/>
 66                      <Transform/>
 67                 </Group>
 68                 <Transform>
 69                      <Group>
 70                           <Transform>
 71 
                              <!-- ROUTE information for SWINGSEAT1TX node:  [from SWINGSEAT1Inter.value_changed to set_rotation ] -->
                              <Transform DEF='SWINGSEAT1TXcenter='0 0.85 0rotation='1 0 0 0.0001'>
 72                                     <Group DEF='SWINGSEAT1GP'>
 73                                          <Group>
 74                                               <Transform scale='0.5 0.5 0.5translation='-1 0.8 0'>
 75 
                                                  <!-- Group ROPELeft is a DEF node that has 1 USE node: USE_1 -->
                                                  <Group DEF='ROPELeft'>
 76                                                         <Transform rotation='1 0 0 1.57scale='0.05 0.05 0.05'>
 77 
                                                            <!-- Shape SWINRING is a DEF node that has 1 USE node: USE_1 -->
                                                            <Shape DEF='SWINRING'>
 78 
                                                                 <!-- Appearance ROPEApp is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                                                                 <Appearance DEF='ROPEApp'>
 79                                                                        <Material diffuseColor='1 1 1'/>
 80                                                                   </Appearance>
 81                                                                   <Extrusion beginCap='falseconvex='falsecreaseAngle='1.57crossSection='1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00 -0.92 0.38 -0.71 0.71 -0.38 0.92 0.00 1.00 0.38 0.92 0.71 0.71 0.92 0.38 1.00 0.00endCap='falsespine='2.00 0.0 0.00 1.85 0.0 0.77 1.41 0.0 1.41 0.77 0.0 1.85 0.00 0.0 2.00 -0.77 0.0 1.85 -1.41 0.0 1.41 -1.85 0.0 0.77 -2.00 0.0 0.00 -1.85 0.0 -0.77 -1.41 0.0 -1.41 -0.77 0.0 -1.85 0.00 0.0 -2.00 0.77 0.0 -1.85 1.41 0.0 -1.41 1.85 0.0 -0.77 2.00 0.0 0.00'/>
 82                                                              </Shape>
 83                                                         </Transform>
 84                                                         <Transform scale='0.05 0.05 0.05translation='0 -1.475 0'>
 85                                                              <Shape>
 86                                                                   <Appearance USE='ROPEApp'/>
 87                                                                   <Cylinder height='55'/>
 88                                                              </Shape>
 89                                                         </Transform>
 90                                                    </Group>
 91                                                    <Transform translation='1 0 0'>
 92                                                         <Group USE='ROPELeft'/>
 93                                                    </Transform>
 94                                                    <Transform translation='0.5 -2.85 0'>
 95                                                         <Shape>
 96                                                              <Box size='1.15 0.08 0.3'/>
 97                                                              <Appearance>
 98                                                                   <Material diffuseColor='0.95 0.1 0.1emissiveColor='0.05 0.05 0.05'/>
 99                                                              </Appearance>
100                                                         </Shape>
101                                                    </Transform>
102 
                                                  <!-- ROUTE information for SWINGSEAT1Sensor node:  [from touchTime to SWINGSEAT1Timer.set_startTime ] -->
                                                  <TouchSensor DEF='SWINGSEAT1Sensor'/>
103 
                                                  <!-- ROUTE information for SWINGSEAT1Timer node:  [from SWINGSensor.touchTime to set_startTime ] [from SWINGSEAT1Sensor.touchTime to set_startTime ] [from fraction_changed to SWINGSEAT1Inter.set_fraction ] -->
                                                  <TimeSensor DEF='SWINGSEAT1TimercycleInterval='40'/>
104 
                                                  <!-- ROUTE information for SWINGSEAT1Inter node:  [from SWINGSEAT1Timer.fraction_changed to set_fraction ] [from value_changed to SWINGSEAT1TX.set_rotation ] -->
                                                  <OrientationInterpolator DEF='SWINGSEAT1Interkey='0 0.025 0.075 0.125 0.175 0.225 0.275 0.325 0.375 0.425 0.475 0.525 0.575 0.625 0.675 0.725 0.775 0.825 0.875 0.925 0.975 1.0keyValue='1 0 0 0 1 0 0 0.785 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.3 1 0 0 1.3 1 0 0 -1.35 1 0 0 1.35 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.25 1 0 0 0.785 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.3 1 0 0 1.3 1 0 0 -1.35 1 0 0 1.35 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.25 1 0 0 0'/>
105                                               </Transform>
106                                          </Group>
107                                     </Group>
108                                </Transform>
109                           </Transform>
110 
                         <!-- ROUTE information for SWINGSEAT2TX node:  [from SWINGSEAT2Inter.value_changed to set_rotation ] -->
                         <Transform DEF='SWINGSEAT2TXcenter='0 0.85 0'>
111                                <Group DEF='SWINGSEAT2GP'>
112                                     <Group>
113                                          <Transform scale='0.5 0.5 0.5translation='-1 0.8 0'>
114                                               <Transform translation='3 0 0'>
115 
                                                  <!-- Group ROPELeft2 is a DEF node that has 1 USE node: USE_1 -->
                                                  <Group DEF='ROPELeft2'>
116                                                         <Transform rotation='1 0 0 1.57scale='0.05 0.05 0.05'>
117                                                              <Shape USE='SWINRING'/>
118                                                         </Transform>
119                                                         <Transform scale='0.05 0.05 0.05translation='0 -1.37 0'>
120                                                              <Shape>
121                                                                   <Appearance USE='ROPEApp'/>
122                                                                   <Cylinder height='50'/>
123                                                              </Shape>
124                                                         </Transform>
125                                                    </Group>
126                                                    <Transform translation='1 0 0'>
127                                                         <Group USE='ROPELeft2'/>
128                                                    </Transform>
129                                                    <Transform translation='0.5 -2.6 0'>
130                                                         <Shape>
131                                                              <Box size='1.15 0.08 0.3'/>
132                                                              <Appearance>
133                                                                   <Material diffuseColor='0.1 0.1 0.95emissiveColor='0.05 0.05 0.1'/>
134                                                              </Appearance>
135                                                         </Shape>
136                                                    </Transform>
137 
                                                  <!-- ROUTE information for SWINGSEAT2Sensor node:  [from touchTime to SWINGSEAT2Timer.set_startTime ] -->
                                                  <TouchSensor DEF='SWINGSEAT2Sensor'/>
138 
                                                  <!-- ROUTE information for SWINGSEAT2Timer node:  [from SWINGSensor.touchTime to set_startTime ] [from SWINGSEAT2Sensor.touchTime to set_startTime ] [from fraction_changed to SWINGSEAT2Inter.set_fraction ] -->
                                                  <TimeSensor DEF='SWINGSEAT2TimercycleInterval='35'/>
139 
                                                  <!-- ROUTE information for SWINGSEAT2Inter node:  [from SWINGSEAT2Timer.fraction_changed to set_fraction ] [from value_changed to SWINGSEAT2TX.set_rotation ] -->
                                                  <OrientationInterpolator DEF='SWINGSEAT2Interkey='0 0.025 0.075 0.125 0.175 0.225 0.275 0.325 0.375 0.425 0.475 0.525 0.575 0.625 0.675 0.725 0.775 0.825 0.875 0.925 0.975 1.0keyValue='1 0 0 0 1 0 0 0.785 1 0 0 -1.25 1 0 0 1.3 1 0 0 -1.3 1 0 0 1.35 1 0 0 -1.35 1 0 0 1.25 1 0 0 -1.25 1 0 0 1.2 1 0 0 -1.2 1 0 0 0.785 1 0 0 -1.25 1 0 0 1.3 1 0 0 -1.3 1 0 0 1.35 1 0 0 -1.35 1 0 0 1.25 1 0 0 -1.25 1 0 0 1.2 1 0 0 -1.2 1 0 0 0'/>
140                                               </Transform>
141                                          </Transform>
142                                     </Group>
143                                </Group>
144                           </Transform>
145                      </Group>
146                 </Transform>
147                 <Transform/>
148                 < ROUTE  fromNode='SWINGSensor' fromField='touchTime' toNode='SWINGSEAT1Timer' toField='set_startTime'/>
149                 < ROUTE  fromNode='SWINGSensor' fromField='touchTime' toNode='SWINGSEAT2Timer' toField='set_startTime'/>
150                 < ROUTE  fromNode='SWINGSEAT1Sensor' fromField='touchTime' toNode='SWINGSEAT1Timer' toField='set_startTime'/>
151                 < ROUTE  fromNode='SWINGSEAT1Timer' fromField='fraction_changed' toNode='SWINGSEAT1Inter' toField='set_fraction'/>
152                 < ROUTE  fromNode='SWINGSEAT1Inter' fromField='value_changed' toNode='SWINGSEAT1TX' toField='set_rotation'/>
153                 < ROUTE  fromNode='SWINGSEAT2Sensor' fromField='touchTime' toNode='SWINGSEAT2Timer' toField='set_startTime'/>
154                 < ROUTE  fromNode='SWINGSEAT2Timer' fromField='fraction_changed' toNode='SWINGSEAT2Inter' toField='set_fraction'/>
155                 < ROUTE  fromNode='SWINGSEAT2Inter' fromField='value_changed' toNode='SWINGSEAT2TX' toField='set_rotation'/>
156            </Transform>
157            <Transform>
158                 <Group>
159                      <Transform/>
160                      <Transform/>
161                 </Group>
162            </Transform>
163            <Transform>
164                 <Group/>
165            </Transform>
166            <Viewpoint description='Swingposition='0 0.65 6.5'/>
167       </Scene>
168  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: LOOPGP, ROPEApp, ROPELeft, ROPELeft2, SWINGCBarSH, SWINGSEAT1GP, SWINGSEAT1Inter, SWINGSEAT1Sensor, SWINGSEAT1Timer, SWINGSEAT1TX, SWINGSEAT2GP, SWINGSEAT2Inter, SWINGSEAT2Sensor, SWINGSEAT2Timer, SWINGSEAT2TX, SWINGSensor, SWINGVBarGP, SWINRING

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Box, Cylinder, Extrusion, Group, head, ImageTexture, 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 8 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.

SWINGSEAT1Sensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
SWINGSEAT1Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
SWINGSEAT1Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
SWINGSEAT1Inter
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SWINGSEAT1Inter
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
SWINGSEAT1TX
Transform
set_rotation
SFRotation

SWINGSEAT2Sensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
SWINGSEAT2Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
SWINGSEAT2Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
SWINGSEAT2Inter
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SWINGSEAT2Inter
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
SWINGSEAT2TX
Transform
set_rotation
SFRotation

SWINGSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
SWINGSEAT1Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
SWINGSEAT1Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
SWINGSEAT1Inter
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SWINGSEAT1Inter
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
SWINGSEAT1TX
Transform
set_rotation
SFRotation
SWINGSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
SWINGSEAT2Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
SWINGSEAT2Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
SWINGSEAT2Inter
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SWINGSEAT2Inter
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
SWINGSEAT2TX
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://savage.nps.edu/Savage/Buildings/PlayGround/SwingIndex.html -->
<!-- Version control at
https://gitlab.nps.edu/Savage/Savage/Buildings/PlayGround/Swing.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. -->