X3D Model Documentation: Figure27_1VisibilitySensorDungeonSlidingDoors.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='Immersive' 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='Figure27_1VisibilitySensorDungeonSlidingDoors.x3d'/>
  6            <meta name='creatorcontent='Figure 27.1, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
  7            <meta name='referencecontent='http://www.wiley.com/legacy/compbooks/vrml2sbk/ch27/27fig01.htm'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='26 October 2000'/>
 10            <meta name='modifiedcontent='20 October 2019'/>
 11            <meta name='Imagecontent='Figure27_1VisibilitySensorDungeonSlidingDoors.png'/>
 12            <meta name='descriptioncontent="A dungeon door that slides open when visible, and slides closed when not visible. When you are look away from the door it goes shut, then it reopens when you look back. Page up/down between the first two viewpoints to observe this behavior. Arrow keys also help you peek left/right. Interesting side effect: users can't back up through the closed door."/>
 13            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter27SensingVisibilityProximityCollision/Figure27_1VisibilitySensorDungeonSlidingDoors.x3d'/>
 14            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 15            <meta name='licensecontent='../../license.html'/>
 16       </head>
<!--

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

<!-- to top Index for DEF nodes: CloseClock, CloseSound, Door, DoorSense, DungeonRoom, LeftClose, LeftDoor, LeftOpen, OpenClock, OpenSound, RightClose, RightDoor, RightOpen

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
 17       <Scene>
 18            <Viewpoint description='Now doors open, because they are visiblefieldOfView='1.05position='0 2 10'/>
 19            <Viewpoint description='Now doors close, because they are not visiblefieldOfView='1.05orientation='0 1 0 -0.85position='0 2 5'/>
 20            <NavigationInfo avatarSize='0.5 1.6 0.5headlight='falsespeed='2type='"WALK" "EXAMINE" "ANY"'/>
 21            <Group>
 22                 <LOD range='20'>
 23 
 24                      <WorldInfo info='"null node"'/>
 25                 </LOD>
 26                 <Transform translation='0 0 -10'>
 27                      <LOD range='20'>
 28                           <Inline USE='DungeonRoom'/>
 29                           <WorldInfo info='"null node"'/>
 30                      </LOD>
 31                 </Transform>
 32                 <Transform translation='0 0 -5'>
 33                      <Inline   url=' "../Chapter25LevelOfDetail/Figure25_10DungeonWallWithDoorway.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter25LevelOfDetail/Figure25_10DungeonWallWithDoorway.x3d" "../Chapter25LevelOfDetail/Figure25_10DungeonWallWithDoorway.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter25LevelOfDetail/Figure25_10DungeonWallWithDoorway.wrl" '/>
 34                 </Transform>
 35                 <Transform rotation='0 1 0 1.57scale='1 1 2translation='0 0 -15'>
 36                      <Inline   url=' "../Chapter25LevelOfDetail/Figure25_07DungeonRoomWall.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter25LevelOfDetail/Figure25_07DungeonRoomWall.x3d" "../Chapter25LevelOfDetail/Figure25_07DungeonRoomWall.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter25LevelOfDetail/Figure25_07DungeonRoomWall.wrl" '/>
 37                 </Transform>
 38                 <Transform translation='0 0 -4.95'>
 39 
                    <!-- ROUTE information for LeftDoor node:  [from LeftOpen.value_changed to set_translation ] [from LeftClose.value_changed to set_translation ] -->
                    <Transform DEF='LeftDoor'>
 40                           <Transform translation='-0.75 0 0'>
 41 
 42                           </Transform>
 43                      </Transform>
 44 
                    <!-- ROUTE information for RightDoor node:  [from RightOpen.value_changed to set_translation ] [from RightClose.value_changed to set_translation ] -->
                    <Transform DEF='RightDoor'>
 45                           <Transform translation='0.75 0 0'>
 46                                <Inline USE='Door'/>
 47                           </Transform>
 48                      </Transform>
 49 
 50                 </Transform>
 51                 <Sound maxBack='60maxFront='60minBack='20minFront='20'>
 52 
                    <!-- ROUTE information for OpenSound node:  [from DoorSense.enterTime to set_startTime ] [from DoorSense.exitTime to set_stopTime ] -->
                    <AudioClip DEF='OpenSounddescription='door clunks open'   url=' "clunk1.wav" "../Chapter27SensingVisibilityProximityCollision/clunk1.wav" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter27SensingVisibilityProximityCollision/clunk1.wav" '/>
 53                 </Sound>
 54                 <Sound maxBack='60maxFront='60minBack='20minFront='20'>
 55 
                    <!-- ROUTE information for CloseSound node:  [from DoorSense.exitTime to set_startTime ] [from DoorSense.enterTime to set_stopTime ] -->
                    <AudioClip DEF='CloseSounddescription='door clunks shut'   url=' "clunk1.wav" "../Chapter27SensingVisibilityProximityCollision/clunk1.wav" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter27SensingVisibilityProximityCollision/clunk1.wav" '/>
 56                 </Sound>
 57 
               <!-- 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='2'/>
 58 
               <!-- 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='CloseClockcycleInterval='2'/>
 59 
               <!-- 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'/>
 60 
               <!-- 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'/>
 61 
               <!-- 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'/>
 62 
               <!-- 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'/>
 63            </Group>
 64            <!-- open door -->
 65            < ROUTE  fromNode='DoorSense' fromField='enterTime' toNode='OpenSound' toField='set_startTime'/>
 66            < ROUTE  fromNode='DoorSense' fromField='exitTime' toNode='OpenSound' toField='set_stopTime'/>
 67            < ROUTE  fromNode='DoorSense' fromField='enterTime' toNode='OpenClock' toField='set_startTime'/>
 68            < ROUTE  fromNode='DoorSense' fromField='exitTime' toNode='OpenClock' toField='set_stopTime'/>
 69            <!-- close door -->
 70            < ROUTE  fromNode='DoorSense' fromField='exitTime' toNode='CloseSound' toField='set_startTime'/>
 71            < ROUTE  fromNode='DoorSense' fromField='enterTime' toNode='CloseSound' toField='set_stopTime'/>
 72            < ROUTE  fromNode='DoorSense' fromField='exitTime' toNode='CloseClock' toField='set_startTime'/>
 73            < ROUTE  fromNode='DoorSense' fromField='enterTime' toNode='CloseClock' toField='set_stopTime'/>
 74            <!-- door timers -->
 75            < ROUTE  fromNode='OpenClock' fromField='fraction_changed' toNode='LeftOpen' toField='set_fraction'/>
 76            < ROUTE  fromNode='OpenClock' fromField='fraction_changed' toNode='RightOpen' toField='set_fraction'/>
 77            < ROUTE  fromNode='CloseClock' fromField='fraction_changed' toNode='LeftClose' toField='set_fraction'/>
 78            < ROUTE  fromNode='CloseClock' fromField='fraction_changed' toNode='RightClose' toField='set_fraction'/>
 79            <!-- door translations -->
 80            < ROUTE  fromNode='LeftOpen' fromField='value_changed' toNode='LeftDoor' toField='set_translation'/>
 81            < ROUTE  fromNode='RightOpen' fromField='value_changed' toNode='RightDoor' toField='set_translation'/>
 82            < ROUTE  fromNode='LeftClose' fromField='value_changed' toNode='LeftDoor' toField='set_translation'/>
 83            < ROUTE  fromNode='RightClose' fromField='value_changed' toNode='RightDoor' toField='set_translation'/>
 84       </Scene>
 85  </X3D>
<!--

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

<!-- to top Index for DEF nodes: CloseClock, CloseSound, Door, DoorSense, DungeonRoom, LeftClose, LeftDoor, LeftOpen, OpenClock, OpenSound, RightClose, RightDoor, RightOpen

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
X3D Tooltips element index: AudioClip, Group, head, Inline, LOD, meta, NavigationInfo, PositionInterpolator, ROUTE, Scene, Sound, TimeSensor, Transform, Viewpoint, VisibilitySensor, WorldInfo, X3D, accessType and type, XML data types, field types

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

DoorSense
VisibilitySensor
enterTime
SFTime

ROUTE
event to
(1)
OpenSound
AudioClip
set_startTime
SFTime
DoorSense
VisibilitySensor
exitTime
SFTime

ROUTE
event to
(1)
OpenSound
AudioClip
set_stopTime
SFTime
DoorSense
VisibilitySensor
enterTime
SFTime

ROUTE
event to
(1)
OpenClock
TimeSensor
set_startTime
SFTime
then
 
 
 
OpenClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
LeftOpen
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
LeftOpen
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
LeftDoor
Transform
set_translation
SFVec3f
  then
 
 
 
OpenClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
RightOpen
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
RightOpen
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
RightDoor
Transform
set_translation
SFVec3f
DoorSense
VisibilitySensor
exitTime
SFTime

ROUTE
event to
(1)
OpenClock
TimeSensor
set_stopTime
SFTime
then
 
 
 
OpenClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
LeftOpen
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
LeftOpen
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
LeftDoor
Transform
set_translation
SFVec3f
  then
 
 
 
OpenClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
RightOpen
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
RightOpen
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
RightDoor
Transform
set_translation
SFVec3f
DoorSense
VisibilitySensor
exitTime
SFTime

ROUTE
event to
(1)
CloseSound
AudioClip
set_startTime
SFTime
DoorSense
VisibilitySensor
enterTime
SFTime

ROUTE
event to
(1)
CloseSound
AudioClip
set_stopTime
SFTime
DoorSense
VisibilitySensor
exitTime
SFTime

ROUTE
event to
(1)
CloseClock
TimeSensor
set_startTime
SFTime
then
 
 
 
CloseClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
LeftClose
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
LeftClose
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
LeftDoor
Transform
set_translation
SFVec3f
  then
 
 
 
CloseClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
RightClose
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
RightClose
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
RightDoor
Transform
set_translation
SFVec3f
DoorSense
VisibilitySensor
enterTime
SFTime

ROUTE
event to
(1)
CloseClock
TimeSensor
set_stopTime
SFTime
then
 
 
 
CloseClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
LeftClose
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
LeftClose
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
LeftDoor
Transform
set_translation
SFVec3f
  then
 
 
 
CloseClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
RightClose
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
RightClose
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
RightDoor
Transform
set_translation
SFVec3f

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