X3D Model Documentation: ExplodingBuildingExample.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=' ExplodingBuildingExample.x3d '/>
  6            <meta name='descriptioncontent='A simple exploding structure, experimenting with the "Hello World" of explosions - click on the silver chimney to trigger the explosion. This prototype demonstrates a simplified and scalable approach for modeling explosions. Each chunk of geometry inside an Exploder prototype is given initial/final position/orientation. Intermediate heights for each polygon are at the same height as the distance traveled over ground.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='16 September 2002'/>
  9            <meta name='modifiedcontent='28 November 2019'/>
 10            <meta name='referencecontent='Exploding building schematic layout diagram:'/>
 11            <meta name='Imagecontent=' ExplodingBuildingLayout.pdf '/>
 12            <meta name='Imagecontent=' ExplodingBuildingSnapshots.pdf '/>
 13            <meta name='Imagecontent='ExplodingBuildingMontage.png'/>
 14            <meta name='MovingImagecontent='ExplodingBuildingExampleVideo.mov'/>
 15            <meta name='referencecontent='ExplodingBuildingLargeExample.wrl'/>
 16            <meta name='referencecontent='Rotation calculations performed using the Dizzy utility from Vapour Technologies by James Smith.'/>
 17            <meta name='referencecontent='http://www.vapourtech.com'/>
 18            <meta name='referencecontent='DIS-Java-VRML Working Group'/>
 19            <meta name='referencecontent='https://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml'/>
 20            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Tools/Explosions/ExplodingBuildingExample.x3d '/>
 21            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 22            <meta name='licensecontent='../../license.html'/>
 23       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: CoordinateAxes, ExplosionClock, FirstFloorCeiling, FirstFloorWallEast, FirstFloorWallMaterial, FirstFloorWallNorth, FirstFloorWallSouth, FirstFloorWallWest, Floor, FloorMaterial, LongWall, RootEspduTransform, SecondFloorCeiling, SecondFloorWallEast, SecondFloorWallMaterial, SecondFloorWallNorth, SecondFloorWallSouth, SecondFloorWallWest, ShortWall, SmokeStack, SmokeStackTouch

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definition: Exploder
-->
 24       <Scene>
 25            <WorldInfo title='ExplodingBuildingExample.x3d'/>
 26            <ExternProtoDeclare name='Exploderappinfo='Explode contained geometry through animation on demand'   url=' "ExplodingBuildingPrototype.x3d#Exploder" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Explosions/ExplodingBuildingPrototype.x3d#Exploder" "ExplodingBuildingPrototype.wrl#Exploder" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Explosions/ExplodingBuildingPrototype.wrl#Exploder" '>
 27                 <field name='geometrytype='SFNodeaccessType='initializeOnly'
                appinfo='geometry node, to be used inside a Shape'/>
 28                 <field name='materialtype='SFNodeaccessType='initializeOnly'
                appinfo='Material node for this geometry, to be used inside a Shape'/>
 29                 <field name='initialPositiontype='SFVec3faccessType='initializeOnly'
                appinfo='starting point'/>
 30                 <field name='finalPositiontype='SFVec3faccessType='initializeOnly'
                appinfo='finish point'/>
 31                 <field name='initialOrientationtype='SFRotationaccessType='initializeOnly'
                appinfo='starting point orientation'/>
 32                 <field name='finalOrientationtype='SFRotationaccessType='initializeOnly'
                appinfo='finish point orientation'/>
 33                 <field name='set_fractiontype='SFFloataccessType='inputOnly'
                appinfo='animation input'/>
 34            </ExternProtoDeclare>
 35            <!-- Root Transform will be replaced by EspduTransfor when ready to network -->
 36            <Transform DEF='RootEspduTransform'>
 37                 <Viewpoint description='Hello Exploding Buildingorientation='1 0 0 -0.3position='1 20 50'/>
 38                 <DirectionalLight direction='-0.57735 -0.57735 0.57735'/>
 39                 <Transform scale='10 10 10'>
 40                      <Inline DEF='CoordinateAxes'   url=' "../../Tools/Authoring/CoordinateAxes.x3d" "../../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../Tools/Authoring/CoordinateAxes.wrl" "../../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" '/>
 41                 </Transform>
 42                 <Shape>
 43 
                    <!-- Box Floor is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                    <Box DEF='Floorsize='14 0.1 8'/>
 44                      <Appearance>
 45 
                         <!-- Material FloorMaterial is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                         <Material DEF='FloorMaterialdiffuseColor='0 0.3 0.3transparency='0.3'/>
 46                      </Appearance>
 47                 </Shape>
 48 
               <!-- ROUTE information for FirstFloorCeiling node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='FirstFloorCeiling'>
 49                      <fieldValue name='geometry'>
 50                           <Box USE='Floor'/>
 51                      </fieldValue>
 52                      <fieldValue name='material'>
 53                           <Material USE='FloorMaterial'/>
 54                      </fieldValue>
 55                      <fieldValue name='initialPositionvalue='0 3 0'/>
 56                      <fieldValue name='finalPositionvalue='14 0.05 14'/>
 57                      <fieldValue name='finalOrientationvalue='0.48 0 0.88 3.14'/>
 58                 </ProtoInstance>
 59 
               <!-- ROUTE information for FirstFloorWallEast node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='FirstFloorWallEast'>
 60                      <fieldValue name='geometry'>
 61 
                         <!-- Box LongWall is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                         <Box DEF='LongWallsize='14 3 0.1'/>
 62                      </fieldValue>
 63                      <fieldValue name='material'>
 64 
                         <!-- Material FirstFloorWallMaterial is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                         <Material DEF='FirstFloorWallMaterialdiffuseColor='0.4 0.4 0transparency='0.3'/>
 65                      </fieldValue>
 66                      <fieldValue name='initialPositionvalue='0 1.5 3.95'/>
 67                      <fieldValue name='finalPositionvalue='0 0.05 10'/>
 68                      <fieldValue name='finalOrientationvalue='0.96 0.2 -0.19 1.61'/>
 69                 </ProtoInstance>
 70 
               <!-- ROUTE information for FirstFloorWallNorth node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='FirstFloorWallNorth'>
 71                      <fieldValue name='geometry'>
 72 
                         <!-- Box ShortWall is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                         <Box DEF='ShortWallsize='0.1 3 8'/>
 73                      </fieldValue>
 74                      <fieldValue name='material'>
 75                           <Material USE='FirstFloorWallMaterial'/>
 76                      </fieldValue>
 77                      <fieldValue name='initialPositionvalue='7 1.5 0'/>
 78                      <fieldValue name='finalPositionvalue='15 0.05 2'/>
 79                      <fieldValue name='finalOrientationvalue='0 0 1 -1.57'/>
 80                 </ProtoInstance>
 81 
               <!-- ROUTE information for FirstFloorWallWest node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='FirstFloorWallWest'>
 82                      <fieldValue name='geometry'>
 83                           <Box USE='LongWall'/>
 84                      </fieldValue>
 85                      <fieldValue name='material'>
 86                           <Material USE='FirstFloorWallMaterial'/>
 87                      </fieldValue>
 88                      <fieldValue name='initialPositionvalue='0 1.5 -3.95'/>
 89                      <fieldValue name='finalPositionvalue='0 0.05 -12'/>
 90                      <fieldValue name='finalOrientationvalue='0.96 0.2 -0.19 1.61'/>
 91                 </ProtoInstance>
 92 
               <!-- ROUTE information for FirstFloorWallSouth node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='FirstFloorWallSouth'>
 93                      <fieldValue name='geometry'>
 94                           <Box USE='ShortWall'/>
 95                      </fieldValue>
 96                      <fieldValue name='material'>
 97                           <Material USE='FirstFloorWallMaterial'/>
 98                      </fieldValue>
 99                      <fieldValue name='initialPositionvalue='-7 1.5 0'/>
100                      <fieldValue name='finalPositionvalue='-10 0.05 1'/>
101                      <fieldValue name='finalOrientationvalue='-0.32 -0.32 0.89 1.69'/>
102                 </ProtoInstance>
103 
               <!-- ROUTE information for SecondFloorCeiling node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='SecondFloorCeiling'>
104                      <fieldValue name='geometry'>
105                           <Box USE='Floor'/>
106                      </fieldValue>
107                      <fieldValue name='material'>
108                           <Material USE='FloorMaterial'/>
109                      </fieldValue>
110                      <fieldValue name='initialPositionvalue='0 6 0'/>
111                      <fieldValue name='finalPositionvalue='-12 0.05 -10'/>
112                      <fieldValue name='finalOrientationvalue='0.84 0 0.54 3.14'/>
113                 </ProtoInstance>
114 
               <!-- ROUTE information for SecondFloorWallEast node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='SecondFloorWallEast'>
115                      <fieldValue name='geometry'>
116                           <Box USE='LongWall'/>
117                      </fieldValue>
118                      <fieldValue name='material'>
119 
                         <!-- Material SecondFloorWallMaterial is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                         <Material DEF='SecondFloorWallMaterialdiffuseColor='0.8 0.8 0transparency='0.3'/>
120                      </fieldValue>
121                      <fieldValue name='initialPositionvalue='0 4.5 3.95'/>
122                      <fieldValue name='finalPositionvalue='5 0.05 20'/>
123                      <fieldValue name='finalOrientationvalue='0.89 -0.32 0.32 1.69'/>
124                 </ProtoInstance>
125 
               <!-- ROUTE information for SecondFloorWallNorth node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='SecondFloorWallNorth'>
126                      <fieldValue name='geometry'>
127                           <Box USE='ShortWall'/>
128                      </fieldValue>
129                      <fieldValue name='material'>
130                           <Material USE='SecondFloorWallMaterial'/>
131                      </fieldValue>
132                      <fieldValue name='initialPositionvalue='7 4.5 0'/>
133                      <fieldValue name='finalPositionvalue='22 0.05 -6'/>
134                      <fieldValue name='finalOrientationvalue='-0.32 -0.32 0.89 1.69'/>
135                 </ProtoInstance>
136 
               <!-- ROUTE information for SecondFloorWallWest node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='SecondFloorWallWest'>
137                      <fieldValue name='geometry'>
138                           <Box USE='LongWall'/>
139                      </fieldValue>
140                      <fieldValue name='material'>
141                           <Material USE='SecondFloorWallMaterial'/>
142                      </fieldValue>
143                      <fieldValue name='initialPositionvalue='0 4.5 -3.95'/>
144                      <fieldValue name='finalPositionvalue='5 0.05 -19'/>
145                      <fieldValue name='finalOrientationvalue='0.96 0.2 -0.19 1.61'/>
146                 </ProtoInstance>
147 
               <!-- ROUTE information for SecondFloorWallSouth node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
               <ProtoInstance name='ExploderDEF='SecondFloorWallSouth'>
148                      <fieldValue name='geometry'>
149                           <Box USE='ShortWall'/>
150                      </fieldValue>
151                      <fieldValue name='material'>
152                           <Material USE='SecondFloorWallMaterial'/>
153                      </fieldValue>
154                      <fieldValue name='initialPositionvalue='-7 4.5 0'/>
155                      <fieldValue name='finalPositionvalue='-10 0.05 11'/>
156                      <fieldValue name='finalOrientationvalue='-0.28 0.28 -0.92 1.66'/>
157                 </ProtoInstance>
158                 <Group>
159 
                    <!-- ROUTE information for SmokeStack node:  [from ExplosionClock.fraction_changed to set_fraction ] -->
                    <ProtoInstance name='ExploderDEF='SmokeStack'>
160                           <fieldValue name='geometry'>
161                                <Cylinder bottom='falseheight='9radius='0.5'/>
162                           </fieldValue>
163                           <fieldValue name='material'>
164                                <Material diffuseColor='0.4 0.4 0.4shininess='0.8'/>
165                           </fieldValue>
166                           <fieldValue name='initialPositionvalue='-4 4.51 2'/>
167                           <fieldValue name='finalPositionvalue='-15 0.4 2'/>
168                           <fieldValue name='finalOrientationvalue='0 0 1 1.57'/>
169                      </ProtoInstance>
170 
                    <!-- ROUTE information for SmokeStackTouch node:  [from touchTime to ExplosionClock.set_startTime ] -->
                    <TouchSensor DEF='SmokeStackTouchdescription='touch to activate'/>
171                 </Group>
172 
173            </Transform>
174            < ROUTE  fromNode='SmokeStackTouch' fromField='touchTime' toNode='ExplosionClock' toField='set_startTime'/>
175            <!-- Connect clock to animations -->
176            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorCeiling' toField='set_fraction'/>
177            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallEast' toField='set_fraction'/>
178            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallNorth' toField='set_fraction'/>
179            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallWest' toField='set_fraction'/>
180            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallSouth' toField='set_fraction'/>
181            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorCeiling' toField='set_fraction'/>
182            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallEast' toField='set_fraction'/>
183            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallNorth' toField='set_fraction'/>
184            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallWest' toField='set_fraction'/>
185            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallSouth' toField='set_fraction'/>
186            < ROUTE  fromNode='ExplosionClock' fromField='fraction_changed' toNode='SmokeStack' toField='set_fraction'/>
187       </Scene>
188  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: CoordinateAxes, ExplosionClock, FirstFloorCeiling, FirstFloorWallEast, FirstFloorWallMaterial, FirstFloorWallNorth, FirstFloorWallSouth, FirstFloorWallWest, Floor, FloorMaterial, LongWall, RootEspduTransform, SecondFloorCeiling, SecondFloorWallEast, SecondFloorWallMaterial, SecondFloorWallNorth, SecondFloorWallSouth, SecondFloorWallWest, ShortWall, SmokeStack, SmokeStackTouch

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definition: Exploder
-->
X3D Tooltips element index: Appearance, Box, Cylinder, DirectionalLight, ExternProtoDeclare, field, fieldValue, Group, head, Inline, Material, meta, ProtoInstance, 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 12 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.

SmokeStackTouch
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
ExplosionClock
TimeSensor
set_startTime
SFTime

      FirstFloorCeiling
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      FirstFloorWallEast
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      FirstFloorWallNorth
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      FirstFloorWallSouth
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      FirstFloorWallWest
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      SecondFloorCeiling
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      SecondFloorWallEast
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      SecondFloorWallNorth
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      SecondFloorWallSouth
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      SecondFloorWallWest
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

      SmokeStack
ProtoInstance
Exploder
No direct ROUTE connection found for events to/from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

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/Tools/Explosions/ExplodingBuildingExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Tools/Explosions/ExplodingBuildingExample.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)
    <ProtoInstance name='ProtoName'> <field name='fieldName'/> </ProtoInstance> -->

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