X3D Model Documentation: Figure09_5FourStackingBlocksWithAxes.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='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='titlecontent='Figure09_5FourStackingBlocksWithAxes.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='20 October 2019'/>
 11            <meta name='descriptioncontent='Four stacking blocks, select and drag to see each of them. Coordinate axes are superimposed to show X3D/VRML directions.'/>
 12            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09SensingViewer/Figure09_5FourStackingBlocksWithAxes.x3d'/>
 13            <meta name='generatorcontent='X3D-Edit 3.3, 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, CoordinateAxes, Hider

Index for Viewpoint node: Viewpoint_1
-->
 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 .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                 <!-- 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 .5emissiveColor='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_SENSORdescription='Click and drag to move boxmaxPosition='3 3minPosition='-3 -3offset='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 .5emissiveColor='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_SENSORdescription='Click and drag to move boxmaxPosition='3 3minPosition='-3 -3offset='-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 .5emissiveColor='.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_SENSORdescription='Click and drag to move boxmaxPosition='3 3minPosition='-3 -3offset='.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='HiderwhichChoice='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 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, CoordinateAxes, Hider

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Box, head, Inline, Material, meta, PlaneSensor, ROUTE, Scene, Shape, Switch, 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_5FourStackingBlocksWithAxesIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09SensingViewer/Figure09_5FourStackingBlocksWithAxes.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. -->