X3D Model Documentation: MfdScreen.x3d

  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='titlecontent='MfdScreen.x3d'/>
  6            <meta name='descriptioncontent='This file defines an MFD screen that is inlined to create the cockpit console of a helicopter'/>
  7            <meta name='creatorcontent='Doug Miller (original creator), Jane Wu (adapted from the original mfd.wrl created for vrtp demo helicopter)'/>
  8            <meta name='createdcontent='19 February 1999'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='identifiercontent='https://savage.nps.edu/Savage/AircraftHelicopters/HelicopterUnitedStates/MfdScreen.x3d'/>
 11            <meta name='Imagecontent='JT-62-2.JPG'/>
 12            <meta name='Imagecontent='JM1-3.JPG'/>
 13            <meta name='Imagecontent='MFD.JPG'/>
 14            <meta name='Soundcontent='50CAL.WAV'/>
 15            <meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
 16            <meta name='licensecontent='../../license.html'/>
 17       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: BUTTON, CycleSelector, FIFTY_CAL_SOUND, FiftyCalOnOffToggle, GRAY, GREEN_COLOR, KNOB, MFD_GEOMETRY, MFD_SCREEN, OFF_WHITE, RIGHT_BUTTON1, RIGHT_BUTTON2
-->
 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_SCREENwhichChoice='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_COLORdiffuseColor='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_GEOMETRYcoordIndex='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" "https://savage.nps.edu/Savage/AircraftHelicopters/HelicopterUnitedStates/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" "https://savage.nps.edu/Savage/AircraftHelicopters/HelicopterUnitedStates/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" "https://savage.nps.edu/Savage/AircraftHelicopters/HelicopterUnitedStates/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_SOUNDwhichChoice='-1'>
 61                      <Sound>
 62                           <AudioClip description='50 caliber machine gunloop='true'   url=' "50CAL.WAV" "https://savage.nps.edu/Savage/AircraftHelicopters/HelicopterUnitedStates/50CAL.WAV" '/>
 63                      </Sound>
 64                 </Switch>
 65                 <Transform translation='-0.11 -0.05 0.025'>
 66 
                    <!-- Shape BUTTON is a DEF node that has 11 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6, USE_7, USE_8, USE_9, USE_10, USE_11 -->
                    <Shape DEF='BUTTON'>
 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_BUTTON2description='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_BUTTON1description='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.57translation='-0.11 -0.085 0.025'>
109 
                    <!-- Shape KNOB is a DEF node that has 1 USE node: USE_1 -->
                    <Shape DEF='KNOB'>
110                           <Appearance>
111                                <Material USE='GREEN_COLOR'/>
112                           </Appearance>
113                           <Cylinder height='0.02radius='0.0125'/>
114                      </Shape>
115                 </Transform>
116                 <Transform rotation='1.0 0.0 0.0 1.57translation='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='valuetype='SFInt32value='0accessType='initializeOnly'/>
122                 <field name='set_booleantype='SFBoolaccessType='inputOnly'/>
123                 <field name='value_changedtype='SFInt32accessType='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='valuetype='SFInt32value='-1accessType='initializeOnly'/>
128                 <field name='set_booleantype='SFBoolaccessType='inputOnly'/>
129                 <field name='value_changedtype='SFInt32accessType='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 shows event connections.
-->
<!-- to top Index for DEF nodes: BUTTON, CycleSelector, FIFTY_CAL_SOUND, FiftyCalOnOffToggle, GRAY, GREEN_COLOR, KNOB, MFD_GEOMETRY, MFD_SCREEN, OFF_WHITE, RIGHT_BUTTON1, RIGHT_BUTTON2
-->
X3D Tooltips element index: Appearance, AudioClip, Box, Coordinate, Cylinder, field, Group, head, ImageTexture, IndexedFaceSet, Material, meta, ROUTE, Scene, Script, Shape, Sound, Switch, TouchSensor, Transform, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

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

ROUTE
event to
(1)
CycleSelector
Script
set_boolean
SFBool
then
 
 
 
CycleSelector
Script
value_changed
SFInt32

ROUTE
event to
(2)
MFD_SCREEN
Switch
set_whichChoice
SFInt32

RIGHT_BUTTON2
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
FiftyCalOnOffToggle
Script
set_boolean
SFBool
then
 
 
 
FiftyCalOnOffToggle
Script
value_changed
SFInt32

ROUTE
event to
(2)
FIFTY_CAL_SOUND
Switch
set_whichChoice
SFInt32


Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://savage.nps.edu/Savage/AircraftHelicopters/HelicopterUnitedStates/MfdScreenIndex.html -->
<!-- Version control at
https://gitlab.nps.edu/Savage/Savage/AircraftHelicopters/HelicopterUnitedStates/MfdScreen.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->