#X3D V3.0 utf8 # X3D-to-ClassicVRML XSL translation autogenerated by X3dToVrml97.xslt # https://www.web3d.org/x3d/content/X3dToVrml97.xslt # Generated using XSLT processor: Saxonica PROFILE Immersive # [X3D] version=3.0 # [X3D] noNamespaceSchemaLocation=https://www.web3d.org/specifications/x3d-3.0.xsd # [head] META "title" "Sail.x3d" META "description" "Sail of 688 Submarine with masts up" META "creator" "LT Ken Curtin" META "created" "4 August 2003" META "modified" "28 November 2019" META "reference" "http://www.fas.org/man/dod-101/sys/ship/ssn-688.htm" META "reference" "http://www.combatindex.com/store/3d/ssn688_model.html" META "subject" "Submarine, 688, Sail" META "identifier" "https://savage.nps.edu/Savage/Submarines/SsnLosAngelesUnitedStates/Sail.x3d" META "generator" "X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit" META "license" "../../license.html" # [Scene] ========== ========== ========== NavigationInfo { type [ "EXAMINE" "ANY" ] } ### Default X3D NavigationInfo WorldInfo { title "Sail.x3d" } EXTERNPROTO HeadsUpDisplay [ inputOutput MFNode children # [appinfo] Displayed subscene positioned as a HUD. inputOutput MFNode dragChildren # [appinfo] Additional HUD geometry which can be touched and dragged for repositioning. If this geometry goes offscreen (perhaps due to screen resizing) then it snaps back to original position. initializeOnly SFVec3f locationOffset # [appinfo] Modified screen location and distance (for size). initializeOnly SFBool traceEnabled # [appinfo] Enable/disable console output for troubleshooting. ][ "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" ] ### here1 DEF UpTimer TimeSensor { cycleInterval 4 } DEF DownTimer TimeSensor { cycleInterval 4 } Viewpoint { description "StbdSideSail" orientation 0.351 0.933 -0.077 0.2902 position 4.3 5.4 17.8 } Transform { children [ DEF Bridge Transform { translation 2.62 5.52 0 children [ Shape { geometry Box { size .966 .1 1.04 } appearance DEF Gray Appearance { material Material { diffuseColor .8 .8 .8 shininess .8 } } } ] } DEF RadarGroup Group { children [ DEF MoveRadar Transform { children [ DEF RadarTop Transform { translation 1.74 7.52 -.276 children [ Shape { geometry Box { size .276 .25 1.104 } appearance DEF Black Appearance { material Material { diffuseColor .1 .1 .1 } } } ] } DEF Radar Transform { translation 1.74 6.52 -.276 children [ Shape { geometry Cylinder { radius .1 } appearance USE Gray } ] } DEF MoveRadarTouch TouchSensor { description "Touch Sensor to cycle radar" } DEF MoveRadarUpAndDown Group { children [ DEF RadarTimer TimeSensor { cycleInterval 8 } DEF RadarUpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -2.5 0 0 0 0 ] } ] ROUTE MoveRadarTouch.touchTime TO RadarTimer.set_startTime ROUTE RadarTimer.fraction_changed TO RadarUpAndDown.set_fraction ROUTE RadarUpAndDown.value_changed TO MoveRadar.set_translation } DEF MoveRadarUp Group { children [ DEF RadarUp PositionInterpolator { key [ 0 1 ] keyValue [ 0 -2.5 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO RadarUp.set_fraction ROUTE RadarUp.value_changed TO MoveRadar.set_translation } DEF MoveRadarDown Group { children [ DEF RadarDown PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -2.5 0 ] } ] ROUTE DownTimer.fraction_changed TO RadarDown.set_fraction ROUTE RadarDown.value_changed TO MoveRadar.set_translation } ] } ] } DEF Periscopes Group { children [ DEF MoveScope1 Transform { children [ DEF MoveScope1Sensor TouchSensor { description "Sensor to cycle #1 Scope" } DEF Scope1Timer TimeSensor { cycleInterval 4 } DEF Scope1UpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -10 0 0 0 0 ] } DEF No1Scope Transform { translation -.483 6.9 .414 children [ DEF Scope Shape { geometry Cylinder { height 13.8 radius .05 } appearance USE Gray } Transform { scale 1.5 1 1 children [ DEF ScopeFairing Shape { geometry Cylinder { height 7 radius .1 } appearance Appearance { material DEF SeaFoamGreen Material { diffuseColor .6 1 .8 } } } ] } ] } DEF Move1ScopeUp Group { children [ DEF Scope1Up PositionInterpolator { key [ 0 1 ] keyValue [ 0 -10 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO Scope1Up.set_fraction ROUTE Scope1Up.value_changed TO MoveScope1.set_translation } DEF Move1ScopeDown Group { children [ DEF Scope1Down PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -10 0 ] } ] ROUTE DownTimer.fraction_changed TO Scope1Down.set_fraction ROUTE Scope1Down.value_changed TO MoveScope1.set_translation } ] ROUTE MoveScope1Sensor.touchTime TO Scope1Timer.set_startTime ROUTE Scope1Timer.fraction_changed TO Scope1UpAndDown.set_fraction ROUTE Scope1UpAndDown.value_changed TO MoveScope1.set_translation } DEF MoveScope2 Transform { children [ DEF MoveScope2Touch TouchSensor { description "Sensor to Cycle #2 Scope" } DEF Scope2Timer TimeSensor { cycleInterval 4 } DEF Scope2UpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -10 0 0 0 0 ] } DEF No2Scope Transform { translation -.483 6.9 -.414 children [ USE Scope Transform { scale 1.5 1 1 children [ USE ScopeFairing ] } ] } DEF Move2ScopeDown Group { children [ DEF Scope2Down PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -10 0 ] } ] ROUTE DownTimer.fraction_changed TO Scope2Down.set_fraction ROUTE Scope2Down.value_changed TO MoveScope2.set_translation } DEF Move2ScopeUp Group { children [ DEF Scope2Up PositionInterpolator { key [ 0 1 ] keyValue [ 0 -10 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO Scope2Up.set_fraction ROUTE Scope2Up.value_changed TO MoveScope2.set_translation } ] ROUTE MoveScope2Touch.touchTime TO Scope2Timer.set_startTime ROUTE Scope2Timer.fraction_changed TO Scope2UpAndDown.set_fraction ROUTE Scope2UpAndDown.value_changed TO MoveScope2.set_translation } ] } DEF SnorkelMast Group { children [ DEF MoveSnorkel Transform { children [ DEF MoveSnorkelTouch TouchSensor { description "Sensor to Cycle Snorkel Mast" } DEF Timer TimeSensor { cycleInterval 4 } DEF UpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -5 0 0 0 0 ] } DEF Snorkel Transform { scale 1.3 1 1 translation -2.484 7.52 0 children [ Shape { geometry Cylinder { height 4 radius .3 } appearance Appearance { material Material { diffuseColor .6 .6 .6 } } } ] } DEF SnorkelCap Transform { scale 1.4 1.1 1.1 translation -2.484 9.52 0 children [ Shape { geometry Cylinder { height .6 radius .5 } appearance USE Black } ] } DEF MoveSnorkelUp Group { children [ DEF SnorkelUp PositionInterpolator { key [ 0 1 ] keyValue [ 0 -5 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO SnorkelUp.set_fraction ROUTE SnorkelUp.value_changed TO MoveSnorkel.set_translation } DEF MoveSnorkelDown Group { children [ DEF SnorkelDown PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -5 0 ] } ] ROUTE DownTimer.fraction_changed TO SnorkelDown.set_fraction ROUTE SnorkelDown.value_changed TO MoveSnorkel.set_translation } ] ROUTE MoveSnorkelTouch.touchTime TO Timer.set_startTime ROUTE Timer.fraction_changed TO UpAndDown.set_fraction ROUTE UpAndDown.value_changed TO MoveSnorkel.set_translation } ] } DEF ANBRA-34 Group { children [ DEF MoveBRA-34 Transform { children [ DEF MoveBRA-34Touch TouchSensor { description "Cycles #1 Bra-34" } DEF BRA-34Timer TimeSensor { cycleInterval 4 } DEF BRA-34UpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -10 0 0 0 0 ] } DEF No1BRA34 Transform { translation .552 7.4 .414 children [ DEF BRA34Fairing Transform { scale 1.8 1 1 children [ DEF BRA34FairingShape Shape { geometry Cylinder { height 7 radius .13 } appearance USE Gray } ] } DEF BRA34Cap Transform { translation 0 6.95 0 children [ DEF Cap Shape { geometry Cylinder { height .1 radius .08 } appearance USE Black } ] } Transform { translation 0 3 0 children [ DEF BRA34Shape Shape { geometry DEF BRA34 Cylinder { height 7.8 radius .08 } appearance Appearance { material USE SeaFoamGreen } } ] } ] } DEF Move1Bra34Up Group { children [ DEF BRA-34Up PositionInterpolator { key [ 0 1 ] keyValue [ 0 -10 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO BRA-34Up.set_fraction ROUTE BRA-34Up.value_changed TO MoveBRA-34.set_translation } DEF Move1BRA-34lDown Group { children [ DEF BRA-34Down PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -10 0 ] } ] ROUTE DownTimer.fraction_changed TO BRA-34Down.set_fraction ROUTE BRA-34Down.value_changed TO MoveBRA-34.set_translation } ] ROUTE BRA-34Timer.fraction_changed TO BRA-34UpAndDown.set_fraction ROUTE BRA-34UpAndDown.value_changed TO MoveBRA-34.set_translation ROUTE MoveBRA-34Touch.touchTime TO BRA-34Timer.set_startTime } DEF MoveBRA-34No2 Transform { children [ DEF Move2BRA-34Touch TouchSensor { description "Cycles #2 Bra-34" } DEF No2BRA-34Timer TimeSensor { cycleInterval 4 } DEF No2BRA-34UpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -10 0 0 0 0 ] } DEF No2BRA34 Transform { translation .552 7.4 -.414 children [ Transform { scale 1.8 1 1 children [ USE BRA34FairingShape ] } Transform { translation 0 6.95 0 children [ USE Cap ] } Transform { translation 0 3 0 children [ USE BRA34Shape ] } ] } DEF Move2Bra34Up Group { children [ DEF BRA-342Up PositionInterpolator { key [ 0 1 ] keyValue [ 0 -10 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO BRA-342Up.set_fraction ROUTE BRA-342Up.value_changed TO MoveBRA-34No2.set_translation } DEF Move2BRA-34lDown Group { children [ DEF BRA-342Down PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -10 0 ] } ] ROUTE DownTimer.fraction_changed TO BRA-342Down.set_fraction ROUTE BRA-342Down.value_changed TO MoveBRA-34No2.set_translation } ] ROUTE No2BRA-34Timer.fraction_changed TO No2BRA-34UpAndDown.set_fraction ROUTE No2BRA-34UpAndDown.value_changed TO MoveBRA-34No2.set_translation ROUTE Move2BRA-34Touch.touchTime TO No2BRA-34Timer.set_startTime } ] } DEF Sail Transform { children [ Shape { appearance USE Black geometry Extrusion { creaseAngle 3 crossSection [ -5.382 0 -4.41 .414 -2.76 .69 -1.38 .828 0 .966 1.38 .966 2.76 .759 3.312 .69 3.726 .552 4.002 .207 4.14 0 4.002 -.207 3.726 -.552 3.312 -.69 2.76 -.759 1.38 -.966 0 -.966 -1.38 -.828 -2.76 -.69 -4.14 -.414 -5.382 0 ] spine [ 0 0 0 0 5.52 0 ] } } ] } DEF BRD-7 Transform { translation -1.449 7.52 0 children [ DEF MoveBRD7 Transform { children [ DEF MoveBRD7Touch TouchSensor { description "Cycles BRD-7" } DEF BRD7Timer TimeSensor { cycleInterval 4 } DEF BRD7UpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -5.5 0 0 0 0 ] } DEF BRD-7Pole Transform { children [ Shape { geometry Cylinder { height 6 radius .1 } appearance USE Black } ] } DEF BRD-7TopHat Transform { translation 0 3 0 children [ Shape { geometry Cylinder { height .8 radius .5 } appearance USE Black } ] } DEF MoveBRD-7Up Group { children [ DEF BRD7Up PositionInterpolator { key [ 0 1 ] keyValue [ 0 -5.5 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO BRD7Up.set_fraction ROUTE BRD7Up.value_changed TO MoveBRD7.set_translation } DEF MoveBRD-7lDown Group { children [ DEF BRD7Down PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -5.5 0 ] } ] ROUTE DownTimer.fraction_changed TO BRD7Down.set_fraction ROUTE BRD7Down.value_changed TO MoveBRD7.set_translation } ] ROUTE MoveBRD7Touch.touchTime TO BRD7Timer.set_startTime ROUTE BRD7Timer.fraction_changed TO BRD7UpAndDown.set_fraction ROUTE BRD7UpAndDown.value_changed TO MoveBRD7.set_translation } ] } DEF NavID Transform { translation 1.449 5.52 .552 children [ DEF MoveNavID Transform { children [ DEF NavIDTouch TouchSensor { description "Cycles NAV ID" } DEF NavIDTimer TimeSensor { cycleInterval 4 } DEF NavIDUpAndDown PositionInterpolator { key [ 0 .5 1 ] keyValue [ 0 0 0 0 -4.2 0 0 0 0 ] } DEF NavIDPole Transform { translation 0 2 0 children [ Shape { geometry Cylinder { height 4 radius .05 } appearance USE Gray } ] } DEF NavIDLight Transform { translation 0 4 0 children [ Shape { geometry Cylinder { height .3 radius .1 } appearance Appearance { material DEF NavIDColor Material { ambientIntensity 0 } } } DEF ColorPath ColorInterpolator { key [ 0.0 .2 .250 .450 .5 .7 .750 .875 1 ] keyValue [ .996 .598 0 .879 .988 .996 .996 .598 0 .879 .988 .996 .996 .598 0 .879 .988 .996 .879 .988 .996 .879 .988 .996 .879 .988 .996 ] } DEF AnimationClock TimeSensor { cycleInterval 9 loop TRUE } ] ROUTE ColorPath.value_changed TO NavIDColor.set_emissiveColor ROUTE AnimationClock.fraction_changed TO ColorPath.set_fraction } DEF MoveNavIDUp Group { children [ DEF NavIDUp PositionInterpolator { key [ 0 1 ] keyValue [ 0 -4.2 0 0 0 0 ] } ] ROUTE UpTimer.fraction_changed TO NavIDUp.set_fraction ROUTE NavIDUp.value_changed TO MoveNavID.set_translation } DEF MoveNavIDlDown Group { children [ DEF NavIDDown PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 0 -4.2 0 ] } ] ROUTE DownTimer.fraction_changed TO NavIDDown.set_fraction ROUTE NavIDDown.value_changed TO MoveNavID.set_translation } ] ROUTE NavIDTouch.touchTime TO NavIDTimer.set_startTime ROUTE NavIDTimer.fraction_changed TO NavIDUpAndDown.set_fraction ROUTE NavIDUpAndDown.value_changed TO MoveNavID.set_translation } ] } DEF FairwaterPlanesMain Transform { rotation 1 0 0 -1.57 translation -1.85 3.54 6 children [ DEF FairwaterPlanes Transform { center 3 0 0 children [ Inline { url [ "Planes.x3d" "https://savage.nps.edu/Savage/Submarines/SsnLosAngelesUnitedStates/Planes.x3d" "Planes.wrl" "https://savage.nps.edu/Savage/Submarines/SsnLosAngelesUnitedStates/Planes.wrl" ] } DEF MoveFWPlanes TouchSensor { description "Cycles FW Planes" } DEF FWPlaneTimer TimeSensor { cycleInterval 5 } DEF RotateFWPlanes OrientationInterpolator { key [ 0 .25 .50 .75 1.0 ] keyValue [ 0 1 0 0.0 0 1 0 0.52 0 1 0 0.00 0 1 0 -0.52 0 1 0 0.00 ] } ] ROUTE MoveFWPlanes.touchTime TO FWPlaneTimer.set_startTime ROUTE FWPlaneTimer.fraction_changed TO RotateFWPlanes.set_fraction ROUTE RotateFWPlanes.value_changed TO FairwaterPlanes.set_rotation } ] } ] } HeadsUpDisplay { dragChildren [ Transform { translation 0 0 -0.2 children [ Shape { geometry Box { size 5 2 0.001 } appearance Appearance { material Material { diffuseColor 1 1 1 transparency 1 } } } ] } ] locationOffset 4 2 0 children [ Transform { children [ DEF SwitchGroup Group { children [ DEF RaiseOrLowerButton Switch { whichChoice 0 children [ DEF LowerMasts Group { children [ DEF ClickToLowerSensor TouchSensor { description "Lower All Masts" } Shape { geometry Text { string [ "Click To Lower All Masts" ] fontStyle DEF HudText FontStyle { justify [ "MIDDLE" "MIDDLE" ] size 0.5 } } appearance Appearance { material Material { diffuseColor 0 .8 0 } } } ] } DEF RaiseMasts Group { children [ DEF ClickToRaiseSensor TouchSensor { description "Raise ALl Masts" } Shape { geometry Text { string [ "Click To Raise All Masts" ] fontStyle USE HudText } appearance Appearance { material Material { diffuseColor 1 0 0 } } } ] } ] } DEF AreMastsUp Script { inputOnly SFBool up inputOnly SFBool down outputOnly SFInt32 setSwitch url [ "ecmascript: function up (value, timestamp) { setSwitch = 0; } function down (value, timestamp) { setSwitch = 1; } " ] } ] } DEF LowerOrRaiseRouteGroup Group { ROUTE ClickToLowerSensor.touchTime TO DownTimer.set_startTime ROUTE ClickToRaiseSensor.touchTime TO UpTimer.set_startTime ROUTE ClickToLowerSensor.isActive TO AreMastsUp.down ROUTE ClickToRaiseSensor.isActive TO AreMastsUp.up ROUTE AreMastsUp.setSwitch TO RaiseOrLowerButton.whichChoice } ] } ] }