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='title' content='Example15.x3d'/> |
6 | <meta name='translator' content='Don Brutzman'/> |
7 | <meta name='created' content='26 June 2000'/> |
8 | <meta name='modified' content='3 August 2024'/> |
9 | <meta name='creator' content='X3D working group'/> |
10 | <meta name='description' content='VRML 97 specification example: Robot. Seek or zoom in towards the robot to start a simple animation sequence.'/> |
11 | <meta name='reference' content='originals/exampleD_15.wrl'/> |
12 | <meta name='specificationSection' content='VRML 97, ISO/IEC 14772-1, Part 1: Functional specification and UTF-8 encoding, D.15 Robot'/> |
13 | <meta name='specificationUrl' content='https://www.web3d.org/documents/specifications/14772/V2.0/part1/examples.html#D.15'/> |
14 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example15.x3d'/> |
15 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
16 | <meta name='license' content='../license.html'/> |
17 | </head> |
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='rate' type='SFTime' accessType='initializeOnly'/> |
22 | <field name='distance' type='SFFloat' accessType='initializeOnly'/> |
23 | <field name='children' type='MFNode' accessType='initializeOnly'/> |
24 | <field name='startTime' type='SFTime' accessType='inputOutput'/> |
25 | <field name='stopTime' type='SFTime' accessType='inputOutput'/> |
26 | <field name='loop' type='SFBool' accessType='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='rate' type='SFTime' accessType='initializeOnly'/> |
30 | <field name='maxAngle' type='SFFloat' accessType='initializeOnly'/> |
31 | <field name='children' type='MFNode' accessType='initializeOnly'/> |
32 | <field name='startTime' type='SFTime' accessType='inputOutput'/> |
33 | <field name='stopTime' type='SFTime' accessType='inputOutput'/> |
34 | <field name='loop' type='SFBool' accessType='initializeOnly'/> |
35 | </ExternProtoDeclare> |
36 | <NavigationInfo speed='20' type='"WALK" "ANY"'/> |
37 | <Viewpoint description='zoom in' position='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='Near' size='200 200 200'/> |
39 |
<!-- ROUTE information for WALK node:
[from Near.enterTime to startTime
]
[from Near.exitTime to stopTime
]
-->
<ProtoInstance name='Shuttle' DEF='WALK'> |
40 | <fieldValue name='stopTime' value='1'/> |
41 | <fieldValue name='rate' value='10'/> |
42 | <fieldValue name='distance' value='20'/> |
43 | <fieldValue name='children'> |
44 | <Transform rotation='0 1 0 1.57'> |
45 | <Shape> |
46 | |
47 | <Material diffuseColor='0 0.5 0.7'/> |
48 | </Appearance> |
49 | <!-- head --> |
50 | <Box/> |
51 | </Shape> |
52 | <Transform scale='1 5 1' translation='0 -5 0'> |
53 | <Shape> |
54 | <Appearance USE='A'/> |
55 | <!-- body --> |
56 | <Sphere/> |
57 | </Shape> |
58 | </Transform> |
59 | <Transform rotation='0 1 0 1.57' translation='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='Pendulum' DEF='Arm'> |
61 | <fieldValue name='stopTime' value='1'/> |
62 | <fieldValue name='rate' value='1'/> |
63 | <fieldValue name='maxAngle' value='0.52'/> |
64 | <fieldValue name='children'> |
65 | <Transform translation='0 -3 0'> |
66 | <Shape> |
67 | <Appearance USE='A'/> |
68 | <Cylinder height='4' radius='0.5'/> |
69 | </Shape> |
70 | </Transform> |
71 | </fieldValue> |
72 | </ProtoInstance> |
73 | </Transform> |
74 | <Transform rotation='0 -1 0 1.57' translation='-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 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. -->