<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive'  version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.3.xsd ' >
<head>
<meta name='titlecontent=' A3_GeoInline.x3d '/>
<meta name='creatorcontent='Martin Reddy SRI, original example'/>
<meta name='creatorcontent='Don Brutzman NPS, X3D encoding'/>
<meta name='createdcontent='26 June 2000'/>
<meta name='modifiedcontent='17 June 2020'/>
<meta name='descriptioncontent='Specification example: on-demand inlining via GeoInline for scene resource management.'/>
<meta name=' warning content=' GeoVRML 1.1 GeoInline functionality is embedded in X3D Inline node, GeoInline no longer supported in X3D. '/>
<meta name='referencecontent=' http://www.geovrml.org/1.0/doc/examples.html '/>
<meta name='referencecontent='originals/geoinlineTest.wrl'/>
<meta name='referencecontent=' VRML 97 encoding http://www.geovrml.org/1.0/doc/examples/geoinline.wrl '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/Geospatial/A3_GeoInline.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: LoadTrigger, ReturnFalse, ReturnTrue, TestInline, UnLoadTrigger
-->
<Scene>
<WorldInfo title='A3_GeoInline.x3d'/>
<Group>
<!-- Original GeoVRML GeoInline node replaced by improved X3D Inline node -->

<!-- don't load TestInline until 'true' event sent -->
</Group>
<!-- Two cones that are used to load and unload the URL for the box -->
<Transform scale='0.5 0.5 0.5translation='2 1.0 0'>
<!-- ROUTE information for LoadTrigger node:  [from isActive to ReturnTrue.set_value ] -->
<TouchSensor DEF='LoadTriggerdescription='click to load inlined Box'/>

<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Cone/>
</Shape>
</Transform>
<Transform scale='0.5 0.5 0.5translation='1.5 1.2 0.3'>
<Shape>
<Text length='0string='"Load Cube"'>
<FontStyle/>
</Text>
<Appearance>
<Material diffuseColor='0 0.6 0.3'/>
</Appearance>
</Shape>
</Transform>
<Transform rotation='1 0 0 3.1415scale='0.5 0.5 0.5translation='2 -1.0 0'>
<!-- ROUTE information for UnLoadTrigger node:  [from isActive to ReturnFalse.set_value ] -->
<TouchSensor DEF='UnLoadTriggerdescription='click to unload inlined Box'/>

<Shape>
<Appearance>
<Material diffuseColor='0 0 1'/>
</Appearance>
<Cone/>
</Shape>
</Transform>
<Transform scale='0.5 0.5 0.5translation='1.5 -1.5 0.3'>
<Shape>
<Text length='0string='"Unload Cube"'>
<FontStyle/>
</Text>
<Appearance>
<Material diffuseColor='0.6 0.3 0'/>
</Appearance>
</Shape>
</Transform>
<!-- a couple of scripts to process the events from clicking on the cones -->
<!-- ROUTE information for ReturnTrue node:  [from LoadTrigger.isActive to set_value ] [from value_changed to TestInline.set_load ] -->
<Script DEF='ReturnTrue'>
<field name='set_valuetype='SFBoolaccessType='inputOnly'/>
<field name='value_changedtype='SFBoolaccessType='outputOnly'/>
<![CDATA[
      
ecmascript:

function set_value( value ) {
  if ( value == true ) value_changed = true;
}

    
]]>
</Script>
<!-- ROUTE information for ReturnFalse node:  [from UnLoadTrigger.isActive to set_value ] [from value_changed to TestInline.set_load ] -->
<Script DEF='ReturnFalse'>
<field name='set_valuetype='SFBoolaccessType='inputOnly'/>
<field name='value_changedtype='SFBoolaccessType='outputOnly'/>
<![CDATA[
      
ecmascript:

function set_value( value ) {
  if ( value == true ) value_changed = false;
}

    
]]>
</Script>
< ROUTE  fromNode=' LoadTrigger' fromField='isActive' toNode=' ReturnTrue' toField='set_value'/>
< ROUTE  fromNode=' ReturnTrue' fromField='value_changed' toNode=' TestInline' toField='set_load'/>
< ROUTE  fromNode=' UnLoadTrigger' fromField='isActive' toNode=' ReturnFalse' toField='set_value'/>
< ROUTE  fromNode=' ReturnFalse' fromField='value_changed' toNode=' TestInline' toField='set_load'/>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: LoadTrigger, ReturnFalse, ReturnTrue, TestInline, UnLoadTrigger
-->

Event Graph ROUTE Table entries with 4 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

LoadTrigger
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
ReturnTrue
Script
set_value
SFBool

 
 
then
ReturnTrue
Script
value_changed
SFBool

ROUTE
event to
(2)
TestInline
Inline
set_load
SFBool


UnLoadTrigger
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
ReturnFalse
Script
set_value
SFBool

 
 
then
ReturnFalse
Script
value_changed
SFBool

ROUTE
event to
(2)
TestInline
Inline
set_load
SFBool



-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/Geospatial/A3_GeoInlineIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/Geospatial/A3_GeoInline.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->