<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile='Interactive' version='3.2 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.2.xsd '>
<head>
<component level='1name='Geospatial'/>
<component level='2name='NURBS'/>
<component level='2name='Core'/>
<component level='2name='Navigation'/>
<component level='1name='Text'/>
<meta name='titlecontent='X3dHeaderPrototypeSyntaxExamples.x3d'/>
<meta name='descriptioncontent='X3D scene header and prototype syntax examples. This example header indicates that the content is XML encoded, follows the Interactive Profile and explicitly lists additional necessary components. The X3D header may also contain additional semantic information. The remainder of this scene contains example Prototype declaration and instancing.'/>
<meta name='createdcontent='14 October 2002'/>
<meta name='modifiedcontent='12 January 2014'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Basic/development/X3dHeaderPrototypeSyntaxExamples.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for ExternProtoDeclare definition : ViewPositionOrientation

Index for ProtoDeclare definitions : EmissiveMaterial, NewWorldInfoNode, ShiftGroupUp2m

Index for DEF nodes : Clock, DefaultNodeValue, ExampleChildElement, ExamplePrototypeBody, ExampleSingleElement, Spinner, TransformExampleUSE

Index for Viewpoint image : ExampleSingleElement
-->
<Scene>
<ExternProtoDeclare name='ViewPositionOrientation'
  url=' "../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" '>
<field name='enabledtype='SFBoolaccessType='inputOutput'/>
<field name='traceEnabledtype='SFBoolaccessType='initializeOnly'/>
<field name='set_traceEnabledtype='SFBoolaccessType='inputOnly'/>
<field name='position_changedtype='SFVec3faccessType='outputOnly'/>
<field name='orientation_changedtype='SFRotationaccessType='outputOnly'/>
<field name='outputViewpointStringtype='MFStringaccessType='outputOnly'/>
</ExternProtoDeclare>
<ProtoDeclare name='NewWorldInfoNode'>
<ProtoBody>
<WorldInfo DEF='ExamplePrototypeBody'/>
</ProtoBody>
</ProtoDeclare>
<ProtoDeclare name='EmissiveMaterial'>
<ProtoInterface>
<field name='onlyColortype='SFColorvalue='1 0 0accessType='inputOutput'/>
</ProtoInterface>
<ProtoBody>
<!-- Override default diffuseColor value 0.8 0.8 0.8 -->
<Material diffuseColor='0 0 0'>
<!-- Connect emissiveColor field of current node to onlyColor field of parent ProtoDeclare. -->
<IS>
<connect nodeField='emissiveColorprotoField='onlyColor'/>
</IS>
</Material>
</ProtoBody>
</ProtoDeclare>
<ProtoDeclare name='ShiftGroupUp2m'>
<ProtoInterface>
<field name='childrentype='MFNodeaccessType='inputOutput'>
<Group DEF='DefaultNodeValuebboxSize='2 2 2'/>
</field>
</ProtoInterface>
<ProtoBody>
<Transform translation='0 2 0'>
<Group>
<IS>
<connect nodeField='childrenprotoField='children'/>
</IS>
</Group>
</Transform>
</ProtoBody>
</ProtoDeclare>
<!-- ==================== -->
<Viewpoint DEF='ExampleSingleElementdescription='Hello syntax'/>
<Group DEF='ExampleChildElement'>
<Shape>
<Box/>
<Appearance>
<Material diffuseColor='0.6 0.4 0.2'/>
</Appearance>
</Shape>
</Group>
<!-- TransformExampleUSE ROUTE:  [from Spinner.value_changed to rotation ] -->
<Transform DEF='TransformExampleUSErotation='0 1 0 0.78translation='0 2.5 0'>
<Group USE='ExampleChildElement'/>
</Transform>
<Collision>
<Shape containerField='proxy'>
<Sphere/>
</Shape>
<Group USE='ExampleChildElement'/>
</Collision>
<Transform translation='0 -2.5 0'>
<Shape>
<Appearance>
<ProtoInstance name='EmissiveMaterialcontainerField='material'>
<fieldValue name='onlyColorvalue='0.2 0.6 0.6'/>
</ProtoInstance>
</Appearance>
<Text string='"X3D Header Prototype syntax examples" "(view console for EXTERNPROTO output)"'>
<FontStyle justify='"MIDDLE" "MIDDLE"size='0.6'/>
</Text>
</Shape>
</Transform>
<ProtoInstance name='ViewPositionOrientation'>
<fieldValue name='enabledvalue='true'/>
</ProtoInstance>
<!-- Clock ROUTE:  [from fraction_changed to Spinner.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='4loop='true'/>
<!-- Spinner ROUTEs:  [from Clock.fraction_changed to set_fraction ] [from value_changed to TransformExampleUSE.rotation ] -->
<OrientationInterpolator DEF='Spinnerkey='0 0.5 1keyValue='0 1 0 0 0 1 0 3.1416 0 1 0 6.2832'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='SpinnertoField='set_fraction'/>
<ROUTE fromNode='SpinnerfromField='value_changedtoNode='TransformExampleUSEtoField='rotation'/>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definition : ViewPositionOrientation

Index for ProtoDeclare definitions : EmissiveMaterial, NewWorldInfoNode, ShiftGroupUp2m

Index for DEF nodes : Clock, DefaultNodeValue, ExampleChildElement, ExamplePrototypeBody, ExampleSingleElement, Spinner, TransformExampleUSE

Index for Viewpoint image : ExampleSingleElement
-->

<!-- 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 -->