@prefix :        <https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/RelativeProximitySensorExample.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_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'RelativeProximitySensorExample.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'RelativeProximitySensor design pattern: example use for paired object-to-object collision detection.' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Don Brutzman and MV4204 class' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '7 September 2004' ;
  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 'RelativeProximitySensorPrototype.x3d' ;
  x3do:name 'reference' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Object-to-object collision detection' ;
  x3do:name 'subject' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/RelativeProximitySensorExample.x3d' ;
  x3do:name 'identifier' .
:meta_1_9 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_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "RelativeProximitySensorExample.x3d" .
:meta dcterms:description "RelativeProximitySensor design pattern: example use for paired object-to-object collision detection." .
:meta dcterms:creator "Don Brutzman and MV4204 class" .
:meta dcterms:created "7 September 2004" .
:meta dcterms:modified "28 November 2019" .
:meta dcterms:reference "RelativeProximitySensorPrototype.x3d" .
:meta dcterms:subject "Object-to-object collision detection" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/RelativeProximitySensorExample.x3d" .
: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, :Viewpoint_2_3, :TextTouchGroup, :ShapeAnimationGroup, :RPS ;
  x3do:hasExternProtoDeclare :ExternProtoDeclare_2_2 ;
  x3do:hasROUTE :ROUTE_2_7, :ROUTE_2_8 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'RelativeProximitySensorExample.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, :field_2_2_11 ;
  x3do:appinfo 'RelativeProximitySensor measures paired object-to-object collision detection' ;
  x3do:name 'RelativeProximitySensor' ;
  x3do:url '"RelativeProximitySensorPrototype.x3d#RelativeProximitySensor" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/RelativeProximitySensorPrototype.x3d#RelativeProximitySensor" "RelativeProximitySensorPrototype.wrl#RelativeProximitySensor" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/RelativeProximitySensorPrototype.wrl#RelativeProximitySensor"' .
:field_2_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'describe the purpose of this sensor' ;
  x3do:name 'description' ;
  x3do:type 'SFString' .
:field_2_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'where is the primary object' ;
  x3do:name 'locationPrimary' ;
  x3do:type 'SFVec3f' .
:field_2_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'update location of the primary object' ;
  x3do:name 'set_locationPrimary' ;
  x3do:type 'SFVec3f' .
:field_2_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'where is the secondary object' ;
  x3do:name 'locationSecondary' ;
  x3do:type 'SFVec3f' .
:field_2_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'update location of the secondary object' ;
  x3do:name 'set_locationSecondary' ;
  x3do:type 'SFVec3f' .
:field_2_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'distance for detecting object-to-object collision' ;
  x3do:name 'proximityRangeThreshold' ;
  x3do:type 'SFFloat' .
:field_2_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'change threshold distance for detecting collision' ;
  x3do:name 'set_proximityRangeThreshold' ;
  x3do:type 'SFFloat' .
:field_2_2_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'is object-to-object distance less than proximityRangeThreshold?' ;
  x3do:name 'isInRange' ;
  x3do:type 'SFBool' .
:field_2_2_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'when did object-to-object range meet detection criteria?' ;
  x3do:name 'isInRangeTime' ;
  x3do:type 'SFTime' .
:field_2_2_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether sensor is active' ;
  x3do:name 'enabled' ;
  x3do:type 'SFBool' .
:field_2_2_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_enabled' ;
  x3do:type 'SFBool' .
:Viewpoint_2_3 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:description 'RelativeProximitySensor test' ;
  x3do:position ( 0 2 25 ) .
:TextTouchGroup a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Transform_2_4_1, :TouchSensorActive ;
  x3do:DEF 'TextTouchGroup' .
:Transform_2_4_1 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TextTouchGroup ;
  x3do:hasChildren :Shape_2_4_1_1, :Shape_2_4_1_2 ;
  x3do:translation ( 0 5 0 ) .
:Shape_2_4_1_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_4_1 ;
  x3do:hasGeometry :Text_2_4_1_1_1 ;
  x3do:hasAppearance :Appearance_2_4_1_1_2 .
:Text_2_4_1_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_4_1_1 ;
  x3do:hasFontStyle :FontStyle_2_4_1_1_1_1 ;
  x3do:string '"click text to watch object motion and" "RelativeProximitySensor console alerts"' .
:FontStyle_2_4_1_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_4_1_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 1.8 .
:Appearance_2_4_1_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_1_1 ;
  x3do:hasMaterial :TextColor .
:TextColor a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_4_1_1_2 ;
  x3do:DEF 'TextColor' ;
  x3do:diffuseColor ( 0.8 0.1 0.1 ) .
:Shape_2_4_1_2 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_4_1 ;
  x3do:hasGeometry :Box_2_4_1_2_1 ;
  x3do:hasAppearance :Appearance_2_4_1_2_2 .
:Box_2_4_1_2_1 a owl:NamedIndividual, x3do:Box ;
  x3do:hasParent :Shape_2_4_1_2 ;
  x3do:size ( 25 4 0.01 ) .
:Appearance_2_4_1_2_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_4_1_2 ;
  x3do:hasMaterial :Material_2_4_1_2_2_1 .
:Material_2_4_1_2_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_4_1_2_2 ;
  x3do:transparency 1 .
:TouchSensorActive a owl:NamedIndividual, x3do:TouchSensor ;
  x3do:hasParent :TextTouchGroup ;
  x3do:DEF 'TouchSensorActive' ;
  x3do:description 'click to initiate time delay and color change' .
:ShapeAnimationGroup a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :AnimationClock, :LeftHandBoxTransform, :RightHandSphereTransform ;
  x3do:hasROUTE :ROUTE_2_5_2 ;
  x3do:DEF 'ShapeAnimationGroup' .
:AnimationClock a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :ShapeAnimationGroup ;
  x3do:DEF 'AnimationClock' ;
  x3do:cycleInterval '4' .
:ROUTE_2_5_2 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ShapeAnimationGroup ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'TouchSensorActive' ;
  x3do:toField 'set_startTime' ;
  x3do:toNode 'AnimationClock' .
:LeftHandBoxTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :ShapeAnimationGroup ;
  x3do:hasChildren :Shape_2_5_3_1, :BoxMover ;
  x3do:hasROUTE :ROUTE_2_5_3_3, :ROUTE_2_5_3_4 ;
  x3do:DEF 'LeftHandBoxTransform' ;
  x3do:translation ( -10 0 0 ) .
:Shape_2_5_3_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :LeftHandBoxTransform ;
  x3do:hasGeometry :Box_2_5_3_1_1 ;
  x3do:hasAppearance :Appearance_2_5_3_1_2 .
:Box_2_5_3_1_1 a owl:NamedIndividual, x3do:Box ;
  x3do:hasParent :Shape_2_5_3_1 .
:Appearance_2_5_3_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_5_3_1 ;
  x3do:hasMaterial :Material_2_5_3_1_2_1 .
:Material_2_5_3_1_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_5_3_1_2 ;
  x3do:diffuseColor ( 0.1 0.8 0.1 ) .
:BoxMover a owl:NamedIndividual, x3do:PositionInterpolator ;
  x3do:hasParent :LeftHandBoxTransform ;
  x3do:DEF 'BoxMover' ;
  x3do:key ( 0 0.5 1 ) ;
  x3do:keyValue ( -10 0 0 -3 0 0 -10 0 0 ) .
:ROUTE_2_5_3_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LeftHandBoxTransform ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'AnimationClock' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'BoxMover' .
:ROUTE_2_5_3_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LeftHandBoxTransform ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'BoxMover' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'LeftHandBoxTransform' .
:RightHandSphereTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :ShapeAnimationGroup ;
  x3do:hasChildren :Shape_2_5_4_1, :SphereMover ;
  x3do:hasROUTE :ROUTE_2_5_4_3, :ROUTE_2_5_4_4 ;
  x3do:DEF 'RightHandSphereTransform' ;
  x3do:translation ( 10 0 0 ) .
:Shape_2_5_4_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :RightHandSphereTransform ;
  x3do:hasGeometry :Sphere_2_5_4_1_1 ;
  x3do:hasAppearance :Appearance_2_5_4_1_2 .
:Sphere_2_5_4_1_1 a owl:NamedIndividual, x3do:Sphere ;
  x3do:hasParent :Shape_2_5_4_1 .
:Appearance_2_5_4_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_5_4_1 ;
  x3do:hasMaterial :Material_2_5_4_1_2_1 .
:Material_2_5_4_1_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_5_4_1_2 ;
  x3do:diffuseColor ( 0.1 0.1 0.8 ) .
:SphereMover a owl:NamedIndividual, x3do:PositionInterpolator ;
  x3do:hasParent :RightHandSphereTransform ;
  x3do:DEF 'SphereMover' ;
  x3do:key ( 0 0.5 1 ) ;
  x3do:keyValue ( 10 0 0 2 0 0 10 0 0 ) .
:ROUTE_2_5_4_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :RightHandSphereTransform ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'AnimationClock' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'SphereMover' .
:ROUTE_2_5_4_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :RightHandSphereTransform ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'SphereMover' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'RightHandSphereTransform' .
:RPS a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Scene ;
  x3do:hasFieldValue :fieldValue_2_6_1, :fieldValue_2_6_2, :fieldValue_2_6_3, :fieldValue_2_6_4 ;
  x3do:DEF 'RPS' ;
  x3do:name 'RelativeProximitySensor' .
:fieldValue_2_6_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :RPS ;
  x3do:name 'description' ;
  x3do:value 'test case' .
:fieldValue_2_6_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :RPS ;
  x3do:name 'enabled' ;
  x3do:value true .
:fieldValue_2_6_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :RPS ;
  x3do:name 'locationPrimary' ;
  x3do:value ( -10 0 0 ) .
:fieldValue_2_6_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :RPS ;
  x3do:name 'locationSecondary' ;
  x3do:value ( 10 0 0 ) .
:ROUTE_2_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'BoxMover' ;
  x3do:toField 'set_locationPrimary' ;
  x3do:toNode 'RPS' .
:ROUTE_2_8 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'translation_changed' ;
  x3do:fromNode 'RightHandSphereTransform' ;
  x3do:toField 'set_locationSecondary' ;
  x3do:toNode 'RPS' .
