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='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'> |
4 | <head> |
5 | <meta name='title' content='Robot.x3d'/> |
6 | <meta name='description' content='X3D encodings example: Robot. Seek or zoom in towards the robot to start a simple animation sequence. This scene demonstrates nested prototype instances'/> |
7 | <meta name='creator' content='Don Brutzman and Joe Williams'/> |
8 | <meta name='created' content='1 June 2002'/> |
9 | <meta name='modified' content='28 October 2019'/> |
10 | <meta name='specificationSection' content='X3D encodings, ISO/IEC 19776-1.3, Part 1: XML encoding, Annex C.15 Robot'/> |
11 | <meta name='specificationUrl' content='https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/examples.html#Robot'/> |
12 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/Robot.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='Robot.x3d'/> |
18 | <ExternProtoDeclare name='Shuttle' url=' "ShuttlesAndPendulums.x3d#Shuttle" "https://www.web3d.org/Specifications/Encodings/ShuttlesAndPendulums.x3d#Shuttle" '> |
19 | <field name='rate' type='SFTime' accessType='initializeOnly'/> |
20 | <field name='distance' type='SFFloat' accessType='initializeOnly'/> |
21 | <field name='children' type='MFNode' accessType='initializeOnly'/> |
22 | <field name='startTime' type='SFTime' accessType='inputOutput'/> |
23 | <field name='stopTime' type='SFTime' accessType='inputOutput'/> |
24 | <field name='loop' type='SFBool' accessType='initializeOnly'/> |
25 | </ExternProtoDeclare> |
26 | <ExternProtoDeclare name='Pendulum' url=' "ShuttlesAndPendulums.x3d#Pendulum" "https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/ShuttlesAndPendulums.x3d#Pendulum" '> |
27 | <field name='rate' type='SFTime' accessType='initializeOnly'/> |
28 | <field name='maxAngle' type='SFFloat' accessType='initializeOnly'/> |
29 | <field name='children' type='MFNode' accessType='initializeOnly'/> |
30 | <field name='startTime' type='SFTime' accessType='inputOutput'/> |
31 | <field name='stopTime' type='SFTime' accessType='inputOutput'/> |
32 | <field name='loop' type='SFBool' accessType='initializeOnly'/> |
33 | </ExternProtoDeclare> |
34 | <NavigationInfo speed='20' type='"WALK" "ANY"'/> |
35 | <Viewpoint description='Watch Robot Stand' position='0 0 150'/> |
36 | <Viewpoint description='Watch Robot Walk when close' position='0 0 95'/> |
37 |
<!-- 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='Near' size='200 200 200'/> |
38 |
<!-- ROUTE information for WALK node:
[from Near.enterTime to startTime
]
[from Near.exitTime to stopTime
]
-->
<ProtoInstance name='Shuttle' DEF='WALK'> |
39 | <fieldValue name='stopTime' value='1'/> |
40 | <fieldValue name='rate' value='10'/> |
41 | <fieldValue name='distance' value='20'/> |
42 | <fieldValue name='children'> |
43 | <Transform rotation='0 1 0 1.57'> |
44 | <Shape> |
45 | |
46 | <Material diffuseColor='0 0.5 0.7'/> |
47 | </Appearance> |
48 | <!-- head --> |
49 | <Box/> |
50 | </Shape> |
51 | <Transform scale='1 5 1' translation='0 -5 0'> |
52 | <Shape> |
53 | <Appearance USE='A'/> |
54 | <!-- body --> |
55 | <Sphere/> |
56 | </Shape> |
57 | </Transform> |
58 | <Transform rotation='0 1 0 1.57' translation='1.5 0 0'> |
59 |
<!-- 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='Pendulum' DEF='Arm'> |
60 | <fieldValue name='stopTime' value='1'/> |
61 | <fieldValue name='rate' value='1'/> |
62 | <fieldValue name='maxAngle' value='0.52'/> |
63 | <fieldValue name='children'> |
64 | <Transform translation='0 -3 0'> |
65 | <Shape> |
66 | <Appearance USE='A'/> |
67 | <Cylinder height='4' radius='0.5'/> |
68 | </Shape> |
69 | </Transform> |
70 | </fieldValue> |
71 | </ProtoInstance> |
72 | </Transform> |
73 | <Transform rotation='0 -1 0 1.57' translation='-1.5 0 0'> |
74 | <!-- name='Pendulum' no longer required for ProtoInstance USE nodes --> |
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 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 |
WALK
ProtoInstance startTime SFTime |
|
Near
ProximitySensor enterTime SFTime |
Arm
ProtoInstance startTime SFTime |
|
Near
ProximitySensor exitTime SFTime |
WALK
ProtoInstance stopTime SFTime |
|
Near
ProximitySensor exitTime SFTime |
Arm
ProtoInstance stopTime SFTime |
<!--
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>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->