X3D Model Documentation: SpinGroupInternalSubsetDeclaration.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  <!-- 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='titlecontent='SpinGroupInternalSubsetDeclaration.x3d'/>
  8            <meta name='creatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='18 September 2000'/>
 10            <meta name='modifiedcontent='20 October 2019'/>
 11            <meta name='descriptioncontent='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='referencecontent='SpinGroupInternalSubsetDeclaration.x3d.txt'/>
 15            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/development/SpinGroupInternalSubsetDeclaration.x3d'/>
 16            <meta name='generatorcontent='X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html'/>
 17            <meta name='licensecontent='../license.html'/>
 18       </head>
<!--

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

<!-- to top Index for DEF nodes: AQUAMARINE, CENTER_FONT, instanceOne, instanceThree, instanceTwo, SpinGroupOrientationInterpolator, SpinGroupOrientationInterpolator-TagVersion, SpinGroupTimeSensor, SpinGroupTimeSensor-TagVersion, SpinGroupTransform, SpinGroupTransform-TagVersion

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definitions: SpinGroup, SpinGroupTag
-->
 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='translationtype='SFVec3fvalue='0 0 0accessType='inputOutput'/>
 24                      <field name='rotationtype='SFRotationvalue='0 0 1 0accessType='inputOutput'/>
 25                      <field name='centertype='SFVec3fvalue='0 0 0accessType='inputOutput'/>
 26                      <field name='cycleIntervaltype='SFTimevalue='1accessType='inputOutput'/>
 27                      <field name='childrentype='MFNodeaccessType='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-TagVersionrotation='1 0 0 0'>
 34                           <IS>
 35                                <connect nodeField='translationprotoField='translation'/>
 36                                <connect nodeField='rotationprotoField='rotation'/>
 37                                <connect nodeField='centerprotoField='center'/>
 38                                <connect nodeField='childrenprotoField='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-TagVersionkey='0.0 0.50 1.0keyValue='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-TagVersionloop='true'>
 42                                <IS>
 43                                     <connect nodeField='cycleIntervalprotoField='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='translationtype='SFVec3fvalue='0 0 0accessType='inputOutput'/>
 54                      <field name='rotationtype='SFRotationvalue='0 0 1 0accessType='inputOutput'/>
 55                      <field name='centertype='SFVec3fvalue='0 0 0accessType='inputOutput'/>
 56                      <field name='cycleIntervaltype='SFTimevalue='1accessType='inputOutput'/>
 57                      <field name='childrentype='MFNodeaccessType='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='translationprotoField='translation'/>
 66                                <connect nodeField='rotationprotoField='rotation'/>
 67                                <connect nodeField='centerprotoField='center'/>
 68                                <connect nodeField='childrenprotoField='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='SpinGroupOrientationInterpolatorkey='0.0 0.50 1.0keyValue='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='SpinGroupTimeSensorloop='true'>
 72                                <IS>
 73                                     <connect nodeField='cycleIntervalprotoField='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 Examplesposition='0 0 15'/>
 82            <NavigationInfo type='"EXAMINE"'/>
 83            <!-- Instantiating the SpinGroupTag using a customized tag: -->
 84            <SpinGroupTag DEF='instanceOnecenter='0 0 0cycleInterval='8nodeType='Grouprotation='0 0 1 0translation='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_FONTjustify='"MIDDLE" "MIDDLE"style='BOLD'/>
 92                           </Text>
 93                      </Shape>
 94                 </fieldValue>
 95            </SpinGroupTag>
 96            <!-- Instantiating the SpinGroup PROTO using a ProtoInstance tag: -->
 97            <ProtoInstance name='SpinGroupDEF='instanceTwo'>
 98                 <fieldValue name='translationvalue='0 1 0'/>
 99                 <fieldValue name='cycleIntervalvalue='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='SpinGroupDEF='instanceThree'>
110                 <fieldValue name='translationvalue='0 -2 0'/>
111                 <fieldValue name='cycleIntervalvalue='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 shows event connections.
-->

<!-- to top Index for DEF nodes: AQUAMARINE, CENTER_FONT, instanceOne, instanceThree, instanceTwo, SpinGroupOrientationInterpolator, SpinGroupOrientationInterpolator-TagVersion, SpinGroupTimeSensor, SpinGroupTimeSensor-TagVersion, SpinGroupTransform, SpinGroupTransform-TagVersion

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definitions: SpinGroup, SpinGroupTag
-->
X3D Tooltips element index: Appearance, connect, field, fieldValue, FontStyle, head, IS, Material, meta, NavigationInfo, OrientationInterpolator, ProtoBody, ProtoDeclare, ProtoInstance, ProtoInterface, ROUTE, Scene, Shape, SpinGroupTag, Text, TimeSensor, 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.

SpinGroupTimeSensor
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
SpinGroupOrientationInterpolator
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SpinGroupOrientationInterpolator
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
SpinGroupTransform
Transform
set_rotation
SFRotation

SpinGroupTimeSensor-TagVersion
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
SpinGroupOrientationInterpolator-TagVersion
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
SpinGroupOrientationInterpolator-TagVersion
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
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. 
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/development/SpinGroupInternalSubsetDeclarationIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/development/SpinGroupInternalSubsetDeclaration.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. -->