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='OahuCollisionSite.x3d'/> |
6 | <meta name='description' content='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='creator' content='Capt Mark Lennerton USMC'/> |
8 | <meta name='translator' content='Capt Mark Lennerton USMC'/> |
9 | <meta name=' warning ' content=' terrain is misaligned 90 degrees with respect to North '/> |
10 | <meta name='modified' content='20 October 2019'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='reference' content='MakingOahuAreaModelInVRMLX3D.ppt'/> |
13 | <meta name='subject' content='Oahu Hawaii collision Greenville Ehime Maru submarine'/> |
14 | <meta name='identifier' content='https://savage.nps.edu/Savage/Locations/Hawaii/OahuCollisionSite.x3d'/> |
15 | <meta name='generator' content='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/> |
16 | <meta name='license' content='../../license.html'/> |
17 | </head> |
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='enabled' type='SFBool' accessType='inputOutput'/> |
22 | <field name='positionOffsetFromCamera' type='SFVec3f' accessType='inputOutput'/> |
23 | <field name='markerColor' type='SFColor' accessType='inputOutput'/> |
24 | <field name='labelColor' type='SFColor' accessType='inputOutput'/> |
25 | </ExternProtoDeclare> |
26 | <NavigationInfo avatarSize='10 1.6 1' speed='1000' visibilityLimit='1000000'/> |
27 | <Viewpoint description='Collision_Point_Boresighted' orientation='1 -1 0 -.401' position='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-ish' groundAngle='1.309 1.570796' groundColor='0.15 0.15 0.7 0.2 0.2 0.65 0.6 0.6 0.6' skyAngle='1.309 1.571' skyColor='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='BackgroundReddish' groundAngle='1.309 1.570796' groundColor='0.15 0.15 0.7 0.2 0.2 0.65 0.6 0.6 0.2' skyAngle='1.309 1.571' skyColor='1 0 0 1 0.4 0 1 1 0'/> |
33 | <Transform rotation='0 1 0 1.57' translation='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='enabled' value='true'/> |
39 | <fieldValue name='positionOffsetFromCamera' value='0 5 0'/> |
40 | <fieldValue name='markerColor' value='0.9 0.9 0.9'/> |
41 | <fieldValue name='labelColor' value='0.9 0.9 0.9'/> |
42 | </ProtoInstance> |
43 | <Group DEF='BackgroundControls'> |
44 | <Transform DEF='LatLongOn' scale='2000 2000 2000' translation='-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 2000' translation='-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_boolean' type='SFBool' accessType='inputOnly'/> |
64 | <!-- activated: provides a persistent binding value, otherwise isActive events will toggle Background binding on/off. --> |
65 | <field name='activated' type='SFBool' accessType='outputOnly'/> |
66 | <!-- count: only used locally, so it is declared for persistence --> |
67 | <field name='count' type='SFInt32' value='1' accessType='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_boolean' type='SFBool' accessType='inputOnly'/> |
72 | <field name='activated' type='SFBool' accessType='outputOnly'/> |
73 | <field name='count' type='SFInt32' value='1' accessType='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 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 |
Filter1
Script set_boolean SFBool |
then
|
Filter1
Script activated SFBool |
BackgroundCyan-ish
Background set_bind SFBool |
SensorButton2
TouchSensor isActive SFBool |
Filter2
Script set_boolean SFBool |
then
|
Filter2
Script activated SFBool |
BackgroundReddish
Background set_bind SFBool |
Filter1
Script activated SFBool |
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. |
<!--
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)
<ProtoInstance name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->