| 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='title' content=' Doors.x3d '/> |
| 6 | <meta name='description' content='Two doors activated by different fields from a TouchSensor node.'/> |
| 7 | <meta name='creator' content='Leonard Daly and Don Brutzman'/> |
| 8 | <meta name='created' content='6 June 2006'/> |
| 9 | <meta name='modified' content='20 October 2019'/> |
| 10 | <meta name='reference' content='https://X3dGraphics.com'/> |
| 11 | <meta name='reference' content=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/> |
| 12 | <meta name='rights' content='Copyright 2006, Daly Realism and Don Brutzman'/> |
| 13 | <meta name='subject' content='X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com'/> |
| 14 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/Doors.x3d '/> |
| 15 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 16 | <meta name='license' content='../license.html'/> |
| 17 | </head> |
| 18 | <Scene> |
| 19 | <WorldInfo title='Doors.x3d'/> |
| 20 | <Background skyColor='1 1 1'/> |
| 21 | <NavigationInfo type='"WALK" "ANY"'/> |
| 22 | <Viewpoint description='Initial default' position='0 1.4 10'/> |
| 23 | <Viewpoint description='Book View' position='0 1.4 4.5'/> |
| 24 | <Transform> |
| 25 | <Shape> |
| 26 | <Appearance> |
| 27 | <Material diffuseColor='.6 .2 0' shininess='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='Wall' coordIndex='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='DoorLeftTransform' center='-.5 0 0' translation='-1 1.125 -.05'> |
| 36 | |
| 37 | <Shape DEF='DoorShape'> |
| 38 | <Appearance DEF='DoorApp'> |
| 39 | <Material DEF='DoorMat' diffuseColor='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='DoorGeometry' coordIndex='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='MoverLeft' key='0 1' keyValue='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='TimerLeft' cycleInterval='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='TouchLeft' description='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='DoorRight' center='-.5 0 0' translation='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='MoverRight' key='0 1' keyValue='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='TimerRight' cycleInterval='3'/> |
| 63 |
<!-- ROUTE information for TouchRight node:
[from touchTime to TimerRight.startTime
]
-->
<TouchSensor DEF='TouchRight' description='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 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 |
FilterLeft
BooleanFilter set_boolean SFBool |
then
|
FilterLeft
BooleanFilter inputTrue SFBool |
TriggerLeft
TimeTrigger set_boolean SFBool |
then
|
TriggerLeft
TimeTrigger triggerTime SFTime |
TimerLeft
TimeSensor startTime SFTime |
then
|
TimerLeft
TimeSensor fraction_changed SFFloat |
MoverLeft
OrientationInterpolator set_fraction SFFloat |
then
|
MoverLeft
OrientationInterpolator value_changed SFRotation |
DoorLeftTransform
Transform rotation SFRotation |
|
TouchRight
TouchSensor touchTime SFTime |
TimerRight
TimeSensor startTime SFTime |
then
|
TimerRight
TimeSensor fraction_changed SFFloat |
MoverRight
OrientationInterpolator set_fraction SFFloat |
then
|
MoverRight
OrientationInterpolator value_changed SFRotation |
DoorRight
Transform rotation SFRotation |
<!--
Color-coding 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)
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->