X3D Model Documentation: Example18.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='Interactive' 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='Example18.x3d'/>
  6            <meta name='translatorcontent='Don Brutzman'/>
  7            <meta name='createdcontent='26 June 2000'/>
  8            <meta name='modifiedcontent='28 October 2019'/>
  9            <meta name='creatorcontent='X3D working group'/>
 10            <meta name='descriptioncontent='VRML 97 specification example: another example of animating the camera by depicting an elevator to ease access to a multi-storey building. For this example, a 2 storey building is shown and it is assumed that the elevator is already at the ground floor. To go up, the user just steps onto the elevator platform. A ProximitySensor fires and starts the elevator up automatically. Additional features such as call buttons for outside the elevator, elevator doors, and floor selector buttons could be added to make the elevator easier to use.'/>
 11            <meta name='referencecontent='originals/exampleD_18.wrl'/>
 12            <meta name='specificationSectioncontent='VRML 97, ISO/IEC 14772-1, Part 1: Functional specification and UTF-8 encoding, D.18 Elevator'/>
 13            <meta name='specificationUrlcontent='https://www.web3d.org/documents/specifications/14772/V2.0/part1/examples.html#D.18'/>
 14            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example18.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: ElevatorPI, EProximity, ETransform, EViewpoint, TS

Index for Viewpoint node: EViewpoint
-->
 18       <Scene>
 19            <WorldInfo title='Example18.x3d'/>
 20            <Transform translation='0.0 0.0 -3.5'>
 21                 <Shape>
 22                      <Cone/>
 23                      <Appearance>
 24                           <Material diffuseColor='0.0 1.0 0.0'/>
 25                      </Appearance>
 26                 </Shape>
 27            </Transform>
 28            <Transform translation='0.0 4.0 -3.5'>
 29                 <Shape>
 30                      <Cone/>
 31                      <Appearance>
 32                           <Material diffuseColor='1.0 0.0 0.0'/>
 33                      </Appearance>
 34                 </Shape>
 35            </Transform>
 36            <Transform translation='0.0 8.0 -3.5'>
 37                 <Shape>
 38                      <Cone/>
 39                      <Appearance>
 40                           <Material diffuseColor='0.0 0.0 1.0'/>
 41                      </Appearance>
 42                 </Shape>
 43            </Transform>
 44            <Group>
 45 
               <!-- ROUTE information for ETransform node:  [from ElevatorPI.value_changed to translation ] -->
               <Transform DEF='ETransform'>
 46 
                    <!-- ROUTE information for EViewpoint node:  [from TS.isActive to set_bind ] -->
                    <Viewpoint DEF='EViewpointdescription='Viewpointjump='false'/>
 47 
                    <!-- ROUTE information for EProximity node:  [from enterTime to TS.startTime ] -->
                    <ProximitySensor DEF='EProximitysize='2.0 5.0 5.0'/>
 48                      <Transform translation='0.0 -1.0 0.0'>
 49                           <Shape>
 50                                <Box size='2.0 0.2 5.0'/>
 51                                <Appearance>
 52                                     <Material/>
 53                                </Appearance>
 54                           </Shape>
 55                      </Transform>
 56                 </Transform>
 57            </Group>
 58 
          <!-- ROUTE information for ElevatorPI node:  [from TS.fraction_changed to set_fraction ] [from value_changed to ETransform.translation ] -->
          <PositionInterpolator DEF='ElevatorPIkey='0.0 1.0keyValue='0.0 0.0 0.0 0.0 8.0 0.0'/>
 59 
          <!-- ROUTE information for TS node:  [from EProximity.enterTime to startTime ] [from isActive to EViewpoint.set_bind ] [from fraction_changed to ElevatorPI.set_fraction ] -->
          <TimeSensor DEF='TScycleInterval='10.0'/>
 60            < ROUTE  fromNode='EProximity' fromField='enterTime' toNode='TS' toField='startTime'/>
 61            < ROUTE  fromNode='TS' fromField='isActive' toNode='EViewpoint' toField='set_bind'/>
 62            < ROUTE  fromNode='TS' fromField='fraction_changed' toNode='ElevatorPI' toField='set_fraction'/>
 63            < ROUTE  fromNode='ElevatorPI' fromField='value_changed' toNode='ETransform' toField='translation'/>
 64       </Scene>
 65  </X3D>
<!--

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

<!-- to top Index for DEF nodes: ElevatorPI, EProximity, ETransform, EViewpoint, TS

Index for Viewpoint node: EViewpoint
-->
X3D Tooltips element index: Appearance, Box, Cone, Group, head, Material, meta, PositionInterpolator, ProximitySensor, ROUTE, Scene, Shape, TimeSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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

EProximity
ProximitySensor
enterTime
SFTime

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

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

ROUTE
event to
(3)
ETransform
Transform
translation
SFVec3f
  then
 
 
 
TS
TimeSensor
isActive
SFBool

ROUTE
event to
(2)
EViewpoint
Viewpoint
set_bind
SFBool
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/Vrml97Specification/Example18Index.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example18.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. -->