X3D Model Documentation: Bathtub.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=' Bathtub.x3d '/>
  6            <meta name='descriptioncontent='Bathtub model.'/>
  7            <meta name='creatorcontent='Baris AKTOP'/>
  8            <meta name='createdcontent='12 September 2002'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Buildings/HouseBarisAktop/Bathtub.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: door, fountain, fountainapp, fountaintrans, nowater, open, shower, showertrans, showertrans1, slide, tub, water, waterflow, wateropen

Index for Viewpoint node: Viewpoint_1
-->
 14       <Scene>
 15            <WorldInfo title='Bathtub.x3d'/>
 16            <Group>
 17                 <Transform>
 18                      <Shape>
 19                           <Extrusion creaseAngle='3.14crossSection='1 0 0.92 -0.38 0.71 -0.71 0.38 -0.92 0 -1 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0endCap='falsescale='0.35 0.7 0.375 0.75 0.4 0.8 0.45 0.9 0.5 1solid='falsespine='0 0 0 0 0.1 0 0 0.3 0 0 0.4 0 0 0.5 0'/>
 20                           <Appearance>
 21                                <Material diffuseColor='0.9 0.9 0.9'/>
 22                           </Appearance>
 23                      </Shape>
 24                      <Transform scale='0.2 0.2 0.2translation='0 0 -0.45'>
 25                           <Shape>
 26                                <Cylinder height='0.05radius='0.15'/>
 27                                <Appearance>
 28                                     <Material diffuseColor='0.3 0.3 0.3'/>
 29                                </Appearance>
 30                           </Shape>
 31                           <Transform rotation='0 1 0 1.57translation='0 0.1 0'>
 32                                <Shape>
 33                                     <Box size='0.05 0.05 0.3'/>
 34 
                                   <!-- Appearance tub is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                                   <Appearance DEF='tub'>
 35                                          <Material diffuseColor='0.9 0.9 0.9shininess='0.9'/>
 36                                     </Appearance>
 37                                </Shape>
 38                           </Transform>
 39                           <Transform translation='0 0.1 0'>
 40                                <Shape>
 41                                     <Box size='0.05 0.05 0.3'/>
 42                                     <Appearance USE='tub'/>
 43                                </Shape>
 44                           </Transform>
 45                      </Transform>
 46                 </Transform>
 47                 <Transform scale='0.5 1 1'>
 48                      <Shape>
 49                           <Extrusion convex='falsecreaseAngle='3.14crossSection='1 0 0.92 -0.38 0.71 -0.71 0.38 -0.92 0 -1 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1 0.38 0.92 0.71 0.71 0.92 0.38 0.995 0.005 1.2 0.005 1.2 1 -1.2 1 -1.2 -1.1 1.2 -1.1 1.2 0 1 0solid='falsespine='0 0 0 0 0.5 0'/>
 50                           <Appearance>
 51                                <Material diffuseColor='0.8 0.8 0.4'/>
 52                           </Appearance>
 53                      </Shape>
 54                 </Transform>
 55                 <Transform translation='-0.6 1.25 -0.6'>
 56                      <Shape>
 57                           <Box size='0.05 1.5 1'/>
 58                           <Appearance>
 59                                <Material diffuseColor='0.8 1 1transparency='0.5'/>
 60                           </Appearance>
 61                      </Shape>
 62                 </Transform>
 63                 <Transform rotation='0 1 0 1.57translation='0 1.25 1'>
 64                      <Shape>
 65                           <Box size='0.05 1.5 1.2'/>
 66                           <Appearance>
 67                                <Material diffuseColor='0.8 1 1transparency='0.5'/>
 68                           </Appearance>
 69                      </Shape>
 70                 </Transform>
 71                 <Transform rotation='1 0 0 -1.57'/>
 72                 <Transform rotation='0 1 0 -1.57translation='-0.6 0 0'>
 73                      <Group>
 74 
                         <!-- ROUTE information for door node:  [from slide.translation_changed to set_translation ] -->
                         <Transform DEF='doorrotation='0 1 0 1.57translation='0.45 1.25 0'>
 75                                <Shape>
 76                                     <Box size='0.05 1.5 1.1'/>
 77                                     <Appearance>
 78                                          <Material diffuseColor='0.8 1 1transparency='0.5'/>
 79                                     </Appearance>
 80                                </Shape>
 81                           </Transform>
 82 
                         <!-- ROUTE information for slide node:  [from translation_changed to door.set_translation ] -->
                         <PlaneSensor DEF='slidedescription='click and drag to move objectmaxPosition='0.43 1.25minPosition='-0.6 1.25'/>
 83                           < ROUTE  fromNode='slide' fromField='translation_changed' toNode='door' toField='set_translation'/>
 84                      </Group>
 85                 </Transform>
 86            </Group>
 87            <Group>
 88                 <Transform scale='0.5 0.5 0.5translation='0 0.5 -1'>
 89                      <Shape>
 90                           <Appearance USE='tub'/>
 91                           <Extrusion creaseAngle='3.14crossSection='-0.25 -0.05 0.25 -0.05 0.25 0.05 -0.25 0.05 -0.25 -0.05scale='1 1 1 1 0.9 0.9 0.8 0.8solid='falsespine='0 0 0 0 0.03 0 0 0.04 0 0 0.05 0'/>
 92                      </Shape>
 93 
                    <!-- ROUTE information for fountaintrans node:  [from fountain.rotation_changed to set_rotation ] -->
                    <Transform DEF='fountaintransrotation='1 0 0 0.5scale='0.05 0.05 0.05translation='0 0.03 0'>
 94                           <Shape>
 95                                <Extrusion creaseAngle='3.14crossSection='1 0 0.92 -0.38 0.71 -0.71 0.38 -0.92 0 -1 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0endCap='falsesolid='falsespine='0 0 0 0 5 0 0 6.76 0.16 0 7.42 0.58 0 7.84 1.24 0 8 2 0 7.84 2.76 0 7.42 3.42 0 6.76 3.84'/>
 96 
                              <!-- Appearance fountainapp is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                              <Appearance DEF='fountainapp'>
 97                                     <Material diffuseColor='0.95 0.95 0.95shininess='1'/>
 98                                </Appearance>
 99                           </Shape>
100 
                         <!-- ROUTE information for fountain node:  [from rotation_changed to fountaintrans.set_rotation ] -->
                         <SphereSensor DEF='fountaindescription='click and drag to rotate'/>
101                           < ROUTE  fromNode='fountain' fromField='rotation_changed' toNode='fountaintrans' toField='set_rotation'/>
102                      </Transform>
103                      <Transform DEF='wateropentranslation='-0.15 0.05 0'>
104                           <Shape>
105 
                              <!-- Sphere open is a DEF node that has 1 USE node: USE_1 -->
                              <Sphere DEF='openradius='0.05'/>
106                                <Appearance USE='fountainapp'/>
107                           </Shape>
108                           <Sound maxBack='30maxFront='30minBack='10minFront='10'>
109 
                              <!-- ROUTE information for waterflow node:  [from water.touchTime to set_startTime ] [from nowater.touchTime to set_stopTime ] -->
                              <AudioClip DEF='waterflowdescription='water flowloop='truestartTime='-1'   url=' "waterflow.wav" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/HouseBarisAktop/waterflow.wav" '/>
110                           </Sound>
111 
                         <!-- ROUTE information for water node:  [from touchTime to waterflow.set_startTime ] -->
                         <TouchSensor DEF='waterdescription='touch to start water sound'/>
112                           < ROUTE  fromNode='water' fromField='touchTime' toNode='waterflow' toField='set_startTime'/>
113                      </Transform>
114                      <Transform translation='0.15 0.05 0'>
115                           <Shape>
116                                <Sphere USE='open'/>
117                                <Appearance USE='fountainapp'/>
118                           </Shape>
119 
                         <!-- ROUTE information for nowater node:  [from touchTime to waterflow.set_stopTime ] -->
                         <TouchSensor DEF='nowaterdescription='touch to silence water sound'/>
120                           < ROUTE  fromNode='nowater' fromField='touchTime' toNode='waterflow' toField='set_stopTime'/>
121                      </Transform>
122                 </Transform>
123            </Group>
124            <Transform DEF='showertransrotation='1 0 0 0.5scale='0.05 0.05 0.05translation='0 1.5 -1.1'>
125                 <Shape>
126                      <Extrusion creaseAngle='3.14crossSection='1 0 0.92 -0.38 0.71 -0.71 0.38 -0.92 0 -1 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0endCap='falsescale='0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5spine='0 0 0 0 5 0 0 6.76 0.16 0 7.42 0.58 0 7.84 1.24 0 8 2 0 7.84 2.76'/>
127                      <Appearance>
128                           <Material diffuseColor='0.95 0.95 0.95shininess='1'/>
129                      </Appearance>
130                 </Shape>
131            </Transform>
132            <Viewpoint description='showerorientation='1 0 0 -0.6position='0 2.5 1.5'/>
133            <Transform rotation='1 0 0 0.5scale='0.05 0.05 0.05translation='0 1.52 -1.12'>
134 
               <!-- ROUTE information for showertrans1 node:  [from shower.rotation_changed to set_rotation ] -->
               <Transform DEF='showertrans1center='0 7.84 2.76'>
135                      <Shape>
136                           <Extrusion beginCap='falsecreaseAngle='3.14crossSection='1 0 0.92 -0.38 0.71 -0.71 0.38 -0.92 0 -1 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0scale='0.7 0.7 1.5 1.5 1.4 1.4solid='falsespine='0 7.84 2.76 0 7.42 3.42 0 6.76 3.84'/>
137                           <Appearance>
138                                <Material diffuseColor='0.95 0.95 0.95shininess='1'/>
139                           </Appearance>
140                      </Shape>
141 
                    <!-- ROUTE information for shower node:  [from rotation_changed to showertrans1.set_rotation ] -->
                    <SphereSensor DEF='showerdescription='click and drag to rotate'/>
142                      < ROUTE  fromNode='shower' fromField='rotation_changed' toNode='showertrans1' toField='set_rotation'/>
143                 </Transform>
144            </Transform>
145       </Scene>
146  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: door, fountain, fountainapp, fountaintrans, nowater, open, shower, showertrans, showertrans1, slide, tub, water, waterflow, wateropen

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, AudioClip, Box, Cylinder, Extrusion, Group, head, Material, meta, PlaneSensor, ROUTE, Scene, Shape, Sound, Sphere, SphereSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table entries with 5 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.

nowater
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
waterflow
AudioClip
set_stopTime
SFTime

water
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
waterflow
AudioClip
set_startTime
SFTime

fountain
SphereSensor
rotation_changed
SFRotation

ROUTE
event to
(1)
fountaintrans
Transform
set_rotation
SFRotation

shower
SphereSensor
rotation_changed
SFRotation

ROUTE
event to
(1)
showertrans1
Transform
set_rotation
SFRotation

slide
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
door
Transform
set_translation
SFVec3f


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