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='NetworkReroutingAlternateRoutes.x3d'/> |
6 | <meta name='description' content='This scene demonstrates that even though a minimal interference secondary route has been identified in case of link failure, (a) both routes may be invalid due to an overlap at a critical link, and (b) some reasonable third path may exist to route packets. Note that the hop count is larger (by 1) for each successive route. By pushing the right rear button, the critical link that overlaps the primary and secondary route will turn red opaque.'/> |
7 | <meta name='creator' content='Bill Fischer'/> |
8 | <meta name='translator' content='Xeena'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name='modified' content='20 October 2019'/> |
11 | <meta name='Image' content='NetworkReroutingAlternateRoutes.png'/> |
12 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/Networking/NetworkReroutingAlternateRoutes.x3d'/> |
13 | <meta name='reference' content='NetworkReroutingRoutes.x3d'/> |
14 | <meta name='reference' content='NetworkReroutingNetwork.x3d'/> |
15 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
16 | <meta name='license' content='../license.html'/> |
17 | </head> |
18 | <Scene> |
19 | <WorldInfo title='NetworkReroutingAlternateRoutes.x3d'/> |
20 | <Viewpoint DEF='default' description='Network Rerouting Alternate Routes' orientation='1 0 0 -.5' position='0 6 10'/> |
21 | <Group DEF='default_network'> |
22 | <Transform> |
23 | <Inline DEF='network' url=' "NetworkReroutingNetwork.x3d" "https://www.web3d.org/x3d/content/examples/Basic/Networking/NetworkReroutingNetwork.x3d" "NetworkReroutingNetwork.wrl" "https://www.web3d.org/x3d/content/examples/Basic/Networking/NetworkReroutingNetwork.wrl" '/> |
24 | </Transform> |
25 | </Group> |
26 | <Group> |
27 | <Transform> |
28 | <Inline DEF='routes' url=' "NetworkReroutingRoutes.x3d" "https://www.web3d.org/x3d/content/examples/Basic/Networking/NetworkReroutingRoutes.x3d" "NetworkReroutingRoutes.wrl" "https://www.web3d.org/x3d/content/examples/Basic/Networking/NetworkReroutingRoutes.wrl" '/> |
29 | </Transform> |
30 | </Group> |
31 | <Group> |
32 | <Transform rotation='0 1 0 -.785' translation='-3 -.5 1'> |
33 | <Transform rotation='0 0 1 1.57'> |
34 | <Shape> |
35 | <Appearance> |
36 |
<!-- ROUTE information for pipe_material node:
[from linkFailure.toggleValue to transparency
]
[from linkFailure.transparency to transparency
]
-->
<Material DEF='pipe_material' diffuseColor='.8 0 0' transparency='1'/> |
37 | </Appearance> |
38 | <Cylinder radius='.1'/> |
39 | </Shape> |
40 | </Transform> |
41 | </Transform> |
42 | <Transform rotation='0 1 0 .785' translation='-1 -.5 1'> |
43 | <Transform rotation='0 0 1 1.57'> |
44 | <Shape> |
45 | <Appearance> |
46 |
<!-- Material
pipe_material2 is a DEF node that has 2 USE nodes: USE_1, USE_2
<!-- ROUTE information for pipe_material2 node: [from nodeFailure.toggleValue to transparency ] [from nodeFailure.transparency to transparency ] --> <Material DEF='pipe_material2' diffuseColor='.8 0 0' transparency='1'/> |
47 | </Appearance> |
48 | <Cylinder radius='.1'/> |
49 | </Shape> |
50 | </Transform> |
51 | </Transform> |
52 | <Transform rotation='0 1 0 .785' translation='-3 -.5 3'> |
53 | <Transform rotation='0 0 1 1.57'> |
54 | <Shape> |
55 | <Appearance> |
56 | <Material USE='pipe_material2'/> |
57 | </Appearance> |
58 | <Cylinder radius='.1'/> |
59 | </Shape> |
60 | </Transform> |
61 | </Transform> |
62 | <Transform rotation='0 1 0 -.785' translation='-3 -.5 1'> |
63 | <Transform rotation='0 0 1 1.57'> |
64 | <Shape> |
65 | <Appearance> |
66 | <Material USE='pipe_material2'/> |
67 | </Appearance> |
68 | <Cylinder radius='.1'/> |
69 | </Shape> |
70 | </Transform> |
71 | </Transform> |
72 | <Transform/> |
73 | <Transform scale='.4 .4 .4' translation='4 -.5 -6'> |
74 | <Group> |
75 | <Transform scale='1 1.5 1' translation='0 -.5 0'> |
76 | <Shape> |
77 | <Appearance> |
78 | <Material diffuseColor='.5 .5 .5'/> |
79 | </Appearance> |
80 | <Box/> |
81 | </Shape> |
82 | </Transform> |
83 | <Shape> |
84 | <Appearance> |
85 | <Material emissiveColor='1 0 0'/> |
86 | </Appearance> |
87 | <Cylinder height='2.5' radius='.5'/> |
88 | </Shape> |
89 |
<!-- ROUTE information for red_pipe node:
[from isActive to linkFailure.toggle
]
-->
<TouchSensor DEF='red_pipe' description='#1 red pipe touchsensor'/> |
90 | <Transform translation='0 11 0'> |
91 | <Billboard> |
92 | <Shape> |
93 | <Text string='"Link Error"'> |
94 | <FontStyle horizontal='false' style='BOLD'/> |
95 | </Text> |
96 | <Appearance> |
97 | <Material emissiveColor='1 0 0'/> |
98 | </Appearance> |
99 | </Shape> |
100 | </Billboard> |
101 | </Transform> |
102 | </Group> |
103 | <Group> |
104 | <Transform scale='1 1.5 1' translation='3 -.5 0'> |
105 | <Shape> |
106 | <Appearance> |
107 | <Material diffuseColor='.5 .5 .5'/> |
108 | </Appearance> |
109 | <Box/> |
110 | </Shape> |
111 | </Transform> |
112 | <Transform translation='3 0 0'> |
113 | <Shape> |
114 | <Appearance> |
115 | <Material emissiveColor='1 0 0'/> |
116 | </Appearance> |
117 | <Cylinder height='2.5' radius='.5'/> |
118 | </Shape> |
119 |
<!-- ROUTE information for red_pipe2 node:
[from isActive to nodeFailure.toggle
]
-->
<TouchSensor DEF='red_pipe2' description='#2 red pipe touchsensor'/> |
120 | </Transform> |
121 | <Transform translation='3 11 0'> |
122 | <Billboard> |
123 | <Shape> |
124 | <Text string='"Node Error"'> |
125 | <FontStyle horizontal='false' style='BOLD'/> |
126 | </Text> |
127 | <Appearance> |
128 | <Material emissiveColor='1 0 0'/> |
129 | </Appearance> |
130 | </Shape> |
131 | </Billboard> |
132 | </Transform> |
133 | </Group> |
134 | </Transform> |
135 |
<!-- ROUTE information for linkFailure node:
[from red_pipe.isActive to toggle
]
[from toggleValue to pipe_material.transparency
]
[from transparency to pipe_material.transparency
]
-->
<Script DEF='linkFailure'> |
136 | <field name='toggle' type='SFBool' accessType='inputOnly'/> |
137 | <field name='state' type='SFBool' value='false' accessType='initializeOnly'/> |
138 | <field name='toggleValue' type='SFFloat' accessType='outputOnly'/> |
139 | <field name='transState' type='SFFloat' value='1' accessType='initializeOnly'/> |
140 | <field name='transparency' type='SFFloat' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function toggle ( value, ts ) { if(value == true){ state = !state; toggleValue = state; } if(state){ transState = 0; transparency = transState; } else{ transState = 1; transparency = transState; } }
]]>
|
|
142 | </Script> |
143 |
<!-- ROUTE information for nodeFailure node:
[from red_pipe2.isActive to toggle
]
[from toggleValue to pipe_material2.transparency
]
[from transparency to pipe_material2.transparency
]
-->
<Script DEF='nodeFailure'> |
144 | <field name='toggle' type='SFBool' accessType='inputOnly'/> |
145 | <field name='state' type='SFBool' value='false' accessType='initializeOnly'/> |
146 | <field name='toggleValue' type='SFFloat' accessType='outputOnly'/> |
147 | <field name='transState' type='SFFloat' value='1' accessType='initializeOnly'/> |
148 | <field name='transparency' type='SFFloat' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function toggle ( value, ts ) { if(value == true){ state = !state; toggleValue = state; } if(state){ transState = 0; transparency = transState; } else{ transState = 1; transparency = transState; } }
]]>
|
|
150 | </Script> |
151 | </Group> |
152 | < ROUTE fromNode='red_pipe' fromField='isActive' toNode='linkFailure' toField='toggle'/> |
153 | < ROUTE fromNode='linkFailure' fromField='toggleValue' toNode='pipe_material' toField='transparency'/> |
154 | < ROUTE fromNode='linkFailure' fromField='transparency' toNode='pipe_material' toField='transparency'/> |
155 | < ROUTE fromNode='red_pipe2' fromField='isActive' toNode='nodeFailure' toField='toggle'/> |
156 | < ROUTE fromNode='nodeFailure' fromField='toggleValue' toNode='pipe_material2' toField='transparency'/> |
157 | < ROUTE fromNode='nodeFailure' fromField='transparency' toNode='pipe_material2' toField='transparency'/> |
158 | </Scene> |
159 | </X3D> |
Event Graph ROUTE Table entries with 6 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.
red_pipe
TouchSensor isActive SFBool |
linkFailure
Script toggle SFBool |
then
|
linkFailure
Script toggleValue SFFloat |
pipe_material
Material transparency SFFloat |
||
then
|
linkFailure
Script transparency SFFloat |
pipe_material
Material transparency SFFloat |
red_pipe2
TouchSensor isActive SFBool |
nodeFailure
Script toggle SFBool |
then
|
nodeFailure
Script toggleValue SFFloat |
pipe_material2
Material transparency SFFloat |
||
then
|
nodeFailure
Script transparency SFFloat |
pipe_material2
Material transparency SFFloat |
<!--
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. -->