<?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='ExtrusionCrossSectionPrototype.x3d'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='22 November 2000'/>
<meta name='modifiedcontent='23 December 2017'/>
<meta name='referencecontent='ExtrusionExampleShip.x3d'/>
<meta name='referencecontent='ExtrusionCrossSectionExampleShip.x3d'/>
<meta name='referencecontent='ExtrusionCrossSectionExampleTorus.x3d'/>
<meta name='descriptioncontent='Shape prototype for Extrusion node that also draws spine line plus oriented, scaled cross sections at each spine point.'/>
<meta name='hintcontent='Utilize ExtrusionCrossSection ProtoInstance as if it is a Shape node (with containerField="children") rather than an Extrusion node (with containerField="geometry") under a Shape.'/>
<meta name='referencecontent='VRML 97 Specification, 6.18 Extrusion'/>
<meta name='referencecontent=' http://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#Extrusion '/>
<meta name='Imagecontent='VRML 97 Specification, Figure 6.6'/>
<meta name='Imagecontent=' http://www.web3d.org/technicalinfo/specifications/vrml97/Images/Extrusion.gif '/>
<meta name='referencecontent=' http://realism.com/x3d/examples/Extrusion/_frame.html '/>
<meta name='referencecontent=' http://www.cs.brown.edu/~gss/vrml/drawpoly.html '/>
<meta name='referencecontent='ExtrusionXj3dGoldberg1999.java'/>
<meta name='referencecontent=' http://web3d.metrolink.com/cgi-bin/cvsweb.cgi/x3d/src/com/sun/j3d/loaders/vrml97/impl/Attic/Extrusion.java '/>
<meta name='referencecontent=' http://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionPrototype.x3d '/>
<meta name='identifiercontent=' http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ExtrusionCrossSectionPrototype.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<ProtoDeclare name='ExtrusionCrossSectionappinfo='Shape prototype for Extrusion node that also draws spine line plus oriented scaled cross sections at each spine point'>
<ProtoInterface>
<!-- run-time eventIn Extrusion-modification interfaces for VRML97 compatibility -->
<field name='nametype='SFStringaccessType='initializeOnly'
 appinfo='Extrusion name'/>

<field name='crossSectiontype='MFVec2fvalue='1 1 1 -1 -1 -1 -1 1 1 1accessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='spinetype='MFVec3fvalue='0 0 0 0 1 0accessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='scaletype='MFVec2fvalue='1 1accessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='orientationtype='MFRotationvalue='0 0 1 0accessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='beginCaptype='SFBoolvalue='falseaccessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='endCaptype='SFBoolvalue='falseaccessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='ccwtype='SFBoolvalue='trueaccessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='convextype='SFBoolvalue='trueaccessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='creaseAngletype='SFFloatvalue='0accessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='solidtype='SFBoolvalue='trueaccessType='initializeOnly'
 appinfo='Extrusion field'/>

<field name='spineColortype='SFColorvalue='0 0.9 0.8accessType='inputOutput'
 appinfo='emissiveColor of spine'/>

<field name='crossSectionColortype='SFColorvalue='0.2 0.8 0.3accessType='inputOutput'
 appinfo='diffuseColor of crossSection'/>

<field name='crossSectionTransparencytype='SFFloatvalue='0.2accessType='inputOutput'
 appinfo='transparency of crossSection'/>

<field name='extrusionColortype='SFColorvalue='0.3 0.3 0.3accessType='inputOutput'
 appinfo='diffuseColor of extrusion hull'/>

<field name='extrusionTransparencytype='SFFloatvalue='0.7accessType='inputOutput'
 appinfo='transparency of extrusion hull'/>

<field name='extrusionImageTexturetype='SFNodeaccessType='initializeOnly'
 appinfo='Image to apply to Extrusion'>
<!-- initialization node (if any) goes here -->
</field>
<field name='extrusionTextureTransformtype='SFNodeaccessType='initializeOnly'
 appinfo='TextureTransform coordinates of image applied to Extrusion'>
<!-- initialization node (if any) goes here -->
</field>
<field name='set_crossSectiontype='MFVec2faccessType='inputOnly'
 appinfo='Extrusion field'/>

<field name='set_spinetype='MFVec3faccessType='inputOnly'
 appinfo='Extrusion field'/>

<field name='set_scaletype='MFVec2faccessType='inputOnly'
 appinfo='Extrusion field'/>

<field name='set_orientationtype='MFRotationaccessType='inputOnly'
 appinfo='Extrusion field'/>

<field name='traceEnabledtype='SFBoolvalue='falseaccessType='initializeOnly'
 appinfo='Whether to provide initialization trace statements showing node construction'/>
</ProtoInterface>
<ProtoBody>
<Group>
<Shape DEF='Spine'>
<!-- ROUTE information for SpineLine node:  [from CrossSectionScript.spineIndex to set_coordIndex ] -->
<IndexedLineSet DEF='SpineLinecolorPerVertex='false'>
<Coordinate DEF='SpineCoordinates'>
<IS>
<connect nodeField='pointprotoField='spine'/>
<connect nodeField='set_pointprotoField='set_spine'/>
</IS>
</Coordinate>
</IndexedLineSet>
<Appearance>
<Material DEF='SpineMaterial'>
<IS>
<connect nodeField='emissiveColorprotoField='spineColor'/>
</IS>
</Material>
</Appearance>
</Shape>
<Shape DEF='InternalCrossSections'>
<!-- use most conservative polygon settings for reliable rendering: convex='false' solid='false' -->
<!-- ROUTE information for CrossSectionFaces node:  [from CrossSectionScript.facesIndex to set_coordIndex ] -->
<IndexedFaceSet DEF='CrossSectionFacesconvex='falsesolid='false'>
<!-- ROUTE information for CrossSectionFacesCoordinates node:  [from CrossSectionScript.facePoints to point ] -->
<Coordinate DEF='CrossSectionFacesCoordinates'/>
</IndexedFaceSet>
<Appearance>
<Material DEF='CrossSectionMaterial'>
<IS>
<connect nodeField='diffuseColorprotoField='crossSectionColor'/>
<connect nodeField='transparencyprotoField='crossSectionTransparency'/>
</IS>
</Material>
</Appearance>
</Shape>
<Shape DEF='ExternalExtrusion'>
<!-- use most conservative polygon settings: convex='false' solid='false' -->
<Extrusion DEF='EnclosingExtrusionconvex='falsesolid='false'>
<IS>
<connect nodeField='crossSectionprotoField='crossSection'/>
<connect nodeField='spineprotoField='spine'/>
<connect nodeField='scaleprotoField='scale'/>
<connect nodeField='orientationprotoField='orientation'/>
<connect nodeField='set_crossSectionprotoField='set_crossSection'/>
<connect nodeField='set_spineprotoField='set_spine'/>
<connect nodeField='set_scaleprotoField='set_scale'/>
<connect nodeField='set_orientationprotoField='set_orientation'/>
<connect nodeField='beginCapprotoField='beginCap'/>
<connect nodeField='endCapprotoField='endCap'/>
<connect nodeField='ccwprotoField='ccw'/>
<connect nodeField='convexprotoField='convex'/>
<connect nodeField='creaseAngleprotoField='creaseAngle'/>
<connect nodeField='solidprotoField='solid'/>
</IS>
</Extrusion>
<Appearance DEF='ExtrusionAppearance'>
<IS>
<connect nodeField='textureprotoField='extrusionImageTexture'/>
<connect nodeField='textureTransformprotoField='extrusionTextureTransform'/>
</IS>
<Material DEF='ExtrusionMaterial'>
<IS>
<connect nodeField='diffuseColorprotoField='extrusionColor'/>
<connect nodeField='transparencyprotoField='extrusionTransparency'/>
</IS>
</Material>
</Appearance>
</Shape>
</Group>
<!-- ROUTE information for CrossSectionScript node:  [from spineIndex to SpineLine.set_coordIndex ] [from facesIndex to CrossSectionFaces.set_coordIndex ] [from facePoints to CrossSectionFacesCoordinates.point ] -->
<Script DEF='CrossSectionScript'
  url=' "ExtrusionCrossSectionPrototype.js" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ExtrusionCrossSectionPrototype.js" '>
<!-- local variables -->
<field name='nametype='SFStringaccessType='initializeOnly'/>
<field name='crossSectiontype='MFVec2faccessType='initializeOnly'/>
<field name='spinetype='MFVec3faccessType='initializeOnly'/>
<field name='scaletype='MFVec2faccessType='initializeOnly'/>
<field name='orientationtype='MFRotationaccessType='initializeOnly'/>
<field name='spineColortype='SFColoraccessType='inputOutput'/>
<field name='crossSectionColortype='SFColoraccessType='inputOutput'/>
<field name='crossSectionTransparencytype='SFFloataccessType='inputOutput'/>
<field name='extrusionColortype='SFColoraccessType='inputOutput'/>
<field name='extrusionTransparencytype='SFFloataccessType='inputOutput'/>
<field name='set_crossSectiontype='MFVec2faccessType='inputOnly'/>
<field name='set_spinetype='MFVec3faccessType='inputOnly'/>
<field name='set_scaletype='MFVec2faccessType='inputOnly'/>
<field name='set_orientationtype='MFRotationaccessType='inputOnly'/>
<field name='spineIndextype='MFInt32accessType='outputOnly'/>
<field name='facesIndextype='MFInt32accessType='outputOnly'/>
<field name='facePointstype='MFVec3faccessType='outputOnly'/>
<field name='traceEnabledtype='SFBoolaccessType='initializeOnly'/>
<field name='computedFacesIndextype='MFInt32accessType='initializeOnly'/>
<field name='computedFacePointstype='MFVec3faccessType='initializeOnly'/>
<IS>
<connect nodeField='nameprotoField='name'/>
<connect nodeField='crossSectionprotoField='crossSection'/>
<connect nodeField='spineprotoField='spine'/>
<connect nodeField='scaleprotoField='scale'/>
<connect nodeField='spineColorprotoField='spineColor'/>
<connect nodeField='crossSectionColorprotoField='crossSectionColor'/>
<connect nodeField='crossSectionTransparencyprotoField='crossSectionTransparency'/>
<connect nodeField='extrusionColorprotoField='extrusionColor'/>
<connect nodeField='extrusionTransparencyprotoField='extrusionTransparency'/>
<connect nodeField='orientationprotoField='orientation'/>
<connect nodeField='set_crossSectionprotoField='set_crossSection'/>
<connect nodeField='set_spineprotoField='set_spine'/>
<connect nodeField='set_scaleprotoField='set_scale'/>
<connect nodeField='set_orientationprotoField='set_orientation'/>
<connect nodeField='traceEnabledprotoField='traceEnabled'/>
</IS>
</Script>
<ROUTE fromNode='CrossSectionScriptfromField='spineIndextoNode='SpineLinetoField='set_coordIndex'/>
<ROUTE fromNode='CrossSectionScriptfromField='facesIndextoNode='CrossSectionFacestoField='set_coordIndex'/>
<ROUTE fromNode='CrossSectionScriptfromField='facePointstoNode='CrossSectionFacesCoordinatestoField='point'/>
</ProtoBody>
</ProtoDeclare>
<!-- ==================== -->
<!-- Example instance adapted from Figure15.12Torus.x3d -->
<!-- http://www.web3d.org/x3d/content/examples/Basic/Vrml2Sourcebook/Chapter15-Extrusion/Figure15.12Torus.x3d -->
<!-- Redirection text in case a user examines this PROTO file via a 3D browser: -->
<Group>
<Transform translation='0 1.5 0'>
<Shape>
<Appearance>
<Material diffuseColor='0 1 1emissiveColor='0 1 1'/>
</Appearance>
<Text string='"ExtrusionCrossSectionPrototype" "is a Prototype definition scene." "" "Example scenes using this node:"'>
<FontStyle justify='"MIDDLE" "MIDDLE"size='0.9'/>
</Text>
</Shape>
</Transform>
<Transform translation='0 -0.8 0'>
<Anchor description='Touch text for ExtrusionPentagon exampleparameter='"target=_blank"'
  url=' "ExtrusionPentagon.x3d" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ExtrusionPentagon.x3d" "ExtrusionPentagon.wrl" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ExtrusionPentagon.wrl" '>
<Shape>
<Appearance>
<Material diffuseColor='0 1 0.341176transparency='0.2'/>
</Appearance>
<Text string='"Pentagon"'>
<FontStyle DEF='FontCenterjustify='"MIDDLE" "MIDDLE"size='1.2style='BOLD'/>
</Text>
</Shape>
<Shape>
<Box size='3 1 0.01'/>
<Appearance DEF='TransparentAppearance'>
<Material transparency='1'/>
</Appearance>
</Shape>
</Anchor>
</Transform>
<Transform translation='-2.5 -2 0'>
<Anchor description='Touch text for Torus exampleparameter='"target=_blank"'
  url=' "../../Basic/course/ExtrusionCrossSectionExampleTorus.x3d" "http://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionExampleTorus.x3d" "../../Basic/course/ExtrusionCrossSectionExampleTorus.wrl" "http://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionExampleTorus.wrl" '>
<Shape>
<Appearance>
<Material diffuseColor='1 0 1transparency='0.2'/>
</Appearance>
<Text string='"Torus"'>
<FontStyle USE='FontCenter'/>
</Text>
</Shape>
<Shape>
<Box size='3 1 0.01'/>
<Appearance USE='TransparentAppearance'/>
</Shape>
</Anchor>
</Transform>
<Transform translation='2.5 -2 0'>
<Anchor description='Touch text for Ship exampleparameter='"target=_blank"'
  url=' "../../Basic/course/ExtrusionCrossSectionExampleShip.x3d" "http://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionExampleShip.x3d" "../../Basic/course/ExtrusionCrossSectionExampleShip.wrl" "http://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionExampleShip.wrl" '>
<Shape>
<Appearance>
<Material diffuseColor='0.7 0.7 0.7transparency='0.2'/>
</Appearance>
<Text string='"Ship"'>
<FontStyle USE='FontCenter'/>
</Text>
</Shape>
<Shape>
<Box size='2 1 0.01'/>
<Appearance USE='TransparentAppearance'/>
</Shape>
</Anchor>
</Transform>
</Group>
</Scene>
</X3D>
<!--

Index for ProtoDeclare definition : ExtrusionCrossSection

Index for DEF nodes : CrossSectionFaces, CrossSectionFacesCoordinates, CrossSectionMaterial, CrossSectionScript, EnclosingExtrusion, ExternalExtrusion, ExtrusionAppearance, ExtrusionMaterial, FontCenter, InternalCrossSections, Spine, SpineCoordinates, SpineLine, SpineMaterial, TransparentAppearance
-->

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