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='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'> |
4 | <head> |
5 | <meta name='title' content='BooleanFilterPumpHouse.x3d'/> |
6 | <meta name='description' content='A BooleanFilter node starts the animation of cones orbiting near the pump house, instead of an unfiltered TouchSensor toggling the animation on/off during selection/deselection.'/> |
7 | <meta name='creator' content='Todd Gagnon and Mark A. Boyd'/> |
8 | <meta name='translator' content='Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html'/> |
9 | <meta name='created' content='8 June 1998'/> |
10 | <meta name='translated' content='20 December 2002'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/PumpHouse.x3d'/> |
13 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/BooleanFilterPumpHouse.x3d'/> |
14 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
15 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
16 | <meta name='license' content='../license.html'/> |
17 | </head> |
18 | <Scene> |
19 | <WorldInfo title='BooleanFilterPumpHouse.x3d'/> |
20 | <Background skyColor='1 1 1'/> |
21 | <NavigationInfo type='"FLY" "ANY"'/> |
22 | <Viewpoint description='Click pump house to activate' position='2 1 9'/> |
23 |
<!-- ROUTE information for Timer node:
[from Filter.inputTrue to enabled
]
[from fraction_changed to Rotator.set_fraction
]
-->
<TimeSensor DEF='Timer' cycleInterval='2' enabled='false' loop='true' startTime='1'/> |
24 |
<!-- ROUTE information for Rotator node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to SpinningColoredCones.rotation
]
-->
<OrientationInterpolator DEF='Rotator' key='0 .33 .67 1' keyValue='0 0 1 0 0 0 1 2 0 0 1 4 0 0 1 6.28'/> |
25 |
<!-- ROUTE information for Filter node:
[from PumpTouched.isActive to set_boolean
]
[from inputTrue to Timer.enabled
]
[from inputFalse to PistonClock.enabled
]
-->
<BooleanFilter DEF='Filter'/> |
26 |
<!-- ROUTE information for SpinningColoredCones node:
[from Rotator.value_changed to rotation
]
-->
<Transform DEF='SpinningColoredCones' translation='3 2 1'> |
27 | <Transform rotation='0 0 1 3.14' translation='0 -1.5 .5'> |
28 | <Shape> |
29 | <Appearance> |
30 | <Material diffuseColor='1 0 0'/> |
31 | </Appearance> |
32 |
<!-- Cone
OneMeterCone is a DEF node that has 2 USE nodes: USE_1, USE_2 --> <Cone DEF='OneMeterCone' bottomRadius='.5' height='1'/> |
33 | </Shape> |
34 | </Transform> |
35 | <Transform rotation='0 0 1 -1.05' translation='1.3 .75 0'> |
36 | <Shape> |
37 | <Appearance> |
38 | <Material diffuseColor='0 1 1'/> |
39 | </Appearance> |
40 | <Cone USE='OneMeterCone'/> |
41 | </Shape> |
42 | </Transform> |
43 | <Transform rotation='0 0 1 1.05' translation='-1.3 .75 -.5'> |
44 | <Shape> |
45 | <Appearance> |
46 | <Material diffuseColor='1 1 0'/> |
47 | </Appearance> |
48 | <Cone USE='OneMeterCone'/> |
49 | </Shape> |
50 | </Transform> |
51 | </Transform> |
52 | < ROUTE fromNode='Filter' fromField='inputTrue' toNode='Timer' toField='enabled'/> |
53 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Rotator' toField='set_fraction'/> |
54 | < ROUTE fromNode='Rotator' fromField='value_changed' toNode='SpinningColoredCones' toField='rotation'/> |
55 | <Group> |
56 |
<!-- ROUTE information for PumpTouched node:
[from isActive to Filter.set_boolean
]
-->
<TouchSensor DEF='PumpTouched' description='touch to activate'/> |
57 | < ROUTE fromNode='PumpTouched' fromField='isActive' toNode='Filter' toField='set_boolean'/> |
58 | <!-- pump house geometry follows --> |
59 | <Transform scale='0.91 0.6 0.3' translation='0.8 -0.65 0.5'> |
60 | <Shape> |
61 | <Appearance> |
62 | <Material diffuseColor='0.749 0.694 0.651'/> |
63 | </Appearance> |
64 | <Cylinder bottom='false' top='false'/> |
65 | </Shape> |
66 | </Transform> |
67 | <Group> |
68 | <Shape> |
69 | |
70 | <Material diffuseColor='0.82 0.78 0.74'/> |
71 | </Appearance> |
72 | <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'> |
73 | <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'/> |
74 | </IndexedFaceSet> |
75 | </Shape> |
76 | </Group> |
77 | </Group> |
78 | <Group> |
79 | <Transform scale='0.5 0.5 0.5' translation='1.0 1.1 -1.5'> |
80 |
<!-- ROUTE information for PistonTransform node:
[from PistonPath.value_changed to set_translation
]
-->
<Transform DEF='PistonTransform'> |
81 | <Transform scale='1.8 1.2 0.6' translation='0.0 -0.2 0.0'> |
82 | <Shape> |
83 | <Appearance> |
84 | <Material diffuseColor='0.427 0.427 0.42'/> |
85 | </Appearance> |
86 | <Cylinder height='1.0' radius='0.98'/> |
87 | </Shape> |
88 | </Transform> |
89 |
<!-- Transform
CylinderRod is a DEF node that has 1 USE node: USE_1 -->
<Transform DEF='CylinderRod' rotation='0.0 0.0 -1.0 0.523599' translation='-0.25 0.75 0.0'> |
90 | <Shape> |
91 | <Appearance USE='PumpHouseAppearance'/> |
92 | <Cylinder height='1.0' radius='0.1'/> |
93 | </Shape> |
94 | </Transform> |
95 | <Transform rotation='0.0 0.0 1.0 1.047198' translation='1.0 0.6 0.0'> |
96 | <Transform USE='CylinderRod'/> |
97 | </Transform> |
98 | <Transform translation='0.0 1.2 0.0'> |
99 | <Shape> |
100 | <Appearance USE='PumpHouseAppearance'/> |
101 | <Sphere radius='0.15'/> |
102 | </Shape> |
103 | </Transform> |
104 |
<!-- ROUTE information for RockerArm1 node:
[from Rocker1Path.value_changed to set_translation
]
[from Rocker1Rotation.value_changed to set_rotation
]
-->
<Transform DEF='RockerArm1' center='0.0 -0.4 0.0'> |
105 | <Shape> |
106 | <Appearance USE='PumpHouseAppearance'/> |
107 | <Cylinder height='1.8' radius='0.1'/> |
108 | </Shape> |
109 | <Transform translation='0.0 0.95 0.0'> |
110 | <Shape> |
111 | <Appearance USE='PumpHouseAppearance'/> |
112 | <Sphere radius='0.15'/> |
113 | </Shape> |
114 | </Transform> |
115 |
<!-- ROUTE information for Rocker1Path node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm1.set_translation
]
-->
<PositionInterpolator DEF='Rocker1Path' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='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'/> |
116 |
<!-- ROUTE information for Rocker1Rotation node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm1.set_rotation
]
-->
<OrientationInterpolator DEF='Rocker1Rotation' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='-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'/> |
117 | </Transform> |
118 |
<!-- ROUTE information for RockerArm2 node:
[from Rocker2Path.value_changed to set_translation
]
[from Rocker2Rotation.value_changed to set_rotation
]
-->
<Transform DEF='RockerArm2' center='0.0 0.7 0.0'> |
119 | <Shape> |
120 | <Appearance USE='PumpHouseAppearance'/> |
121 | <Cylinder height='1.8' radius='0.1'/> |
122 | </Shape> |
123 | <Transform translation='0.0 -0.95 0.0'> |
124 | <Shape> |
125 | <Appearance USE='PumpHouseAppearance'/> |
126 | <Sphere radius='0.15'/> |
127 | </Shape> |
128 | </Transform> |
129 |
<!-- ROUTE information for Rocker2Path node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm2.set_translation
]
-->
<PositionInterpolator DEF='Rocker2Path' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='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'/> |
130 |
<!-- ROUTE information for Rocker2Rotation node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm2.set_rotation
]
-->
<OrientationInterpolator DEF='Rocker2Rotation' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='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'/> |
131 | </Transform> |
132 | </Transform> |
133 |
<!-- ROUTE information for PistonClock node:
[from Filter.inputFalse to enabled
]
[from fraction_changed to PistonPath.set_fraction
]
[from fraction_changed to Rocker1Path.set_fraction
]
[from fraction_changed to Rocker1Rotation.set_fraction
]
[from fraction_changed to Rocker2Path.set_fraction
]
[from fraction_changed to Rocker2Rotation.set_fraction
]
-->
<TimeSensor DEF='PistonClock' cycleInterval='5.5' loop='true'/> |
134 |
<!-- ROUTE information for PistonPath node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to PistonTransform.set_translation
]
-->
<PositionInterpolator DEF='PistonPath' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='-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'/> |
135 | </Transform> |
136 | </Group> |
137 | < ROUTE fromNode='Filter' fromField='inputFalse' toNode='PistonClock' toField='enabled'/> |
138 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='PistonPath' toField='set_fraction'/> |
139 | < ROUTE fromNode='PistonPath' fromField='value_changed' toNode='PistonTransform' toField='set_translation'/> |
140 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker1Path' toField='set_fraction'/> |
141 | < ROUTE fromNode='Rocker1Path' fromField='value_changed' toNode='RockerArm1' toField='set_translation'/> |
142 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker1Rotation' toField='set_fraction'/> |
143 | < ROUTE fromNode='Rocker1Rotation' fromField='value_changed' toNode='RockerArm1' toField='set_rotation'/> |
144 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker2Path' toField='set_fraction'/> |
145 | < ROUTE fromNode='Rocker2Path' fromField='value_changed' toNode='RockerArm2' toField='set_translation'/> |
146 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker2Rotation' toField='set_fraction'/> |
147 | < ROUTE fromNode='Rocker2Rotation' fromField='value_changed' toNode='RockerArm2' toField='set_rotation'/> |
148 | </Scene> |
149 | </X3D> |
Event Graph ROUTE Table entries with 15 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.
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->