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='title' content='UnderstandingSceneGraphsTouchToLight.x3d'/> |
6 | <meta name='description' content="Put mouse (or pointing device) over ball to turn on light. Demonstration example used in Doctor Dobb's Journal (DDJ) article."/> |
7 | <meta name='creator' content='Aaron Walsh, Mantiscorp Development'/> |
8 | <meta name='reference' content='aaron@mantiscorp.com(Aaron Walsh)?subject=Understanding Scene Graphs - example feedback'/> |
9 | <meta name='reference' content='http://www.mantiscorp.com/people/aew'/> |
10 | <meta name='created' content='9 April 2002'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='reference' content='http://www.ddj.com'/> |
13 | <meta name='reference' content='UnderstandingSceneGraphs.pdf'/> |
14 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphs.pdf'/> |
15 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/development/UnderstandingSceneGraphsTouchToLight.x3d'/> |
16 | <meta name='translator' content='Don Brutzman, NPS'/> |
17 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
18 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
19 | <meta name='license' content='../license.html'/> |
20 | </head> |
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='TOUCH' description='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='LIGHT' color='1.0 1.0 0.0' on='false'/> |
34 | < ROUTE fromNode='TOUCH' fromField='isOver' toNode='LIGHT' toField='set_on'/> |
35 | </Group> |
36 | </Scene> |
37 | </X3D> |
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 |
LIGHT
DirectionalLight set_on SFBool |
<!--
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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->