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='title' content=' SliderPrototype.x3d '/> |
6 | <meta name='creator' content='Mike Hunsberger'/> |
7 | <meta name='created' content='12 February 2001'/> |
8 | <meta name='modified' content='28 November 2019'/> |
9 | <meta name='description' content='External prototype of a slider to be used to control scenes where integer values are needed. This file is a combination of a slider prototype and a conversion program.'/> |
10 | <meta name=' warning ' content=' needs troubleshooting. '/> |
11 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Tools/ExerciseClock/SliderPrototype.x3d '/> |
12 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
13 | <meta name='license' content='../../license.html'/> |
14 | </head> |
15 | <Scene> |
16 | <WorldInfo title='SliderPrototype.x3d'/> |
17 | <ProtoDeclare name='ScaledSFFloat'> |
18 | <ProtoInterface> |
19 | <field name='oldMin' type='SFFloat' value='0' accessType='initializeOnly'/> |
20 | <field name='oldMax' type='SFFloat' value='1' accessType='initializeOnly'/> |
21 | <field name='newMin' type='SFFloat' value='0' accessType='initializeOnly'/> |
22 | <field name='newMax' type='SFFloat' value='1' accessType='initializeOnly'/> |
23 | <field name='set_oldMin' type='SFFloat' accessType='inputOnly'/> |
24 | <field name='set_oldMax' type='SFFloat' accessType='inputOnly'/> |
25 | <field name='set_newMin' type='SFFloat' accessType='inputOnly'/> |
26 | <field name='set_newMax' type='SFFloat' accessType='inputOnly'/> |
27 | <field name='set_value' type='SFFloat' accessType='inputOnly'/> |
28 | <field name='value_changed' type='SFFloat' accessType='outputOnly'/> |
29 | </ProtoInterface> |
30 | <ProtoBody> |
31 | <!-- Warning: VRML97-style scripting, not X3D Scene Authoring Interface (SAI) --> |
32 | <Script DEF='ScaledSFFloatScriptNode' url=' "ScaledSFFloatScript.class" "https://www.web3d.org/x3d/content/examples/Savage/Tools/ExerciseClock/ScaledSFFloatScript.class" '> |
33 | <field name='oldMin' type='SFFloat' accessType='initializeOnly'/> |
34 | <field name='oldMax' type='SFFloat' accessType='initializeOnly'/> |
35 | <field name='newMin' type='SFFloat' accessType='initializeOnly'/> |
36 | <field name='newMax' type='SFFloat' accessType='initializeOnly'/> |
37 | <field name='set_oldMin' type='SFFloat' accessType='inputOnly'/> |
38 | <field name='set_oldMax' type='SFFloat' accessType='inputOnly'/> |
39 | <field name='set_newMin' type='SFFloat' accessType='inputOnly'/> |
40 | <field name='set_newMax' type='SFFloat' accessType='inputOnly'/> |
41 | <field name='set_value' type='SFFloat' accessType='inputOnly'/> |
42 | <field name='value_changed' type='SFFloat' accessType='outputOnly'/> |
43 | <IS> |
44 | <connect nodeField='oldMin' protoField='oldMin'/> |
45 | <connect nodeField='oldMax' protoField='oldMax'/> |
46 | <connect nodeField='newMin' protoField='newMin'/> |
47 | <connect nodeField='newMax' protoField='newMax'/> |
48 | <connect nodeField='set_oldMin' protoField='set_oldMin'/> |
49 | <connect nodeField='set_oldMax' protoField='set_oldMax'/> |
50 | <connect nodeField='set_newMin' protoField='set_newMin'/> |
51 | <connect nodeField='set_newMax' protoField='set_newMax'/> |
52 | <connect nodeField='set_value' protoField='set_value'/> |
53 | <connect nodeField='value_changed' protoField='value_changed'/> |
54 | </IS> |
55 | </Script> |
56 | </ProtoBody> |
57 | </ProtoDeclare> |
58 | <ProtoDeclare name='SingleTypeConversion'> |
59 | <ProtoInterface> |
60 | <field name='SFBoolValue' type='SFBool' accessType='inputOnly'/> |
61 | <field name='SFFloatValue' type='SFFloat' accessType='inputOnly'/> |
62 | <field name='SFInt32Value' type='SFInt32' accessType='inputOnly'/> |
63 | <field name='SFStringValue' type='SFString' accessType='inputOnly'/> |
64 | <field name='SFBoolResult' type='SFBool' accessType='outputOnly'/> |
65 | <field name='SFFloatResult' type='SFFloat' accessType='outputOnly'/> |
66 | <field name='SFInt32Result' type='SFInt32' accessType='outputOnly'/> |
67 | <field name='SFStringResult' type='SFString' accessType='outputOnly'/> |
68 | <field name='MFStringResult' type='MFString' accessType='outputOnly'/> |
69 | </ProtoInterface> |
70 | <ProtoBody> |
71 | <!-- Warning: VRML97-style scripting, not X3D Scene Authoring Interface (SAI) --> |
72 | <Script DEF='SingleTypeConversionScriptNode' url=' "SingleTypeConversionScript.class" "https://www.web3d.org/x3d/content/examples/Savage/Tools/ExerciseClock/SingleTypeConversionScript.class" '> |
73 | <field name='SFBoolValue' type='SFBool' accessType='inputOnly'/> |
74 | <field name='SFFloatValue' type='SFFloat' accessType='inputOnly'/> |
75 | <field name='SFInt32Value' type='SFInt32' accessType='inputOnly'/> |
76 | <field name='SFStringValue' type='SFString' accessType='inputOnly'/> |
77 | <field name='SFBoolResult' type='SFBool' accessType='outputOnly'/> |
78 | <field name='SFFloatResult' type='SFFloat' accessType='outputOnly'/> |
79 | <field name='SFInt32Result' type='SFInt32' accessType='outputOnly'/> |
80 | <field name='SFStringResult' type='SFString' accessType='outputOnly'/> |
81 | <field name='MFStringResult' type='MFString' accessType='outputOnly'/> |
82 | <IS> |
83 | <connect nodeField='SFBoolValue' protoField='SFBoolValue'/> |
84 | <connect nodeField='SFFloatValue' protoField='SFFloatValue'/> |
85 | <connect nodeField='SFInt32Value' protoField='SFInt32Value'/> |
86 | <connect nodeField='SFStringValue' protoField='SFStringValue'/> |
87 | <connect nodeField='SFBoolResult' protoField='SFBoolResult'/> |
88 | <connect nodeField='SFFloatResult' protoField='SFFloatResult'/> |
89 | <connect nodeField='SFInt32Result' protoField='SFInt32Result'/> |
90 | <connect nodeField='SFStringResult' protoField='SFStringResult'/> |
91 | <connect nodeField='MFStringResult' protoField='MFStringResult'/> |
92 | </IS> |
93 | </Script> |
94 | </ProtoBody> |
95 | </ProtoDeclare> |
96 | <ProtoDeclare name='Slider'> |
97 | <ProtoInterface> |
98 | <field name='height' type='SFFloat' value='1' accessType='initializeOnly'/> |
99 | <field name='radius' type='SFFloat' value='.1' accessType='initializeOnly'/> |
100 | <field name='min' type='SFInt32' value='0' accessType='initializeOnly'/> |
101 | <field name='max' type='SFInt32' value='10' accessType='initializeOnly'/> |
102 | <field name='value' type='SFInt32' value='0' accessType='initializeOnly'/> |
103 | <field name='set_min' type='SFInt32' accessType='inputOnly'/> |
104 | <field name='set_max' type='SFInt32' accessType='inputOnly'/> |
105 | <field name='set_value' type='SFInt32' accessType='outputOnly'/> |
106 | <field name='value_changed' type='SFInt32' accessType='outputOnly'/> |
107 | </ProtoInterface> |
108 | <ProtoBody> |
109 | <Group> |
110 |
<!-- ROUTE information for CONNECTOR_TRANS node:
[from SLIDER_SCRIPT.connectorTrans_changed to set_translation
]
-->
<Transform DEF='CONNECTOR_TRANS'> |
111 | <Shape> |
112 | <Cylinder radius='.02'/> |
113 | <Appearance> |
114 | <Material diffuseColor='.8 .4 .8'/> |
115 | </Appearance> |
116 | </Shape> |
117 | </Transform> |
118 |
<!-- ROUTE information for BALL_TRANS node:
[from SLIDER_SCRIPT.ballTrans_changed to set_translation
]
-->
<Transform DEF='BALL_TRANS'> |
119 | <TouchSensor DEF='BALL_TOUCH'/> |
120 | <Shape> |
121 | <Sphere radius='.1'/> |
122 | <Appearance> |
123 | <Material diffuseColor='.3 .4 .8'/> |
124 | </Appearance> |
125 | </Shape> |
126 |
<!-- ROUTE information for BALL_PLANE node:
[from SLIDER_SCRIPT.maxBallPosition_changed to set_maxPosition
]
[from SLIDER_SCRIPT.minBallPosition_changed to set_minPosition
]
[from isActive to SLIDER_SCRIPT.set_dragActive
]
[from translation_changed to SLIDER_SCRIPT.set_ballTrans
]
-->
<PlaneSensor DEF='BALL_PLANE'/> |
127 | </Transform> |
128 |
<!-- ROUTE information for BOTTOM_DISK_TRANS node:
[from SLIDER_SCRIPT.bottomDiskTrans_changed to set_translation
]
-->
<Transform DEF='BOTTOM_DISK_TRANS'> |
129 |
<!-- ROUTE information for BOTTOM_DISK_TOUCH node:
[from isActive to SLIDER_SCRIPT.bottomDiskTouched
]
-->
<TouchSensor DEF='BOTTOM_DISK_TOUCH'/> |
130 | <Shape> |
131 | <Cylinder height='.05' radius='.1'/> |
132 | <Appearance> |
133 | <Material diffuseColor='.2 .3 .9'/> |
134 | </Appearance> |
135 | </Shape> |
136 | </Transform> |
137 |
<!-- ROUTE information for TOP_DISK_TRANS node:
[from SLIDER_SCRIPT.topDiskTrans_changed to set_translation
]
-->
<Transform DEF='TOP_DISK_TRANS'> |
138 |
<!-- ROUTE information for TOP_DISK_TOUCH node:
[from isActive to SLIDER_SCRIPT.topDiskTouched
]
-->
<TouchSensor DEF='TOP_DISK_TOUCH'/> |
139 | <Shape> |
140 | <Cylinder height='.05' radius='.1'/> |
141 | <Appearance> |
142 | <Material diffuseColor='.2 .3 .9'/> |
143 | </Appearance> |
144 | </Shape> |
145 | </Transform> |
146 | </Group> |
147 | <!-- Warning: VRML97-style scripting, not X3D Scene Authoring Interface (SAI) --> |
148 |
<!-- ROUTE information for SLIDER_SCRIPT node:
[from BALL_PLANE.isActive to set_dragActive
]
[from BALL_PLANE.translation_changed to set_ballTrans
]
[from BOTTOM_DISK_TOUCH.isActive to bottomDiskTouched
]
[from TOP_DISK_TOUCH.isActive to topDiskTouched
]
[from bottomDiskTrans_changed to BOTTOM_DISK_TRANS.set_translation
]
[from topDiskTrans_changed to TOP_DISK_TRANS.set_translation
]
[from connectorTrans_changed to CONNECTOR_TRANS.set_translation
]
[from ballTrans_changed to BALL_TRANS.set_translation
]
[from maxBallPosition_changed to BALL_PLANE.set_maxPosition
]
[from minBallPosition_changed to BALL_PLANE.set_minPosition
]
-->
<Script DEF='SLIDER_SCRIPT' url=' "SliderScript.class" "https://www.web3d.org/x3d/content/examples/Savage/Tools/ExerciseClock/SliderScript.class" '> |
149 | <field name='height' type='SFFloat' accessType='initializeOnly'/> |
150 | <field name='radius' type='SFFloat' accessType='initializeOnly'/> |
151 | <field name='min' type='SFInt32' accessType='initializeOnly'/> |
152 | <field name='max' type='SFInt32' accessType='initializeOnly'/> |
153 | <field name='value' type='SFInt32' accessType='initializeOnly'/> |
154 | <field name='set_min' type='SFInt32' accessType='inputOnly'/> |
155 | <field name='set_max' type='SFInt32' accessType='inputOnly'/> |
156 | <field name='set_value' type='SFInt32' accessType='outputOnly'/> |
157 | <field name='value_changed' type='SFInt32' accessType='outputOnly'/> |
158 | <field name='bottomDiskTouched' type='SFBool' accessType='inputOnly'/> |
159 | <field name='topDiskTouched' type='SFBool' accessType='inputOnly'/> |
160 | <field name='set_ballTrans' type='SFVec3f' accessType='inputOnly'/> |
161 | <field name='set_dragActive' type='SFBool' accessType='inputOnly'/> |
162 | <field name='topDiskTrans_changed' type='SFVec3f' accessType='outputOnly'/> |
163 | <field name='bottomDiskTrans_changed' type='SFVec3f' accessType='outputOnly'/> |
164 | <field name='connectorTrans_changed' type='SFVec3f' accessType='outputOnly'/> |
165 | <field name='ballTrans_changed' type='SFVec3f' accessType='outputOnly'/> |
166 | <field name='maxBallPosition_changed' type='SFVec2f' accessType='outputOnly'/> |
167 | <field name='minBallPosition_changed' type='SFVec2f' accessType='outputOnly'/> |
168 | <IS> |
169 | <connect nodeField='height' protoField='height'/> |
170 | <connect nodeField='radius' protoField='radius'/> |
171 | <connect nodeField='min' protoField='min'/> |
172 | <connect nodeField='max' protoField='max'/> |
173 | <connect nodeField='value' protoField='value'/> |
174 | <connect nodeField='set_min' protoField='set_min'/> |
175 | <connect nodeField='set_max' protoField='set_max'/> |
176 | <connect nodeField='set_value' protoField='set_value'/> |
177 | <connect nodeField='value_changed' protoField='value_changed'/> |
178 | </IS> |
179 | </Script> |
180 | < ROUTE fromNode='SLIDER_SCRIPT' fromField='bottomDiskTrans_changed' toNode='BOTTOM_DISK_TRANS' toField='set_translation'/> |
181 | < ROUTE fromNode='SLIDER_SCRIPT' fromField='topDiskTrans_changed' toNode='TOP_DISK_TRANS' toField='set_translation'/> |
182 | < ROUTE fromNode='SLIDER_SCRIPT' fromField='connectorTrans_changed' toNode='CONNECTOR_TRANS' toField='set_translation'/> |
183 | < ROUTE fromNode='SLIDER_SCRIPT' fromField='ballTrans_changed' toNode='BALL_TRANS' toField='set_translation'/> |
184 | < ROUTE fromNode='SLIDER_SCRIPT' fromField='maxBallPosition_changed' toNode='BALL_PLANE' toField='set_maxPosition'/> |
185 | < ROUTE fromNode='SLIDER_SCRIPT' fromField='minBallPosition_changed' toNode='BALL_PLANE' toField='set_minPosition'/> |
186 | < ROUTE fromNode='BALL_PLANE' fromField='isActive' toNode='SLIDER_SCRIPT' toField='set_dragActive'/> |
187 | < ROUTE fromNode='BALL_PLANE' fromField='translation_changed' toNode='SLIDER_SCRIPT' toField='set_ballTrans'/> |
188 | < ROUTE fromNode='BOTTOM_DISK_TOUCH' fromField='isActive' toNode='SLIDER_SCRIPT' toField='bottomDiskTouched'/> |
189 | < ROUTE fromNode='TOP_DISK_TOUCH' fromField='isActive' toNode='SLIDER_SCRIPT' toField='topDiskTouched'/> |
190 | </ProtoBody> |
191 | </ProtoDeclare> |
192 | <Anchor description='SliderExample' url=' "SliderExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/ExerciseClock/SliderExample.x3d" "SliderExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/ExerciseClock/SliderExample.wrl" '> |
193 | <Shape> |
194 | <Text string='"SliderPrototype" "holds prototype declarations" "" "Select text to view" "SliderTest.x3d"'> |
195 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
196 | </Text> |
197 | <Appearance> |
198 | <Material diffuseColor='0 0.6 0.6'/> |
199 | </Appearance> |
200 | </Shape> |
201 | </Anchor> |
202 | </Scene> |
203 | </X3D> |
Event Graph ROUTE Table entries with 10 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.
BALL_TOUCH
TouchSensor |
No direct ROUTE connection found for events to/from this node. |
line 192
Anchor |
description='SliderExample' User-interaction hint for this node. |
<!--
Color-coding 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)
<ProtoDeclare name='ProtoName'>
<field
name='fieldName'/> </ProtoDeclare>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->