<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='OahuCollisionSite.x3d'/>
<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.'/>
<meta name='creatorcontent='Capt Mark Lennerton USMC'/>
<meta name='translatorcontent='Capt Mark Lennerton USMC'/>
<meta name=' warning content=' terrain is misaligned 90 degrees with respect to North '/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent='MakingOahuAreaModelInVRMLX3D.ppt'/>
<meta name='subjectcontent='Oahu Hawaii collision Greenville Ehime Maru submarine'/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/Locations/Hawaii/OahuCollisionSite.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!--

Index for ExternProtoDeclare definition : CameraCompass36

Index for DEF nodes : BackgroundControls, BackgroundCyan-ish, BackgroundReddish, Filter1, Filter2, LatLongOn, SensorButton1, SensorButton2

Index for Viewpoint images : Viewpoint_1, Viewpoint_2
-->
<Scene>
<WorldInfo title='OahuCollisionSite.x3d'/>
<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" '>
<field name='enabledtype='SFBoolaccessType='inputOutput'/>
<field name='positionOffsetFromCameratype='SFVec3faccessType='inputOutput'/>
<field name='markerColortype='SFColoraccessType='inputOutput'/>
<field name='labelColortype='SFColoraccessType='inputOutput'/>
</ExternProtoDeclare>
<NavigationInfo avatarSize='10 1.6 1speed='1000visibilityLimit='1000000'/>
<Viewpoint description='Collision_Point_Boresightedorientation='1 -1 0 -.401position='65000 3000 -8250'/>
<Transform bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Viewpoint description='Turn_to_Mag_North'/>
</Transform>
<!-- 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'/>
<!-- 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'/>
<Transform rotation='0 1 0 1.57translation='62000 0 -18250bboxCenter='0 0 0bboxSize='-1 -1 -1'> </Transform>
<Inline bboxCenter='0 0 0bboxSize='-1 -1 -1'
  url=' "OahuAndSouthernBathymetry.x3d" "https://savage.nps.edu/Savage/Locations/Hawaii/OahuAndSouthernBathymetry.x3d" "OahuAndSouthernBathymetry.wrl" "https://savage.nps.edu/Savage/Locations/Hawaii/OahuAndSouthernBathymetry.wrl" '/>

<ProtoInstance name='CameraCompass36'>
<fieldValue name='enabledvalue='true'/>
<fieldValue name='positionOffsetFromCameravalue='0 5 0'/>
<fieldValue name='markerColorvalue='0.9 0.9 0.9'/>
<fieldValue name='labelColorvalue='0.9 0.9 0.9'/>
</ProtoInstance>
<Group DEF='BackgroundControlsbboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Transform DEF='LatLongOnscale='2000 2000 2000translation='-10000 5000 -120000bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Shape bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Sphere/>
<Appearance>
<Material diffuseColor='0 0.5 0.8'/>
</Appearance>
</Shape>
<!-- ROUTE information for SensorButton1 node:  [from isActive to Filter1.set_boolean ] -->
<TouchSensor DEF='SensorButton1'/>
</Transform>
<Transform scale='2000 2000 2000translation='-5000 5000 -120000bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Shape bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<Sphere/>
<Appearance>
<Material diffuseColor='1 0.4 0'/>
</Appearance>
</Shape>
<!-- ROUTE information for SensorButton2 node:  [from isActive to Filter2.set_boolean ] -->
<TouchSensor DEF='SensorButton2'/>
</Transform>
<!-- ROUTE information for Filter1 node:  [from SensorButton1.isActive to set_boolean ] [from activated to BackgroundCyan-ish.set_bind ] -->
<Script DEF='Filter1'>
<field name='set_booleantype='SFBoolaccessType='inputOnly'/>
<!-- activated: provides a persistent binding value, otherwise isActive events will toggle Background binding on/off. -->
<field name='activatedtype='SFBoolaccessType='outputOnly'/>
<!-- count: only used locally, so it is declared for persistence -->
<field name='counttype='SFInt32value='1accessType='initializeOnly'/>
<![CDATA[
        
ecmascript:

function initialize () {
  Browser.print (' '); // skip line
  Browser.print ('Click shapes to select a background...');
  Browser.print (' '); // 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.print ('Display blue clear sky' + count);
  }
  else count++;  // received isActive value = false
}

      
]]>
</Script>
<!-- ROUTE information for Filter2 node:  [from SensorButton2.isActive to set_boolean ] [from activated to BackgroundReddish.set_bind ] -->
<Script DEF='Filter2'>
<field name='set_booleantype='SFBoolaccessType='inputOnly'/>
<field name='activatedtype='SFBoolaccessType='outputOnly'/>
<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.print ('Display red sunset sky' + count);
  }
  else count++;  // received isActive value = false
}

      
]]>
</Script>
</Group>
<ROUTE fromNode='SensorButton1fromField='isActivetoNode='Filter1toField='set_boolean'/>
<ROUTE fromNode='Filter1fromField='activatedtoNode='BackgroundCyan-ishtoField='set_bind'/>
<ROUTE fromNode='SensorButton2fromField='isActivetoNode='Filter2toField='set_boolean'/>
<ROUTE fromNode='Filter2fromField='activatedtoNode='BackgroundReddishtoField='set_bind'/>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definition : CameraCompass36

Index for DEF nodes : BackgroundControls, BackgroundCyan-ish, BackgroundReddish, Filter1, Filter2, LatLongOn, SensorButton1, SensorButton2

Index for Viewpoint images : Viewpoint_1, Viewpoint_2
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
    <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->