<WorldInfo title='CapsuleGenerator.x3d'/>
<Background skyColor='0.5 1 0.9'/>
<Viewpoint description='Capsule Generator' position='0 0 4'/>
<Shape DEF='Capsule'>
</Shape>
<!-- ROUTE information for CapsuleGeneratorScript node:
[from indicesComputed to COMPUTED_IFS.set_coordIndex
]
[from pointsComputed to COMPUTED_COORDINATE.set_point
]
-->
<Script DEF='CapsuleGeneratorScript'
url='
"CapsuleGenerator.js" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/CapsuleGenerator.js" '>
<field name='height' type='SFFloat' value='2.0' accessType='initializeOnly'
appinfo='total height, includes top and bottom hemispheres'/>
<field name='radius' type='SFFloat' value='0.5' accessType='initializeOnly'
appinfo='for cylinder and hemispherical end caps'/>
<field name='numberOfPoints' type='SFInt32' value='36' accessType='initializeOnly'
appinfo='horizontal resolution for cylinder and hemispherical end caps'/>
<field name='numberOfLevels' type='SFInt32' value='10' accessType='initializeOnly'
appinfo='vertical resolution for cylinder and hemispherical end caps'/>
<field name='horizontalScale' type='SFFloat' value='1.0' accessType='initializeOnly'
appinfo='radial scale factor'/>
<field name='verticalScale' type='SFFloat' value='1.0' accessType='initializeOnly'
appinfo='vertical scale factor'/>
<field name='top' type='SFBool' value='true' accessType='initializeOnly'
appinfo='whether to draw top hemisphere'/>
<field name='side' type='SFBool' value='true' accessType='initializeOnly'
appinfo='whether to draw side cylinder'/>
<field name='bottom' type='SFBool' value='true' accessType='initializeOnly'
appinfo='whether to draw bottom hemisphere'/>
<field name='pointsComputed' type='MFVec3f' accessType='outputOnly'
appinfo='points for Coordinate node'/>
<field name='indicesComputed' type='MFInt32' accessType='outputOnly'
appinfo='index values for IFS'/>
<field name='traceEnabled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='whether to trace output values on X3D browser console'/>
<field name='geometryType' type='SFString' value='polygons' accessType='initializeOnly'
appinfo='determines console output node type: polygons=IndexedFaceSet, lines=IndexedLineSet, points=PointSet'/>
</Script>
<ROUTE fromNode='CapsuleGeneratorScript' fromField='indicesComputed' toNode='COMPUTED_IFS' toField='set_coordIndex'/>
<ROUTE fromNode='CapsuleGeneratorScript' fromField='pointsComputed' toNode='COMPUTED_COORDINATE' toField='set_point'/>