X3D Model Documentation: Lamp.x3d

  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='https://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent=' Lamp.x3d '/>
  6            <meta name='descriptioncontent='Desk lampillustrate the use of multiple sensors, nested into groups within groups along with the shapes they sense.'/>
  7            <meta name='creatorcontent='David R. Nadeau'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='1 July 1998'/>
 10            <meta name='translatedcontent='2 February 2014'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent='originals/lamp.wrl'/>
 13            <meta name='referencecontent='http://www.siggraph.org/s98'/>
 14            <meta name='referencecontent=' http://www.siggraph.org/s98/conference/courses/18.html '/>
 15            <meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0173.htm '/>
 16            <meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm '/>
 17            <meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/>
 18            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Lamp.x3d '/>
 19            <meta name='generatorcontent=' Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html '/>
 20            <meta name='generatorcontent='X3D-Edit, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 21            <meta name='licensecontent='../license.html'/>
 22       </head>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: FirstArm, Lamp, LampArm, LampShade, MoveFirstArm, MoveLamp, MoveLampShade, MoveSecondArm, Red, SecondArm

Index for Viewpoint node: Viewpoint_1

-->
 23       <Scene>
 24            <WorldInfo info='"Copyright (c) 1997, Andrea L. Ames, David R. Nadeau, John L. Moreland"title='Desk lamp'/>
 25            <Viewpoint description='Entry viewposition='0.0 0.15 1.0'/>
 26            <NavigationInfo/>
 27            <Transform>
 28                 <Shape>
 29                      <Appearance>
 30                           <Material diffuseColor='0.0 0.0 0.0emissiveColor='0.7 0.7 0.7'/>
 31                      </Appearance>
 32                      <Box size='2.25 0.01 2.25'/>
 33                 </Shape>
 34            </Transform>
 35            <Transform rotation='1.0 0.0 0.0 1.571translation='0.0 0.01 0.0'>
 36 
               <!-- ROUTE information for MoveLamp node:  [from translation_changed to Lamp.set_translation ] -->
               <PlaneSensor DEF='MoveLamp'/>
 37 
               <!-- ROUTE information for Lamp node:  [from MoveLamp.translation_changed to set_translation ] -->
               <Transform DEF='Lamprotation='1.0 0.0 0.0 -1.571'>
 38                      <Shape>
 39                           <Appearance>
 40                                <Material diffuseColor='0.5 0.5 0.5'/>
 41                           </Appearance>
 42                           <Cylinder height='0.01radius='0.1'/>
 43                      </Shape>
 44                      <Group>
 45 
                         <!-- ROUTE information for MoveFirstArm node:  [from rotation_changed to FirstArm.set_rotation ] -->
                         <CylinderSensor DEF='MoveFirstArm'/>
 46 
                         <!-- ROUTE information for FirstArm node:  [from MoveFirstArm.rotation_changed to set_rotation ] -->
                         <Transform DEF='FirstArm'>
 47                                <Transform center='0.0 -0.15 0.0rotation='1.0 0.0 0.0 -0.7translation='0.0 0.15 0.0'>
 48 
                                   <!-- Shape LampArm is a DEF node that has 1 USE node: USE_1 -->
                                   <Shape DEF='LampArm'>
 49 
                                        <!-- Appearance Red is a DEF node that has 1 USE node: USE_1 -->
                                        <Appearance DEF='Red'>
 50                                               <Material diffuseColor='1.0 0.2 0.2'/>
 51                                          </Appearance>
 52                                          <Cylinder height='0.3radius='0.01'/>
 53                                     </Shape>
 54                                     <Group>
 55 
                                        <!-- ROUTE information for MoveSecondArm node:  [from rotation_changed to SecondArm.set_rotation ] -->
                                        <CylinderSensor DEF='MoveSecondArm'/>
 56 
                                        <!-- ROUTE information for SecondArm node:  [from MoveSecondArm.rotation_changed to set_rotation ] -->
                                        <Transform DEF='SecondArm'>
 57                                               <Transform center='0.0 -0.15 0.0rotation='1.0 0.0 0.0 1.9translation='0.0 0.3 0.0'>
 58                                                    <Shape USE='LampArm'/>
 59                                                    <Group>
 60 
                                                       <!-- ROUTE information for MoveLampShade node:  [from rotation_changed to LampShade.set_rotation ] -->
                                                       <SphereSensor DEF='MoveLampShadeoffset='1.0 0.0 0.0 -1.25'/>
 61 
                                                       <!-- ROUTE information for LampShade node:  [from MoveLampShade.rotation_changed to set_rotation ] -->
                                                       <Transform DEF='LampShadecenter='0.0 0.075 0.0rotation='1.0 0.0 0.0 -1.25translation='0.0 0.075 0.0'>
 62                                                              <Shape>
 63                                                                   <Appearance USE='Red'/>
 64                                                                   <Cone bottom='falsebottomRadius='0.12height='0.15'/>
 65                                                              </Shape>
 66                                                              <Transform translation='0.0 0.075 0.0'>
 67                                                                   <Shape>
 68                                                                        <Appearance>
 69                                                                             <Material diffuseColor='1.0 1.0 1.0'/>
 70                                                                        </Appearance>
 71                                                                        <Cylinder height='0.03radius='0.007'/>
 72                                                                   </Shape>
 73                                                              </Transform>
 74                                                              <Transform translation='0.0 -0.05 0.0'>
 75                                                                   <Shape>
 76                                                                        <Appearance>
 77                                                                             <Material diffuseColor='0.0 0.0 0.0emissiveColor='1.0 1.0 1.0'/>
 78                                                                        </Appearance>
 79                                                                        <Sphere radius='0.05'/>
 80                                                                   </Shape>
 81                                                              </Transform>
 82                                                         </Transform>
 83                                                    </Group>
 84                                               </Transform>
 85                                          </Transform>
 86                                     </Group>
 87                                </Transform>
 88                           </Transform>
 89                      </Group>
 90                 </Transform>
 91            </Transform>
 92            < ROUTE  fromNode='MoveLamp' fromField='translation_changed' toNode='Lamp' toField='set_translation'/>
 93            < ROUTE  fromNode='MoveFirstArm' fromField='rotation_changed' toNode='FirstArm' toField='set_rotation'/>
 94            < ROUTE  fromNode='MoveSecondArm' fromField='rotation_changed' toNode='SecondArm' toField='set_rotation'/>
 95            < ROUTE  fromNode='MoveLampShade' fromField='rotation_changed' toNode='LampShade' toField='set_rotation'/>
 96       </Scene>
 97  </X3D>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: FirstArm, Lamp, LampArm, LampShade, MoveFirstArm, MoveLamp, MoveLampShade, MoveSecondArm, Red, SecondArm

Index for Viewpoint node: Viewpoint_1

-->
X3D Tooltips element index: to top Appearance, Box, Cone, Cylinder, CylinderSensor, Group, head, Material, meta, NavigationInfo, PlaneSensor, ROUTE, Scene, Shape, Sphere, SphereSensor, Transform, Viewpoint, WorldInfo, X3D,
plus documentation for accessType definitions, type definitions, XML data types, and field types

🔖   Event Graph ROUTE Table entries with 4 ROUTE connections, showing X3D event-model relationships for this scene.

Each row with a ROUTE statement shows an event cascade that may occur during a single timestamp interval between frame renderings, performed as part of the X3D execution model.

MoveLamp
PlaneSensor
translation_changed
SFVec3f
→
ROUTE
event to
(1)
Lamp
Transform
set_translation
SFVec3f

MoveFirstArm
CylinderSensor
rotation_changed
SFRotation
→
ROUTE
event to
(1)
FirstArm
Transform
set_rotation
SFRotation

MoveSecondArm
CylinderSensor
rotation_changed
SFRotation
→
ROUTE
event to
(1)
SecondArm
Transform
set_rotation
SFRotation

MoveLampShade
SphereSensor
rotation_changed
SFRotation
→
ROUTE
event to
(1)
LampShade
Transform
set_rotation
SFRotation

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/Siggraph98Course/LampIndex.html -->
<!-- SourceForge version control Version control at    
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Lamp.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode DEF='idNamefield='value'/> matches XML terminology <XmlElement DEF='idNameattribute='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. -->