| 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=' MfdScreen.x3d '/> |
| 6 | <meta name='description' content='This file defines an MFD screen that is inlined to create the cockpit console of a helicopter'/> |
| 7 | <meta name='creator' content='Doug Miller (original creator), Jane Wu (adapted from the original mfd.wrl created for vrtp demo helicopter)'/> |
| 8 | <meta name='created' content='19 February 1999'/> |
| 9 | <meta name='modified' content='20 October 2019'/> |
| 10 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/HelicopterUnitedStates/MfdScreen.x3d '/> |
| 11 |
<meta name='Image' content='JT-62-2.JPG' |
| 12 |
<meta name='Image' content='JM1-3.JPG' |
| 13 |
<meta name='Image' content='MFD.JPG' |
| 14 | <meta name='Sound' content='50CAL.WAV' /> |
| 15 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 16 | <meta name='license' content='../../license.html'/> |
| 17 | </head> |
| 18 | <Scene> |
| 19 | <WorldInfo title='MfdScreen.x3d'/> |
| 20 | <Group> |
| 21 | <Shape> |
| 22 | <Appearance DEF='GRAY'> |
| 23 | <Material diffuseColor='0.2 0.2 0.2'/> |
| 24 | </Appearance> |
| 25 | <Box size='0.26 0.21 0.05'/> |
| 26 | </Shape> |
| 27 | <Transform translation='0.00 0.00 0.03'> |
| 28 |
<!-- ROUTE information for MFD_SCREEN node:
[from CycleSelector.value_changed to set_whichChoice
]
-->
<Switch DEF='MFD_SCREEN' whichChoice='3'> |
| 29 | <Shape> |
| 30 | <Appearance> |
| 31 |
<!-- Material
GREEN_COLOR is a DEF node that has 4 USE nodes: USE_1, USE_2, USE_3, USE_4 --> <Material DEF='GREEN_COLOR' diffuseColor='0.0 1.0 0.0'/> |
| 32 | </Appearance> |
| 33 |
<!-- IndexedFaceSet
MFD_GEOMETRY is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
<IndexedFaceSet DEF='MFD_GEOMETRY' coordIndex='0 1 2 3 -1'> |
| 34 | <Coordinate point='-0.09 -0.07 0.01 0.09 -0.07 0.01 0.09 0.07 0.01 -0.09 0.07 0.01'/> |
| 35 | </IndexedFaceSet> |
| 36 | </Shape> |
| 37 | <Shape> |
| 38 | <Appearance> |
| 39 | <Material USE='GREEN_COLOR'/> |
| 40 |
<ImageTexture
url=' "JT-62-2.JPG |
| 41 | </Appearance> |
| 42 | <IndexedFaceSet USE='MFD_GEOMETRY'/> |
| 43 | </Shape> |
| 44 | <Shape> |
| 45 | <Appearance> |
| 46 | <Material USE='GREEN_COLOR'/> |
| 47 |
<ImageTexture
url=' "JM1-3.JPG |
| 48 | </Appearance> |
| 49 | <IndexedFaceSet USE='MFD_GEOMETRY'/> |
| 50 | </Shape> |
| 51 | <Shape> |
| 52 | <Appearance> |
| 53 | <Material USE='GREEN_COLOR'/> |
| 54 |
<ImageTexture
url=' "MFD.JPG |
| 55 | </Appearance> |
| 56 | <IndexedFaceSet USE='MFD_GEOMETRY'/> |
| 57 | </Shape> |
| 58 | </Switch> |
| 59 | </Transform> |
| 60 |
<!-- ROUTE information for FIFTY_CAL_SOUND node:
[from FiftyCalOnOffToggle.value_changed to set_whichChoice
]
-->
<Switch DEF='FIFTY_CAL_SOUND' whichChoice='-1'> |
| 61 | <Sound> |
| 62 | <AudioClip description='50 caliber machine gun' loop='true' url=' "50CAL.WAV " "https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/HelicopterUnitedStates/50CAL.WAV" '/> |
| 63 | </Sound> |
| 64 | </Switch> |
| 65 | <Transform translation='-0.11 -0.05 0.025'> |
| 66 | |
| 67 | <Appearance DEF='OFF_WHITE'> |
| 68 | <Material diffuseColor='0.75 0.75 0.75'/> |
| 69 | </Appearance> |
| 70 | <Box size='0.02 0.02 0.01'/> |
| 71 | </Shape> |
| 72 | </Transform> |
| 73 | <Transform translation='-0.11 -0.015 0.025'> |
| 74 | <Shape USE='BUTTON'/> |
| 75 | </Transform> |
| 76 | <Transform translation='-0.11 0.02 0.025'> |
| 77 | <Shape USE='BUTTON'/> |
| 78 | </Transform> |
| 79 | <Transform translation='-0.11 0.055 0.025'> |
| 80 | <Shape USE='BUTTON'/> |
| 81 | </Transform> |
| 82 | <Transform translation='0.11 -0.05 0.025'> |
| 83 | <Shape USE='BUTTON'/> |
| 84 | </Transform> |
| 85 | <Transform translation='0.11 -0.015 0.025'> |
| 86 | <Shape USE='BUTTON'/> |
| 87 | </Transform> |
| 88 | <Transform translation='0.11 0.02 0.025'> |
| 89 | <Shape USE='BUTTON'/> |
| 90 |
<!-- ROUTE information for RIGHT_BUTTON2 node:
[from isActive to FiftyCalOnOffToggle.set_boolean
]
-->
<TouchSensor DEF='RIGHT_BUTTON2' description='touch to activate'/> |
| 91 | </Transform> |
| 92 | <Transform translation='0.11 0.055 0.025'> |
| 93 | <Shape USE='BUTTON'/> |
| 94 |
<!-- ROUTE information for RIGHT_BUTTON1 node:
[from isActive to CycleSelector.set_boolean
]
-->
<TouchSensor DEF='RIGHT_BUTTON1' description='touch to activate'/> |
| 95 | </Transform> |
| 96 | <Transform translation='-0.065 -0.09 0.025'> |
| 97 | <Shape USE='BUTTON'/> |
| 98 | </Transform> |
| 99 | <Transform translation='-0.035 -0.09 0.025'> |
| 100 | <Shape USE='BUTTON'/> |
| 101 | </Transform> |
| 102 | <Transform translation='0.035 -0.09 0.025'> |
| 103 | <Shape USE='BUTTON'/> |
| 104 | </Transform> |
| 105 | <Transform translation='0.065 -0.09 0.025'> |
| 106 | <Shape USE='BUTTON'/> |
| 107 | </Transform> |
| 108 | <Transform rotation='1.0 0.0 0.0 1.57' translation='-0.11 -0.085 0.025'> |
| 109 | |
| 110 | <Appearance> |
| 111 | <Material USE='GREEN_COLOR'/> |
| 112 | </Appearance> |
| 113 | <Cylinder height='0.02' radius='0.0125'/> |
| 114 | </Shape> |
| 115 | </Transform> |
| 116 | <Transform rotation='1.0 0.0 0.0 1.57' translation='0.11 -0.085 0.025'> |
| 117 | <Shape USE='KNOB'/> |
| 118 | </Transform> |
| 119 | </Group> |
| 120 |
<!-- ROUTE information for CycleSelector node:
[from RIGHT_BUTTON1.isActive to set_boolean
]
[from value_changed to MFD_SCREEN.set_whichChoice
]
-->
<Script DEF='CycleSelector'> |
| 121 | <field name='value' type='SFInt32' value='0' accessType='initializeOnly'/> |
| 122 | <field name='set_boolean' type='SFBool' accessType='inputOnly'/> |
| 123 | <field name='value_changed' type='SFInt32' accessType='outputOnly'/> |
<![CDATA[
ecmascript:
function set_boolean(bool, eventTime)
{
if (bool == false)
return;
if (value == 3)
value = -1;
value++;
value_changed = value;
}
]]>
|
|
| 125 | </Script> |
| 126 |
<!-- ROUTE information for FiftyCalOnOffToggle node:
[from RIGHT_BUTTON2.isActive to set_boolean
]
[from value_changed to FIFTY_CAL_SOUND.set_whichChoice
]
-->
<Script DEF='FiftyCalOnOffToggle'> |
| 127 | <field name='value' type='SFInt32' value='-1' accessType='initializeOnly'/> |
| 128 | <field name='set_boolean' type='SFBool' accessType='inputOnly'/> |
| 129 | <field name='value_changed' type='SFInt32' accessType='outputOnly'/> |
<![CDATA[
ecmascript:
function set_boolean(bool, eventTime)
{
if (bool == false)
return;
if (value == 0)
value = -1;
else
value = 0;
value_changed = value;
}
]]>
|
|
| 131 | </Script> |
| 132 | < ROUTE fromNode='RIGHT_BUTTON1' fromField='isActive' toNode='CycleSelector' toField='set_boolean'/> |
| 133 | < ROUTE fromNode='CycleSelector' fromField='value_changed' toNode='MFD_SCREEN' toField='set_whichChoice'/> |
| 134 | < ROUTE fromNode='RIGHT_BUTTON2' fromField='isActive' toNode='FiftyCalOnOffToggle' toField='set_boolean'/> |
| 135 | < ROUTE fromNode='FiftyCalOnOffToggle' fromField='value_changed' toNode='FIFTY_CAL_SOUND' toField='set_whichChoice'/> |
| 136 | </Scene> |
| 137 | </X3D> |
Event Graph ROUTE Table entries with 4 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.
|
RIGHT_BUTTON1
TouchSensor isActive SFBool |
CycleSelector
Script set_boolean SFBool |
then
|
CycleSelector
Script value_changed SFInt32 |
MFD_SCREEN
Switch set_whichChoice SFInt32 |
|
RIGHT_BUTTON2
TouchSensor isActive SFBool |
FiftyCalOnOffToggle
Script set_boolean SFBool |
then
|
FiftyCalOnOffToggle
Script value_changed SFInt32 |
FIFTY_CAL_SOUND
Switch set_whichChoice SFInt32 |
<!--
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.
-->