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 | <!-- ENTITY, ELEMENT and ATTLIST definitions are listed in detail within the DOCTYPE declaration internal subset. --> |
4 | <!-- You must view full source of the DTD declarations (SpinGroupInternalSubsetDeclaration.x3d.txt) to fully understand this file. --> |
5 | <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'> |
6 | <head> |
7 | <meta name='title' content='SpinGroupInternalSubsetDeclaration.x3d'/> |
8 | <meta name='creator' content='Don Brutzman'/> |
9 | <meta name='created' content='18 September 2000'/> |
10 | <meta name='modified' content='20 October 2019'/> |
11 | <meta name='description' content='SpinGroup PROTO example content to test DTD modularization and extensibility - view XML source to see DTD internal-subset declarations.'/> |
12 | <meta name=' error ' content=' Test to demonstrate DOCTYPE extensibility, this X3D scene not valid and does not render. '/> |
13 | <meta name=' warning ' content=' You must view full source of the DTD declarations (SpinGroupInternalSubsetDeclaration.x3d.txt) to fully understand validation techniques in this file. '/> |
14 | <meta name='reference' content='SpinGroupInternalSubsetDeclaration.x3d.txt'/> |
15 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/development/SpinGroupInternalSubsetDeclaration.x3d'/> |
16 | <meta name='generator' content='X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html'/> |
17 | <meta name='license' content='../license.html'/> |
18 | </head> |
19 | <Scene> |
20 | <!-- Declaring the SpinGroupTag PROTO, so that translations of internally defined SpinGroupTag to VRML can work: --> |
21 | <ProtoDeclare name='SpinGroupTag'> |
22 | <ProtoInterface> |
23 | <field name='translation' type='SFVec3f' value='0 0 0' accessType='inputOutput'/> |
24 | <field name='rotation' type='SFRotation' value='0 0 1 0' accessType='inputOutput'/> |
25 | <field name='center' type='SFVec3f' value='0 0 0' accessType='inputOutput'/> |
26 | <field name='cycleInterval' type='SFTime' value='1' accessType='inputOutput'/> |
27 | <field name='children' type='MFNode' accessType='inputOutput'> |
28 | <WorldInfo info='"overridden at run time"'/> |
29 | </field> |
30 | </ProtoInterface> |
31 | <ProtoBody> |
32 | <!-- SpinGroupTransform is first node, which determines node type, and encloses children for instances. --> |
33 |
<!-- ROUTE information for SpinGroupTransform-TagVersion node:
[from SpinGroupOrientationInterpolator-TagVersion.value_changed to set_rotation
]
-->
<Transform DEF='SpinGroupTransform-TagVersion' rotation='1 0 0 0'> |
34 | <IS> |
35 | <connect nodeField='translation' protoField='translation'/> |
36 | <connect nodeField='rotation' protoField='rotation'/> |
37 | <connect nodeField='center' protoField='center'/> |
38 | <connect nodeField='children' protoField='children'/> |
39 | </IS> |
40 |
<!-- ROUTE information for SpinGroupOrientationInterpolator-TagVersion node:
[from SpinGroupTimeSensor-TagVersion.fraction_changed to set_fraction
]
[from value_changed to SpinGroupTransform-TagVersion.set_rotation
]
-->
<OrientationInterpolator DEF='SpinGroupOrientationInterpolator-TagVersion' key='0.0 0.50 1.0' keyValue='0 1 0 0.0 0 1 0 -3.14159 0 1 0 -6.28318'/> |
41 |
<!-- ROUTE information for SpinGroupTimeSensor-TagVersion node:
[from fraction_changed to SpinGroupOrientationInterpolator-TagVersion.set_fraction
]
-->
<TimeSensor DEF='SpinGroupTimeSensor-TagVersion' loop='true'> |
42 | <IS> |
43 | <connect nodeField='cycleInterval' protoField='cycleInterval'/> |
44 | </IS> |
45 | </TimeSensor> |
46 | < ROUTE fromNode='SpinGroupTimeSensor-TagVersion' fromField='fraction_changed' toNode='SpinGroupOrientationInterpolator-TagVersion' toField='set_fraction'/> |
47 | < ROUTE fromNode='SpinGroupOrientationInterpolator-TagVersion' fromField='value_changed' toNode='SpinGroupTransform-TagVersion' toField='set_rotation'/> |
48 | </Transform> |
49 | </ProtoBody> |
50 | </ProtoDeclare> |
51 | <ProtoDeclare name='SpinGroup'> |
52 | <ProtoInterface> |
53 | <field name='translation' type='SFVec3f' value='0 0 0' accessType='inputOutput'/> |
54 | <field name='rotation' type='SFRotation' value='0 0 1 0' accessType='inputOutput'/> |
55 | <field name='center' type='SFVec3f' value='0 0 0' accessType='inputOutput'/> |
56 | <field name='cycleInterval' type='SFTime' value='1' accessType='inputOutput'/> |
57 | <field name='children' type='MFNode' accessType='inputOutput'> |
58 | <WorldInfo info='"overridden at run time"'/> |
59 | </field> |
60 | </ProtoInterface> |
61 | <ProtoBody> |
62 | <!-- SpinGroupTransform is first node, which determines node type, and encloses children for instances. --> |
63 |
<!-- ROUTE information for SpinGroupTransform node:
[from SpinGroupOrientationInterpolator.value_changed to set_rotation
]
-->
<Transform DEF='SpinGroupTransform'> |
64 | <IS> |
65 | <connect nodeField='translation' protoField='translation'/> |
66 | <connect nodeField='rotation' protoField='rotation'/> |
67 | <connect nodeField='center' protoField='center'/> |
68 | <connect nodeField='children' protoField='children'/> |
69 | </IS> |
70 |
<!-- ROUTE information for SpinGroupOrientationInterpolator node:
[from SpinGroupTimeSensor.fraction_changed to set_fraction
]
[from value_changed to SpinGroupTransform.set_rotation
]
-->
<OrientationInterpolator DEF='SpinGroupOrientationInterpolator' key='0.0 0.50 1.0' keyValue='0 1 0 0.0 0 1 0 -3.14159 0 1 0 -6.28318'/> |
71 |
<!-- ROUTE information for SpinGroupTimeSensor node:
[from fraction_changed to SpinGroupOrientationInterpolator.set_fraction
]
-->
<TimeSensor DEF='SpinGroupTimeSensor' loop='true'> |
72 | <IS> |
73 | <connect nodeField='cycleInterval' protoField='cycleInterval'/> |
74 | </IS> |
75 | </TimeSensor> |
76 | < ROUTE fromNode='SpinGroupTimeSensor' fromField='fraction_changed' toNode='SpinGroupOrientationInterpolator' toField='set_fraction'/> |
77 | < ROUTE fromNode='SpinGroupOrientationInterpolator' fromField='value_changed' toNode='SpinGroupTransform' toField='set_rotation'/> |
78 | </Transform> |
79 | </ProtoBody> |
80 | </ProtoDeclare> |
81 | <Viewpoint description='SpinGroup Examples' position='0 0 15'/> |
82 | <NavigationInfo type='"EXAMINE"'/> |
83 | <!-- Instantiating the SpinGroupTag using a customized tag: --> |
84 | <SpinGroupTag DEF='instanceOne' center='0 0 0' cycleInterval='8' nodeType='Group' rotation='0 0 1 0' translation='0 4 0'> |
85 | <fieldValue name='children'> |
86 | <Shape> |
87 |
<!-- Appearance
AQUAMARINE is a DEF node that has 1 USE node: USE_1 -->
<Appearance DEF='AQUAMARINE'> |
88 | <Material diffuseColor='0.1 0.8 0.8'/> |
89 | </Appearance> |
90 | <Text string='"SpinGroupTag example 1 single child"'> |
91 |
<!-- FontStyle
CENTER_FONT is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 --> <FontStyle DEF='CENTER_FONT' justify='"MIDDLE" "MIDDLE"' style='BOLD'/> |
92 | </Text> |
93 | </Shape> |
94 | </fieldValue> |
95 | </SpinGroupTag> |
96 | <!-- Instantiating the SpinGroup PROTO using a ProtoInstance tag: --> |
97 | <ProtoInstance name='SpinGroup' DEF='instanceTwo'> |
98 | <fieldValue name='translation' value='0 1 0'/> |
99 | <fieldValue name='cycleInterval' value='12'/> |
100 | <fieldValue name='children'> |
101 | <Shape> |
102 | <Text string='"SpinGroup ProtoInstance example 2 single child"'> |
103 | <FontStyle USE='CENTER_FONT'/> |
104 | </Text> |
105 | </Shape> |
106 | </fieldValue> |
107 | </ProtoInstance> |
108 | <!-- Instantiating the SpinGroup PROTO with multiple Node children: --> |
109 | <ProtoInstance name='SpinGroup' DEF='instanceThree'> |
110 | <fieldValue name='translation' value='0 -2 0'/> |
111 | <fieldValue name='cycleInterval' value='20'/> |
112 | <fieldValue name='children'> |
113 | <Shape> |
114 | <Appearance USE='AQUAMARINE'/> |
115 | <Text string='"SpinGroup ProtoInstance" "example 3 first child"'> |
116 | <FontStyle USE='CENTER_FONT'/> |
117 | </Text> |
118 | </Shape> |
119 | <Transform translation='0 -2 0'> |
120 | <Shape> |
121 | <Text string='"example 3 second child"'> |
122 | <FontStyle USE='CENTER_FONT'/> |
123 | </Text> |
124 | </Shape> |
125 | </Transform> |
126 | </fieldValue> |
127 | </ProtoInstance> |
128 | </Scene> |
129 | </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.
SpinGroupTimeSensor
TimeSensor fraction_changed SFFloat |
SpinGroupOrientationInterpolator
OrientationInterpolator set_fraction SFFloat |
then
|
SpinGroupOrientationInterpolator
OrientationInterpolator value_changed SFRotation |
SpinGroupTransform
Transform set_rotation SFRotation |
SpinGroupTimeSensor-TagVersion
TimeSensor fraction_changed SFFloat |
SpinGroupOrientationInterpolator-TagVersion
OrientationInterpolator set_fraction SFFloat |
then
|
SpinGroupOrientationInterpolator-TagVersion
OrientationInterpolator value_changed SFRotation |
SpinGroupTransform-TagVersion
Transform set_rotation SFRotation |
instanceThree
ProtoInstance SpinGroup |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
instanceTwo
ProtoInstance SpinGroup |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declaration with direct access to other nodes, and thus has potential to produce run-time animation. |
<!--
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. -->