<?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='Immersive' 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='Figure27_2ProximitySensorDungeonSlidingDoors.x3d'/>
<meta name='creatorcontent='Figure 27.2, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
<meta name='referencecontent=' http://www.wiley.com/legacy/compbooks/vrml2sbk/ch27/27fig02.htm '/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='26 October 2000'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='descriptioncontent='A dungeon door that slides open when the ProximitySensor detects the viewer close enough. Later the doors close when the viewer moves out of range from the ProximitySensor.'/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter27SensingVisibilityProximityCollision/Figure27_2ProximitySensorDungeonSlidingDoors.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<Viewpoint description='Now you see doors closed, because they are far awayfieldOfView='1.05position='0 2 10'/>
<Viewpoint description='Now you see doors opened, because you are closefieldOfView='1.05position='0 2 -1'/>
<NavigationInfo avatarSize='0.5 1.6 0.5headlight='falsespeed='2type='"WALK" "EXAMINE" "ANY"'/>
<Group>
<LOD range='20'> </LOD>
<Transform translation='0 0 -10'>
<LOD range='20'>
<Inline USE='DungeonRoom'/>
<WorldInfo info='"null node"'/>
</LOD>
</Transform>
<Transform translation='0 0 -5'> </Transform>
<Transform rotation='0 1 0 1.57scale='1 1 2translation='0 0 -15'> </Transform>
<Transform translation='0 0 -4.95'> </Transform>
<Sound maxBack='60maxFront='60minBack='20minFront='20'> </Sound>
<Sound maxBack='60maxFront='60minBack='20minFront='20'> </Sound>
<!-- ROUTE information for OpenClock node:  [from DoorSense.enterTime to set_startTime ] [from DoorSense.exitTime to set_stopTime ] [from fraction_changed to LeftOpen.set_fraction ] [from fraction_changed to RightOpen.set_fraction ] -->
<TimeSensor DEF='OpenClockcycleInterval='0.5'/>
<!-- ROUTE information for CloseClock node:  [from DoorSense.exitTime to set_startTime ] [from DoorSense.enterTime to set_stopTime ] [from fraction_changed to LeftClose.set_fraction ] [from fraction_changed to RightClose.set_fraction ] -->
<TimeSensor DEF='CloseClock'/>
<!-- ROUTE information for LeftOpen node:  [from OpenClock.fraction_changed to set_fraction ] [from value_changed to LeftDoor.set_translation ] -->
<PositionInterpolator DEF='LeftOpenkey='0 1keyValue='0 0 0 -1.3 0 0'/>
<!-- ROUTE information for LeftClose node:  [from CloseClock.fraction_changed to set_fraction ] [from value_changed to LeftDoor.set_translation ] -->
<PositionInterpolator DEF='LeftClosekey='0 1keyValue='-1.3 0 0 0 0 0'/>
<!-- ROUTE information for RightOpen node:  [from OpenClock.fraction_changed to set_fraction ] [from value_changed to RightDoor.set_translation ] -->
<PositionInterpolator DEF='RightOpenkey='0 1keyValue='0 0 0 1.3 0 0'/>
<!-- ROUTE information for RightClose node:  [from CloseClock.fraction_changed to set_fraction ] [from value_changed to RightDoor.set_translation ] -->
<PositionInterpolator DEF='RightClosekey='0 1keyValue='1.3 0 0 0 0 0'/>
</Group>
<!-- open door -->
<ROUTE fromNode='DoorSensefromField='enterTimetoNode='OpenSoundtoField='set_startTime'/>
<ROUTE fromNode='DoorSensefromField='exitTimetoNode='OpenSoundtoField='set_stopTime'/>
<ROUTE fromNode='DoorSensefromField='enterTimetoNode='OpenClocktoField='set_startTime'/>
<ROUTE fromNode='DoorSensefromField='exitTimetoNode='OpenClocktoField='set_stopTime'/>
<!-- close door -->
<ROUTE fromNode='DoorSensefromField='exitTimetoNode='CloseSoundtoField='set_startTime'/>
<ROUTE fromNode='DoorSensefromField='enterTimetoNode='CloseSoundtoField='set_stopTime'/>
<ROUTE fromNode='DoorSensefromField='exitTimetoNode='CloseClocktoField='set_startTime'/>
<ROUTE fromNode='DoorSensefromField='enterTimetoNode='CloseClocktoField='set_stopTime'/>
<!-- door timers -->
<ROUTE fromNode='OpenClockfromField='fraction_changedtoNode='LeftOpentoField='set_fraction'/>
<ROUTE fromNode='OpenClockfromField='fraction_changedtoNode='RightOpentoField='set_fraction'/>
<ROUTE fromNode='CloseClockfromField='fraction_changedtoNode='LeftClosetoField='set_fraction'/>
<ROUTE fromNode='CloseClockfromField='fraction_changedtoNode='RightClosetoField='set_fraction'/>
<!-- door translations -->
<ROUTE fromNode='LeftOpenfromField='value_changedtoNode='LeftDoortoField='set_translation'/>
<ROUTE fromNode='RightOpenfromField='value_changedtoNode='RightDoortoField='set_translation'/>
<ROUTE fromNode='LeftClosefromField='value_changedtoNode='LeftDoortoField='set_translation'/>
<ROUTE fromNode='RightClosefromField='value_changedtoNode='RightDoortoField='set_translation'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : CloseClock, CloseSound, Door, DoorSense, DungeonRoom, LeftClose, LeftDoor, LeftOpen, OpenClock, OpenSound, RightClose, RightDoor, RightOpen

Index for Viewpoint images : Viewpoint_1, Viewpoint_2
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

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