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='BooleanSequencerExample.x3d'/> |
6 | <meta name='description' content='This example shows how to use the BooleanSequencer prototype in an animated scenario.'/> |
7 | <meta name='creator' content='Don Brutzman, Estuko Lippi, Jeff Weekley, Jane Wu'/> |
8 | <meta name='created' content='10 August 2001'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name='reference' content='https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#ScalarInterpolator'/> |
11 | <meta name='subject' content='boolean sequencer'/> |
12 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/development/BooleanSequencerExample.x3d'/> |
13 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
14 | <meta name='license' content='../license.html'/> |
15 | </head> |
16 | <Scene> |
17 | <WorldInfo title='BooleanSequencerExample.x3d'/> |
18 | <Group DEF='HUDGroup'> |
19 |
<!-- ROUTE information for WhereSensor node:
[from position_changed to BillboardWhereTransform.set_translation
]
[from orientation_changed to BillboardWhereTransform.set_rotation
]
-->
<ProximitySensor DEF='WhereSensor' size='1000 1000 1000'/> |
20 |
<!-- ROUTE information for BillboardWhereTransform node:
[from WhereSensor.position_changed to set_translation
]
[from WhereSensor.orientation_changed to set_rotation
]
-->
<Transform DEF='BillboardWhereTransform'> |
21 | <Transform rotation='1 0 0 -0.03' translation='0 0 -12'> |
22 | <Billboard> |
23 | <Transform DEF='BillboardPlaneTransform'> |
24 |
<!-- ROUTE information for Toucher node:
[from touchTime to Clock.set_startTime
]
-->
<TouchSensor DEF='Toucher' description='Click text to start clock and run multiple BooleanSequencers'/> |
25 | <Shape> |
26 | <Appearance> |
27 | <Material diffuseColor='0 1 1'/> |
28 | </Appearance> |
29 | <Text string='"Click text to start clock, run" "multiple BooleanSequencers" "" "" "" "See Viewpoint description" "for bound Viewpoint number"'> |
30 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
31 | </Text> |
32 | </Shape> |
33 | </Transform> |
34 | </Billboard> |
35 | </Transform> |
36 | </Transform> |
37 | < ROUTE fromNode='WhereSensor' fromField='position_changed' toNode='BillboardWhereTransform' toField='set_translation'/> |
38 | < ROUTE fromNode='WhereSensor' fromField='orientation_changed' toNode='BillboardWhereTransform' toField='set_rotation'/> |
39 | </Group> |
40 |
<!-- ROUTE information for Clock node:
[from Toucher.touchTime to set_startTime
]
[from fraction_changed to LeftViewBinder.set_fraction
]
[from fraction_changed to BackViewBinder.set_fraction
]
[from fraction_changed to RightViewBinder.set_fraction
]
[from fraction_changed to TopViewBinder.set_fraction
]
[from fraction_changed to FrontDownViewBinder.set_fraction
]
[from fraction_changed to BottomViewBinder.set_fraction
]
[from fraction_changed to Debug.setFraction
]
-->
<TimeSensor DEF='Clock' cycleInterval='10'/> |
41 | < ROUTE fromNode='Toucher' fromField='touchTime' toNode='Clock' toField='set_startTime'/> |
42 |
<!-- ROUTE information for FrontUpViewpoint node:
[from isBound to Debug.setFrontUpViewBind
]
-->
<Viewpoint DEF='FrontUpViewpoint' description='View 0, Front Up'/> |
43 | <Group DEF='AnimatedView1'> |
44 |
<!-- ROUTE information for LeftViewpoint node:
[from LeftViewBinder.value_changed to set_bind
]
[from isBound to Debug.setLeftViewBind
]
-->
<Viewpoint DEF='LeftViewpoint' description='View 1, Left' orientation='0 1 0 -1.57' position='-10 0 0'/> |
45 |
<!-- ROUTE information for LeftViewBinder node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to LeftViewpoint.set_bind
]
[from value_changed to Debug.setLeftBSOutput
]
-->
<BooleanSequencer DEF='LeftViewBinder' key='0 0.1 0.25' keyValue='false true false'/> |
46 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='LeftViewBinder' toField='set_fraction'/> |
47 | < ROUTE fromNode='LeftViewBinder' fromField='value_changed' toNode='LeftViewpoint' toField='set_bind'/> |
48 | </Group> |
49 | <Group DEF='AnimatedView2'> |
50 |
<!-- ROUTE information for BackViewpoint node:
[from BackViewBinder.value_changed to set_bind
]
[from isBound to Debug.setBackViewBind
]
-->
<Viewpoint DEF='BackViewpoint' description='View 2, Back' orientation='0 1 0 -3.14' position='0 0 -10'/> |
51 |
<!-- ROUTE information for BackViewBinder node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to BackViewpoint.set_bind
]
[from value_changed to Debug.setBackBSOutput
]
-->
<BooleanSequencer DEF='BackViewBinder' key='0 0.375 0.475' keyValue='false true false'/> |
52 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='BackViewBinder' toField='set_fraction'/> |
53 | < ROUTE fromNode='BackViewBinder' fromField='value_changed' toNode='BackViewpoint' toField='set_bind'/> |
54 | </Group> |
55 | <Group DEF='AnimatedView3'> |
56 |
<!-- ROUTE information for RightViewpoint node:
[from RightViewBinder.value_changed to set_bind
]
[from isBound to Debug.setRightViewBind
]
-->
<Viewpoint DEF='RightViewpoint' description='View 3, Right' orientation='0 1 0 1.57' position='10 0 0'/> |
57 |
<!-- ROUTE information for RightViewBinder node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to RightViewpoint.set_bind
]
[from value_changed to Debug.setRightBSOutput
]
-->
<BooleanSequencer DEF='RightViewBinder' key='0 0.5 0.6' keyValue='false true false'/> |
58 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='RightViewBinder' toField='set_fraction'/> |
59 | < ROUTE fromNode='RightViewBinder' fromField='value_changed' toNode='RightViewpoint' toField='set_bind'/> |
60 | </Group> |
61 | <Group DEF='AnimatedView4'> |
62 |
<!-- ROUTE information for TopViewpoint node:
[from TopViewBinder.value_changed to set_bind
]
[from isBound to Debug.setTopViewBind
]
-->
<Viewpoint DEF='TopViewpoint' description='View 4, Top' orientation='1 0 0 -1.57' position='0 10 0'/> |
63 |
<!-- ROUTE information for TopViewBinder node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to TopViewpoint.set_bind
]
[from value_changed to Debug.setTopBSOutput
]
-->
<BooleanSequencer DEF='TopViewBinder' key='0.625 0.725' keyValue='true false'/> |
64 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='TopViewBinder' toField='set_fraction'/> |
65 | < ROUTE fromNode='TopViewBinder' fromField='value_changed' toNode='TopViewpoint' toField='set_bind'/> |
66 | </Group> |
67 | <Group DEF='AnimatedView5'> |
68 |
<!-- ROUTE information for FrontDownViewpoint node:
[from FrontDownViewBinder.value_changed to set_bind
]
[from isBound to Debug.setFrontDownViewBind
]
-->
<Viewpoint DEF='FrontDownViewpoint' description='View 5, Front Down' orientation='1 0 0 -3.14' position='0 0 -10'/> |
69 |
<!-- ROUTE information for FrontDownViewBinder node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to FrontDownViewpoint.set_bind
]
[from value_changed to Debug.setFrontDownBSOutput
]
-->
<BooleanSequencer DEF='FrontDownViewBinder' key='0.75 0.85' keyValue='true false'/> |
70 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='FrontDownViewBinder' toField='set_fraction'/> |
71 | < ROUTE fromNode='FrontDownViewBinder' fromField='value_changed' toNode='FrontDownViewpoint' toField='set_bind'/> |
72 | </Group> |
73 | <Group DEF='AnimatedView6'> |
74 |
<!-- ROUTE information for BottomViewpoint node:
[from BottomViewBinder.value_changed to set_bind
]
[from isBound to Debug.setBottomViewBind
]
-->
<Viewpoint DEF='BottomViewpoint' description='View 6, Bottom' orientation='1 0 0 1.57' position='0 -10 0'/> |
75 |
<!-- ROUTE information for BottomViewBinder node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to BottomViewpoint.set_bind
]
[from value_changed to Debug.setBottomBSOutput
]
-->
<BooleanSequencer DEF='BottomViewBinder' key='0.875 0.975' keyValue='true false'/> |
76 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='BottomViewBinder' toField='set_fraction'/> |
77 | < ROUTE fromNode='BottomViewBinder' fromField='value_changed' toNode='BottomViewpoint' toField='set_bind'/> |
78 | </Group> |
79 | <Switch DEF='DebugSwitch' whichChoice='0'> |
80 | <Group> |
81 |
<!-- ROUTE information for Debug node:
[from Clock.fraction_changed to setFraction
]
[from FrontUpViewpoint.isBound to setFrontUpViewBind
]
[from LeftViewpoint.isBound to setLeftViewBind
]
[from BackViewpoint.isBound to setBackViewBind
]
[from RightViewpoint.isBound to setRightViewBind
]
[from TopViewpoint.isBound to setTopViewBind
]
[from FrontDownViewpoint.isBound to setFrontDownViewBind
]
[from BottomViewpoint.isBound to setBottomViewBind
]
[from LeftViewBinder.value_changed to setLeftBSOutput
]
[from BackViewBinder.value_changed to setBackBSOutput
]
[from RightViewBinder.value_changed to setRightBSOutput
]
[from TopViewBinder.value_changed to setTopBSOutput
]
[from FrontDownViewBinder.value_changed to setFrontDownBSOutput
]
[from BottomViewBinder.value_changed to setBottomBSOutput
]
-->
<Script DEF='Debug'> |
82 | <field name='setFraction' type='SFFloat' accessType='inputOnly'/> |
83 | <field name='setFrontUpViewBind' type='SFBool' accessType='inputOnly'/> |
84 | <field name='setLeftViewBind' type='SFBool' accessType='inputOnly'/> |
85 | <field name='setBackViewBind' type='SFBool' accessType='inputOnly'/> |
86 | <field name='setRightViewBind' type='SFBool' accessType='inputOnly'/> |
87 | <field name='setTopViewBind' type='SFBool' accessType='inputOnly'/> |
88 | <field name='setFrontDownViewBind' type='SFBool' accessType='inputOnly'/> |
89 | <field name='setBottomViewBind' type='SFBool' accessType='inputOnly'/> |
90 | <field name='setFrontUpBSOutput' type='SFBool' accessType='inputOnly'/> |
91 | <field name='setLeftBSOutput' type='SFBool' accessType='inputOnly'/> |
92 | <field name='setBackBSOutput' type='SFBool' accessType='inputOnly'/> |
93 | <field name='setRightBSOutput' type='SFBool' accessType='inputOnly'/> |
94 | <field name='setTopBSOutput' type='SFBool' accessType='inputOnly'/> |
95 | <field name='setFrontDownBSOutput' type='SFBool' accessType='inputOnly'/> |
96 | <field name='setBottomBSOutput' type='SFBool' accessType='inputOnly'/> |
98 | </Script> |
99 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='Debug' toField='setFraction'/> |
100 | < ROUTE fromNode='FrontUpViewpoint' fromField='isBound' toNode='Debug' toField='setFrontUpViewBind'/> |
101 | < ROUTE fromNode='LeftViewpoint' fromField='isBound' toNode='Debug' toField='setLeftViewBind'/> |
102 | < ROUTE fromNode='BackViewpoint' fromField='isBound' toNode='Debug' toField='setBackViewBind'/> |
103 | < ROUTE fromNode='RightViewpoint' fromField='isBound' toNode='Debug' toField='setRightViewBind'/> |
104 | < ROUTE fromNode='TopViewpoint' fromField='isBound' toNode='Debug' toField='setTopViewBind'/> |
105 | < ROUTE fromNode='FrontDownViewpoint' fromField='isBound' toNode='Debug' toField='setFrontDownViewBind'/> |
106 | < ROUTE fromNode='BottomViewpoint' fromField='isBound' toNode='Debug' toField='setBottomViewBind'/> |
107 | < ROUTE fromNode='LeftViewBinder' fromField='value_changed' toNode='Debug' toField='setLeftBSOutput'/> |
108 | < ROUTE fromNode='BackViewBinder' fromField='value_changed' toNode='Debug' toField='setBackBSOutput'/> |
109 | < ROUTE fromNode='RightViewBinder' fromField='value_changed' toNode='Debug' toField='setRightBSOutput'/> |
110 | < ROUTE fromNode='TopViewBinder' fromField='value_changed' toNode='Debug' toField='setTopBSOutput'/> |
111 | < ROUTE fromNode='FrontDownViewBinder' fromField='value_changed' toNode='Debug' toField='setFrontDownBSOutput'/> |
112 | < ROUTE fromNode='BottomViewBinder' fromField='value_changed' toNode='Debug' toField='setBottomBSOutput'/> |
113 | </Group> |
114 | </Switch> |
115 | <Transform> |
116 | <Shape> |
117 | <Appearance> |
118 | <Material diffuseColor='1 1 0'/> |
119 | </Appearance> |
120 | <Box size='2 0.1 0.35'/> |
121 | </Shape> |
122 | <Transform translation='-1 0 0'> |
123 | <Shape> |
124 | <Appearance> |
125 | <Material diffuseColor='1 0 0'/> |
126 | </Appearance> |
127 | <Sphere radius='0.2'/> |
128 | </Shape> |
129 | </Transform> |
130 | <Transform translation='1 0 0'> |
131 | <Shape> |
132 | <Appearance> |
133 | <Material diffuseColor='0 1 0'/> |
134 | </Appearance> |
135 | <Sphere radius='0.2'/> |
136 | </Shape> |
137 | </Transform> |
138 | </Transform> |
139 | <Transform> |
140 | <Shape> |
141 | <Appearance> |
142 | <Material diffuseColor='0 0 1'/> |
143 | </Appearance> |
144 | <Cone/> |
145 | </Shape> |
146 | </Transform> |
147 | </Scene> |
148 | </X3D> |
Event Graph ROUTE Table entries with 29 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.
WhereSensor
ProximitySensor position_changed SFVec3f |
BillboardWhereTransform
Transform set_translation SFVec3f |
|
WhereSensor
ProximitySensor orientation_changed SFRotation |
BillboardWhereTransform
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.
-->