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='title' content='Figure09_5FourStackingBlocksWithAxes.x3d'/> |
6 | <meta name='creator' content='Figure 9.5, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/> |
7 | <meta name='reference' content='http://www.wiley.com/legacy/compbooks/vrml2sbk/ch09/09fig05.htm'/> |
8 | <meta name='translator' content='Don Brutzman'/> |
9 | <meta name='created' content='9 August 2000'/> |
10 | <meta name='modified' content='20 October 2019'/> |
11 | <meta name='description' content='Four stacking blocks, select and drag to see each of them. Coordinate axes are superimposed to show X3D/VRML directions.'/> |
12 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09SensingViewer/Figure09_5FourStackingBlocksWithAxes.x3d'/> |
13 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
14 | <meta name='license' content='../../license.html'/> |
15 | </head> |
16 | <Scene> |
17 | <WorldInfo title='Figure09_5FourStackingBlocksWithAxes.x3d'/> |
18 | <Viewpoint description='Hello Cubes.' position='0 0 15'/> |
19 | <!-- Dragging Orderly Cubes. Superfluous Group nodes removed. --> |
20 |
<!-- ROUTE information for BLOCK_1_TRANSFORM node:
[from BLOCK_1_SENSOR.translation_changed to set_translation
]
-->
<Transform DEF='BLOCK_1_TRANSFORM'> |
21 | <Shape> |
22 | <Box/> |
23 | <Appearance> |
24 | <Material diffuseColor='.5 .5 .5' emissiveColor='.5 0 0'/> |
25 | </Appearance> |
26 | </Shape> |
27 |
<!-- ROUTE information for BLOCK_1_SENSOR node:
[from translation_changed to BLOCK_1_TRANSFORM.set_translation
]
-->
<PlaneSensor DEF='BLOCK_1_SENSOR' description='Click and drag to move box' maxPosition='3 3' minPosition='-3 -3'/> |
28 | <!-- Note that we are connecting a translation (SFVec3F) output to a translation (SFVec3F) input in these ROUTEs. --> |
29 | < ROUTE fromNode='BLOCK_1_SENSOR' fromField='translation_changed' toNode='BLOCK_1_TRANSFORM' toField='set_translation'/> |
30 | </Transform> |
31 |
<!-- ROUTE information for BLOCK_2_TRANSFORM node:
[from BLOCK_2_SENSOR.translation_changed to set_translation
]
-->
<Transform DEF='BLOCK_2_TRANSFORM'> |
32 | <Shape> |
33 | <Box/> |
34 | <Appearance> |
35 | <Material diffuseColor='.5 .5 .5' emissiveColor='0 .5 0'/> |
36 | </Appearance> |
37 | </Shape> |
38 |
<!-- ROUTE information for BLOCK_2_SENSOR node:
[from translation_changed to BLOCK_2_TRANSFORM.set_translation
]
-->
<PlaneSensor DEF='BLOCK_2_SENSOR' description='Click and drag to move box' maxPosition='3 3' minPosition='-3 -3' offset='2.5 0 0'/> |
39 | < ROUTE fromNode='BLOCK_2_SENSOR' fromField='translation_changed' toNode='BLOCK_2_TRANSFORM' toField='set_translation'/> |
40 | </Transform> |
41 |
<!-- ROUTE information for BLOCK_3_TRANSFORM node:
[from BLOCK_3_SENSOR.translation_changed to set_translation
]
-->
<Transform DEF='BLOCK_3_TRANSFORM'> |
42 | <Shape> |
43 | <Box/> |
44 | <Appearance> |
45 | <Material diffuseColor='.5 .5 .5' emissiveColor='0 0 .5'/> |
46 | </Appearance> |
47 | </Shape> |
48 |
<!-- ROUTE information for BLOCK_3_SENSOR node:
[from translation_changed to BLOCK_3_TRANSFORM.set_translation
]
-->
<PlaneSensor DEF='BLOCK_3_SENSOR' description='Click and drag to move box' maxPosition='3 3' minPosition='-3 -3' offset='-1.5 -2 0'/> |
49 | < ROUTE fromNode='BLOCK_3_SENSOR' fromField='translation_changed' toNode='BLOCK_3_TRANSFORM' toField='set_translation'/> |
50 | </Transform> |
51 |
<!-- ROUTE information for BLOCK_4_TRANSFORM node:
[from BLOCK_4_SENSOR.translation_changed to set_translation
]
-->
<Transform DEF='BLOCK_4_TRANSFORM'> |
52 | <Shape> |
53 | <Box/> |
54 | <Appearance> |
55 | <Material diffuseColor='.5 .5 .5' emissiveColor='.5 .5 0'/> |
56 | </Appearance> |
57 | </Shape> |
58 |
<!-- ROUTE information for BLOCK_4_SENSOR node:
[from translation_changed to BLOCK_4_TRANSFORM.set_translation
]
-->
<PlaneSensor DEF='BLOCK_4_SENSOR' description='Click and drag to move box' maxPosition='3 3' minPosition='-3 -3' offset='.75 4 0'/> |
59 | < ROUTE fromNode='BLOCK_4_SENSOR' fromField='translation_changed' toNode='BLOCK_4_TRANSFORM' toField='set_translation'/> |
60 | </Transform> |
61 | <!-- Adding this Inline reference to another scene superimposes X3D/VRML coordinate system axes. --> |
62 | <Switch DEF='Hider' whichChoice='0'> |
63 | <Transform scale='4 4 4'> |
64 | <Inline DEF='CoordinateAxes' url=' "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl" '/> |
65 | </Transform> |
66 | </Switch> |
67 | </Scene> |
68 | </X3D> |
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.
BLOCK_1_SENSOR
PlaneSensor translation_changed SFVec3f |
BLOCK_1_TRANSFORM
Transform set_translation SFVec3f |
BLOCK_2_SENSOR
PlaneSensor translation_changed SFVec3f |
BLOCK_2_TRANSFORM
Transform set_translation SFVec3f |
BLOCK_3_SENSOR
PlaneSensor translation_changed SFVec3f |
BLOCK_3_TRANSFORM
Transform set_translation SFVec3f |
BLOCK_4_SENSOR
PlaneSensor translation_changed SFVec3f |
BLOCK_4_TRANSFORM
Transform set_translation SFVec3f |
<!--
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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->