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='MultiFunctionDisplay (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='contributorcontent='Del Beilstein'/>
 11            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/OH58dKiowaWarriorUnitedStates/MfdScreen.x3d '/>
 12            <meta name='referencecontent='T62.jpg'/>
 13            <meta name='referencecontent='M1Abrams.jpg'/>
 14            <meta name='referencecontent='MfdScreen.jpg'/>
 15            <meta name='referencecontent=' 50cal.wav ' />
 16            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 17            <meta name='licensecontent='../../license.html'/>
 18       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: BUTTON, CycleSelector, FIFTY_CAL_SOUND, FiftyCalOnOffToggle, GRAY, GREEN_COLOR, KNOB, MFD_GEOMETRY, MFD_SCREEN, OFF_WHITE, RIGHT_BUTTON1, RIGHT_BUTTON2

Index for Viewpoint node: Viewpoint_1
-->
 19       <Scene>
 20            <WorldInfo title='MfdScreen.x3d'/>
 21            <Viewpoint description='Close-up view of Multi-FunctionDisplayposition='0 0 0.3'/>
 22            <Group>
 23                 <Shape>
 24                      <Appearance DEF='GRAY'>
 25                           <Material diffuseColor='0.2 0.2 0.2'/>
 26                      </Appearance>
 27                      <Box size='0.26 0.21 0.05'/>
 28                 </Shape>
 29                 <Transform translation='0.00 0.00 0.03'>
 30 
                    <!-- ROUTE information for MFD_SCREEN node:  [from CycleSelector.value_changed to set_whichChoice ] -->
                    <Switch DEF='MFD_SCREENwhichChoice='3'>
 31                           <Shape>
 32                                <Appearance>
 33 
                                   <!-- 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'/>
 34                                </Appearance>
 35 
                              <!-- 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'>
 36                                     <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'/>
 37                                </IndexedFaceSet>
 38                           </Shape>
 39                           <Shape>
 40                                <Appearance>
 41                                     <Material USE='GREEN_COLOR'/>
 42                                     <ImageTexture   url=' "T62.jpg " "https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/OH58dKiowaWarriorUnitedStates/T62.jpg " '/>
 43                                </Appearance>
 44                                <IndexedFaceSet USE='MFD_GEOMETRY'/>
 45                           </Shape>
 46                           <Shape>
 47                                <Appearance>
 48                                     <Material USE='GREEN_COLOR'/>
 49                                     <ImageTexture   url=' "M1Abrams.jpg " "https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/OH58dKiowaWarriorUnitedStates/M1Abrams.jpg " '/>
 50                                </Appearance>
 51                                <IndexedFaceSet USE='MFD_GEOMETRY'/>
 52                           </Shape>
 53                           <Shape>
 54                                <Appearance>
 55                                     <Material USE='GREEN_COLOR'/>
 56                                     <ImageTexture   url=' "MfdScreen.jpg " "https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/OH58dKiowaWarriorUnitedStates/MfdScreen.jpg " '/>
 57                                </Appearance>
 58                                <IndexedFaceSet USE='MFD_GEOMETRY'/>
 59                           </Shape>
 60                      </Switch>
 61                 </Transform>
 62 
               <!-- ROUTE information for FIFTY_CAL_SOUND node:  [from FiftyCalOnOffToggle.value_changed to set_whichChoice ] -->
               <Switch DEF='FIFTY_CAL_SOUNDwhichChoice='0'>
 63                      <Sound>
 64                           <AudioClip description='50 caliber gunloop='true'   url=' "50cal.wav" "https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/OH58dKiowaWarriorUnitedStates/50cal.wav" '/>
 65                      </Sound>
 66                 </Switch>
 67                 <Transform translation='-0.11 -0.05 0.025'>
 68 
                    <!-- 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'>
 69                           <Appearance DEF='OFF_WHITE'>
 70                                <Material diffuseColor='0.75 0.75 0.75'/>
 71                           </Appearance>
 72                           <Box size='0.02 0.02 0.01'/>
 73                      </Shape>
 74                 </Transform>
 75                 <Transform translation='-0.11 -0.015 0.025'>
 76                      <Shape USE='BUTTON'/>
 77                 </Transform>
 78                 <Transform translation='-0.11 0.02 0.025'>
 79                      <Shape USE='BUTTON'/>
 80                 </Transform>
 81                 <Transform translation='-0.11 0.055 0.025'>
 82                      <Shape USE='BUTTON'/>
 83                 </Transform>
 84                 <Transform translation='0.11 -0.05 0.025'>
 85                      <Shape USE='BUTTON'/>
 86                 </Transform>
 87                 <Transform translation='0.11 -0.015 0.025'>
 88                      <Shape USE='BUTTON'/>
 89                 </Transform>
 90                 <Transform translation='0.11 0.02 0.025'>
 91                      <Shape USE='BUTTON'/>
 92 
                    <!-- ROUTE information for RIGHT_BUTTON2 node:  [from isActive to FiftyCalOnOffToggle.set_boolean ] -->
                    <TouchSensor DEF='RIGHT_BUTTON2description='touch to activate'/>
 93                 </Transform>
 94                 <Transform translation='0.11 0.055 0.025'>
 95                      <Shape USE='BUTTON'/>
 96 
                    <!-- ROUTE information for RIGHT_BUTTON1 node:  [from isActive to CycleSelector.set_boolean ] -->
                    <TouchSensor DEF='RIGHT_BUTTON1description='touch to activate'/>
 97                 </Transform>
 98                 <Transform translation='-0.065 -0.09 0.025'>
 99                      <Shape USE='BUTTON'/>
100                 </Transform>
101                 <Transform translation='-0.035 -0.09 0.025'>
102                      <Shape USE='BUTTON'/>
103                 </Transform>
104                 <Transform translation='0.035 -0.09 0.025'>
105                      <Shape USE='BUTTON'/>
106                 </Transform>
107                 <Transform translation='0.065 -0.09 0.025'>
108                      <Shape USE='BUTTON'/>
109                 </Transform>
110                 <Transform rotation='1.0 0.0 0.0 1.57translation='-0.11 -0.085 0.025'>
111 
                    <!-- Shape KNOB is a DEF node that has 1 USE node: USE_1 -->
                    <Shape DEF='KNOB'>
112                           <Appearance>
113                                <Material USE='GREEN_COLOR'/>
114                           </Appearance>
115                           <Cylinder height='0.02radius='0.0125'/>
116                      </Shape>
117                 </Transform>
118                 <Transform rotation='1.0 0.0 0.0 1.57translation='0.11 -0.085 0.025'>
119                      <Shape USE='KNOB'/>
120                 </Transform>
121            </Group>
122 
          <!-- ROUTE information for CycleSelector node:  [from RIGHT_BUTTON1.isActive to set_boolean ] [from value_changed to MFD_SCREEN.set_whichChoice ] -->
          <Script DEF='CycleSelector'>
123                 <field name='valuetype='SFInt32value='0accessType='initializeOnly'/>
124                 <field name='set_booleantype='SFBoolaccessType='inputOnly'/>
125                 <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;
}

    
]]>
127            </Script>
128 
          <!-- ROUTE information for FiftyCalOnOffToggle node:  [from RIGHT_BUTTON2.isActive to set_boolean ] [from value_changed to FIFTY_CAL_SOUND.set_whichChoice ] -->
          <Script DEF='FiftyCalOnOffToggle'>
129                 <field name='valuetype='SFBoolvalue='falseaccessType='initializeOnly'/>
130                 <field name='set_booleantype='SFBoolaccessType='inputOnly'/>
131                 <field name='value_changedtype='SFInt32accessType='outputOnly'/>
  <![CDATA[
      
ecmascript:
function set_boolean(bool, eventTime) {
   if (bool == false)
      return;

   value_changed = value;

   if (value == true)
      value = false;
   else
      value = true;
}

    
]]>
133            </Script>
134            <!-- Cycle selectors routes -->
135            < ROUTE  fromNode='RIGHT_BUTTON1' fromField='isActive' toNode='CycleSelector' toField='set_boolean'/>
136            < ROUTE  fromNode='CycleSelector' fromField='value_changed' toNode='MFD_SCREEN' toField='set_whichChoice'/>
137            <!-- 50Cal Routes -->
138            < ROUTE  fromNode='RIGHT_BUTTON2' fromField='isActive' toNode='FiftyCalOnOffToggle' toField='set_boolean'/>
139            < ROUTE  fromNode='FiftyCalOnOffToggle' fromField='value_changed' toNode='FIFTY_CAL_SOUND' toField='set_whichChoice'/>
140       </Scene>
141  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: BUTTON, CycleSelector, FIFTY_CAL_SOUND, FiftyCalOnOffToggle, GRAY, GREEN_COLOR, KNOB, MFD_GEOMETRY, MFD_SCREEN, OFF_WHITE, RIGHT_BUTTON1, RIGHT_BUTTON2

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, AudioClip, Box, Coordinate, Cylinder, field, Group, head, ImageTexture, IndexedFaceSet, Material, meta, ROUTE, Scene, Script, Shape, Sound, Switch, TouchSensor, Transform, Viewpoint, 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://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/OH58dKiowaWarriorUnitedStates/MfdScreenIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/OH58dKiowaWarriorUnitedStates/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. -->