<?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='Proximity2.x3d'/>
<meta name='descriptioncontent='Proximity pillars example illustrates the use of proximity sensors to sense when the user gets close, and trigger animations or sounds.'/>
<meta name='creatorcontent='David R. Nadeau'/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='1 July 1998'/>
<meta name='translatedcontent='2 February 2014'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent='originals/prox2.wrl'/>
<meta name='referencecontent=' http://www.siggraph.org/s98 '/>
<meta name='referencecontent=' http://www.siggraph.org/s98/conference/courses/18.html '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0376.htm '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Proximity2.x3d '/>
<meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
<meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo info='"Copyright (c) 1997, David R. Nadeau"title='Proximity pillars'/>
<Viewpoint description='Entry vieworientation='0.0 1.0 0.0 0.785position='7.5 1.7 7.5'/>
<NavigationInfo headlight='falsespeed='3.0'/>
<Background skyAngle='1.57 1.87skyColor='0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0'/>
<Fog color='0.1 0.1 0.1visibilityRange='18.0'/>
<DirectionalLight direction='-1.0 -0.5 -0.5'/>
<Shape>
<Appearance>
<TextureTransform scale='16.0 16.0'/>
<ImageTexture
  url=' "grill.png " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/grill.png " ' />
</Appearance>
<IndexedFaceSet coordIndex='0 1 2 3texCoordIndex='0 1 2 3'>
<TextureCoordinate point='0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0'/>
<Coordinate point='-16.0 0.0 16.0 16.0 0.0 16.0 16.0 0.0 -16.0 -16.0 0.0 -16.0'/>
</IndexedFaceSet>
</Shape>
<Sound maxBack='100.0maxFront='100.0minBack='100.0minFront='100.0'> </Sound>
<!-- ROUTE information for HitBar1 node:  [from collideTime to Bonk.set_startTime ] -->
<Collision DEF='HitBar1'>
<Transform translation='-2.0 0.0 2.0'>
<!-- ROUTE information for NearBar1 node:  [from enterTime to ClockOnBar1.set_startTime ] [from exitTime to ClockOffBar1.set_startTime ] -->
<ProximitySensor DEF='NearBar1size='14.0 14.0 14.0'/>

<Shape>
<Appearance>
<!-- ROUTE information for MaterialBar1 node:  [from OnBar1.value_changed to set_transparency ] [from OffBar1.value_changed to set_transparency ] -->
<Material DEF='MaterialBar1diffuseColor='0.0 0.3 1.0transparency='1.0'/>
</Appearance>
<IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'>
<Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 4.0 0.5 0.5 4.0 0.5 0.5 4.0 -0.5 -0.5 4.0 -0.5'/>
</IndexedFaceSet>
</Shape>
</Transform>
</Collision>
<!-- ROUTE information for ClockOnBar1 node:  [from NearBar1.enterTime to set_startTime ] [from fraction_changed to OnBar1.set_fraction ] -->
<TimeSensor DEF='ClockOnBar1stopTime='1.0'/>

<!-- ROUTE information for ClockOffBar1 node:  [from NearBar1.exitTime to set_startTime ] [from fraction_changed to OffBar1.set_fraction ] -->
<TimeSensor DEF='ClockOffBar1stopTime='1.0'/>

<!-- ROUTE information for OnBar1 node:  [from ClockOnBar1.fraction_changed to set_fraction ] [from value_changed to MaterialBar1.set_transparency ] -->
<ScalarInterpolator DEF='OnBar1key='0.0 1.0keyValue='1.0 0.0'/>

<!-- ROUTE information for OffBar1 node:  [from ClockOffBar1.fraction_changed to set_fraction ] [from value_changed to MaterialBar1.set_transparency ] -->
<ScalarInterpolator DEF='OffBar1key='0.0 1.0keyValue='0.0 1.0'/>

< ROUTE  fromNode=' NearBar1' fromField='enterTime' toNode=' ClockOnBar1' toField='set_startTime'/>
< ROUTE  fromNode=' NearBar1' fromField='exitTime' toNode=' ClockOffBar1' toField='set_startTime'/>
< ROUTE  fromNode=' ClockOnBar1' fromField='fraction_changed' toNode=' OnBar1' toField='set_fraction'/>
< ROUTE  fromNode=' ClockOffBar1' fromField='fraction_changed' toNode=' OffBar1' toField='set_fraction'/>
< ROUTE  fromNode=' OnBar1' fromField='value_changed' toNode=' MaterialBar1' toField='set_transparency'/>
< ROUTE  fromNode=' OffBar1' fromField='value_changed' toNode=' MaterialBar1' toField='set_transparency'/>
< ROUTE  fromNode=' HitBar1' fromField='collideTime' toNode=' Bonk' toField='set_startTime'/>
<!-- ROUTE information for HitBar2 node:  [from collideTime to Bonk.set_startTime ] -->
<Collision DEF='HitBar2'>
<Transform translation='4.0 0.0 0.0'>
<!-- ROUTE information for NearBar2 node:  [from enterTime to ClockOnBar2.set_startTime ] [from exitTime to ClockOffBar2.set_startTime ] -->
<ProximitySensor DEF='NearBar2size='14.0 14.0 14.0'/>

<Shape>
<Appearance>
<!-- ROUTE information for MaterialBar2 node:  [from OnBar2.value_changed to set_transparency ] [from OffBar2.value_changed to set_transparency ] -->
<Material DEF='MaterialBar2diffuseColor='0.0 1.0 0.0transparency='1.0'/>
</Appearance>
<IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'>
<Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 2.0 0.5 0.5 2.0 0.5 0.5 2.0 -0.5 -0.5 2.0 -0.5'/>
</IndexedFaceSet>
</Shape>
</Transform>
</Collision>
<!-- ROUTE information for ClockOnBar2 node:  [from NearBar2.enterTime to set_startTime ] [from fraction_changed to OnBar2.set_fraction ] -->
<TimeSensor DEF='ClockOnBar2stopTime='1.0'/>

<!-- ROUTE information for ClockOffBar2 node:  [from NearBar2.exitTime to set_startTime ] [from fraction_changed to OffBar2.set_fraction ] -->
<TimeSensor DEF='ClockOffBar2stopTime='1.0'/>

<!-- ROUTE information for OnBar2 node:  [from ClockOnBar2.fraction_changed to set_fraction ] [from value_changed to MaterialBar2.set_transparency ] -->
<ScalarInterpolator DEF='OnBar2key='0.0 1.0keyValue='1.0 0.0'/>

<!-- ROUTE information for OffBar2 node:  [from ClockOffBar2.fraction_changed to set_fraction ] [from value_changed to MaterialBar2.set_transparency ] -->
<ScalarInterpolator DEF='OffBar2key='0.0 1.0keyValue='0.0 1.0'/>

< ROUTE  fromNode=' NearBar2' fromField='enterTime' toNode=' ClockOnBar2' toField='set_startTime'/>
< ROUTE  fromNode=' NearBar2' fromField='exitTime' toNode=' ClockOffBar2' toField='set_startTime'/>
< ROUTE  fromNode=' ClockOnBar2' fromField='fraction_changed' toNode=' OnBar2' toField='set_fraction'/>
< ROUTE  fromNode=' ClockOffBar2' fromField='fraction_changed' toNode=' OffBar2' toField='set_fraction'/>
< ROUTE  fromNode=' OnBar2' fromField='value_changed' toNode=' MaterialBar2' toField='set_transparency'/>
< ROUTE  fromNode=' OffBar2' fromField='value_changed' toNode=' MaterialBar2' toField='set_transparency'/>
< ROUTE  fromNode=' HitBar2' fromField='collideTime' toNode=' Bonk' toField='set_startTime'/>
<!-- ROUTE information for HitBar3 node:  [from collideTime to Bonk.set_startTime ] -->
<Collision DEF='HitBar3'>
<Transform translation='-4.0 0.0 -4.0'>
<!-- ROUTE information for NearBar3 node:  [from enterTime to ClockOnBar3.set_startTime ] [from exitTime to ClockOffBar3.set_startTime ] -->
<ProximitySensor DEF='NearBar3size='14.0 14.0 14.0'/>

<Shape>
<Appearance>
<!-- ROUTE information for MaterialBar3 node:  [from OnBar3.value_changed to set_transparency ] [from OffBar3.value_changed to set_transparency ] -->
<Material DEF='MaterialBar3diffuseColor='1.0 1.0 0.0transparency='1.0'/>
</Appearance>
<IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'>
<Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 4.0 0.5 0.5 4.0 0.5 0.5 4.0 -0.5 -0.5 4.0 -0.5'/>
</IndexedFaceSet>
</Shape>
</Transform>
</Collision>
<!-- ROUTE information for ClockOnBar3 node:  [from NearBar3.enterTime to set_startTime ] [from fraction_changed to OnBar3.set_fraction ] -->
<TimeSensor DEF='ClockOnBar3stopTime='1.0'/>

<!-- ROUTE information for ClockOffBar3 node:  [from NearBar3.exitTime to set_startTime ] [from fraction_changed to OffBar3.set_fraction ] -->
<TimeSensor DEF='ClockOffBar3stopTime='1.0'/>

<!-- ROUTE information for OnBar3 node:  [from ClockOnBar3.fraction_changed to set_fraction ] [from value_changed to MaterialBar3.set_transparency ] -->
<ScalarInterpolator DEF='OnBar3key='0.0 1.0keyValue='1.0 0.0'/>

<!-- ROUTE information for OffBar3 node:  [from ClockOffBar3.fraction_changed to set_fraction ] [from value_changed to MaterialBar3.set_transparency ] -->
<ScalarInterpolator DEF='OffBar3key='0.0 1.0keyValue='0.0 1.0'/>

< ROUTE  fromNode=' NearBar3' fromField='enterTime' toNode=' ClockOnBar3' toField='set_startTime'/>
< ROUTE  fromNode=' NearBar3' fromField='exitTime' toNode=' ClockOffBar3' toField='set_startTime'/>
< ROUTE  fromNode=' ClockOnBar3' fromField='fraction_changed' toNode=' OnBar3' toField='set_fraction'/>
< ROUTE  fromNode=' ClockOffBar3' fromField='fraction_changed' toNode=' OffBar3' toField='set_fraction'/>
< ROUTE  fromNode=' OnBar3' fromField='value_changed' toNode=' MaterialBar3' toField='set_transparency'/>
< ROUTE  fromNode=' OffBar3' fromField='value_changed' toNode=' MaterialBar3' toField='set_transparency'/>
< ROUTE  fromNode=' HitBar3' fromField='collideTime' toNode=' Bonk' toField='set_startTime'/>
<!-- ROUTE information for HitBar4 node:  [from collideTime to Bonk.set_startTime ] -->
<Collision DEF='HitBar4'>
<Transform translation='2.0 0.0 -2.0'>
<!-- ROUTE information for NearBar4 node:  [from enterTime to ClockOnBar4.set_startTime ] [from exitTime to ClockOffBar4.set_startTime ] -->
<ProximitySensor DEF='NearBar4size='14.0 14.0 14.0'/>

<Shape>
<Appearance>
<!-- ROUTE information for MaterialBar4 node:  [from OnBar4.value_changed to set_transparency ] [from OffBar4.value_changed to set_transparency ] -->
<Material DEF='MaterialBar4diffuseColor='1.0 0.0 0.0transparency='1.0'/>
</Appearance>
<IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'>
<Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 3.0 0.5 0.5 3.0 0.5 0.5 3.0 -0.5 -0.5 3.0 -0.5'/>
</IndexedFaceSet>
</Shape>
</Transform>
</Collision>
<!-- ROUTE information for ClockOnBar4 node:  [from NearBar4.enterTime to set_startTime ] [from fraction_changed to OnBar4.set_fraction ] -->
<TimeSensor DEF='ClockOnBar4stopTime='1.0'/>

<!-- ROUTE information for ClockOffBar4 node:  [from NearBar4.exitTime to set_startTime ] [from fraction_changed to OffBar4.set_fraction ] -->
<TimeSensor DEF='ClockOffBar4stopTime='1.0'/>

<!-- ROUTE information for OnBar4 node:  [from ClockOnBar4.fraction_changed to set_fraction ] [from value_changed to MaterialBar4.set_transparency ] -->
<ScalarInterpolator DEF='OnBar4key='0.0 1.0keyValue='1.0 0.0'/>

<!-- ROUTE information for OffBar4 node:  [from ClockOffBar4.fraction_changed to set_fraction ] [from value_changed to MaterialBar4.set_transparency ] -->
<ScalarInterpolator DEF='OffBar4key='0.0 1.0keyValue='0.0 1.0'/>

< ROUTE  fromNode=' NearBar4' fromField='enterTime' toNode=' ClockOnBar4' toField='set_startTime'/>
< ROUTE  fromNode=' NearBar4' fromField='exitTime' toNode=' ClockOffBar4' toField='set_startTime'/>
< ROUTE  fromNode=' ClockOnBar4' fromField='fraction_changed' toNode=' OnBar4' toField='set_fraction'/>
< ROUTE  fromNode=' ClockOffBar4' fromField='fraction_changed' toNode=' OffBar4' toField='set_fraction'/>
< ROUTE  fromNode=' OnBar4' fromField='value_changed' toNode=' MaterialBar4' toField='set_transparency'/>
< ROUTE  fromNode=' OffBar4' fromField='value_changed' toNode=' MaterialBar4' toField='set_transparency'/>
< ROUTE  fromNode=' HitBar4' fromField='collideTime' toNode=' Bonk' toField='set_startTime'/>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Bonk, ClockOffBar1, ClockOffBar2, ClockOffBar3, ClockOffBar4, ClockOnBar1, ClockOnBar2, ClockOnBar3, ClockOnBar4, HitBar1, HitBar2, HitBar3, HitBar4, MaterialBar1, MaterialBar2, MaterialBar3, MaterialBar4, NearBar1, NearBar2, NearBar3, NearBar4, OffBar1, OffBar2, OffBar3, OffBar4, OnBar1, OnBar2, OnBar3, OnBar4

Index for Viewpoint node: Viewpoint_1
-->

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

NearBar1
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
ClockOnBar1
TimeSensor
set_startTime
SFTime

 
 
then
ClockOnBar1
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OnBar1
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OnBar1
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar1
Material
set_transparency
SFFloat
NearBar1
ProximitySensor
exitTime
SFTime

ROUTE
event to
(1)
ClockOffBar1
TimeSensor
set_startTime
SFTime

 
 
then
ClockOffBar1
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OffBar1
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OffBar1
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar1
Material
set_transparency
SFFloat


NearBar2
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
ClockOnBar2
TimeSensor
set_startTime
SFTime

 
 
then
ClockOnBar2
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OnBar2
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OnBar2
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar2
Material
set_transparency
SFFloat
NearBar2
ProximitySensor
exitTime
SFTime

ROUTE
event to
(1)
ClockOffBar2
TimeSensor
set_startTime
SFTime

 
 
then
ClockOffBar2
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OffBar2
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OffBar2
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar2
Material
set_transparency
SFFloat


NearBar3
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
ClockOnBar3
TimeSensor
set_startTime
SFTime

 
 
then
ClockOnBar3
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OnBar3
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OnBar3
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar3
Material
set_transparency
SFFloat
NearBar3
ProximitySensor
exitTime
SFTime

ROUTE
event to
(1)
ClockOffBar3
TimeSensor
set_startTime
SFTime

 
 
then
ClockOffBar3
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OffBar3
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OffBar3
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar3
Material
set_transparency
SFFloat


NearBar4
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
ClockOnBar4
TimeSensor
set_startTime
SFTime

 
 
then
ClockOnBar4
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OnBar4
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OnBar4
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar4
Material
set_transparency
SFFloat
NearBar4
ProximitySensor
exitTime
SFTime

ROUTE
event to
(1)
ClockOffBar4
TimeSensor
set_startTime
SFTime

 
 
then
ClockOffBar4
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
OffBar4
ScalarInterpolator
set_fraction
SFFloat

 
 
then
OffBar4
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(3)
MaterialBar4
Material
set_transparency
SFFloat



-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Proximity2Index.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Proximity2.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. -->