<?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>
<component level='1name='Geospatial'/>
<component level='2name='NURBS'/>
<component level='2name='Core'/>
<component level='1name='Navigation'/>
<!-- test no warning for overloaded component names -->
<component level='1name='Text'/>
<component level='1name='Sound'/>
<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. Used for specification EXAMPLE excerpts in 19776:1 XML Encoding.'/>
<meta name='createdcontent='14 October 2002'/>
<meta name='modifiedcontent='28 January 2024'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='specificationSectioncontent=' X3D encodings, ISO/IEC 19776-1.3, Part 1: XML encoding, 4.3 XML file syntax'/>
<meta name='specificationUrlcontent=' https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#XMLFileSyntax '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/X3dHeaderPrototypeSyntaxExamples.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, 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: Clock, ConsoleOutputViewPositionOrientation, DefaultNodeValue, ExampleChildElement, ExamplePrototypeBody, ExampleSingleElement, someInline, Spinner, StayInPlace, TransformExampleUSE

Index for Viewpoint node: ExampleSingleElement Index for ExternProtoDeclare definition: ViewPositionOrientation

Index for ProtoDeclare definitions: EmissiveMaterial, NewWorldInfoNode, ShiftGroupUp2m
-->
<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>
<ProtoInstance name='NewWorldInfoNode'/>
<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'>
<!-- Authors need to override this node when creating the ProtoInstance fieldValue name="children"
-->
</Group>
</field>
</ProtoInterface>
<ProtoBody>
<Transform translation='0 2 0'>
<Group>
<IS>
<connect nodeField='childrenprotoField='children'/>
</IS>
</Group>
</Transform>
</ProtoBody>
</ProtoDeclare>
<ProtoInstance name='ShiftGroupUp2m'/>
<!-- ==================== -->
<Viewpoint DEF='ExampleSingleElementdescription='Hello syntax'/>
<Group DEF='ExampleChildElement'>
<Shape>
<Box/>
<Appearance>
<Material diffuseColor='0.6 0.4 0.2'/>
</Appearance>
</Shape>
</Group>
<!-- ROUTE information for TransformExampleUSE node:  [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'>
<!-- note that Collision proxy Shape is not rendered -->
<Sphere/>
<Appearance>
<Material/>
</Appearance>
</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='ViewPositionOrientationDEF='ConsoleOutputViewPositionOrientation'>
<fieldValue name='enabledvalue='true'/>
</ProtoInstance>
<!-- ROUTE information for Clock node:  [from fraction_changed to Spinner.set_fraction ] [from fraction_changed to StayInPlace.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='4loop='true'/>

<!-- ROUTE information for Spinner node:  [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.14159 0 1 0 6.28318'/>

< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' Spinner' toField='set_fraction'/>
< ROUTE  fromNode=' Spinner' fromField='value_changed' toNode=' TransformExampleUSE' toField='rotation'/>
<Inline DEF='someInline'
  url=' someUrl.x3d"https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/someUrl.x3d" ' />

<IMPORT inlineDEF='someInlineimportedDEF='someNameAS='someInlineRoot'/>
<!-- ROUTE information for StayInPlace node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to someInlineRoot.set_translation ] -->
<PositionInterpolator DEF='StayInPlacekey='0 1keyValue='0 0 0 0 0 0'/>

< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' StayInPlace' toField='set_fraction'/>
< ROUTE  fromNode=' StayInPlace' fromField='value_changed' toNode=' someInlineRoot' toField='set_translation'/>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Clock, ConsoleOutputViewPositionOrientation, DefaultNodeValue, ExampleChildElement, ExamplePrototypeBody, ExampleSingleElement, someInline, Spinner, StayInPlace, TransformExampleUSE

Index for Viewpoint node: ExampleSingleElement Index for ExternProtoDeclare definition: ViewPositionOrientation

Index for ProtoDeclare definitions: EmissiveMaterial, NewWorldInfoNode, ShiftGroupUp2m
-->

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.

Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Spinner
OrientationInterpolator
set_fraction
SFFloat

 
 
then
Spinner
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
TransformExampleUSE
Transform
rotation
SFRotation
Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
StayInPlace
PositionInterpolator
set_fraction
SFFloat

 
 
then
StayInPlace
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
someInlineRoot

set_translation
SFVec3f



ProtoInstance
NewWorldInfoNode
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ShiftGroupUp2m
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
EmissiveMaterial
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


ConsoleOutputViewPositionOrientation
ProtoInstance
ViewPositionOrientation
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/X3dHeaderPrototypeSyntaxExamplesIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/X3dHeaderPrototypeSyntaxExamples.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. -->