@prefix :        <https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairPrototype.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_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'CrossHairPrototype.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Prototype for a heads-up display (HUD) crosshair showing center of screen, useful for assessing lookAt point.' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Don Brutzman' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '1 February 2003' ;
  x3do:name 'created' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '28 November 2019' ;
  x3do:name 'modified' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'crosshair display' ;
  x3do:name 'subject' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairPrototype.x3d' ;
  x3do:name 'identifier' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "CrossHairPrototype.x3d" .
:meta dcterms:description "Prototype for a heads-up display (HUD) crosshair showing center of screen, useful for assessing lookAt point." .
:meta dcterms:creator "Don Brutzman" .
:meta dcterms:created "1 February 2003" .
:meta dcterms:modified "28 November 2019" .
:meta dcterms:subject "crosshair display" .
:meta dcterms:identifier "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairPrototype.x3d" .
:meta dcterms:generator "X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit" .
:meta dcterms:license "../../license.html" .
:Scene a owl:NamedIndividual, x3do:Scene ;
  x3do:hasParent :X3D ;
  x3do:hasChildren :WorldInfo_2_1, :NavigationInfo_2_3, :ProtoInstance_2_4, :TextMenu ;
  x3do:hasProtoDeclare :ProtoDeclare_2_2 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'CrossHairPrototype.x3d' .
:ProtoDeclare_2_2 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_2_1 ;
  x3do:hasProtoBody :ProtoBody_2_2_2 ;
  x3do:appinfo 'CrossHair prototype provides a heads-up display (HUD) crosshair at the view center, which is useful for assessing NavigationInfo lookAt point' ;
  x3do:name 'CrossHair' .
:ProtoInterface_2_2_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_2 ;
  x3do:hasField :field_2_2_1_1, :field_2_2_1_2, :field_2_2_1_3, :field_2_2_1_4, :field_2_2_1_5 .
:field_2_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether CrossHair prototype is enabled or not' ;
  x3do:name 'enabled' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'control whether enabled/disabled' ;
  x3do:name 'set_enabled' ;
  x3do:type 'SFBool' .
:field_2_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'color of CrossHair marker' ;
  x3do:name 'markerColor' ;
  x3do:type 'SFColor' ;
  x3do:value ( 0.3 0.3 0.8 ) .
:field_2_2_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'size of CrossHair in meters' ;
  x3do:name 'scale' ;
  x3do:type 'SFVec3f' ;
  x3do:value ( 1 1 1 ) .
:field_2_2_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'distance in front of HUD viewpoint' ;
  x3do:name 'positionOffsetFromCamera' ;
  x3do:type 'SFVec3f' ;
  x3do:value ( 0 0 -3 ) .
:ProtoBody_2_2_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_2 ;
  x3do:hasChildren :ShowSwitch ;
  x3do:hasROUTE :ROUTE_2_2_2_2, :ROUTE_2_2_2_3 .
:ShowSwitch a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :ProtoBody_2_2_2 ;
  x3do:hasChildren :Group_2_2_2_1_1 ;
  x3do:DEF 'ShowSwitch' ;
  x3do:whichChoice -1 .
:Group_2_2_2_1_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ShowSwitch ;
  x3do:hasChildren :WhereSensor, :CameraLocation .
:WhereSensor a owl:NamedIndividual, x3do:ProximitySensor ;
  x3do:hasParent :Group_2_2_2_1_1 ;
  x3do:hasIS :IS_2_2_2_1_1_1_1 ;
  x3do:DEF 'WhereSensor' ;
  x3do:size ( 1000000000 1000000000 1000000000 ) .
:IS_2_2_2_1_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :WhereSensor ;
  x3do:hasConnect :connect_2_2_2_1_1_1_1_1 .
:connect_2_2_2_1_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_1_1 ;
  x3do:nodeField 'enabled' ;
  x3do:protoField 'enabled' .
:CameraLocation a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_2_2_1_1 ;
  x3do:hasChildren :CameraOffset, :Group_2_2_2_1_1_2_2 ;
  x3do:DEF 'CameraLocation' .
:CameraOffset a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :CameraLocation ;
  x3do:hasIS :IS_2_2_2_1_1_2_1_1 ;
  x3do:hasChildren :Shape_2_2_2_1_1_2_1_2 ;
  x3do:DEF 'CameraOffset' .
:IS_2_2_2_1_1_2_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :CameraOffset ;
  x3do:hasConnect :connect_2_2_2_1_1_2_1_1_1, :connect_2_2_2_1_1_2_1_1_2 .
:connect_2_2_2_1_1_2_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_2_1_1 ;
  x3do:nodeField 'translation' ;
  x3do:protoField 'positionOffsetFromCamera' .
:connect_2_2_2_1_1_2_1_1_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_2_1_1 ;
  x3do:nodeField 'scale' ;
  x3do:protoField 'scale' .
:Shape_2_2_2_1_1_2_1_2 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :CameraOffset ;
  x3do:hasGeometry :IndexedLineSet_2_2_2_1_1_2_1_2_1 ;
  x3do:hasAppearance :Appearance_2_2_2_1_1_2_1_2_2 .
:IndexedLineSet_2_2_2_1_1_2_1_2_1 a owl:NamedIndividual, x3do:IndexedLineSet ;
  x3do:hasParent :Shape_2_2_2_1_1_2_1_2 ;
  x3do:hasCoord :Coordinate_2_2_2_1_1_2_1_2_1_1 ;
  x3do:coordIndex ( 0 1 -1 2 3 -1 ) .
:Coordinate_2_2_2_1_1_2_1_2_1_1 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedLineSet_2_2_2_1_1_2_1_2_1 ;
  x3do:point ( 0 1 0 0 -1 0 1 0 0 -1 0 0 ) .
:Appearance_2_2_2_1_1_2_1_2_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_2_2_1_1_2_1_2 ;
  x3do:hasMaterial :CircleMaterial .
:CircleMaterial a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_2_2_1_1_2_1_2_2 ;
  x3do:hasIS :IS_2_2_2_1_1_2_1_2_2_1_1 ;
  x3do:DEF 'CircleMaterial' ;
  x3do:diffuseColor ( 0 0 0 ) .
:IS_2_2_2_1_1_2_1_2_2_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :CircleMaterial ;
  x3do:hasConnect :connect_2_2_2_1_1_2_1_2_2_1_1_1 .
:connect_2_2_2_1_1_2_1_2_2_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_2_1_2_2_1_1 ;
  x3do:nodeField 'emissiveColor' ;
  x3do:protoField 'markerColor' .
:Group_2_2_2_1_1_2_2 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :CameraLocation ;
  x3do:hasChildren :EnabledScript ;
  x3do:hasROUTE :ROUTE_2_2_2_1_1_2_2_2, :ROUTE_2_2_2_1_1_2_2_3 .
:EnabledScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Group_2_2_2_1_1_2_2 ;
  x3do:hasField :field_2_2_2_1_1_2_2_1_1, :field_2_2_2_1_1_2_2_1_2, :field_2_2_2_1_1_2_2_1_3 ;
  x3do:hasIS :IS_2_2_2_1_1_2_2_1_4 ;
  x3do:DEF 'EnabledScript' ;
  x3do:sourceCode """
ecmascript:

function initialize ()
{
	if (enabled) whichChoice =  0;
	else                        whichChoice = -1;
//	Browser.println ('enabled=' + enabled + ', whichChoice=' + whichChoice);
}

function set_enabled (value, timestamp)
{
	if (value) whichChoice =  0;
	else       whichChoice = -1;
//	Browser.println ('set_enabled=' + value + ', whichChoice=' + whichChoice);
}
""" .
:field_2_2_2_1_1_2_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :EnabledScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'enabled' ;
  x3do:type 'SFBool' .
:field_2_2_2_1_1_2_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :EnabledScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_enabled' ;
  x3do:type 'SFBool' .
:field_2_2_2_1_1_2_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :EnabledScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'whichChoice' ;
  x3do:type 'SFInt32' .
:IS_2_2_2_1_1_2_2_1_4 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :EnabledScript ;
  x3do:hasConnect :connect_2_2_2_1_1_2_2_1_4_1, :connect_2_2_2_1_1_2_2_1_4_2 .
:connect_2_2_2_1_1_2_2_1_4_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_2_2_1_4 ;
  x3do:nodeField 'enabled' ;
  x3do:protoField 'enabled' .
:connect_2_2_2_1_1_2_2_1_4_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_2_2_1_4 ;
  x3do:nodeField 'set_enabled' ;
  x3do:protoField 'set_enabled' .
:ROUTE_2_2_2_1_1_2_2_2 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Group_2_2_2_1_1_2_2 ;
  x3do:fromField 'isActive' ;
  x3do:fromNode 'WhereSensor' ;
  x3do:toField 'set_enabled' ;
  x3do:toNode 'EnabledScript' .
:ROUTE_2_2_2_1_1_2_2_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Group_2_2_2_1_1_2_2 ;
  x3do:fromField 'whichChoice' ;
  x3do:fromNode 'EnabledScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'ShowSwitch' .
:ROUTE_2_2_2_2 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_2_2 ;
  x3do:fromField 'position_changed' ;
  x3do:fromNode 'WhereSensor' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'CameraLocation' .
:ROUTE_2_2_2_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_2_2 ;
  x3do:fromField 'orientation_changed' ;
  x3do:fromNode 'WhereSensor' ;
  x3do:toField 'set_rotation' ;
  x3do:toNode 'CameraLocation' .
:NavigationInfo_2_3 a owl:NamedIndividual, x3do:NavigationInfo ;
  x3do:hasParent :Scene ;
  x3do:speed 10 ;
  x3do:type '"FLY" "ANY"' .
:ProtoInstance_2_4 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Scene ;
  x3do:hasFieldValue :fieldValue_2_4_1, :fieldValue_2_4_2, :fieldValue_2_4_3, :fieldValue_2_4_4 ;
  x3do:name 'CrossHair' .
:fieldValue_2_4_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'enabled' ;
  x3do:value true .
:fieldValue_2_4_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'markerColor' ;
  x3do:value ( 1 0.5 0 ) .
:fieldValue_2_4_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'scale' ;
  x3do:value ( 1 1 1 ) .
:fieldValue_2_4_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'positionOffsetFromCamera' ;
  x3do:value ( 0 0 -3 ) .
:TextMenu a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Transform_2_5_1 ;
  x3do:DEF 'TextMenu' .
:Transform_2_5_1 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TextMenu ;
  x3do:hasChildren :Anchor_2_5_1_1 .
:Anchor_2_5_1_1 a owl:NamedIndividual, x3do:Anchor ;
  x3do:hasParent :Transform_2_5_1 ;
  x3do:hasChildren :Shape_2_5_1_1_1 ;
  x3do:description 'CrossHair Example' ;
  x3do:parameter '"target=_blank"' ;
  x3do:url '"CrossHairExample.x3d" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairExample.x3d" "CrossHairExample.wrl" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairExample.wrl"' .
:Shape_2_5_1_1_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Anchor_2_5_1_1 ;
  x3do:hasGeometry :Text_2_5_1_1_1_1 ;
  x3do:hasAppearance :Appearance_2_5_1_1_1_2 .
:Text_2_5_1_1_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_5_1_1_1 ;
  x3do:hasFontStyle :FontStyle_2_5_1_1_1_1_1 ;
  x3do:string '"CrossHairPrototype is a" "prototype definition file." "Click text to see" "CrossHairExample"' .
:FontStyle_2_5_1_1_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_5_1_1_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 0.8 .
:Appearance_2_5_1_1_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_5_1_1_1 ;
  x3do:hasMaterial :Material_2_5_1_1_1_2_1 .
:Material_2_5_1_1_1_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_5_1_1_1_2 ;
  x3do:diffuseColor ( 0.8 0.8 0.4 ) .
