X3D Model Documentation: Doors.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Interactive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent='Doors.x3d'/>
  6            <meta name='descriptioncontent='Two doors activated by different fields from a TouchSensor node.'/>
  7            <meta name='creatorcontent='Leonard Daly and Don Brutzman'/>
  8            <meta name='createdcontent='6 June 2006'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='referencecontent='https://X3dGraphics.com'/>
 11            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dResources.html'/>
 12            <meta name='rightscontent='Copyright 2006, Daly Realism and Don Brutzman'/>
 13            <meta name='subjectcontent='X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com'/>
 14            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/Doors.x3d'/>
 15            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 16            <meta name='licensecontent='../license.html'/>
 17       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: Door, DoorApp, DoorGeometry, DoorImage, DoorLeftTransform, DoorMat, DoorRight, DoorShape, FilterLeft, MoverLeft, MoverRight, TimerLeft, TimerRight, TouchLeft, TouchRight, TriggerLeft, Wall

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
 18       <Scene>
 19            <WorldInfo title='Doors.x3d'/>
 20            <Background skyColor='1 1 1'/>
 21            <NavigationInfo type='"WALK" "ANY"'/>
 22            <Viewpoint description='Initial defaultposition='0 1.4 10'/>
 23            <Viewpoint description='Book Viewposition='0 1.4 4.5'/>
 24            <Transform>
 25                 <Shape>
 26                      <Appearance>
 27                           <Material diffuseColor='.6 .2 0shininess='0'/>
 28                           <ImageTexture   url=' "brick_3.jpg " "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/brick_3.jpg " "http://www.dei.isep.ipp.pt/~losa/public/cg/UniversalMedia/textures/urban/brick_3.jpg " '/>
 29                      </Appearance>
 30                      <IndexedFaceSet DEF='WallcoordIndex='0 1 2 3 -1 0 3 8 11 -1 4 5 6 7 -1 8 9 10 11 -1 12 15 14 13 -1 12 23 20 15 -1 16 19 18 17 -1 20 23 22 21 -1 0 1 13 12 -1 2 14 15 3 -1 4 16 17 5 -1 7 6 18 19 -1 8 20 21 9 -1 11 10 22 23 -1 0 11 23 12 -1 1 13 14 2 -1 3 15 16 4 -1 7 19 20 8 -1 5 17 18 6 -1 9 21 22 10 -1'>
 31                           <Coordinate point='-2 3 0 -2 0 0 -1.5 0 0 -1.5 2.25 0 -.5 2.25 0 -.5 0 0 .5 0 0 .5 2.25 0 1.5 2.25 0 1.5 0 0 2 0 0 2 3 0 -2 3 -.1 -2 0 -.1 -1.5 0 -.1 -1.5 2.25 -.1 -.5 2.25 -.1 -.5 0 -.1 .5 0 -.1 .5 2.25 -.1 1.5 2.25 -.1 1.5 0 -.1 2 0 -.1 2 3 -.1'/>
 32                      </IndexedFaceSet>
 33                 </Shape>
 34            </Transform>
 35 
          <!-- ROUTE information for DoorLeftTransform node:  [from MoverLeft.value_changed to rotation ] -->
          <Transform DEF='DoorLeftTransformcenter='-.5 0 0translation='-1 1.125 -.05'>
 36 
               <!-- Group Door is a DEF node that has 1 USE node: USE_1 -->
               <Group DEF='Door'>
 37                      <Shape DEF='DoorShape'>
 38                           <Appearance DEF='DoorApp'>
 39                                <Material DEF='DoorMatdiffuseColor='0 .7 0'/>
 40                                <ImageTexture DEF='DoorImage'   url=' "door_1.jpg " "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/door_1.jpg " "http://www.dei.isep.ipp.pt/~losa/public/cg/UniversalMedia/textures/urban/door_1.jpg " '/>
 41                           </Appearance>
 42                           <IndexedFaceSet DEF='DoorGeometrycoordIndex='0 1 2 3 -1 4 7 6 5 -1 0 1 5 4 -1 1 5 6 2 -1 2 6 7 3 -1 3 7 6 4 -1'>
 43                                <Coordinate point='-.5 -1.125 .05 .5 -1.125 .05 .5 1.125 .05 -.5 1.125 .05 -.5 -1.125 -.05 .5 -1.125 -.05 .5 1.125 -.05 -.5 1.125 -.05'/>
 44                                <TextureCoordinate point='0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 .95 0 1 .95 .95 .95 1 0 .95 0 1 .95 .95 .95 1 0 .95 0 1 .95 .95 .95 1 0 .95 0 1 .95 .95 .95'/>
 45                           </IndexedFaceSet>
 46                      </Shape>
 47                 </Group>
 48 
               <!-- ROUTE information for MoverLeft node:  [from TimerLeft.fraction_changed to set_fraction ] [from value_changed to DoorLeftTransform.rotation ] -->
               <OrientationInterpolator DEF='MoverLeftkey='0 1keyValue='0 1 0 0 0 1 0 -1'/>
 49 
               <!-- ROUTE information for TimerLeft node:  [from TriggerLeft.triggerTime to startTime ] [from fraction_changed to MoverLeft.set_fraction ] -->
               <TimeSensor DEF='TimerLeftcycleInterval='3'/>
 50 
               <!-- ROUTE information for TriggerLeft node:  [from FilterLeft.inputTrue to set_boolean ] [from triggerTime to TimerLeft.startTime ] -->
               <TimeTrigger DEF='TriggerLeft'/>
 51 
               <!-- ROUTE information for FilterLeft node:  [from TouchLeft.isActive to set_boolean ] [from inputTrue to TriggerLeft.set_boolean ] -->
               <BooleanFilter DEF='FilterLeft'/>
 52 
               <!-- ROUTE information for TouchLeft node:  [from isActive to FilterLeft.set_boolean ] -->
               <TouchSensor DEF='TouchLeftdescription='touch to activate'/>
 53                 < ROUTE  fromNode='TouchLeft' fromField='isActive' toNode='FilterLeft' toField='set_boolean'/>
 54                 < ROUTE  fromNode='FilterLeft' fromField='inputTrue' toNode='TriggerLeft' toField='set_boolean'/>
 55                 < ROUTE  fromNode='TriggerLeft' fromField='triggerTime' toNode='TimerLeft' toField='startTime'/>
 56                 < ROUTE  fromNode='TimerLeft' fromField='fraction_changed' toNode='MoverLeft' toField='set_fraction'/>
 57                 < ROUTE  fromNode='MoverLeft' fromField='value_changed' toNode='DoorLeftTransform' toField='rotation'/>
 58            </Transform>
 59 
          <!-- ROUTE information for DoorRight node:  [from MoverRight.value_changed to rotation ] -->
          <Transform DEF='DoorRightcenter='-.5 0 0translation='1 1.125 -.05'>
 60                 <Group USE='Door'/>
 61 
               <!-- ROUTE information for MoverRight node:  [from TimerRight.fraction_changed to set_fraction ] [from value_changed to DoorRight.rotation ] -->
               <OrientationInterpolator DEF='MoverRightkey='0 1keyValue='0 1 0 0 0 1 0 -1'/>
 62 
               <!-- ROUTE information for TimerRight node:  [from TouchRight.touchTime to startTime ] [from fraction_changed to MoverRight.set_fraction ] -->
               <TimeSensor DEF='TimerRightcycleInterval='3'/>
 63 
               <!-- ROUTE information for TouchRight node:  [from touchTime to TimerRight.startTime ] -->
               <TouchSensor DEF='TouchRightdescription='touch to activate'/>
 64                 < ROUTE  fromNode='TouchRight' fromField='touchTime' toNode='TimerRight' toField='startTime'/>
 65                 < ROUTE  fromNode='TimerRight' fromField='fraction_changed' toNode='MoverRight' toField='set_fraction'/>
 66                 < ROUTE  fromNode='MoverRight' fromField='value_changed' toNode='DoorRight' toField='rotation'/>
 67            </Transform>
 68       </Scene>
 69  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: Door, DoorApp, DoorGeometry, DoorImage, DoorLeftTransform, DoorMat, DoorRight, DoorShape, FilterLeft, MoverLeft, MoverRight, TimerLeft, TimerRight, TouchLeft, TouchRight, TriggerLeft, Wall

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
X3D Tooltips element index: Appearance, Background, BooleanFilter, Coordinate, Group, head, ImageTexture, IndexedFaceSet, Material, meta, NavigationInfo, OrientationInterpolator, ROUTE, Scene, Shape, TextureCoordinate, TimeSensor, TimeTrigger, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

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

TouchLeft
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
FilterLeft
BooleanFilter
set_boolean
SFBool
then
 
 
 
FilterLeft
BooleanFilter
inputTrue
SFBool

ROUTE
event to
(2)
TriggerLeft
TimeTrigger
set_boolean
SFBool
then
 
 
 
TriggerLeft
TimeTrigger
triggerTime
SFTime

ROUTE
event to
(3)
TimerLeft
TimeSensor
startTime
SFTime
then
 
 
 
TimerLeft
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(4)
MoverLeft
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
MoverLeft
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(5)
DoorLeftTransform
Transform
rotation
SFRotation

TouchRight
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
TimerRight
TimeSensor
startTime
SFTime
then
 
 
 
TimerRight
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
MoverRight
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
MoverRight
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
DoorRight
Transform
rotation
SFRotation


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/X3dForWebAuthors/Chapter08UserInteractivity/DoorsIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/Doors.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='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. -->