@prefix :        <https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HudControlPanelExample.ttl#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema:  <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix x3d:     <https://www.web3d.org/specifications/x3d-4.0.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.0#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.0' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.0.xsd' .
:head a owl:NamedIndividual, x3do:head ;
  x3do:hasParent :X3D ;
  x3do:hasMeta :meta_1_1, :meta_1_2, :meta_1_3, :meta_1_4, :meta_1_5, :meta_1_6, :meta_1_7, :meta_1_8, :meta_1_9, :meta_1_10, :meta_1_11, :meta_1_12, :meta_1_13, :meta_1_14, :meta_1_15, :meta_1_16, :meta_1_17 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'HudControlPanelExample.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Example world using an adjustable Heads-Up Display (HUD) or control panel. The panel always appears in the same position in the brower&apos;s window, independent of view point. The HUD can be dragged around the window by grabbing onto the border and sliding.' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Leonard Daly' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Dan Kucik' ;
  x3do:name 'translator' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '1999' ;
  x3do:name 'created' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '8 June 2003' ;
  x3do:name 'translated' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '28 November 2019' ;
  x3do:name 'modified' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'HUD does not sit still when navigating' ;
  x3do:name 'error' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'http://www.realism.com/Web3D/Examples/examples.cgi?ID=5' ;
  x3do:name 'reference' .
:meta_1_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'This code may be reused in part or total. Please include this paragraph when it is used. Copyright 1999, Leonard Daly #****************' ;
  x3do:name 'rights' .
:meta_1_11 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'http://www.realism.com/vrml/Example/HUD/CP.gif' ;
  x3do:name 'Image' .
:meta_1_12 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Heads-up display example' ;
  x3do:name 'subject' .
:meta_1_13 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Original VRML File: http://www.realism.com/vrml/Example/HUD/HUD.wrl' ;
  x3do:name 'reference' .
:meta_1_14 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HudControlPanelExample.x3d' ;
  x3do:name 'identifier' .
:meta_1_15 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html' ;
  x3do:name 'generator' .
:meta_1_16 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_17 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "HudControlPanelExample.x3d" .
:meta dcterms:description "Example world using an adjustable Heads-Up Display (HUD) or control panel. The panel always appears in the same position in the brower's window, independent of view point. The HUD can be dragged around the window by grabbing onto the border and sliding." .
:meta dcterms:creator "Leonard Daly" .
:meta dcterms:translator "Dan Kucik" .
:meta dcterms:created "1999" .
:meta dcterms:translated "8 June 2003" .
:meta dcterms:modified "28 November 2019" .
:meta dcterms:error "HUD does not sit still when navigating" .
:meta dcterms:reference "http://www.realism.com/Web3D/Examples/examples.cgi?ID=5" .
:meta dcterms:rights "This code may be reused in part or total. Please include this paragraph when it is used. Copyright 1999, Leonard Daly #****************" .
:meta dcterms:Image "http://www.realism.com/vrml/Example/HUD/CP.gif" .
:meta dcterms:subject "Heads-up display example" .
:meta dcterms:reference "Original VRML File: http://www.realism.com/vrml/Example/HUD/HUD.wrl" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HudControlPanelExample.x3d" .
:meta dcterms:generator "Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html" .
:meta dcterms:generator "X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit" .
:meta dcterms:license "../../license.html" .
:Scene a owl:NamedIndividual, x3do:Scene ;
  x3do:hasParent :X3D ;
  x3do:hasChildren :WorldInfo_2_1, :NavInfo, :SIDE_VP, :TOP_VP, :Revolver, :Timer1, :Timer2, :Spinner, :Tumble, :HUD, :Where, :Controller ;
  x3do:hasExternProtoDeclare :ExternProtoDeclare_2_2 ;
  x3do:hasROUTE :ROUTE_2_11, :ROUTE_2_12, :ROUTE_2_13, :ROUTE_2_14, :ROUTE_2_18, :ROUTE_2_19, :ROUTE_2_20 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'HudControlPanelExample.x3d' .
:ExternProtoDeclare_2_2 a owl:NamedIndividual, x3do:ExternProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_2_1, :field_2_2_2, :field_2_2_3, :field_2_2_4, :field_2_2_5, :field_2_2_6, :field_2_2_7, :field_2_2_8, :field_2_2_9, :field_2_2_10 ;
  x3do:appinfo 'Heads Up Display (HUD) Control Panel' ;
  x3do:name 'HudControlPanel' ;
  x3do:url '"HudControlPanelPrototype.x3d#HudControlPanel" "../../Tools/HeadsUpDisplays/HudControlPanelPrototype.x3d#HudControlPanel" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HudControlPanelPrototype.x3d#HudControlPanel" "../../Tools/HeadsUpDisplays/HudControlPanelPrototype.wrl#HudControlPanel" "HudControlPanelPrototype.wrl#HudControlPanel" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HudControlPanelPrototype.wrl#HudControlPanel"' .
:field_2_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'SFVec3f Position of the panel relative to the viewpoint. The X and Y components can be changed by dragging the window around.' ;
  x3do:name 'translation' ;
  x3do:type 'SFVec3f' .
:field_2_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'SFRotation This field should be the object of a ROUTE statement from the orientation_changed event from a ProximitySensor. For some reason the ProximitySensor does not correctly report the current viewpoint when the sensor is located inside of the PROTO.' ;
  x3do:name 'orientation' ;
  x3do:type 'SFRotation' .
:field_2_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Out - SFBool event is generated when the cursor is over the texture mapped region of the control panel. Set to false when the cursor leaves the texture mapped region.' ;
  x3do:name 'isOver' ;
  x3do:type 'SFBool' .
:field_2_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Out - SFVec2f The X/Y normalized coordinates (S and T) of the cursor location when &apos;isOver&apos; is true.' ;
  x3do:name 'hitTexCoord_changed' ;
  x3do:type 'SFVec2f' .
:field_2_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'SFColor The color of the panel border. This is the region that can be used to drag the panel around the screen.' ;
  x3do:name 'borderColor' ;
  x3do:type 'SFColor' .
:field_2_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'SFVec3f Size of the panel. The texture mapped area (see textureMap) is 95% in X and 90% in Y of this size.' ;
  x3do:name 'scale' ;
  x3do:type 'SFVec3f' .
:field_2_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'SFVec3f This field should be the object of a ROUTE statement from the position_changed event from a ProximitySensor. See &apos;orientation&apos; for more details.' ;
  x3do:name 'position' ;
  x3do:type 'SFVec3f' .
:field_2_2_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'MFString The texture map URLs. This is specified in the same manner as the URL field in ImageTexture. The first one that can be loaded is the that is displayed. If this field is not specified then this region of the object is painted white.' ;
  x3do:name 'textureMap' ;
  x3do:type 'MFString' .
:field_2_2_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Out - SFTime The time when a mouse button is released provided that the just prior to release &apos;isOver&apos; and &apos;isActive&apos; are true.' ;
  x3do:name 'touchTime' ;
  x3do:type 'SFTime' .
:field_2_2_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Out - SFBool A true event is generated when the mouse button is depressed and the cursor is over the texture mapped region. A false event is generated when the button is released or when &apos;isOver&apos; becomes false.' ;
  x3do:name 'isActive' ;
  x3do:type 'SFBool' .
:NavInfo a owl:NamedIndividual, x3do:NavigationInfo ;
  x3do:hasParent :Scene ;
  x3do:DEF 'NavInfo' ;
  x3do:type '"FLY" "EXAMINE" "ANY"' .
:SIDE_VP a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:DEF 'SIDE_VP' ;
  x3do:description 'Side View' ;
  x3do:jump false .
:TOP_VP a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:DEF 'TOP_VP' ;
  x3do:description 'Top View' ;
  x3do:jump false ;
  x3do:orientation ( 1.0 0.0 0.0 -1.57 ) ;
  x3do:position ( 0.0 10.0 0.0 ) .
:Revolver a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Body1, :Body2 ;
  x3do:DEF 'Revolver' .
:Body1 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Revolver ;
  x3do:hasChildren :PointLight_2_6_1_1, :Shape_2_6_1_2 ;
  x3do:DEF 'Body1' ;
  x3do:translation ( 3.0 0.0 0.0 ) .
:PointLight_2_6_1_1 a owl:NamedIndividual, x3do:PointLight ;
  x3do:hasParent :Body1 ;
  x3do:color ( 0.0 0.0 1.0 ) .
:Shape_2_6_1_2 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Body1 ;
  x3do:hasAppearance :Appearance_2_6_1_2_1 ;
  x3do:hasGeometry :Sphere_2_6_1_2_2 .
:Appearance_2_6_1_2_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_6_1_2 ;
  x3do:hasMaterial :Material_2_6_1_2_1_1 .
:Material_2_6_1_2_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_6_1_2_1 ;
  x3do:diffuseColor ( 1.0 0.0 0.0 ) ;
  x3do:emissiveColor ( 0.0 0.0 1.0 ) ;
  x3do:specularColor ( 0.0 1.0 0.0 ) .
:Sphere_2_6_1_2_2 a owl:NamedIndividual, x3do:Sphere ;
  x3do:hasParent :Shape_2_6_1_2 ;
  x3do:radius 0.75 .
:Body2 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Revolver ;
  x3do:hasChildren :SpotLight_2_6_2_1, :Shape_2_6_2_2 ;
  x3do:DEF 'Body2' ;
  x3do:translation ( -3.0 0.0 0.0 ) .
:SpotLight_2_6_2_1 a owl:NamedIndividual, x3do:SpotLight ;
  x3do:hasParent :Body2 ;
  x3do:beamWidth 1.57 ;
  x3do:direction ( 0.0 -1.0 0.0 ) .
:Shape_2_6_2_2 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Body2 ;
  x3do:hasAppearance :Appearance_2_6_2_2_1 ;
  x3do:hasGeometry :Cone_2_6_2_2_2 .
:Appearance_2_6_2_2_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_6_2_2 ;
  x3do:hasMaterial :Material_2_6_2_2_1_1 .
:Material_2_6_2_2_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_6_2_2_1 ;
  x3do:diffuseColor ( 0.0 1.0 1.0 ) .
:Cone_2_6_2_2_2 a owl:NamedIndividual, x3do:Cone ;
  x3do:hasParent :Shape_2_6_2_2 ;
  x3do:bottomRadius 0.75 ;
  x3do:height 1.5 .
:Timer1 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :Scene ;
  x3do:DEF 'Timer1' ;
  x3do:cycleInterval '5.0' ;
  x3do:loop true ;
  x3do:startTime '1.0' .
:Timer2 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :Scene ;
  x3do:DEF 'Timer2' ;
  x3do:cycleInterval '3.0' ;
  x3do:loop true ;
  x3do:startTime '1.0' .
:Spinner a owl:NamedIndividual, x3do:OrientationInterpolator ;
  x3do:hasParent :Scene ;
  x3do:DEF 'Spinner' ;
  x3do:key ( 0.0 0.333 0.667 1.0 ) ;
  x3do:keyValue ( 0.0 1.0 0.0 0.0 0.0 1.0 0.0 2.09 0.0 1.0 0.0 4.18 0.0 1.0 0.0 0.0 ) .
:Tumble a owl:NamedIndividual, x3do:OrientationInterpolator ;
  x3do:hasParent :Scene ;
  x3do:DEF 'Tumble' ;
  x3do:key ( 0.0 0.14 0.28 0.43 0.57 0.71 0.86 1.0 ) ;
  x3do:keyValue ( 0.0 1.0 0.0 0.0 0.0 1.0 0.5 0.898 0.0 0.5 1.0 1.795 0.5 0.0 1.0 2.693 1.0 0.2 0.8 3.59 1.0 0.8 0.5 4.488 0.5 1.0 0.0 5.386 0.0 1.0 0.0 6.283 ) .
:ROUTE_2_11 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'Timer1' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'Spinner' .
:ROUTE_2_12 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'Timer2' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'Tumble' .
:ROUTE_2_13 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'Spinner' ;
  x3do:toField 'rotation' ;
  x3do:toNode 'Revolver' .
:ROUTE_2_14 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'Tumble' ;
  x3do:toField 'rotation' ;
  x3do:toNode 'Body2' .
:HUD a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Scene ;
  x3do:hasFieldValue :fieldValue_2_15_1, :fieldValue_2_15_2, :fieldValue_2_15_3, :fieldValue_2_15_4, :fieldValue_2_15_5, :fieldValue_2_15_6 ;
  x3do:DEF 'HUD' ;
  x3do:name 'HudControlPanel' .
:fieldValue_2_15_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :HUD ;
  x3do:name 'translation' ;
  x3do:value ( 4 -2 -10 ) .
:fieldValue_2_15_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :HUD ;
  x3do:name 'orientation' ;
  x3do:value ( 0.0 1.0 0.0 0.0 ) .
:fieldValue_2_15_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :HUD ;
  x3do:name 'borderColor' ;
  x3do:value ( 0.0 0.4 0.0 ) .
:fieldValue_2_15_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :HUD ;
  x3do:name 'scale' ;
  x3do:value ( 2.5 1.5 0.05 ) .
:fieldValue_2_15_5 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :HUD ;
  x3do:name 'position' ;
  x3do:value ( 0.0 0.0 0.0 ) .
:fieldValue_2_15_6 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :HUD ;
  x3do:name 'textureMap' ;
  x3do:value '"HudControlPanel.gif" "http://www.realism.com/vrml/Example/HUD/CP.gif" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/HudControlPanel.gif"' .
:Where a owl:NamedIndividual, x3do:ProximitySensor ;
  x3do:hasParent :Scene ;
  x3do:DEF 'Where' ;
  x3do:size ( 1000.0 1000.0 1000.0 ) .
:Controller a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_17_1, :field_2_17_2, :field_2_17_3, :field_2_17_4 ;
  x3do:DEF 'Controller' ;
  x3do:sourceCode """
ecmascript:

      function Position (value) {
	msg = 'Control Panel';
	if (value[1] < .5) {
	  if (value[0] > .5) {
	    Light = false;
	    msg = 'Headlight Off';
	   } else {
	    Light = true;
	    msg = 'Headlight On';
	  }
	}
	// Browser.setDescription (msg); // TODO figure this out, see Table 7.2 in Ecmascript SAI
      }

      function Touch (value) {
	Headlight = Light;
      }
""" .
:field_2_17_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Controller ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'Headlight' ;
  x3do:type 'SFBool' .
:field_2_17_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Controller ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'Position' ;
  x3do:type 'SFVec2f' .
:field_2_17_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Controller ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'Touch' ;
  x3do:type 'SFTime' .
:field_2_17_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :Controller ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'Light' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:ROUTE_2_18 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'hitTexCoord_changed' ;
  x3do:fromNode 'HUD' ;
  x3do:toField 'Position' ;
  x3do:toNode 'Controller' .
:ROUTE_2_19 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'HUD' ;
  x3do:toField 'Touch' ;
  x3do:toNode 'Controller' .
:ROUTE_2_20 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'Headlight' ;
  x3do:fromNode 'Controller' ;
  x3do:toField 'headlight' ;
  x3do:toNode 'NavInfo' .
