<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='Figure31.7DonutExternalPrototype.x3d'/>
<meta name='creatorcontent='Figure 31.7, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
<meta name='referencecontent=' http://www.wiley.com/legacy/compbooks/vrml2sbk/ch31/31fig07.htm '/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='22 November 2000'/>
<meta name='modifiedcontent='25 March 2012'/>
<meta name='descriptioncontent='A donut shape built using the Donut geometry node and the LightOak appearance node. Also see Figures 30.5 and 31.6 for comparison.'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter31-Prototypes/Figure31.7DonutExternalPrototype.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!--

Index for ExternProtoDeclare definitions : Donut, LightOak

Index for DEF nodes : Clock, DonutThickness, SpecialtyOfTheHouse, StopSizeChanges

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<ExternProtoDeclare name='Donut'
  url=' "Figure31.6DonutPrototype.wrl#Donut" "http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter31-Prototypes/Figure31.6DonutPrototype.wrl#Donut" "Figure31.6DonutPrototype.x3d#Donut" "http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter31-Prototypes/Figure31.6DonutPrototype.x3d#Donut" '>
<field name='crossSectionRadiustype='SFFloataccessType='initializeOnly'/>
<field name='spineRadiustype='SFFloataccessType='initializeOnly'/>
<field name='crossSectionResolutiontype='SFInt32accessType='initializeOnly'/>
<field name='spineResolutiontype='SFInt32accessType='initializeOnly'/>
<field name='set_crossSectionRadiustype='SFFloataccessType='inputOnly'/>
<field name='set_spineRadiustype='SFFloataccessType='inputOnly'/>
</ExternProtoDeclare>
<ExternProtoDeclare name='LightOak'
  url=' "Figure31.4WoodAppearancePrototypesLibrary.wrl#LightOak" "http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter31-Prototypes/Figure31.4WoodAppearancePrototypesLibrary.wrl#LightOak" "Figure31.4WoodAppearancePrototypesLibrary.x3d#LightOak" "http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter31-Prototypes/Figure31.4WoodAppearancePrototypesLibrary.x3d#LightOak" '>
<field name='textureTransformtype='SFNodeaccessType='inputOutput'/>
</ExternProtoDeclare>
<Viewpoint description='Click to pick a sizeorientation='1 0 0 -0.52position='0 7 12'/>
<!-- Donut instances from prototypes -->
<Transform translation='0 2 0'>
<Shape>
<ProtoInstance name='DonutcontainerField='geometry'>
<fieldValue name='crossSectionRadiusvalue='1'/>
<fieldValue name='spineRadiusvalue='2'/>
</ProtoInstance>
<ProtoInstance name='LightOakcontainerField='appearance'>
<fieldValue name='textureTransform'>
<TextureTransform center='-0 5rotation='0.758scale='2 0.5translation='0.5 0'/>
</fieldValue>
</ProtoInstance>
</Shape>
</Transform>
<!-- Hmmm, what size donut do you really want? -->
<!-- Clock ROUTEs:  [from StopSizeChanges.touchTime to stopTime ] [from fraction_changed to DonutThickness.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='10loop='true'/>
<!-- DonutThickness ROUTEs:  [from Clock.fraction_changed to set_fraction ] [from value_changed to SpecialtyOfTheHouse.set_crossSectionRadius ] -->
<ScalarInterpolator DEF='DonutThicknesskey='0 0.4 0.5 0.9 1keyValue='0.75 1.25 1.25 0.75 0.75'/>
<Transform translation='0 -2 0'>
<Shape>
<!-- SpecialtyOfTheHouse ROUTE:  [from DonutThickness.value_changed to set_crossSectionRadius ] -->
<ProtoInstance name='DonutDEF='SpecialtyOfTheHousecontainerField='geometry'>
<fieldValue name='crossSectionRadiusvalue='0.5'/>
<fieldValue name='spineRadiusvalue='2'/>
</ProtoInstance>
<Appearance> </Appearance>
</Shape>
<!-- StopSizeChanges ROUTE:  [from touchTime to Clock.stopTime ] -->
<TouchSensor DEF='StopSizeChangesdescription='touch to stop size changes'/>
</Transform>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='DonutThicknesstoField='set_fraction'/>
<ROUTE fromNode='DonutThicknessfromField='value_changedtoNode='SpecialtyOfTheHousetoField='set_crossSectionRadius'/>
<ROUTE fromNode='StopSizeChangesfromField='touchTimetoNode='ClocktoField='stopTime'/>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definitions : Donut, LightOak

Index for DEF nodes : Clock, DonutThickness, SpecialtyOfTheHouse, StopSizeChanges

Index for Viewpoint image : Viewpoint_1
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>     <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->