<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "http://www.web3d.org/specifications/x3d-3.0.dtd" "/www.web3d.org/TaskGroups/x3d/translation/x3d-3.0.dtd">
<X3D profile='Immersive'>
<head>
<component name='GeoSpatial'/>
<component name='Nurbs' level='2'/>
<meta name='filename' content='X3dHeaderPrototypeSyntaxExamples.x3d'/>
<meta name='description' content='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='created' content='14 October 2002'/>
<meta name='revised' content='28 December 2002'/>
<meta name='author' content='Don Brutzman'/>
<meta name='url' content='http://www.web3D.org/TaskGroups/x3d/translation/examples/development/X3dHeaderPrototypeSyntaxExamples.x3d'/>
</head>
<!--

Index for ExternProtoDeclareViewPositionOrientation. Index for ProtoDeclaresNewWorldInfoNode, EmissiveMaterial, ShiftGroupUp2m.
Index for DEFsClock, DefaultNodeValue, ExampleChildElement, ExamplePrototypeBody, ExampleSingleElement, Spinner, TransformExampleUSE.

-->
<Scene>
<ExternProtoDeclare name='ViewPositionOrientation' url='"../../Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "../Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "http://web.nps.navy.mil/~brutzman/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "../../Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "http://web.nps.navy.mil/~brutzman/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation"'>
<field name='enabled' type='SFBool' accessType='inputOutput'/>
</ExternProtoDeclare>
<ProtoDeclare name='NewWorldInfoNode'>
<ProtoBody>
<WorldInfo DEF='ExamplePrototypeBody'/>
</ProtoBody>
</ProtoDeclare>
<ProtoDeclare name='EmissiveMaterial'>
<ProtoInterface>
<field name='onlyColor' type='SFColor' accessType='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='emissiveColor' protoField='onlyColor'/>
</IS>
</Material>
</ProtoBody>
</ProtoDeclare>
<ProtoDeclare name='ShiftGroupUp2m'>
<ProtoInterface>
<field name='children' type='MFNode' accessType='inputOutput'>
<Group DEF='DefaultNodeValue' bboxSize='2 2 2'/>
</field>
</ProtoInterface>
<ProtoBody>
<Transform translation='0 2 0'>
<Group>
<IS>
<connect nodeField='children' protoField='children'/>
</IS>
</Group>
</Transform>
</ProtoBody>
</ProtoDeclare>
<!-- ==================== -->
<NavigationInfo type='EXAMINE ANY'/>
<Viewpoint DEF='ExampleSingleElement' description='Hello syntax'/>
<Group DEF='ExampleChildElement'>
<Shape>
<Box/>
<Appearance>
<Material diffuseColor='0.6 0.4 0.2'/>
</Appearance>
</Shape>
</Group>
<Transform DEF='TransformExampleUSE' rotation='0 1 0 0.78' translation='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='EmissiveMaterial' containerField='material'>
<fieldValue name='onlyColor' value='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='enabled' value='true'/>
</ProtoInstance>
<TimeSensor DEF='Clock' cycleInterval='4' loop='true'/>
<OrientationInterpolator DEF='Spinner' key='0 0.5 1' keyValue='0 1 0 0,0 1 0 3.1416, 0 1 0 6.2832'/>
<ROUTE fromNode='Clock' fromField='fraction_changed' toNode='Spinner' toField='set_fraction'/>
<ROUTE fromNode='Spinner' fromField='value_changed' toNode='TransformExampleUSE' toField='rotation'/>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclareViewPositionOrientation. Index for ProtoDeclaresNewWorldInfoNode, EmissiveMaterial, ShiftGroupUp2m.
Index for DEFsClock, DefaultNodeValue, ExampleChildElement, ExamplePrototypeBody, ExampleSingleElement, Spinner, TransformExampleUSE.

-->
<!-- Tag color codes: <NodeType DEF='NodeName' attribute='value'/> < Prototype name='ProtoName'/> < field name='fieldName'/> </Prototype > -->