X3D Model Documentation: UnderstandingSceneGraphsTouchToLight.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <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'>
  4       <head>
  5            <meta name='titlecontent='UnderstandingSceneGraphsTouchToLight.x3d'/>
  6            <meta name='descriptioncontent="Put mouse (or pointing device) over ball to turn on light. Demonstration example used in Doctor Dobb's Journal (DDJ) article."/>
  7            <meta name='creatorcontent='Aaron Walsh, Mantiscorp Development'/>
  8            <meta name='referencecontent='aaron@mantiscorp.com(Aaron Walsh)?subject=Understanding Scene Graphs - example feedback'/>
  9            <meta name='referencecontent='http://www.mantiscorp.com/people/aew'/>
 10            <meta name='createdcontent='9 April 2002'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent='http://www.ddj.com'/>
 13            <meta name='referencecontent='UnderstandingSceneGraphs.pdf'/>
 14            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphs.pdf'/>
 15            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphsTouchToLight.x3d'/>
 16            <meta name='translatorcontent='Don Brutzman, NPS'/>
 17            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 18            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 19            <meta name='licensecontent='../license.html'/>
 20       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: LIGHT, TOUCH
-->
 21       <Scene>
 22            <WorldInfo title='UnderstandingSceneGraphsTouchToLight.x3d'/>
 23            <Group>
 24                 <Shape>
 25                      <Appearance>
 26                           <Material/>
 27                      </Appearance>
 28                      <Sphere/>
 29                 </Shape>
 30                 <!-- define sensor -->
 31 
               <!-- ROUTE information for TOUCH node:  [from isOver to LIGHT.set_on ] -->
               <TouchSensor DEF='TOUCHdescription='hold pointing device over geometry to turn on light'/>
 32                 <!-- define light, R G B color -->
 33 
               <!-- ROUTE information for LIGHT node:  [from TOUCH.isOver to set_on ] -->
               <DirectionalLight DEF='LIGHTcolor='1.0 1.0 0.0on='false'/>
 34                 < ROUTE  fromNode='TOUCH' fromField='isOver' toNode='LIGHT' toField='set_on'/>
 35            </Group>
 36       </Scene>
 37  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: LIGHT, TOUCH
-->
X3D Tooltips element index: Appearance, DirectionalLight, Group, head, Material, meta, ROUTE, Scene, Shape, Sphere, TouchSensor, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table with 1 ROUTE connection 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
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- 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. -->