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='StopWatch.x3d'/> |
6 | <meta name='description' content='Stop-watch with automatically moving second, minute, and hour hands, start and stop buttons, and a stop-watch sweep second hand.'/> |
7 | <meta name='creator' content='David R. Nadeau'/> |
8 | <meta name='translator' content='Don Brutzman'/> |
9 | <meta name='created' content='1 July 1998'/> |
10 | <meta name='translated' content='2 February 2014'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='Image' content='StopWatch.png'/> |
13 | <meta name='reference' content='originals/stopwtch.wrl'/> |
14 | <meta name='reference' content='http://www.siggraph.org/s98'/> |
15 | <meta name='reference' content='http://www.siggraph.org/s98/conference/courses/18.html'/> |
16 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0256.htm'/> |
17 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/> |
18 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dResources.html'/> |
19 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/StopWatch.x3d'/> |
20 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
21 | <meta name='generator' content='X3D-Edit, https://savage.nps.edu/X3D-Edit'/> |
22 | <meta name='license' content='../license.html'/> |
23 | </head> |
24 | <Scene> |
25 | <WorldInfo info='"Copyright (c) 1997, David R. Nadeau"' title='Stop watch'/> |
26 | <Viewpoint description='Entry view' position='0.0 0.0 15.0'/> |
27 | <NavigationInfo/> |
28 |
<!-- ROUTE information for StopWatch node:
[from QuarterSpinner.value_changed to set_rotation
]
[from QuarterSquisher.value_changed to set_scale
]
-->
<Transform DEF='StopWatch'> |
29 | <Transform rotation='1.0 0.0 0.0 1.571'> |
30 | <Shape> |
31 | <Appearance> |
32 | <Material diffuseColor='0.7 0.3 0.0'/> |
33 | </Appearance> |
34 | <Cylinder height='0.8' radius='4.8'/> |
35 | </Shape> |
36 | <Shape> |
37 | <Appearance> |
38 | <Material diffuseColor='1.0 1.0 1.0'/> |
39 | </Appearance> |
40 | <Cylinder height='0.9' radius='4.0'/> |
41 | </Shape> |
42 | </Transform> |
43 | <Transform rotation='0.0 0.0 1.0 -0.71' translation='3.5 3.5 0.0'> |
44 |
<!-- ROUTE information for Start node:
[from touchTime to SweepTimer.set_startTime
]
-->
<TouchSensor DEF='Start'/> |
45 | <Shape> |
46 | <Appearance> |
47 | <Material diffuseColor='0.0 1.0 0.0'/> |
48 | </Appearance> |
49 | <Cylinder height='0.3' radius='0.38'/> |
50 | </Shape> |
51 | </Transform> |
52 | <Transform rotation='0.0 0.0 1.0 0.71' translation='-3.5 3.5 0.0'> |
53 |
<!-- ROUTE information for Stop node:
[from touchTime to SweepTimer.set_stopTime
]
-->
<TouchSensor DEF='Stop'/> |
54 | <Shape> |
55 | <Appearance> |
56 | <Material diffuseColor='1.0 0.0 0.0'/> |
57 | </Appearance> |
58 | <Cylinder height='0.3' radius='0.38'/> |
59 | </Shape> |
60 | </Transform> |
61 |
<!-- ROUTE information for MinuteHand node:
[from MinuteSpinner.value_changed to set_rotation
]
-->
<Transform DEF='MinuteHand' center='0.0 -1.5 0.6' translation='0.0 1.5 0.6'> |
62 | |
63 | |
64 | <Material diffuseColor='0.2 0.2 0.2'/> |
65 | </Appearance> |
66 | <Cylinder height='3.0' radius='0.17'/> |
67 | </Shape> |
68 | |
69 | <Shape> |
70 | <Appearance USE='Black'/> |
71 | <Cone bottomRadius='0.4' height='0.8'/> |
72 | </Shape> |
73 | </Transform> |
74 | </Transform> |
75 |
<!-- ROUTE information for HourHand node:
[from HourSpinner.value_changed to set_rotation
]
-->
<Transform DEF='HourHand' center='0.0 -1.5 0.6' scale='1.0 0.7 1.0' translation='0.0 1.5 0.6'> |
76 | <Shape USE='Arm'/> |
77 | <Transform USE='ArrowHead'/> |
78 | </Transform> |
79 |
<!-- ROUTE information for SecondHand node:
[from SecondSpinner.value_changed to set_rotation
]
-->
<Transform DEF='SecondHand' center='0.0 -1.5 0.6' scale='0.6 1.0 0.6' translation='0.0 1.5 0.6'> |
80 | <Shape USE='Arm'/> |
81 | <Transform USE='ArrowHead'/> |
82 | </Transform> |
83 |
<!-- ROUTE information for SweepHand node:
[from SweepSpinner.value_changed to set_rotation
]
-->
<Transform DEF='SweepHand' center='0.0 -1.9 0.6' scale='0.6 1.0 0.6' translation='0.0 1.9 0.6'> |
84 | <Shape> |
85 | <Appearance DEF='Red'> |
86 | <Material diffuseColor='1.0 0.0 0.0'/> |
87 | </Appearance> |
88 | <Cylinder height='3.8' radius='0.17'/> |
89 | </Shape> |
90 | </Transform> |
91 | </Transform> |
92 |
<!-- ROUTE information for SecondTimer node:
[from fraction_changed to SecondSpinner.set_fraction
]
-->
<TimeSensor DEF='SecondTimer' cycleInterval='60.0' loop='true' stopTime='-1.0'/> |
93 |
<!-- ROUTE information for MinuteTimer node:
[from fraction_changed to MinuteSpinner.set_fraction
]
-->
<TimeSensor DEF='MinuteTimer' cycleInterval='3600.0' loop='true' stopTime='-1.0'/> |
94 |
<!-- ROUTE information for HourTimer node:
[from fraction_changed to HourSpinner.set_fraction
]
-->
<TimeSensor DEF='HourTimer' cycleInterval='43200.0' loop='true' startTime='28800.0' stopTime='-1.0'/> |
95 |
<!-- ROUTE information for SecondSpinner node:
[from SecondTimer.fraction_changed to set_fraction
]
[from value_changed to SecondHand.set_rotation
]
-->
<OrientationInterpolator DEF='SecondSpinner' key='0.0 0.5 1.0' keyValue='0.0 0.0 1.0 0.0 0.0 0.0 1.0 -3.14 0.0 0.0 1.0 -6.28'/> |
96 |
<!-- ROUTE information for MinuteSpinner node:
[from MinuteTimer.fraction_changed to set_fraction
]
[from value_changed to MinuteHand.set_rotation
]
-->
<OrientationInterpolator DEF='MinuteSpinner' key='0.0 0.5 1.0' keyValue='0.0 0.0 1.0 0.0 0.0 0.0 1.0 -3.14 0.0 0.0 1.0 -6.28'/> |
97 |
<!-- ROUTE information for HourSpinner node:
[from HourTimer.fraction_changed to set_fraction
]
[from value_changed to HourHand.set_rotation
]
-->
<OrientationInterpolator DEF='HourSpinner' key='0.0 0.5 1.0' keyValue='0.0 0.0 1.0 0.0 0.0 0.0 1.0 -3.14 0.0 0.0 1.0 -6.28'/> |
98 | < ROUTE fromNode='SecondTimer' fromField='fraction_changed' toNode='SecondSpinner' toField='set_fraction'/> |
99 | < ROUTE fromNode='MinuteTimer' fromField='fraction_changed' toNode='MinuteSpinner' toField='set_fraction'/> |
100 | < ROUTE fromNode='HourTimer' fromField='fraction_changed' toNode='HourSpinner' toField='set_fraction'/> |
101 | < ROUTE fromNode='SecondSpinner' fromField='value_changed' toNode='SecondHand' toField='set_rotation'/> |
102 | < ROUTE fromNode='MinuteSpinner' fromField='value_changed' toNode='MinuteHand' toField='set_rotation'/> |
103 | < ROUTE fromNode='HourSpinner' fromField='value_changed' toNode='HourHand' toField='set_rotation'/> |
104 |
<!-- ROUTE information for SweepTimer node:
[from Start.touchTime to set_startTime
]
[from Stop.touchTime to set_stopTime
]
[from fraction_changed to SweepSpinner.set_fraction
]
-->
<TimeSensor DEF='SweepTimer' cycleInterval='60.0' loop='true' stopTime='1.0'/> |
105 |
<!-- ROUTE information for SweepSpinner node:
[from SweepTimer.fraction_changed to set_fraction
]
[from value_changed to SweepHand.set_rotation
]
-->
<OrientationInterpolator DEF='SweepSpinner' key='0.0 0.5 1.0' keyValue='0.0 0.0 1.0 0.0 0.0 0.0 1.0 -3.14 0.0 0.0 1.0 -6.28'/> |
106 | < ROUTE fromNode='Start' fromField='touchTime' toNode='SweepTimer' toField='set_startTime'/> |
107 | < ROUTE fromNode='Stop' fromField='touchTime' toNode='SweepTimer' toField='set_stopTime'/> |
108 | < ROUTE fromNode='SweepTimer' fromField='fraction_changed' toNode='SweepSpinner' toField='set_fraction'/> |
109 | < ROUTE fromNode='SweepSpinner' fromField='value_changed' toNode='SweepHand' toField='set_rotation'/> |
110 |
<!-- ROUTE information for QuarterHour node:
[from cycleTime to QuarterAnimation.set_startTime
]
-->
<TimeSensor DEF='QuarterHour' cycleInterval='900.0' loop='true' startTime='28800.0' stopTime='-1.0'/> |
111 |
<!-- ROUTE information for QuarterAnimation node:
[from QuarterHour.cycleTime to set_startTime
]
[from fraction_changed to QuarterSpinner.set_fraction
]
[from fraction_changed to QuarterSquisher.set_fraction
]
-->
<TimeSensor DEF='QuarterAnimation' cycleInterval='3.0' startTime='-1.0'/> |
112 |
<!-- ROUTE information for QuarterSpinner node:
[from QuarterAnimation.fraction_changed to set_fraction
]
[from value_changed to StopWatch.set_rotation
]
-->
<OrientationInterpolator DEF='QuarterSpinner' key='0.0 0.5 1.0' keyValue='1.0 1.0 0.0 0.0 1.0 1.0 0.0 -3.14 1.0 1.0 0.0 -6.28'/> |
113 |
<!-- ROUTE information for QuarterSquisher node:
[from QuarterAnimation.fraction_changed to set_fraction
]
[from value_changed to StopWatch.set_scale
]
-->
<PositionInterpolator DEF='QuarterSquisher' key='0.0 0.25 0.5 0.75 1.0' keyValue='1.0 1.0 1.0 0.1 3.0 1.2 3.0 0.1 1.0 0.3 2.0 1.2 1.0 1.0 1.0'/> |
114 | < ROUTE fromNode='QuarterHour' fromField='cycleTime' toNode='QuarterAnimation' toField='set_startTime'/> |
115 | < ROUTE fromNode='QuarterAnimation' fromField='fraction_changed' toNode='QuarterSpinner' toField='set_fraction'/> |
116 | < ROUTE fromNode='QuarterAnimation' fromField='fraction_changed' toNode='QuarterSquisher' toField='set_fraction'/> |
117 | < ROUTE fromNode='QuarterSpinner' fromField='value_changed' toNode='StopWatch' toField='set_rotation'/> |
118 | < ROUTE fromNode='QuarterSquisher' fromField='value_changed' toNode='StopWatch' toField='set_scale'/> |
119 | </Scene> |
120 | </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.
Start
TouchSensor touchTime SFTime |
SweepTimer
TimeSensor set_startTime SFTime |
then
|
SweepTimer
TimeSensor fraction_changed SFFloat |
SweepSpinner
OrientationInterpolator set_fraction SFFloat |
then
|
SweepSpinner
OrientationInterpolator value_changed SFRotation |
SweepHand
Transform set_rotation SFRotation |
Stop
TouchSensor touchTime SFTime |
SweepTimer
TimeSensor set_stopTime SFTime |
then
|
SweepTimer
TimeSensor fraction_changed SFFloat |
SweepSpinner
OrientationInterpolator set_fraction SFFloat |
then
|
SweepSpinner
OrientationInterpolator value_changed SFRotation |
SweepHand
Transform set_rotation SFRotation |
HourTimer
TimeSensor fraction_changed SFFloat |
HourSpinner
OrientationInterpolator set_fraction SFFloat |
then
|
HourSpinner
OrientationInterpolator value_changed SFRotation |
HourHand
Transform set_rotation SFRotation |
MinuteTimer
TimeSensor fraction_changed SFFloat |
MinuteSpinner
OrientationInterpolator set_fraction SFFloat |
then
|
MinuteSpinner
OrientationInterpolator value_changed SFRotation |
MinuteHand
Transform set_rotation SFRotation |
QuarterHour
TimeSensor cycleTime SFTime |
QuarterAnimation
TimeSensor set_startTime SFTime |
then
|
QuarterAnimation
TimeSensor fraction_changed SFFloat |
QuarterSpinner
OrientationInterpolator set_fraction SFFloat |
then
|
QuarterSpinner
OrientationInterpolator value_changed SFRotation |
StopWatch
Transform set_rotation SFRotation |
|||
then
|
QuarterAnimation
TimeSensor fraction_changed SFFloat |
QuarterSquisher
PositionInterpolator set_fraction SFFloat |
then
|
QuarterSquisher
PositionInterpolator value_changed SFVec3f |
StopWatch
Transform set_scale SFVec3f |
SecondTimer
TimeSensor fraction_changed SFFloat |
SecondSpinner
OrientationInterpolator set_fraction SFFloat |
then
|
SecondSpinner
OrientationInterpolator value_changed SFRotation |
SecondHand
Transform set_rotation SFRotation |
<!--
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. -->