<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Interactive'  version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.0.xsd ' >
<head>
<meta name='titlecontent=' UnderstandingSceneGraphsTouchToLight.x3d '/>
<meta name='descriptioncontent="Put mouse (or pointing device) over ball to turn on light. Demonstration example used in Doctor Dobb's Journal (DDJ) article."/>
<meta name='creatorcontent='Aaron Walsh, Mantiscorp Development'/>
<meta name='referencecontent='aaron@mantiscorp.com(Aaron Walsh)?subject=Understanding Scene Graphs - example feedback'/>
<meta name='referencecontent=' http://www.mantiscorp.com/people/aew '/>
<meta name='createdcontent='9 April 2002'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent=' http://www.ddj.com '/>
<meta name='referencecontent=' UnderstandingSceneGraphs.pdf '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphs.pdf '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphsTouchToLight.x3d '/>
<meta name='translatorcontent='Don Brutzman, NPS'/>
<meta name='generatorcontent=' Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html '/>
<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: LIGHT, TOUCH
-->
<Scene>
<WorldInfo title='UnderstandingSceneGraphsTouchToLight.x3d'/>
<Group>
<Shape>
<Appearance>
<Material/>
</Appearance>
<Sphere/>
</Shape>
<!-- define sensor -->
<!-- ROUTE information for TOUCH node:  [from isOver to LIGHT.set_on ] -->
<TouchSensor DEF='TOUCHdescription='hold pointing device over geometry to turn on light'/>

<!-- define light, R G B color -->
<!-- ROUTE information for LIGHT node:  [from TOUCH.isOver to set_on ] -->
<DirectionalLight DEF='LIGHTcolor='1.0 1.0 0.0on='false'/>

< ROUTE  fromNode=' TOUCH' fromField='isOver' toNode=' LIGHT' toField='set_on'/>
</Group>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: LIGHT, TOUCH
-->

Event Graph ROUTE Table with 1 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.

TOUCH
TouchSensor
isOver
SFBool

ROUTE
event to
(1)
LIGHT
DirectionalLight
set_on
SFBool


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphsTouchToLightIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphsTouchToLight.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. -->