X3D Model Documentation: Figure09_5FourStackingBlocks.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='Figure09_5FourStackingBlocks.x3d'/>
  6            <meta name='creatorcontent='Figure 9.5, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
  7            <meta name='referencecontent='http://www.wiley.com/legacy/compbooks/vrml2sbk/ch09/09fig05.htm'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='9 August 2000'/>
 10            <meta name='modifiedcontent='4 September 2023'/>
 11            <meta name='descriptioncontent='Four stacking blocks, select and drag to see each of them.'/>
 12            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09SensingViewer/Figure09_5FourStackingBlocks.x3d'/>
 13            <meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
 14            <meta name='licensecontent='../../license.html'/>
 15       </head>
<!--

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

<!-- to top Index for DEF nodes: BLOCK_1_SENSOR, BLOCK_1_TRANSFORM, BLOCK_2_SENSOR, BLOCK_2_TRANSFORM, BLOCK_3_SENSOR, BLOCK_3_TRANSFORM, BLOCK_4_SENSOR, BLOCK_4_TRANSFORM

Index for Viewpoint node: Viewpoint_1
-->
 16       <Scene>
 17            <WorldInfo title='Figure09_5FourStackingBlocks.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 .5emissiveColor='.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_SENSORdescription='Click and drag to move boxmaxPosition='3 3minPosition='-3 -3'/>
 28            </Transform>
 29 
          <!-- ROUTE information for BLOCK_2_TRANSFORM node:  [from BLOCK_2_SENSOR.translation_changed to set_translation ] -->
          <Transform DEF='BLOCK_2_TRANSFORM'>
 30                 <Shape>
 31                      <Box/>
 32                      <Appearance>
 33                           <Material diffuseColor='.5 .5 .5emissiveColor='0 .5 0'/>
 34                      </Appearance>
 35                 </Shape>
 36 
               <!-- ROUTE information for BLOCK_2_SENSOR node:  [from translation_changed to BLOCK_2_TRANSFORM.set_translation ] -->
               <PlaneSensor DEF='BLOCK_2_SENSORdescription='Click and drag to move boxmaxPosition='3 3minPosition='-3 -3offset='2.5 0 0'/>
 37            </Transform>
 38 
          <!-- ROUTE information for BLOCK_3_TRANSFORM node:  [from BLOCK_3_SENSOR.translation_changed to set_translation ] -->
          <Transform DEF='BLOCK_3_TRANSFORM'>
 39                 <Shape>
 40                      <Box/>
 41                      <Appearance>
 42                           <Material diffuseColor='.5 .5 .5emissiveColor='0 0 .5'/>
 43                      </Appearance>
 44                 </Shape>
 45 
               <!-- ROUTE information for BLOCK_3_SENSOR node:  [from translation_changed to BLOCK_3_TRANSFORM.set_translation ] -->
               <PlaneSensor DEF='BLOCK_3_SENSORdescription='Click and drag to move boxmaxPosition='3 3minPosition='-3 -3offset='-1.5 -2 0'/>
 46            </Transform>
 47 
          <!-- ROUTE information for BLOCK_4_TRANSFORM node:  [from BLOCK_4_SENSOR.translation_changed to set_translation ] -->
          <Transform DEF='BLOCK_4_TRANSFORM'>
 48                 <Shape>
 49                      <Box/>
 50                      <Appearance>
 51                           <Material diffuseColor='.5 .5 .5emissiveColor='.5 .5 0'/>
 52                      </Appearance>
 53                 </Shape>
 54 
               <!-- ROUTE information for BLOCK_4_SENSOR node:  [from translation_changed to BLOCK_4_TRANSFORM.set_translation ] -->
               <PlaneSensor DEF='BLOCK_4_SENSORdescription='Click and drag to move boxmaxPosition='3 3minPosition='-3 -3offset='.75 4 0'/>
 55            </Transform>
 56            <!-- Note that we are connecting a translation (SFVec3F) output to a translation (SFVec3F) input in these ROUTEs. -->
 57            < ROUTE  fromNode='BLOCK_1_SENSOR' fromField='translation_changed' toNode='BLOCK_1_TRANSFORM' toField='set_translation'/>
 58            < ROUTE  fromNode='BLOCK_2_SENSOR' fromField='translation_changed' toNode='BLOCK_2_TRANSFORM' toField='set_translation'/>
 59            < ROUTE  fromNode='BLOCK_3_SENSOR' fromField='translation_changed' toNode='BLOCK_3_TRANSFORM' toField='set_translation'/>
 60            < ROUTE  fromNode='BLOCK_4_SENSOR' fromField='translation_changed' toNode='BLOCK_4_TRANSFORM' toField='set_translation'/>
 61       </Scene>
 62  </X3D>
<!--

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

<!-- to top Index for DEF nodes: BLOCK_1_SENSOR, BLOCK_1_TRANSFORM, BLOCK_2_SENSOR, BLOCK_2_TRANSFORM, BLOCK_3_SENSOR, BLOCK_3_TRANSFORM, BLOCK_4_SENSOR, BLOCK_4_TRANSFORM

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Box, head, Material, meta, PlaneSensor, ROUTE, Scene, Shape, 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.

BLOCK_1_SENSOR
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
BLOCK_1_TRANSFORM
Transform
set_translation
SFVec3f

BLOCK_2_SENSOR
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
BLOCK_2_TRANSFORM
Transform
set_translation
SFVec3f

BLOCK_3_SENSOR
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
BLOCK_3_TRANSFORM
Transform
set_translation
SFVec3f

BLOCK_4_SENSOR
PlaneSensor
translation_changed
SFVec3f

ROUTE
event to
(1)
BLOCK_4_TRANSFORM
Transform
set_translation
SFVec3f
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/Vrml2Sourcebook/Chapter09SensingViewer/Figure09_5FourStackingBlocksIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09SensingViewer/Figure09_5FourStackingBlocks.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. -->