X3D Model Documentation: OahuCollisionSite.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='OahuCollisionSite.x3d'/>
  6            <meta name='descriptioncontent='This program reenacts the collision of the USS Greenville and the Ehime Maru. A previously written, stand-alone reenactment of the collision has been inlined. The islands of Oahu and Molaki (partial) have been inlined as the background.'/>
  7            <meta name='creatorcontent='Capt Mark Lennerton USMC'/>
  8            <meta name='translatorcontent='Capt Mark Lennerton USMC'/>
  9            <meta name=' warning content=' terrain is misaligned 90 degrees with respect to North '/>
 10            <meta name='modifiedcontent='20 October 2019'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent='MakingOahuAreaModelInVRMLX3D.ppt'/>
 13            <meta name='subjectcontent='Oahu Hawaii collision Greenville Ehime Maru submarine'/>
 14            <meta name='identifiercontent='https://savage.nps.edu/Savage/Locations/Hawaii/OahuCollisionSite.x3d'/>
 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: BackgroundControls, BackgroundCyan-ish, BackgroundReddish, Filter1, Filter2, LatLongOn, SensorButton1, SensorButton2

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2

Index for ExternProtoDeclare definition: CameraCompass36
-->
 18       <Scene>
 19            <WorldInfo title='OahuCollisionSite.x3d'/>
 20            <ExternProtoDeclare name='CameraCompass36'   url=' "../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36" "../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36" '>
 21                 <field name='enabledtype='SFBoolaccessType='inputOutput'/>
 22                 <field name='positionOffsetFromCameratype='SFVec3faccessType='inputOutput'/>
 23                 <field name='markerColortype='SFColoraccessType='inputOutput'/>
 24                 <field name='labelColortype='SFColoraccessType='inputOutput'/>
 25            </ExternProtoDeclare>
 26            <NavigationInfo avatarSize='10 1.6 1speed='1000visibilityLimit='1000000'/>
 27            <Viewpoint description='Collision_Point_Boresightedorientation='1 -1 0 -.401position='65000 3000 -8250'/>
 28            <Transform>
 29                 <Viewpoint description='Turn_to_Mag_North'/>
 30            </Transform>
 31 
          <!-- ROUTE information for BackgroundCyan-ish node:  [from Filter1.activated to set_bind ] -->
          <Background DEF='BackgroundCyan-ishgroundAngle='1.309 1.570796groundColor='0.15 0.15 0.7 0.2 0.2 0.65 0.6 0.6 0.6skyAngle='1.309 1.571skyColor='0 0.2 0.7 0.0 0.5 1 1 1 1'/>
 32 
          <!-- ROUTE information for BackgroundReddish node:  [from Filter2.activated to set_bind ] -->
          <Background DEF='BackgroundReddishgroundAngle='1.309 1.570796groundColor='0.15 0.15 0.7 0.2 0.2 0.65 0.6 0.6 0.2skyAngle='1.309 1.571skyColor='1 0 0 1 0.4 0 1 1 0'/>
 33            <Transform rotation='0 1 0 1.57translation='62000 0 -18250'>
 34                 <Inline   url=' "CollisionCourses.x3d" "https://savage.nps.edu/Savage/Locations/Hawaii/CollisionCourses.x3d" "CollisionCourses.wrl" "https://savage.nps.edu/Savage/Locations/Hawaii/CollisionCourses.wrl" '/>
 35            </Transform>
 36            <Inline   url=' "OahuAndSouthernBathymetry.x3d" "https://savage.nps.edu/Savage/Locations/Hawaii/OahuAndSouthernBathymetry.x3d" "OahuAndSouthernBathymetry.wrl" "https://savage.nps.edu/Savage/Locations/Hawaii/OahuAndSouthernBathymetry.wrl" '/>
 37            <ProtoInstance name='CameraCompass36'>
 38                 <fieldValue name='enabledvalue='true'/>
 39                 <fieldValue name='positionOffsetFromCameravalue='0 5 0'/>
 40                 <fieldValue name='markerColorvalue='0.9 0.9 0.9'/>
 41                 <fieldValue name='labelColorvalue='0.9 0.9 0.9'/>
 42            </ProtoInstance>
 43            <Group DEF='BackgroundControls'>
 44                 <Transform DEF='LatLongOnscale='2000 2000 2000translation='-10000 5000 -120000'>
 45                      <Shape>
 46                           <Sphere/>
 47                           <Appearance>
 48                                <Material diffuseColor='0 0.5 0.8'/>
 49                           </Appearance>
 50                      </Shape>
 51 
                    <!-- ROUTE information for SensorButton1 node:  [from isActive to Filter1.set_boolean ] -->
                    <TouchSensor DEF='SensorButton1'/>
 52                 </Transform>
 53                 <Transform scale='2000 2000 2000translation='-5000 5000 -120000'>
 54                      <Shape>
 55                           <Sphere/>
 56                           <Appearance>
 57                                <Material diffuseColor='1 0.4 0'/>
 58                           </Appearance>
 59                      </Shape>
 60 
                    <!-- ROUTE information for SensorButton2 node:  [from isActive to Filter2.set_boolean ] -->
                    <TouchSensor DEF='SensorButton2'/>
 61                 </Transform>
 62 
               <!-- ROUTE information for Filter1 node:  [from SensorButton1.isActive to set_boolean ] [from activated to BackgroundCyan-ish.set_bind ] -->
               <Script DEF='Filter1'>
 63                      <field name='set_booleantype='SFBoolaccessType='inputOnly'/>
 64                      <!-- activated: provides a persistent binding value, otherwise isActive events will toggle Background binding on/off. -->
 65                      <field name='activatedtype='SFBoolaccessType='outputOnly'/>
 66                      <!-- count: only used locally, so it is declared for persistence -->
 67                      <field name='counttype='SFInt32value='1accessType='initializeOnly'/>
  <![CDATA[
        
ecmascript:

function initialize () {
  Browser.println (' '); // skip line
  Browser.println ('Click shapes to select a background...');
  Browser.println (' '); // skip line
}

// setting the value of an eventOut variable also sends it as an event

function set_boolean ( value, eventTime ) {
  if ( value == true ) {
	activated = value;
	Browser.println ('Display blue clear sky' + count);
  }
  else count++;  // received isActive value = false
}

      
]]>
 69                 </Script>
 70 
               <!-- ROUTE information for Filter2 node:  [from SensorButton2.isActive to set_boolean ] [from activated to BackgroundReddish.set_bind ] -->
               <Script DEF='Filter2'>
 71                      <field name='set_booleantype='SFBoolaccessType='inputOnly'/>
 72                      <field name='activatedtype='SFBoolaccessType='outputOnly'/>
 73                      <field name='counttype='SFInt32value='1accessType='initializeOnly'/>
  <![CDATA[
        
ecmascript:

// setting the value of an eventOut variable also sends it as an event

function set_boolean ( value, eventTime ) {
  if ( value == true ) {
	activated = value;
	Browser.println ('Display red sunset sky' + count);
  }
  else count++;  // received isActive value = false
}

      
]]>
 75                 </Script>
 76            </Group>
 77            < ROUTE  fromNode='SensorButton1' fromField='isActive' toNode='Filter1' toField='set_boolean'/>
 78            < ROUTE  fromNode='Filter1' fromField='activated' toNode='BackgroundCyan-ish' toField='set_bind'/>
 79            < ROUTE  fromNode='SensorButton2' fromField='isActive' toNode='Filter2' toField='set_boolean'/>
 80            < ROUTE  fromNode='Filter2' fromField='activated' toNode='BackgroundReddish' toField='set_bind'/>
 81       </Scene>
 82  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: BackgroundControls, BackgroundCyan-ish, BackgroundReddish, Filter1, Filter2, LatLongOn, SensorButton1, SensorButton2

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2

Index for ExternProtoDeclare definition: CameraCompass36
-->
X3D Tooltips element index: Appearance, Background, ExternProtoDeclare, field, fieldValue, Group, head, Inline, Material, meta, NavigationInfo, ProtoInstance, ROUTE, Scene, Script, Shape, Sphere, 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.

SensorButton1
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
Filter1
Script
set_boolean
SFBool
then
 
 
 
Filter1
Script
activated
SFBool

ROUTE
event to
(2)
BackgroundCyan-ish
Background
set_bind
SFBool

SensorButton2
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
Filter2
Script
set_boolean
SFBool
then
 
 
 
Filter2
Script
activated
SFBool

ROUTE
event to
(2)
BackgroundReddish
Background
set_bind
SFBool

      Filter1
Script
activated
SFBool

ROUTE
event to
(1)
BackgroundCyan-ish
Background
set_bind
SFBool

line 37
ProtoInstance
CameraCompass36
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

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/Locations/Hawaii/OahuCollisionSiteIndex.html -->
<!-- Version control at
https://gitlab.nps.edu/Savage/Savage/Locations/Hawaii/OahuCollisionSite.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)
    <ProtoInstance name='ProtoName'> <field name='fieldName'/> </ProtoInstance> -->

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