X3D Model Documentation: Fence.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=' Fence.x3d '/>
  6            <meta name='descriptioncontent='This file draws the fence and door with lawn.'/>
  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://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Fence.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: DoorSound, FENCE1GP, FENCEApp, FENCEBACKTX, FENCEbar, FENCEDoor1, FENCEDoorbarShape, FENCEDOORLEFTLEGTX, FENCEDoorlegShape, FENCEDOORRIGHTLEGTX, FENCEDoorTimer1, FENCEDoorTimer2, FENCEFRONTTX, FENCEGP5, FENCELeftDoorGP, FENCELeftDoorInterpolator, FENCELeftDoorSensor, FENCELeftDoorTX, FENCELEFTTX, FENCEleg, FENCERightDoorGP, FENCERightDoorInterpolator, FENCERightDoorSensor, FENCERightDoorTX, FENCERIGHTTX, FLOOR, FLOORTX, LAWN, wood

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
 14       <Scene>
 15            <WorldInfo title='Fence.x3d'/>
 16            <Transform DEF='FENCEBACKTXtranslation='0 0 -8.75'>
 17 
               <!-- Group FENCEGP5 is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
               <Group DEF='FENCEGP5'>
 18 
                    <!-- Group FENCE1GP is a DEF node that has 12 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6, USE_7, USE_8, USE_9, USE_10, USE_11, USE_12 -->
                    <Group DEF='FENCE1GP'>
 19                           <Transform translation='0 -0.5 0'>
 20 
                              <!-- Shape FENCEbar is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                              <Shape DEF='FENCEbar'>
 21                                     <Box size='2.5 0.1 0.1'/>
 22 
                                   <!-- Appearance FENCEApp is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                                   <Appearance DEF='FENCEApp'>
 23                                          <Material diffuseColor='0.8 0.5 0'/>
 24 
                                        <!-- ImageTexture wood is a DEF node that has 1 USE node: USE_1 -->
                                        <ImageTexture DEF='wood'   url=' "wood.jpg " "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/wood.jpg " '/>
 25                                     </Appearance>
 26                                </Shape>
 27                           </Transform>
 28                           <Transform translation='0 -0.25 0'>
 29                                <Shape USE='FENCEbar'/>
 30                           </Transform>
 31                           <Transform>
 32                                <Shape USE='FENCEbar'/>
 33                           </Transform>
 34                           <Transform translation='0 0.25 0'>
 35                                <Shape USE='FENCEbar'/>
 36                           </Transform>
 37                           <Transform rotation='0 0 1 1.57translation='1.25 -.20 0'>
 38 
                              <!-- Shape FENCEleg is a DEF node that has 1 USE node: USE_1 -->
                              <Shape DEF='FENCEleg'>
 39                                     <Box size='1.3 0.15 0.15'/>
 40                                     <Appearance>
 41                                          <Material diffuseColor='0.8 0.5 0'/>
 42                                          <ImageTexture USE='wood'/>
 43                                     </Appearance>
 44                                </Shape>
 45                           </Transform>
 46                           <Transform rotation='0 0 1 1.57translation='-1.25 -0.20 0'>
 47                                <Shape USE='FENCEleg'/>
 48                           </Transform>
 49                      </Group>
 50                      <Transform translation='2.5 0 0'>
 51                           <Group USE='FENCE1GP'/>
 52                      </Transform>
 53                      <Transform translation='-2.5 0 0'>
 54                           <Group USE='FENCE1GP'/>
 55                      </Transform>
 56                      <Transform translation='5 0 0'>
 57                           <Group USE='FENCE1GP'/>
 58                      </Transform>
 59                      <Transform translation='7.5 0 0'>
 60                           <Group USE='FENCE1GP'/>
 61                      </Transform>
 62                      <Transform translation='-5 0 0'>
 63                           <Group USE='FENCE1GP'/>
 64                      </Transform>
 65                      <Transform translation='-7.5 0 0'>
 66                           <Group USE='FENCE1GP'/>
 67                      </Transform>
 68                 </Group>
 69            </Transform>
 70            <Transform DEF='FENCERIGHTTXrotation='0 1 0 1.57translation='8.75 0 0'>
 71                 <Group USE='FENCEGP5'/>
 72            </Transform>
 73            <Transform DEF='FENCELEFTTXrotation='0 1 0 1.57translation='-8.75 0 0'>
 74                 <Group USE='FENCEGP5'/>
 75            </Transform>
 76            <Transform DEF='FENCEFRONTTXtranslation='0 0 8.75'>
 77                 <Group>
 78                      <Transform translation='-2.5 0 0'>
 79                           <Group USE='FENCE1GP'/>
 80                      </Transform>
 81                      <Transform translation='2.5 0 0'>
 82                           <Group USE='FENCE1GP'/>
 83                      </Transform>
 84                      <Transform translation='5 0 0'>
 85                           <Group USE='FENCE1GP'/>
 86                      </Transform>
 87                      <Transform translation='-5 0 0'>
 88                           <Group USE='FENCE1GP'/>
 89                      </Transform>
 90                      <Transform translation='-7.5 0 0'>
 91                           <Group USE='FENCE1GP'/>
 92                      </Transform>
 93                      <Transform translation='7.5 0 0'>
 94                           <Group USE='FENCE1GP'/>
 95                      </Transform>
 96                 </Group>
 97 
               <!-- ROUTE information for FENCERightDoorTX node:  [from FENCERightDoorInterpolator.value_changed to set_rotation ] -->
               <Transform DEF='FENCERightDoorTXcenter='0.6 0 0.05translation='0.575 0 0.025'>
 98                      <Group DEF='FENCERightDoorGP'>
 99 
                         <!-- Group FENCEDoor1 is a DEF node that has 1 USE node: USE_1 -->
                         <Group DEF='FENCEDoor1'>
100                                <Transform translation='0. -0.5 0'>
101 
                                   <!-- Shape FENCEDoorbarShape is a DEF node that has 5 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5 -->
                                   <Shape DEF='FENCEDoorbarShape'>
102                                          <Box size='1 0.075 0.075'/>
103                                          <Appearance USE='FENCEApp'/>
104                                     </Shape>
105                                </Transform>
106                                <Transform DEF='FENCEDOORRIGHTLEGTXrotation='0 0 1 1.57translation='0.55 -.20 0'>
107 
                                   <!-- Shape FENCEDoorlegShape is a DEF node that has 1 USE node: USE_1 -->
                                   <Shape DEF='FENCEDoorlegShape'>
108                                          <Box size='1.2 0.1 0.1'/>
109                                          <Appearance USE='FENCEApp'/>
110                                     </Shape>
111                                </Transform>
112                                <Transform translation='0 -0.2 0'>
113                                     <Shape USE='FENCEDoorbarShape'/>
114                                </Transform>
115                                <Transform translation='0 0.1 0'>
116                                     <Shape USE='FENCEDoorbarShape'/>
117                                </Transform>
118                                <Transform translation='0 0.35 0'>
119                                     <Shape USE='FENCEDoorbarShape'/>
120                                </Transform>
121                                <Transform DEF='FENCEDOORLEFTLEGTXrotation='0 0 1 1.57translation='-0.5 -.20 0'>
122                                     <Shape USE='FENCEDoorlegShape'/>
123                                </Transform>
124                           </Group>
125                           <Group>
126                                <Transform rotation='0 0 1 0.785scale='1.2 1 1translation='0.05 -0.1 -0.05'>
127                                     <Shape USE='FENCEDoorbarShape'/>
128                                </Transform>
129                           </Group>
130 
                         <!-- ROUTE information for FENCERightDoorSensor node:  [from touchTime to FENCEDoorTimer2.set_startTime ] [from touchTime to DoorSound.set_startTime ] -->
                         <TouchSensor DEF='FENCERightDoorSensor'/>
131                      </Group>
132                 </Transform>
133                 <Transform>
134                      <Group DEF='FENCELeftDoorGP'>
135 
                         <!-- ROUTE information for FENCELeftDoorTX node:  [from FENCELeftDoorInterpolator.value_changed to set_rotation ] -->
                         <Transform DEF='FENCELeftDoorTXcenter='-0.55 0 0.05translation='-0.625 0 0.025'>
136                                <Group USE='FENCEDoor1'/>
137                                <Group>
138                                     <Transform rotation='0 0 1 -0.785scale='1.2 1 1translation='-0.05 -0.1 -0.05'>
139                                          <Shape USE='FENCEDoorbarShape'/>
140                                     </Transform>
141                                </Group>
142 
                              <!-- ROUTE information for FENCELeftDoorSensor node:  [from touchTime to FENCEDoorTimer1.set_startTime ] [from touchTime to DoorSound.set_startTime ] -->
                              <TouchSensor DEF='FENCELeftDoorSensor'/>
143                           </Transform>
144                      </Group>
145                 </Transform>
146 
               <!-- ROUTE information for FENCEDoorTimer1 node:  [from FENCELeftDoorSensor.touchTime to set_startTime ] [from fraction_changed to FENCELeftDoorInterpolator.set_fraction ] -->
               <TimeSensor DEF='FENCEDoorTimer1cycleInterval='12'/>
147 
               <!-- ROUTE information for FENCEDoorTimer2 node:  [from FENCERightDoorSensor.touchTime to set_startTime ] [from fraction_changed to FENCERightDoorInterpolator.set_fraction ] -->
               <TimeSensor DEF='FENCEDoorTimer2cycleInterval='15'/>
148 
               <!-- ROUTE information for FENCELeftDoorInterpolator node:  [from FENCEDoorTimer1.fraction_changed to set_fraction ] [from value_changed to FENCELeftDoorTX.set_rotation ] -->
               <OrientationInterpolator DEF='FENCELeftDoorInterpolatorkey='0 0.25 0.75 1keyValue='0 1 0 0 0 1 0 -1.57 0 1 0 -1.57 0 1 0 0'/>
149 
               <!-- ROUTE information for FENCERightDoorInterpolator node:  [from FENCEDoorTimer2.fraction_changed to set_fraction ] [from value_changed to FENCERightDoorTX.set_rotation ] -->
               <OrientationInterpolator DEF='FENCERightDoorInterpolatorkey='0 0.25 0.75 1keyValue='0 1 0 0.0 0 1 0 1.57 0 1 0 1.57 0 1 0 -0'/>
150            </Transform>
151            <Transform>
152                 <Transform>
153                      <Transform DEF='LAWNtranslation='0 -0.8 0'>
154                           <Transform scale='4 1 4translation='-14 0.01 -14'>
155                                <Shape>
156                                     <Appearance>
157                                          <ImageTexture   url=' "grass1.jpg " "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/grass1.jpg " '/>
158                                          <TextureTransform scale='120 120'/>
159                                     </Appearance>
160                                     <ElevationGrid creaseAngle='0.785xDimension='8xSpacing='1.zDimension='8zSpacing='1.height='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'/>
161                                </Shape>
162                           </Transform>
163                      </Transform>
164                      <Transform DEF='FLOORTXtranslation='0 -0.876 0'>
165                           <Shape DEF='FLOOR'>
166                                <Box size='28 0.15 28'/>
167                                <Appearance>
168                                     <Material ambientIntensity='0.245763diffuseColor='0.336312 0.24807 0.201129shininess='0.061224specularColor='0.108805 0.098067 0.096807'/>
169                                </Appearance>
170                           </Shape>
171                      </Transform>
172                 </Transform>
173            </Transform>
174            <Transform>
175                 <Sound direction='1 1 1maxBack='100maxFront='100minBack='10minFront='10'>
176 
                    <!-- ROUTE information for DoorSound node:  [from FENCELeftDoorSensor.touchTime to set_startTime ] [from FENCERightDoorSensor.touchTime to set_startTime ] -->
                    <AudioClip DEF='DoorSounddescription='Door sound'   url=' "Door.wav" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Door.wav" '/>
177                 </Sound>
178            </Transform>
179            <Transform/>
180            <Viewpoint description='Frontorientation='1 0 0 -0.3position='0 2 20'/>
181            <Viewpoint description='MainDoororientation='1 0 0 -1.57position='0 3 8.75'/>
182            < ROUTE  fromNode='FENCELeftDoorSensor' fromField='touchTime' toNode='FENCEDoorTimer1' toField='set_startTime'/>
183            < ROUTE  fromNode='FENCEDoorTimer1' fromField='fraction_changed' toNode='FENCELeftDoorInterpolator' toField='set_fraction'/>
184            < ROUTE  fromNode='FENCELeftDoorInterpolator' fromField='value_changed' toNode='FENCELeftDoorTX' toField='set_rotation'/>
185            < ROUTE  fromNode='FENCERightDoorSensor' fromField='touchTime' toNode='FENCEDoorTimer2' toField='set_startTime'/>
186            < ROUTE  fromNode='FENCEDoorTimer2' fromField='fraction_changed' toNode='FENCERightDoorInterpolator' toField='set_fraction'/>
187            < ROUTE  fromNode='FENCERightDoorInterpolator' fromField='value_changed' toNode='FENCERightDoorTX' toField='set_rotation'/>
188            < ROUTE  fromNode='FENCELeftDoorSensor' fromField='touchTime' toNode='DoorSound' toField='set_startTime'/>
189            < ROUTE  fromNode='FENCERightDoorSensor' fromField='touchTime' toNode='DoorSound' toField='set_startTime'/>
190       </Scene>
191  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: DoorSound, FENCE1GP, FENCEApp, FENCEBACKTX, FENCEbar, FENCEDoor1, FENCEDoorbarShape, FENCEDOORLEFTLEGTX, FENCEDoorlegShape, FENCEDOORRIGHTLEGTX, FENCEDoorTimer1, FENCEDoorTimer2, FENCEFRONTTX, FENCEGP5, FENCELeftDoorGP, FENCELeftDoorInterpolator, FENCELeftDoorSensor, FENCELeftDoorTX, FENCELEFTTX, FENCEleg, FENCERightDoorGP, FENCERightDoorInterpolator, FENCERightDoorSensor, FENCERightDoorTX, FENCERIGHTTX, FLOOR, FLOORTX, LAWN, wood

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
X3D Tooltips element index: Appearance, AudioClip, Box, ElevationGrid, Group, head, ImageTexture, Material, meta, OrientationInterpolator, ROUTE, Scene, Shape, Sound, TextureTransform, 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.

FENCELeftDoorSensor
TouchSensor
touchTime
SFTime

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

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

ROUTE
event to
(3)
FENCELeftDoorTX
Transform
set_rotation
SFRotation
FENCELeftDoorSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
DoorSound
AudioClip
set_startTime
SFTime

FENCERightDoorSensor
TouchSensor
touchTime
SFTime

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

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

ROUTE
event to
(3)
FENCERightDoorTX
Transform
set_rotation
SFRotation
FENCERightDoorSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
DoorSound
AudioClip
set_startTime
SFTime


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/Buildings/PlayGround/FenceIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Fence.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. -->