@prefix :        <https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/NetworkedCamera.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:hasComponent :component_1_1 ;
  x3do:hasMeta :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 .
:component_1_1 a owl:NamedIndividual, x3do:component ;
  x3do:hasParent :head ;
  x3do:level 1 ;
  x3do:name 'DIS' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'NetworkedCamera.x3d' ;
  x3do:name 'title' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Networked control of master/slave viewpoints using DIS EspduTransform node.' ;
  x3do:name 'description' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Alan Hudson and Don Brutzman' ;
  x3do:name 'creator' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'LT Patrick Sullivan' ;
  x3do:name 'translator' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '19 April 2005' ;
  x3do:name 'created' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '19 April 2005' ;
  x3do:name 'translated' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '9 October 2023' ;
  x3do:name 'modified' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'under development. will split into simple Inline-capable camera scene and usage example. Xj3D chat-server fallback needs to be checked.' ;
  x3do:name 'warning' .
:meta_1_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'http://www.xj3d.org/extensions/DIS.html' ;
  x3do:name 'reference' .
:meta_1_11 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'http://www.yumetech.com' ;
  x3do:name 'reference' .
:meta_1_12 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/NetworkedCamera.x3d' ;
  x3do:name 'identifier' .
:meta_1_13 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_14 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "NetworkedCamera.x3d" .
:meta dcterms:description "Networked control of master/slave viewpoints using DIS EspduTransform node." .
:meta dcterms:creator "Alan Hudson and Don Brutzman" .
:meta dcterms:translator "LT Patrick Sullivan" .
:meta dcterms:created "19 April 2005" .
:meta dcterms:translated "19 April 2005" .
:meta dcterms:modified "9 October 2023" .
:meta dcterms:warning "under development. will split into simple Inline-capable camera scene and usage example. Xj3D chat-server fallback needs to be checked." .
:meta dcterms:reference "http://www.xj3d.org/extensions/DIS.html" .
:meta dcterms:reference "http://www.yumetech.com" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/NetworkedCamera.x3d" .
:meta dcterms:generator "X3D-Edit 4.0, 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, :Background_2_2, :Viewpoint_2_3, :MasterViewpoint, :WorldProximitySensor, :CameraEspduTransform, :ViewpointControlScript, :Background_2_16, :NavigationInfo_2_17, :Transform_2_18 ;
  x3do:hasROUTE :ROUTE_2_8, :ROUTE_2_9, :ROUTE_2_10, :ROUTE_2_11, :ROUTE_2_12, :ROUTE_2_13, :ROUTE_2_14, :ROUTE_2_15 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'NetworkedCamera.x3d' .
:Background_2_2 a owl:NamedIndividual, x3do:Background ;
  x3do:hasParent :Scene ;
  x3do:groundAngle ( 1.45 1.57 ) ;
  x3do:groundColor ( .005 .05 .03 .01 .13 .09 .025 .22 .17 ) ;
  x3do:skyAngle ( .9 1.57 ) ;
  x3do:skyColor ( 0 0 .2 .1 .1 .8 .7 .7 1 ) .
:Viewpoint_2_3 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:description 'Free Navigation' ;
  x3do:position ( 28.85 3.978 -98.85 ) .
:MasterViewpoint a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:DEF 'MasterViewpoint' ;
  x3do:description 'Master Viewpoint' ;
  x3do:orientation ( 0.001188 -1 -0.008389 -2.86 ) ;
  x3do:position ( 28.85 3.978 -98.85 ) .
:WorldProximitySensor a owl:NamedIndividual, x3do:ProximitySensor ;
  x3do:hasParent :Scene ;
  x3do:DEF 'WorldProximitySensor' ;
  x3do:size ( 1000000 1000000 1000000 ) .
:CameraEspduTransform a owl:NamedIndividual, x3do:EspduTransform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :SlavedViewpoint ;
  x3do:DEF 'CameraEspduTransform' ;
  x3do:address '224.2.181.145' ;
  x3do:networkMode 'networkWriter' ;
  x3do:port 62040 ;
  x3do:writeInterval '.01' .
:SlavedViewpoint a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :CameraEspduTransform ;
  x3do:DEF 'SlavedViewpoint' ;
  x3do:description 'Slaved Viewpoint' ;
  x3do:position ( 0 0 0 ) .
:ViewpointControlScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_7_1, :field_2_7_2, :field_2_7_3, :field_2_7_4, :field_2_7_5, :field_2_7_6, :field_2_7_7, :field_2_7_8, :field_2_7_9 ;
  x3do:DEF 'ViewpointControlScript' ;
  x3do:sourceCode """
ecmascript:

function bindMaster (value)
{
	Browser.println ('[NetworkedCamera] Master viewpoint bound');
	isMaster = value;
	if (isMaster) networkMode ='networkWriter';
}

function bindSlave (value)
{
	Browser.println ('[NetworkedCamera] Slave viewpoint bound');
	isSlave = value;
	if (isSlave) networkMode ='networkReader';
}

function user_translation(value)
{
	if (isMaster) sharedTranslation = value;
}

function user_rotation(value)
{
	if (isMaster) sharedRotation = value;
}
""" .
:field_2_7_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'bindMaster' ;
  x3do:type 'SFBool' .
:field_2_7_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'bindSlave' ;
  x3do:type 'SFBool' .
:field_2_7_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'user_translation' ;
  x3do:type 'SFVec3f' .
:field_2_7_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'user_rotation' ;
  x3do:type 'SFRotation' .
:field_2_7_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'sharedTranslation' ;
  x3do:type 'SFVec3f' .
:field_2_7_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'sharedRotation' ;
  x3do:type 'SFRotation' .
:field_2_7_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'networkMode' ;
  x3do:type 'SFString' .
:field_2_7_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'isMaster' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_7_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ViewpointControlScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'isSlave' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:ROUTE_2_8 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'isBound' ;
  x3do:fromNode 'MasterViewpoint' ;
  x3do:toField 'bindMaster' ;
  x3do:toNode 'ViewpointControlScript' .
:ROUTE_2_9 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'isBound' ;
  x3do:fromNode 'MasterViewpoint' ;
  x3do:toField 'enabled' ;
  x3do:toNode 'WorldProximitySensor' .
:ROUTE_2_10 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'isBound' ;
  x3do:fromNode 'SlavedViewpoint' ;
  x3do:toField 'bindSlave' ;
  x3do:toNode 'ViewpointControlScript' .
:ROUTE_2_11 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'position_changed' ;
  x3do:fromNode 'WorldProximitySensor' ;
  x3do:toField 'user_translation' ;
  x3do:toNode 'ViewpointControlScript' .
:ROUTE_2_12 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'orientation_changed' ;
  x3do:fromNode 'WorldProximitySensor' ;
  x3do:toField 'user_rotation' ;
  x3do:toNode 'ViewpointControlScript' .
:ROUTE_2_13 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'sharedTranslation' ;
  x3do:fromNode 'ViewpointControlScript' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'CameraEspduTransform' .
:ROUTE_2_14 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'sharedRotation' ;
  x3do:fromNode 'ViewpointControlScript' ;
  x3do:toField 'set_rotation' ;
  x3do:toNode 'CameraEspduTransform' .
:ROUTE_2_15 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'networkMode' ;
  x3do:fromNode 'ViewpointControlScript' ;
  x3do:toField 'networkMode' ;
  x3do:toNode 'CameraEspduTransform' .
:Background_2_16 a owl:NamedIndividual, x3do:Background ;
  x3do:hasParent :Scene ;
  x3do:groundAngle ( 1.45 1.57 ) ;
  x3do:groundColor ( .005 .05 .03 .01 .13 .09 .025 .22 .17 ) ;
  x3do:skyAngle ( .9 1.57 ) ;
  x3do:skyColor ( 0 0 .2 .1 .1 .8 .7 .7 1 ) .
:NavigationInfo_2_17 a owl:NamedIndividual, x3do:NavigationInfo ;
  x3do:hasParent :Scene ;
  x3do:speed 10 ;
  x3do:type '"WALK" "ANY"' .
:Transform_2_18 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_18_1 ;
  x3do:translation ( 0 -0.1 0 ) .
:Shape_2_18_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_18 ;
  x3do:hasAppearance :Appearance_2_18_1_1 ;
  x3do:hasGeometry :IndexedFaceSet_2_18_1_2 .
:Appearance_2_18_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_18_1 ;
  x3do:hasTexture :PT ;
  x3do:hasTextureTransform :TextureTransform_2_18_1_1_2 .
:PT a owl:NamedIndividual, x3do:PixelTexture ;
  x3do:hasParent :Appearance_2_18_1_1 ;
  x3do:DEF 'PT' ;
  x3do:image '2 2 3 0x0 0x00FF00 0x0000FF 0xFF0000' .
:TextureTransform_2_18_1_1_2 a owl:NamedIndividual, x3do:TextureTransform ;
  x3do:hasParent :Appearance_2_18_1_1 ;
  x3do:scale ( 100 100 ) .
:IndexedFaceSet_2_18_1_2 a owl:NamedIndividual, x3do:IndexedFaceSet ;
  x3do:hasParent :Shape_2_18_1 ;
  x3do:hasCoord :Coordinate_2_18_1_2_1 ;
  x3do:colorPerVertex false ;
  x3do:coordIndex ( 0 1 2 3 0 -1 ) .
:Coordinate_2_18_1_2_1 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedFaceSet_2_18_1_2 ;
  x3do:point ( 1000 0 1000 1000 0 -1000 -1000 0 -1000 -1000 0 1000 ) .
