X3D Model Documentation: Example15.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='Example15.x3d'/>
  6            <meta name='translatorcontent='Don Brutzman'/>
  7            <meta name='createdcontent='26 June 2000'/>
  8            <meta name='modifiedcontent='3 August 2024'/>
  9            <meta name='creatorcontent='X3D working group'/>
 10            <meta name='descriptioncontent='VRML 97 specification example: Robot. Seek or zoom in towards the robot to start a simple animation sequence.'/>
 11            <meta name='referencecontent='originals/exampleD_15.wrl'/>
 12            <meta name='specificationSectioncontent='VRML 97, ISO/IEC 14772-1, Part 1: Functional specification and UTF-8 encoding, D.15 Robot'/>
 13            <meta name='specificationUrlcontent='https://www.web3d.org/documents/specifications/14772/V2.0/part1/examples.html#D.15'/>
 14            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example15.x3d'/>
 15            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 16            <meta name='licensecontent='../license.html'/>
 17       </head>
<!--

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

<!-- to top Index for DEF nodes: A, Arm, Near, WALK

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definitions: Pendulum, Shuttle
-->
 18       <Scene>
 19            <WorldInfo title='Example15.x3d'/>
 20            <ExternProtoDeclare name='Shuttle'   url=' "Example14.x3d#Shuttle" "https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example14.x3d#Shuttle" "Example14.wrl#Shuttle" "https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example14.wrl#Shuttle" '>
 21                 <field name='ratetype='SFTimeaccessType='initializeOnly'/>
 22                 <field name='distancetype='SFFloataccessType='initializeOnly'/>
 23                 <field name='childrentype='MFNodeaccessType='initializeOnly'/>
 24                 <field name='startTimetype='SFTimeaccessType='inputOutput'/>
 25                 <field name='stopTimetype='SFTimeaccessType='inputOutput'/>
 26                 <field name='looptype='SFBoolaccessType='initializeOnly'/>
 27            </ExternProtoDeclare>
 28            <ExternProtoDeclare name='Pendulum'   url=' "Example14.x3d#Pendulum" "https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example14.x3d#Pendulum" "Example14.wrl#Pendulum" "https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example14.wrl#Pendulum" '>
 29                 <field name='ratetype='SFTimeaccessType='initializeOnly'/>
 30                 <field name='maxAngletype='SFFloataccessType='initializeOnly'/>
 31                 <field name='childrentype='MFNodeaccessType='initializeOnly'/>
 32                 <field name='startTimetype='SFTimeaccessType='inputOutput'/>
 33                 <field name='stopTimetype='SFTimeaccessType='inputOutput'/>
 34                 <field name='looptype='SFBoolaccessType='initializeOnly'/>
 35            </ExternProtoDeclare>
 36            <NavigationInfo speed='20type='"WALK" "ANY"'/>
 37            <Viewpoint description='zoom inposition='0 0 150'/>
 38 
          <!-- ROUTE information for Near node:  [from enterTime to WALK.startTime ] [from enterTime to Arm.startTime ] [from exitTime to WALK.stopTime ] [from exitTime to Arm.stopTime ] -->
          <ProximitySensor DEF='Nearsize='200 200 200'/>
 39 
          <!-- ROUTE information for WALK node:  [from Near.enterTime to startTime ] [from Near.exitTime to stopTime ] -->
          <ProtoInstance name='ShuttleDEF='WALK'>
 40                 <fieldValue name='stopTimevalue='1'/>
 41                 <fieldValue name='ratevalue='10'/>
 42                 <fieldValue name='distancevalue='20'/>
 43                 <fieldValue name='children'>
 44                      <Transform rotation='0 1 0 1.57'>
 45                           <Shape>
 46 
                              <!-- Appearance A is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                              <Appearance DEF='A'>
 47                                     <Material diffuseColor='0 0.5 0.7'/>
 48                                </Appearance>
 49                                <!-- head -->
 50                                <Box/>
 51                           </Shape>
 52                           <Transform scale='1 5 1translation='0 -5 0'>
 53                                <Shape>
 54                                     <Appearance USE='A'/>
 55                                     <!-- body -->
 56                                     <Sphere/>
 57                                </Shape>
 58                           </Transform>
 59                           <Transform rotation='0 1 0 1.57translation='1.5 0 0'>
 60 
                              <!-- ProtoInstance Arm is a DEF node that has 1 USE node: USE_1
                              <!-- ROUTE information for Arm node:  [from Near.enterTime to startTime ] [from Near.exitTime to stopTime ] -->
                              <ProtoInstance name='PendulumDEF='Arm'>
 61                                     <fieldValue name='stopTimevalue='1'/>
 62                                     <fieldValue name='ratevalue='1'/>
 63                                     <fieldValue name='maxAnglevalue='0.52'/>
 64                                     <fieldValue name='children'>
 65                                          <Transform translation='0 -3 0'>
 66                                               <Shape>
 67                                                    <Appearance USE='A'/>
 68                                                    <Cylinder height='4radius='0.5'/>
 69                                               </Shape>
 70                                          </Transform>
 71                                     </fieldValue>
 72                                </ProtoInstance>
 73                           </Transform>
 74                           <Transform rotation='0 -1 0 1.57translation='-1.5 0 0'>
 75                                <ProtoInstance USE='Arm'/>
 76                           </Transform>
 77                      </Transform>
 78                 </fieldValue>
 79            </ProtoInstance>
 80            < ROUTE  fromNode='Near' fromField='enterTime' toNode='WALK' toField='startTime'/>
 81            < ROUTE  fromNode='Near' fromField='enterTime' toNode='Arm' toField='startTime'/>
 82            < ROUTE  fromNode='Near' fromField='exitTime' toNode='WALK' toField='stopTime'/>
 83            < ROUTE  fromNode='Near' fromField='exitTime' toNode='Arm' toField='stopTime'/>
 84       </Scene>
 85  </X3D>
<!--

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

<!-- to top Index for DEF nodes: A, Arm, Near, WALK

Index for Viewpoint node: Viewpoint_1

Index for ExternProtoDeclare definitions: Pendulum, Shuttle
-->
X3D Tooltips element index: Appearance, Box, Cylinder, ExternProtoDeclare, field, fieldValue, head, Material, meta, NavigationInfo, ProtoInstance, ProximitySensor, ROUTE, Scene, Shape, Sphere, 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.

Near
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
WALK
ProtoInstance
startTime
SFTime
Near
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
Arm
ProtoInstance
startTime
SFTime
Near
ProximitySensor
exitTime
SFTime

ROUTE
event to
(1)
WALK
ProtoInstance
stopTime
SFTime
Near
ProximitySensor
exitTime
SFTime

ROUTE
event to
(1)
Arm
ProtoInstance
stopTime
SFTime

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/Basic/Vrml97Specification/Example15Index.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example15.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)
    <ProtoInstance name='ProtoName'> <field name='fieldName'/> </ProtoInstance> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->