X3D Model Documentation: CylinderSensorPumpHouse.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Interactive' version='3.3 xmlns:xsd='https://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent=' CylinderSensorPumpHouse.x3d '/>
  6            <meta name='descriptioncontent='A CylinderSensor changes the viewing position of a positive-displacement cylinder pump house.'/>
  7            <meta name='creatorcontent='Todd Gagnon and Mark A. Boyd'/>
  8            <meta name='translatorcontent=' Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html '/>
  9            <meta name='createdcontent='8 June 1998'/>
 10            <meta name='translatedcontent='20 December 2002'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent=' KelpTank.x3d '/>
 13            <meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/PumpHouse.x3d '/>
 14            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/CylinderSensorPumpHouse.x3d '/>
 15            <meta name='generatorcontent='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 16            <meta name='generatorcontent=' Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html '/>
 17            <meta name='licensecontent='../license.html'/>
 18       </head>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: CylinderRod, Handle, Indicator, Mover, PistonClock, PistonPath, PistonTransform, PumpHouseAppearance, PumpTouched, Rocker1Path, Rocker1Rotation, Rocker2Path, Rocker2Rotation, RockerArm1, RockerArm2

Index for Viewpoint node: AdjustableView

-->
 19       <Scene>
 20            <WorldInfo title='CylinderSensorPumpHouse.x3d'/>
 21            <Background skyColor='1 1 1'/>
 22 
          <!-- ROUTE information for AdjustableView node:  [from Mover.rotation_changed to orientation ] -->
          <Viewpoint DEF='AdjustableViewdescription='Adjustible Viewpointposition='0.02 0.45 5'/>
 23            <Transform translation='1.75 1 0'>
 24 
               <!-- ROUTE information for Mover node:  [from rotation_changed to Handle.rotation ] [from rotation_changed to AdjustableView.orientation ] -->
               <CylinderSensor DEF='Moverdescription='click and drag to rotatediskAngle='1.56maxAngle='0.3minAngle='-0.3'/>
 25                 <Shape>
 26                      <Appearance>
 27                           <Material diffuseColor='.9 .9 .9'/>
 28                      </Appearance>
 29                      <Box size='1 1.25 .02'/>
 30                 </Shape>
 31                 <Transform>
 32                      <Transform>
 33                           <Transform rotation='1 0 0 1.57'>
 34                                <Shape>
 35 
                                   <!-- Appearance Indicator is a DEF node that has 1 USE node: USE_1 -->
                                   <Appearance DEF='Indicator'>
 36                                          <Material diffuseColor='1 0 0'/>
 37                                     </Appearance>
 38                                     <Cylinder height='.3radius='.3'/>
 39                                </Shape>
 40                           </Transform>
 41                      </Transform>
 42                      <Transform rotation='1 0 0 -1.57'>
 43 
                         <!-- ROUTE information for Handle node:  [from Mover.rotation_changed to rotation ] -->
                         <Transform DEF='Handle'>
 44                                <Transform rotation='0 0 1 -1.57translation='.25 0 0'>
 45                                     <Shape>
 46                                          <Appearance USE='Indicator'/>
 47                                          <Cone bottomRadius='.1height='.6'/>
 48                                     </Shape>
 49                                </Transform>
 50                           </Transform>
 51                      </Transform>
 52                 </Transform>
 53                 < ROUTE  fromNode='Mover' fromField='rotation_changed' toNode='Handle' toField='rotation'/>
 54                 < ROUTE  fromNode='Mover' fromField='rotation_changed' toNode='AdjustableView' toField='orientation'/>
 55            </Transform>
 56            <Group>
 57                 <Transform scale='0.91 0.6 0.3translation='0.8 -0.65 0.5'>
 58                      <Shape>
 59                           <Appearance>
 60                                <Material diffuseColor='0.749 0.694 0.651'/>
 61                           </Appearance>
 62                           <Cylinder bottom='falsetop='false'/>
 63                      </Shape>
 64                 </Transform>
 65                 <Group>
 66                      <Shape>
 67 
                         <!-- Appearance PumpHouseAppearance is a DEF node that has 6 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6 -->
                         <Appearance DEF='PumpHouseAppearance'>
 68                                <Material diffuseColor='0.82 0.78 0.74'/>
 69                           </Appearance>
 70                           <IndexedFaceSet coordIndex='0 1 5 4 -1 5 1 2 6 -1 6 2 3 7 -1 3 0 4 7 -1 1 12 13 2 -1 2 13 14 -1 12 15 16 13 -1 15 0 3 16 -1 16 3 17 -1 9 5 6 10 -1 8 9 10 11 -1 4 8 11 7 -1 4 5 9 8 -1 11 10 6 7 -1 3 2 14 17 -1 13 16 17 14 -1'>
 71                                <Coordinate point='0.0 0.0 0.0 2.0 0.0 0.0 2.0 1.75 0.0 0.0 1.75 0.0 0.625 0.75 0.0 1.0 0.75 0.0 1.0 1.6 0.0 0.625 1.6 0.0 0.625 0.75 -0.65 1.0 0.75 -0.65 1.0 1.6 -0.65 0.625 1.6 -0.65 2.0 0.0 -2.7 2.0 1.75 -2.7 2.0 2.5 -1.0 0.0 0.0 -2.7 0.0 1.75 -2.7 0.0 2.5 -1.0'/>
 72                           </IndexedFaceSet>
 73                      </Shape>
 74 
                    <!-- ROUTE information for PumpTouched node:  [from isActive to PistonClock.enabled ] -->
                    <TouchSensor DEF='PumpToucheddescription='touch to activate'/>
 75                 </Group>
 76            </Group>
 77            <Group>
 78                 <Transform scale='0.5 0.5 0.5translation='1.0 1.1 -1.5'>
 79 
                    <!-- ROUTE information for PistonTransform node:  [from PistonPath.value_changed to set_translation ] -->
                    <Transform DEF='PistonTransform'>
 80                           <Transform scale='1.8 1.2 0.6translation='0.0 -0.2 0.0'>
 81                                <Shape>
 82                                     <Appearance>
 83                                          <Material diffuseColor='0.427 0.427 0.42'/>
 84                                     </Appearance>
 85                                     <Cylinder height='1.0radius='0.98'/>
 86                                </Shape>
 87                           </Transform>
 88 
                         <!-- Transform CylinderRod is a DEF node that has 1 USE node: USE_1 -->
                         <Transform DEF='CylinderRodrotation='0.0 0.0 -1.0 0.523599translation='-0.25 0.75 0.0'>
 89                                <Shape>
 90                                     <Appearance USE='PumpHouseAppearance'/>
 91                                     <Cylinder height='1.0radius='0.1'/>
 92                                </Shape>
 93                           </Transform>
 94                           <Transform rotation='0.0 0.0 1.0 1.047198translation='1.0 0.6 0.0'>
 95                                <Transform USE='CylinderRod'/>
 96                           </Transform>
 97                           <Transform translation='0.0 1.2 0.0'>
 98                                <Shape>
 99                                     <Appearance USE='PumpHouseAppearance'/>
100                                     <Sphere radius='0.15'/>
101                                </Shape>
102                           </Transform>
103 
                         <!-- ROUTE information for RockerArm1 node:  [from Rocker1Path.value_changed to set_translation ] [from Rocker1Rotation.value_changed to set_rotation ] -->
                         <Transform DEF='RockerArm1center='0.0 -0.4 0.0'>
104                                <Shape>
105                                     <Appearance USE='PumpHouseAppearance'/>
106                                     <Cylinder height='1.8radius='0.1'/>
107                                </Shape>
108                                <Transform translation='0.0 0.95 0.0'>
109                                     <Shape>
110                                          <Appearance USE='PumpHouseAppearance'/>
111                                          <Sphere radius='0.15'/>
112                                     </Shape>
113                                </Transform>
114 
                              <!-- ROUTE information for Rocker1Path node:  [from PistonClock.fraction_changed to set_fraction ] [from value_changed to RockerArm1.set_translation ] -->
                              <PositionInterpolator DEF='Rocker1Pathkey='0.0 0.3 0.32 0.5 0.75 1.0keyValue='0.0 2.0 -0.25 0.0 1.8 -0.35 0.0 1.8 -0.35 0.0 2.0 -0.25 0.0 2.0 -0.12 0.0 2.0 -0.25'/>
115 
                              <!-- ROUTE information for Rocker1Rotation node:  [from PistonClock.fraction_changed to set_fraction ] [from value_changed to RockerArm1.set_rotation ] -->
                              <OrientationInterpolator DEF='Rocker1Rotationkey='0.0 0.3 0.32 0.5 0.75 1.0keyValue='-1.0 0.0 0.0 0.523599 -1.0 0.0 0.0 1.0471976 -1.0 0.0 0.0 1.0471976 -1.0 0.0 0.0 0.523599 -1.0 0.0 0.0 0.2617994 -1.0 0.0 0.0 0.523599'/>
116                           </Transform>
117 
                         <!-- ROUTE information for RockerArm2 node:  [from Rocker2Path.value_changed to set_translation ] [from Rocker2Rotation.value_changed to set_rotation ] -->
                         <Transform DEF='RockerArm2center='0.0 0.7 0.0'>
118                                <Shape>
119                                     <Appearance USE='PumpHouseAppearance'/>
120                                     <Cylinder height='1.8radius='0.1'/>
121                                </Shape>
122                                <Transform translation='0.0 -0.95 0.0'>
123                                     <Shape>
124                                          <Appearance USE='PumpHouseAppearance'/>
125                                          <Sphere radius='0.15'/>
126                                     </Shape>
127                                </Transform>
128 
                              <!-- ROUTE information for Rocker2Path node:  [from PistonClock.fraction_changed to set_fraction ] [from value_changed to RockerArm2.set_translation ] -->
                              <PositionInterpolator DEF='Rocker2Pathkey='0.0 0.3 0.32 0.5 0.75 1.0keyValue='0.0 1.95 -1.0 0.0 1.2 -1.6 0.0 1.2 -1.6 0.0 1.95 -1.0 0.0 2.2 -0.65 0.0 1.95 -1.0'/>
129 
                              <!-- ROUTE information for Rocker2Rotation node:  [from PistonClock.fraction_changed to set_fraction ] [from value_changed to RockerArm2.set_rotation ] -->
                              <OrientationInterpolator DEF='Rocker2Rotationkey='0.0 0.3 0.32 0.5 0.75 1.0keyValue='1.0 0.0 0.0 0.523599 1.0 0.0 0.0 0.4 1.0 0.0 0.0 0.4 1.0 0.0 0.0 0.523599 1.0 0.0 0.0 1.570796 1.0 0.0 0.0 0.523599'/>
130                           </Transform>
131                      </Transform>
132 
133 
                    <!-- ROUTE information for PistonPath node:  [from PistonClock.fraction_changed to set_fraction ] [from value_changed to PistonTransform.set_translation ] -->
                    <PositionInterpolator DEF='PistonPathkey='0.0 0.3 0.32 0.5 0.75 1.0keyValue='-0.4 -2.3 4.0 -0.4 -1.5 4.0 -0.4 -1.5 4.0 -0.4 -2.3 4.0 -0.4 -3.3 4.0 -0.4 -2.3 4.0'/>
134                 </Transform>
135            </Group>
136            < ROUTE  fromNode='PumpTouched' fromField='isActive' toNode='PistonClock' toField='enabled'/>
137            < ROUTE  fromNode='PistonClock' fromField='fraction_changed' toNode='PistonPath' toField='set_fraction'/>
138            < ROUTE  fromNode='PistonPath' fromField='value_changed' toNode='PistonTransform' toField='set_translation'/>
139            < ROUTE  fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker1Path' toField='set_fraction'/>
140            < ROUTE  fromNode='Rocker1Path' fromField='value_changed' toNode='RockerArm1' toField='set_translation'/>
141            < ROUTE  fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker1Rotation' toField='set_fraction'/>
142            < ROUTE  fromNode='Rocker1Rotation' fromField='value_changed' toNode='RockerArm1' toField='set_rotation'/>
143            < ROUTE  fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker2Path' toField='set_fraction'/>
144            < ROUTE  fromNode='Rocker2Path' fromField='value_changed' toNode='RockerArm2' toField='set_translation'/>
145            < ROUTE  fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker2Rotation' toField='set_fraction'/>
146            < ROUTE  fromNode='Rocker2Rotation' fromField='value_changed' toNode='RockerArm2' toField='set_rotation'/>
147       </Scene>
148  </X3D>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: CylinderRod, Handle, Indicator, Mover, PistonClock, PistonPath, PistonTransform, PumpHouseAppearance, PumpTouched, Rocker1Path, Rocker1Rotation, Rocker2Path, Rocker2Rotation, RockerArm1, RockerArm2

Index for Viewpoint node: AdjustableView

-->
X3D Tooltips element index: to top Appearance, Background, Box, Cone, Coordinate, Cylinder, CylinderSensor, Group, head, IndexedFaceSet, Material, meta, OrientationInterpolator, PositionInterpolator, ROUTE, Scene, Shape, Sphere, 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 4 ROUTE connections and 1 TouchSensor hover hint, showing X3D event-model relationships for this scene.

Each row with a ROUTE statement shows an event cascade that may occur during a single timestamp interval between frame renderings, performed as part of the X3D execution model.

Mover
CylinderSensor
rotation_changed
SFRotation

ROUTE
event to
(1)
Handle
Transform
rotation
SFRotation
Mover
CylinderSensor
rotation_changed
SFRotation

ROUTE
event to
(1)
AdjustableView
Viewpoint
orientation
SFRotation

PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
PistonPath
PositionInterpolator
set_fraction
SFFloat
then
from
same
node
PistonPath
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
PistonTransform
Transform
set_translation
SFVec3f
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Rocker1Path
PositionInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker1Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
RockerArm1
Transform
set_translation
SFVec3f
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Rocker1Rotation
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker1Rotation
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
RockerArm1
Transform
set_rotation
SFRotation
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Rocker2Path
PositionInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker2Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
RockerArm2
Transform
set_translation
SFVec3f
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Rocker2Rotation
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker2Rotation
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
RockerArm2
Transform
set_rotation
SFRotation

PumpTouched
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
PistonClock
TimeSensor
enabled
SFBool
then
from
same
node
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
PistonPath
PositionInterpolator
set_fraction
SFFloat
then
from
same
node
PistonPath
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
PistonTransform
Transform
set_translation
SFVec3f
  then
from
same
node
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Rocker1Path
PositionInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker1Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
RockerArm1
Transform
set_translation
SFVec3f
  then
from
same
node
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Rocker1Rotation
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker1Rotation
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
RockerArm1
Transform
set_rotation
SFRotation
  then
from
same
node
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Rocker2Path
PositionInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker2Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
RockerArm2
Transform
set_translation
SFVec3f
  then
from
same
node
PistonClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Rocker2Rotation
OrientationInterpolator
set_fraction
SFFloat
then
from
same
node
Rocker2Rotation
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
RockerArm2
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://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/CylinderSensorPumpHouseIndex.html -->
<!-- SourceForge version control Version control at    
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/CylinderSensorPumpHouse.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. -->