X3D Model Documentation: DoorClassical.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
  3  <X3D profile='Immersive' version='3.2 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'>
  4       <head>
  5            <meta name='titlecontent='DoorClassical.x3d'/>
  6            <meta name='descriptioncontent='X3D Follower example'/>
  7            <meta name='creatorcontent='Herbert Stocker'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='18 April 2006'/>
 10            <meta name='translatedcontent='2 December 2011'/>
 11            <meta name='referencecontent='originals/door-classical.wrl'/>
 12            <meta name='referencecontent='Stocker_06_Followers.pdf'/>
 13            <meta name='referencecontent='http://www.hersto.com/Publications/Followers'/>
 14            <meta name='requirescontent='X3D version 3.2 or greater'/>
 15            <meta name='subjectcontent='X3D Follower Chaser Damper'/>
 16            <meta name='referencecontent='https://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/followers.html'/>
 17            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html'/>
 18            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/Followers/originals/DoorClassical.x3d'/>
 19            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 20            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 21            <meta name='licensecontent='../../license.html'/>
 22       </head>
<!--

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

<!-- to top Index for DEF nodes: Bgnd, InpODoorClose, InpODoorOpen, ShCyl, ShWall, TchCyls, TchDoor, TmrDoorClose, TmrDoorOpen, TransDoor, Worker

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
 23       <Scene>
 24            <WorldInfo title='DoorClassical.x3d'/>
 25            <Background DEF='BgndskyAngle='1.1 1.4 1.57skyColor='0.176 0.314 0.529 0.176 0.314 0.529 0.314 0.549 0.784 0.706 0.824 0.922'/>
 26            <Viewpoint description='initial ViewfieldOfView='0.844orientation='-0.0040 1.0 0.0030 0.439position='3.163 1.65 5.877'/>
 27            <Viewpoint description='from the topfieldOfView='0.844orientation='-0.979 -0.051 0.198 1.263position='-1.216 9.189 2.77'/>
 28            <Shape>
 29                 <Appearance>
 30                      <Material diffuseColor='0.0 0.0 0.0emissiveColor='0.318 0.663 0.0'/>
 31                 </Appearance>
 32                 <Box size='100.0 0.1 100.0'/>
 33            </Shape>
 34            <Group>
 35 
               <!-- ROUTE information for TchCyls node:  [from touchTime to Worker.touched ] -->
               <TouchSensor DEF='TchCylsdescription='touch to activate'/>
 36                 <Transform translation='-1.25 1.0 0.0'>
 37 
                    <!-- Shape ShCyl is a DEF node that has 1 USE node: USE_1 -->
                    <Shape DEF='ShCyl'>
 38                           <Appearance>
 39                                <Material ambientIntensity='0.00333diffuseColor='0.52 0.26 0.0emissiveColor='0.24 0.0 0.0shininess='0.12specularColor='0.97 0.98 0.12'/>
 40                           </Appearance>
 41                           <Cylinder radius='0.375'/>
 42                      </Shape>
 43                 </Transform>
 44                 <Transform translation='1.25 1.0 0.0'>
 45                      <Shape USE='ShCyl'/>
 46                 </Transform>
 47                 <Transform translation='-4.25 1.0 0.0'>
 48 
                    <!-- Shape ShWall is a DEF node that has 1 USE node: USE_1 -->
                    <Shape DEF='ShWall'>
 49                           <Appearance>
 50                                <Material ambientIntensity='0.00333diffuseColor='0.425 0.182 0.0075emissiveColor='0.425 0.182 0.0075shininess='0.12'/>
 51                           </Appearance>
 52                           <Box size='6.0 1.99 0.1'/>
 53                      </Shape>
 54                 </Transform>
 55            </Group>
 56            <Transform translation='4.25 1.0 0.0'>
 57                 <Shape USE='ShWall'/>
 58            </Transform>
 59            <Transform translation='-1.25 0.0 0.0'>
 60 
               <!-- ROUTE information for TchDoor node:  [from touchTime to Worker.touched ] -->
               <TouchSensor DEF='TchDoordescription='touch to activate'/>
 61 
               <!-- ROUTE information for TransDoor node:  [from InpODoorOpen.value_changed to rotation ] [from InpODoorClose.value_changed to rotation ] -->
               <Transform DEF='TransDoor'>
 62                      <Transform translation='1.25 1.0 0.0'>
 63                           <Shape>
 64                                <Appearance>
 65                                     <Material diffuseColor='0.024 0.2 0.334emissiveColor='0.05 0.4 0.666'/>
 66                                </Appearance>
 67                                <Box size='1.75 2.0 0.075'/>
 68                           </Shape>
 69                      </Transform>
 70                 </Transform>
 71            </Transform>
 72 
          <!-- ROUTE information for TmrDoorOpen node:  [from Worker.doorOpenStart to startTime ] [from Worker.doorOpenStop to stopTime ] [from fraction_changed to InpODoorOpen.set_fraction ] -->
          <TimeSensor DEF='TmrDoorOpencycleInterval='1.3'/>
 73 
          <!-- ROUTE information for InpODoorOpen node:  [from TmrDoorOpen.fraction_changed to set_fraction ] [from value_changed to TransDoor.rotation ] -->
          <OrientationInterpolator DEF='InpODoorOpenkey='0.0 1.0keyValue='0.0 0.0 1.0 0.0 0.0 -1.0 0.0 2.5'/>
 74 
          <!-- ROUTE information for TmrDoorClose node:  [from Worker.doorCloseStart to startTime ] [from Worker.doorCloseStop to stopTime ] [from fraction_changed to InpODoorClose.set_fraction ] -->
          <TimeSensor DEF='TmrDoorClosecycleInterval='1.3'/>
 75 
          <!-- ROUTE information for InpODoorClose node:  [from TmrDoorClose.fraction_changed to set_fraction ] [from value_changed to TransDoor.rotation ] -->
          <OrientationInterpolator DEF='InpODoorClosekey='0.0 1.0keyValue='0.0 -1.0 0.0 2.5 0.0 0.0 1.0 0.0'/>
 76 
 77                 <field name='touchedtype='SFTimeaccessType='inputOnly'/>
 78                 <field name='doorCloseStarttype='SFTimeaccessType='outputOnly'/>
 79                 <field name='IsOpentype='SFBoolvalue='falseaccessType='initializeOnly'/>
 80                 <field name='doorOpenStoptype='SFTimeaccessType='outputOnly'/>
 81                 <field name='doorCloseStoptype='SFTimeaccessType='outputOnly'/>
 82                 <field name='doorOpenStarttype='SFTimeaccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:

function touched(now)
{
    if(IsOpen)
    {
        doorCloseStart= now;
        doorOpenStop= now;
        IsOpen= false;
    }else
    {
        doorOpenStart= now;
        doorCloseStop= now;
        IsOpen= true;
    }
}

    
]]>
 84            </Script>
 85            < ROUTE  fromNode='TchDoor' fromField='touchTime' toNode='Worker' toField='touched'/>
 86            < ROUTE  fromNode='TchCyls' fromField='touchTime' toNode='Worker' toField='touched'/>
 87            < ROUTE  fromNode='Worker' fromField='doorOpenStart' toNode='TmrDoorOpen' toField='startTime'/>
 88            < ROUTE  fromNode='Worker' fromField='doorOpenStop' toNode='TmrDoorOpen' toField='stopTime'/>
 89            < ROUTE  fromNode='Worker' fromField='doorCloseStart' toNode='TmrDoorClose' toField='startTime'/>
 90            < ROUTE  fromNode='Worker' fromField='doorCloseStop' toNode='TmrDoorClose' toField='stopTime'/>
 91            < ROUTE  fromNode='TmrDoorOpen' fromField='fraction_changed' toNode='InpODoorOpen' toField='set_fraction'/>
 92            < ROUTE  fromNode='TmrDoorClose' fromField='fraction_changed' toNode='InpODoorClose' toField='set_fraction'/>
 93            < ROUTE  fromNode='InpODoorOpen' fromField='value_changed' toNode='TransDoor' toField='rotation'/>
 94            < ROUTE  fromNode='InpODoorClose' fromField='value_changed' toNode='TransDoor' toField='rotation'/>
 95       </Scene>
 96  </X3D>
<!--

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

<!-- to top Index for DEF nodes: Bgnd, InpODoorClose, InpODoorOpen, ShCyl, ShWall, TchCyls, TchDoor, TmrDoorClose, TmrDoorOpen, TransDoor, Worker

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2
-->
X3D Tooltips element index: Appearance, Background, Box, Cylinder, field, Group, head, Material, meta, OrientationInterpolator, ROUTE, Scene, Script, Shape, TimeSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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

TchCyls
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
Worker
Script
touched
SFTime
then
 
 
 
Worker
Script
doorCloseStart
SFTime

ROUTE
event to
(2)
TmrDoorClose
TimeSensor
startTime
SFTime
then
 
 
 
TmrDoorClose
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorClose
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorClose
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
Transform
rotation
SFRotation
  then
 
 
 
Worker
Script
doorCloseStop
SFTime

ROUTE
event to
(2)
TmrDoorClose
TimeSensor
stopTime
SFTime
then
 
 
 
TmrDoorClose
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorClose
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorClose
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
Transform
rotation
SFRotation
  then
 
 
 
Worker
Script
doorOpenStart
SFTime

ROUTE
event to
(2)
TmrDoorOpen
TimeSensor
startTime
SFTime
then
 
 
 
TmrDoorOpen
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorOpen
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorOpen
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
Transform
rotation
SFRotation
  then
 
 
 
Worker
Script
doorOpenStop
SFTime

ROUTE
event to
(2)
TmrDoorOpen
TimeSensor
stopTime
SFTime
then
 
 
 
TmrDoorOpen
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorOpen
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorOpen
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
Transform
rotation
SFRotation

TchDoor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
Worker
Script
touched
SFTime
then
 
 
 
Worker
Script
doorCloseStart
SFTime

ROUTE
event to
(2)
TmrDoorClose
TimeSensor
startTime
SFTime
then
 
 
 
TmrDoorClose
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorClose
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorClose
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
Transform
rotation
SFRotation
  then
 
 
 
Worker
Script
doorCloseStop
SFTime

ROUTE
event to
(2)
TmrDoorClose
TimeSensor
stopTime
SFTime
then
 
 
 
TmrDoorClose
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorClose
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorClose
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
Transform
rotation
SFRotation
  then
 
 
 
Worker
Script
doorOpenStart
SFTime

ROUTE
event to
(2)
TmrDoorOpen
TimeSensor
startTime
SFTime
then
 
 
 
TmrDoorOpen
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorOpen
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorOpen
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
Transform
rotation
SFRotation
  then
 
 
 
Worker
Script
doorOpenStop
SFTime

ROUTE
event to
(2)
TmrDoorOpen
TimeSensor
stopTime
SFTime
then
 
 
 
TmrDoorOpen
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
InpODoorOpen
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
InpODoorOpen
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(4)
TransDoor
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/Basic/Followers/originals/DoorClassicalIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/Followers/originals/DoorClassical.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. -->