<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 ' >
<head>
<meta name='titlecontent='TumbleGroup.x3d'/>
<meta name='descriptioncontent='Tumble group: this file contains a Prototype declaration to manage a group of shapes, tumbling them in X, Y, and Z directions.'/>
<meta name='creatorcontent='David R. Nadeau'/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='1 July 1998'/>
<meta name='translatedcontent='2 February 2014'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent='Loader.x3d'/>
<meta name='referencecontent='One.x3d'/>
<meta name='referencecontent='Two.x3d'/>
<meta name='referencecontent='Three.x3d'/>
<meta name='referencecontent='Boxes.x3d'/>
<meta name='referencecontent='originals/tumgrp.wrl'/>
<meta name='referencecontent=' http://www.siggraph.org/s98 '/>
<meta name='referencecontent=' http://www.siggraph.org/s98/conference/courses/18.html '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0465.htm '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0469.htm '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TumbleGroup.x3d '/>
<meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
<meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: XClock, XRot, XRotIt, YClock, YRot, YRotIt, ZClock, ZRot, ZRotIt

Index for ProtoDeclare definition: TumbleGroup
-->
<Scene>
<WorldInfo title='TumbleGroup.x3d'/>
<ProtoDeclare name='TumbleGroup'>
<ProtoInterface>
<field name='xTumbleIntervaltype='SFTimevalue='3.0accessType='initializeOnly'/>
<field name='childrentype='MFNodeaccessType='initializeOnly'>
<!-- ProtoInstance needs to initialize children with a fieldValue -->
</field>
<field name='zTumbleIntervaltype='SFTimevalue='5.0accessType='initializeOnly'/>
<field name='translationtype='SFVec3fvalue='0.0 0.0 0.0accessType='initializeOnly'/>
<field name='yTumbleIntervaltype='SFTimevalue='1.0accessType='initializeOnly'/>
</ProtoInterface>
<ProtoBody>
<!-- ROUTE information for XRot node:  [from XRotIt.value_changed to set_rotation ] -->
<Transform DEF='XRot'>
<!-- ROUTE information for YRot node:  [from YRotIt.value_changed to set_rotation ] -->
<Transform DEF='YRot'>
<!-- ROUTE information for ZRot node:  [from ZRotIt.value_changed to set_rotation ] -->
<Transform DEF='ZRot'>
<IS>
<connect nodeField='translationprotoField='translation'/>
<connect nodeField='childrenprotoField='children'/>
</IS>
</Transform>
</Transform>
</Transform>
<!-- ROUTE information for XClock node:  [from fraction_changed to XRotIt.set_fraction ] -->
<TimeSensor DEF='XClockloop='truestartTime='1.0'>
<IS>
<connect nodeField='cycleIntervalprotoField='xTumbleInterval'/>
</IS>
</TimeSensor>
<!-- ROUTE information for YClock node:  [from fraction_changed to YRotIt.set_fraction ] -->
<TimeSensor DEF='YClockloop='truestartTime='1.0'>
<IS>
<connect nodeField='cycleIntervalprotoField='yTumbleInterval'/>
</IS>
</TimeSensor>
<!-- ROUTE information for ZClock node:  [from fraction_changed to ZRotIt.set_fraction ] -->
<TimeSensor DEF='ZClockloop='truestartTime='1.0'>
<IS>
<connect nodeField='cycleIntervalprotoField='zTumbleInterval'/>
</IS>
</TimeSensor>
<!-- ROUTE information for XRotIt node:  [from XClock.fraction_changed to set_fraction ] [from value_changed to XRot.set_rotation ] -->
<OrientationInterpolator DEF='XRotItkey='0.0 0.25 0.5 0.75 1.0keyValue='1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.57 1.0 0.0 0.0 3.14 1.0 0.0 0.0 4.71 1.0 0.0 0.0 6.28'/>

<!-- ROUTE information for YRotIt node:  [from YClock.fraction_changed to set_fraction ] [from value_changed to YRot.set_rotation ] -->
<OrientationInterpolator DEF='YRotItkey='0.0 0.25 0.5 0.75 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 1.57 0.0 1.0 0.0 3.14 0.0 1.0 0.0 4.71 0.0 1.0 0.0 6.28'/>

<!-- ROUTE information for ZRotIt node:  [from ZClock.fraction_changed to set_fraction ] [from value_changed to ZRot.set_rotation ] -->
<OrientationInterpolator DEF='ZRotItkey='0.0 0.25 0.5 0.75 1.0keyValue='0.0 0.0 1.0 0.0 0.0 0.0 1.0 1.57 0.0 0.0 1.0 3.14 0.0 0.0 1.0 4.71 0.0 0.0 1.0 6.28'/>

< ROUTE  fromNode=' XClock' fromField='fraction_changed' toNode=' XRotIt' toField='set_fraction'/>
< ROUTE  fromNode=' YClock' fromField='fraction_changed' toNode=' YRotIt' toField='set_fraction'/>
< ROUTE  fromNode=' ZClock' fromField='fraction_changed' toNode=' ZRotIt' toField='set_fraction'/>
< ROUTE  fromNode=' XRotIt' fromField='value_changed' toNode=' XRot' toField='set_rotation'/>
< ROUTE  fromNode=' YRotIt' fromField='value_changed' toNode=' YRot' toField='set_rotation'/>
< ROUTE  fromNode=' ZRotIt' fromField='value_changed' toNode=' ZRot' toField='set_rotation'/>
</ProtoBody>
</ProtoDeclare>
<!-- Display scene instructions for viewing an example scene with a corresponding prototype instance -->
<Background skyColor='0 0.333333 0.66667'/>
<Anchor description='select text to view parent scene'
  url=' "Loader.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Loader.x3d" "Loader.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Loader.wrl" ' >
<Shape>
<Text string='"The TumbleGroup.x3d scene holds" "a prototype declaration" "" "Select this text to view example usage" "in Loader.x3d scene"'>
<FontStyle justify='"MIDDLE" "MIDDLE"style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='1 0.9 0.4'/>
</Appearance>
</Shape>
<!-- Invisible box behind text makes selection easier -->
<Shape>
<Box size='12 5 0.1'/>
<Appearance>
<Material transparency='1'/>
</Appearance>
</Shape>
</Anchor>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: XClock, XRot, XRotIt, YClock, YRot, YRotIt, ZClock, ZRot, ZRotIt

Index for ProtoDeclare definition: TumbleGroup
-->

Event Graph ROUTE Table entries with 6 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.

XClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
XRotIt
OrientationInterpolator
set_fraction
SFFloat

 
 
then
XRotIt
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
XRot
Transform
set_rotation
SFRotation


YClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
YRotIt
OrientationInterpolator
set_fraction
SFFloat

 
 
then
YRotIt
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
YRot
Transform
set_rotation
SFRotation


ZClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
ZRotIt
OrientationInterpolator
set_fraction
SFFloat

 
 
then
ZRotIt
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
ZRot
Transform
set_rotation
SFRotation


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TumbleGroupIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TumbleGroup.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)
    <ProtoDeclare name='ProtoName'> <field name='fieldName'/> </ProtoDeclare> -->

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