<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://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 =' http://www.web3d.org/specifications/x3d-3.3.xsd '>
<head>
<meta name='titlecontent='StairStepPrototype.x3d'/>
<meta name='descriptioncontent='Build one or more stair steps, in a straight line'/>
<meta name='creatorcontent='Don Brutzman, Michele Foti, Chad Hutchins'/>
<meta name='createdcontent='25 January 2012'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name=' warning content=' under development '/>
<meta name='identifiercontent=' https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/StairStepPrototype.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for ProtoDeclare definition : StairSteps

Index for DEF nodes : CoordinateAxes, SingleStepShape, stairs, StairStepPrototypeScript, StepCoordinate, StepIFS, TransformXdepthYheightZwidth

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<WorldInfo title='StairStepPrototype.x3d'/>
<Viewpoint description='hey steporientation='-0.59028 0.76927 0.2445 0.98786position='2 2 2'/>
<Background skyColor='1 1 1transparency='0'/>
<ProtoDeclare name='StairStepsappinfo='Generate multiple stair steps, bottom left-hand corner at origin, going up along X axis'>
<ProtoInterface>
<field name='diffuseColortype='SFColorvalue='0.8 0.8 0.6accessType='inputOutput'
 appinfo='default value 0.8 0.8 0.6'/>

<field name='scaletype='SFVec3fvalue='1 0.2 0.3accessType='inputOutput'
 appinfo='size of step, default'/>

<field name='numberOfStepstype='SFInt32value='1accessType='inputOutput'
 appinfo='TODO'/>

<field name='traceEnabledtype='SFBoolvalue='trueaccessType='inputOutput'
 appinfo='debug trace to Browser output console'/>
</ProtoInterface>
<ProtoBody>
<!-- First node determines node type of this prototype -->
<Transform DEF='TransformXdepthYheightZwidthbboxCenter='0 0 0bboxSize='-1 -1 -1'>
<IS>
<connect nodeField='scaleprotoField='scale'/>
</IS>
<Shape DEF='SingleStepShapebboxCenter='0 0 0bboxSize='-1 -1 -1'>
<!-- ROUTE information for StepIFS node:  [from StairStepPrototypeScript.computedCoordIndex to set_coordIndex ] -->
<IndexedFaceSet DEF='StepIFSsolid='falsecoordIndex='0 1 2 3 -1 4 5 6 7 -1 0 1 5 4 -1 1 2 6 5 -1 0 3 7 4 -1 3 2 6 7 -1'>
<!-- ROUTE information for StepCoordinate node:  [from StairStepPrototypeScript.computedPoints to point ] -->
<Coordinate DEF='StepCoordinatepoint='0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 1'/>
</IndexedFaceSet>
<Appearance>
<Material>
<IS>
<connect nodeField='diffuseColorprotoField='diffuseColor'/>
</IS>
</Material>
<!-- TODO expose ImageTexture -->
</Appearance>
</Shape>
</Transform>
<!-- Subsequent nodes do not render, but still must be a valid X3D subgraph -->
<!-- This Script provides the X3D author with additional visibility and control over prototype inputs and outputs -->
<!-- ROUTE information for StairStepPrototypeScript node:  [from computedCoordIndex to StepIFS.set_coordIndex ] [from computedPoints to StepCoordinate.point ] -->
<Script DEF='StairStepPrototypeScriptdirectOutput='true'
  url=' "StairStepPrototypeScript.js" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/StairStepPrototypeScript.js" '>
<field name='diffuseColortype='SFColoraccessType='inputOutput'
 appinfo='default value 0.8 0.8 0.6'/>

<field name='scaletype='SFVec3faccessType='inputOutput'
 appinfo='size of step'/>

<field name='numberOfStepstype='SFInt32accessType='inputOutput'
 appinfo='TODO'/>

<field name='traceEnabledtype='SFBoolaccessType='inputOutput'
 appinfo='debug trace to Browser output console'/>

<field name='computedPointstype='MFVec3faccessType='outputOnly'/>
<field name='computedCoordIndextype='MFInt32accessType='outputOnly'/>
<IS>
<connect nodeField='diffuseColorprotoField='diffuseColor'/>
<connect nodeField='scaleprotoField='scale'/>
<connect nodeField='numberOfStepsprotoField='numberOfSteps'/>
<connect nodeField='traceEnabledprotoField='traceEnabled'/>
</IS>
</Script>
<ROUTE fromNode='StairStepPrototypeScriptfromField='computedCoordIndextoNode='StepIFStoField='set_coordIndex'/>
<ROUTE fromNode='StairStepPrototypeScriptfromField='computedPointstoNode='StepCoordinatetoField='point'/>
</ProtoBody>
</ProtoDeclare>
<ProtoInstance name='StairStepsDEF='stairs'>
<fieldValue name='diffuseColorvalue='0.0 0.3 0.6'/>
<fieldValue name='numberOfStepsvalue='7'/>
<fieldValue name='scalevalue='1.0 0.2 0.3'/>
</ProtoInstance>
<Inline DEF='CoordinateAxesbboxCenter='0 0 0bboxSize='-1 -1 -1'
  url=' "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl" '/>
</Scene>
</X3D>
<!--

Index for ProtoDeclare definition : StairSteps

Index for DEF nodes : CoordinateAxes, SingleStepShape, stairs, StairStepPrototypeScript, StepCoordinate, StepIFS, TransformXdepthYheightZwidth

Index for Viewpoint image : Viewpoint_1
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
    <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

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