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=' RearHatch.x3d '/> |
6 | <meta name='description' content='Osprey MV-22 rear hatch.'/> |
7 | <meta name='creator' content='Major William C. James USMC'/> |
8 | <meta name='created' content='23 September 2001'/> |
9 | <meta name='modified' content='7 December 2024'/> |
10 | <meta name='reference' content='Amended from VRML Sourcebook Figure 8.4 (used as base)'/> |
11 | <meta name='reference' content='https://www.navy.mil/Resources/Fact-Files/Display-FactFiles/Article/2417719/v-22b-osprey-tilt-rotor-aircraft'/> |
12 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/RearHatch.x3d '/> |
13 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
14 | <meta name='license' content='../../license.html'/> |
15 | </head> |
16 | <Scene> |
17 | <WorldInfo title='RearHatch.x3d'/> |
18 | <Background skyColor='.2 .2 .7'/> |
19 |
<!-- ROUTE information for ToggleScript node:
[from RearHatchSensor.isActive to toggle
]
[from stateTurnedTrue to TimeFilter.setStart
]
[from stateTurnedTrue to TimeFilter.setStop
]
-->
<Script DEF='ToggleScript'> |
20 | <field name='toggle' type='SFBool' accessType='inputOnly'/> |
21 | <field name='state' type='SFBool' value='true' accessType='initializeOnly'/> |
22 | <field name='stateTurnedTrue' type='SFBool' accessType='outputOnly'/> |
23 | <field name='stateTurnedFalse' type='SFBool' accessType='outputOnly'/> |
<![CDATA[
ecmascript: // setting the value of an eventOut variable also sends it as an event // you can view the output of print statements in the VRML Console function toggle ( value, ts ) { // only toggle on click (isActive true) not release (isActive false) if ( value == false ) return; if ( state == true ) { state = false; stateTurnedFalse = true; Browser.println ('ToggleScript.state = ' + state + ', stateTurnedFalse = ' + true); } else { state = true; stateTurnedTrue = true; Browser.println ('ToggleScript.state = ' + state + ', stateTurnedTrue = ' + true); } }
]]>
|
|
25 | </Script> |
26 |
<!-- ROUTE information for TimeFilter node:
[from ToggleScript.stateTurnedTrue to setStart
]
[from ToggleScript.stateTurnedTrue to setStop
]
[from startEventTime to CLOCK1.set_startTime
]
[from startEventTime to CLOCK2.set_startTime
]
-->
<Script DEF='TimeFilter'> |
27 | <field name='setStart' type='SFBool' accessType='inputOnly'/> |
28 | <field name='setStop' type='SFBool' accessType='inputOnly'/> |
29 | <field name='startEventTime' type='SFTime' accessType='outputOnly'/> |
30 | <field name='stopEventTime' type='SFTime' accessType='outputOnly'/> |
<![CDATA[
ecmascript: // setting the value of an eventOut variable also sends it as an event function setStart ( value, timeStamp ) { startEventTime = timeStamp; Browser.println ('TimeFilter.setStart (' + value + '), startEventTime = ' + timeStamp); Browser.println (' '); } function setStop ( value, timeStamp ) { stopEventTime = timeStamp; Browser.println ('TimeFilter.setStop (' + value + '), stopEventTime = ' + timeStamp); Browser.println (' '); }
]]>
|
|
32 | </Script> |
33 | <!-- Rear Hatch --> |
34 | <Group DEF='Rear_Hatch'> |
35 | <Transform DEF='RearHatchTransform' rotation='0 0 -1 1.57' translation='0 -4.6 -6.2'> |
36 | <Group DEF='RearHatch'> |
37 |
<!-- ROUTE information for RearHatchRotationSupport node:
[from RearHatchInterpolator.value_changed to set_rotation
]
[from RearHatchInterpolator1.value_changed to set_rotation
]
-->
<Transform DEF='RearHatchRotationSupport' rotation='0 1 0 .45'> |
38 | <Shape DEF='RotatingBar'> |
39 | <Cylinder height='3.9' radius='.2'/> |
40 | <Appearance> |
41 | <Material diffuseColor='.5 .5 .5' shininess='.5'/> |
42 | </Appearance> |
43 | </Shape> |
44 | <Transform DEF='Hatch'> |
45 | <Transform rotation='0 0 -1 1.57' translation='0 0 -2.5'> |
46 | <Shape> |
47 | <Box size='3.85 .2 5'/> |
48 | <Appearance> |
49 | <Material diffuseColor='.5 .5 .5' shininess='.5'/> |
50 | </Appearance> |
51 | </Shape> |
52 | </Transform> |
53 | </Transform> |
54 | </Transform> |
55 | </Group> |
56 | </Transform> |
57 |
<!-- ROUTE information for RearHatchSensor node:
[from touchTime to CLOCK1.set_startTime
]
[from isActive to ToggleScript.toggle
]
-->
<TouchSensor DEF='RearHatchSensor' description='touch to open'/> |
58 |
<!-- ROUTE information for CLOCK1 node:
[from RearHatchSensor.touchTime to set_startTime
]
[from TimeFilter.startEventTime to set_startTime
]
[from fraction_changed to RearHatchInterpolator.set_fraction
]
-->
<TimeSensor DEF='CLOCK1' cycleInterval='4'/> |
59 |
<!-- ROUTE information for RearHatchInterpolator node:
[from CLOCK1.fraction_changed to set_fraction
]
[from value_changed to RearHatchRotationSupport.set_rotation
]
-->
<OrientationInterpolator DEF='RearHatchInterpolator' key='0.0 1.0' keyValue='0.0 1.0 0.0 0.45 0.0 1.0 0.0 -0.2'/> |
60 | <!-- Up_Ramp --> |
61 |
<!-- ROUTE information for CLOCK2 node:
[from TimeFilter.startEventTime to set_startTime
]
[from fraction_changed to RearHatchInterpolator1.set_fraction
]
-->
<TimeSensor DEF='CLOCK2' cycleInterval='4'/> |
62 |
<!-- ROUTE information for RearHatchInterpolator1 node:
[from CLOCK2.fraction_changed to set_fraction
]
[from value_changed to RearHatchRotationSupport.set_rotation
]
-->
<OrientationInterpolator DEF='RearHatchInterpolator1' key='0.0 1.0' keyValue='0.0 1.0 0.0 -.2 0.0 1.0 0.0 0.45'/> |
63 | </Group> |
64 | <!-- Down_Ramp_Code --> |
65 | < ROUTE fromNode='RearHatchSensor' fromField='touchTime' toNode='CLOCK1' toField='set_startTime'/> |
66 | < ROUTE fromNode='CLOCK1' fromField='fraction_changed' toNode='RearHatchInterpolator' toField='set_fraction'/> |
67 | < ROUTE fromNode='RearHatchInterpolator' fromField='value_changed' toNode='RearHatchRotationSupport' toField='set_rotation'/> |
68 | <!-- Toggle_Code --> |
69 | < ROUTE fromNode='RearHatchSensor' fromField='isActive' toNode='ToggleScript' toField='toggle'/> |
70 | < ROUTE fromNode='RearHatchInterpolator1' fromField='value_changed' toNode='RearHatchRotationSupport' toField='set_rotation'/> |
71 | <!-- Up_Ramp_Code --> |
72 | < ROUTE fromNode='CLOCK2' fromField='fraction_changed' toNode='RearHatchInterpolator1' toField='set_fraction'/> |
73 | < ROUTE fromNode='ToggleScript' fromField='stateTurnedTrue' toNode='TimeFilter' toField='setStart'/> |
74 | < ROUTE fromNode='ToggleScript' fromField='stateTurnedTrue' toNode='TimeFilter' toField='setStop'/> |
75 | < ROUTE fromNode='TimeFilter' fromField='startEventTime' toNode='CLOCK1' toField='set_startTime'/> |
76 | < ROUTE fromNode='TimeFilter' fromField='startEventTime' toNode='CLOCK2' toField='set_startTime'/> |
77 | </Scene> |
78 | </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.
<!--
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)
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->