X3D Model Documentation: CapsuleGenerator.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <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'>
  4       <head>
  5            <meta name='titlecontent='CapsuleGenerator.x3d'/>
  6            <meta name='descriptioncontent='Capsule has top and bottom hemispheres with connected sides, with adjustable parameters in the contained Script fields. A Script node computes all coordIndex and Coordinate point values. X3D source for the produced capsule also appears on the player console.'/>
  7            <meta name='createdcontent='13 October 2014'/>
  8            <meta name='modifiedcontent='20 October 2019'/>
  9            <meta name='creatorcontent='Don Brutzman'/>
 10            <meta name='referencecontent='CapsuleGenerator.log.txt'/>
 11            <meta name='referencecontent='CapsuleComparison.x3d'/>
 12            <meta name='infocontent='InstantReality and BSContact work'/>
 13            <meta name=' TODO content=' H3DViewer: missing Script appinfo and new SFInt32 when running CapsuleGenerator.js; got bugtracker? '/>
 14            <meta name='referencecontent='https://en.wikipedia.org/wiki/Capsule_(geometry)'/>
 15            <meta name='referencecontent='https://en.wiktionary.org/wiki/capsule'/>
 16            <meta name='infocontent='This tessellation is not geodesic because the polygons are computed using rectangular quadrilaterals and vertical levels rather than triangulated shortest paths.'/>
 17            <meta name='referencecontent='https://en.wiktionary.org/wiki/geodesic'/>
 18            <meta name='referencecontent='https://en.wiktionary.org/wiki/geodesic_dome'/>
 19            <meta name='referencecontent='https://en.wikipedia.org/wiki/Geodesic'/>
 20            <meta name='referencecontent='https://en.wikipedia.org/wiki/Geodesic_grid'/>
 21            <meta name='referencecontent='https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/tools/X3dEdit3.3/X3D/src/org/web3d/x3d/NsidedPolygon.java'/>
 22            <meta name='referencecontent='https://savage.nps.edu/Savage/CommunicationsAndSensors/HalfDome/HemisphereExample.x3d'/>
 23            <meta name='referencecontent='https://savage.nps.edu/Savage/CommunicationsAndSensors/HalfDome/HemispherePrototype.x3d'/>
 24            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/CapsuleGenerator.x3d'/>
 25            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 26            <meta name='licensecontent='../license.html'/>
 27       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: Capsule, CapsuleGeneratorScript, COMPUTED_COORDINATE, COMPUTED_IFS

Index for Viewpoint node: Viewpoint_1
-->
 28       <Scene>
 29            <WorldInfo title='CapsuleGenerator.x3d'/>
 30            <Background skyColor='0.5 1 0.9'/>
 31            <Viewpoint description='Capsule Generatorposition='0 0 4'/>
 32            <Shape DEF='Capsule'>
 33                 <!-- Polygonal Capsule consisting of 2 Hemispheres with connected sides -->
 34 
               <!-- ROUTE information for COMPUTED_IFS node:  [from CapsuleGeneratorScript.indicesComputed to set_coordIndex ] -->
               <IndexedFaceSet DEF='COMPUTED_IFScreaseAngle='0.785398'>
 35 
                    <!-- ROUTE information for COMPUTED_COORDINATE node:  [from CapsuleGeneratorScript.pointsComputed to set_point ] -->
                    <Coordinate DEF='COMPUTED_COORDINATE'/>
 36                 </IndexedFaceSet>
 37                 <Appearance>
 38                      <Material emissiveColor='0.2 0.5 0'/>
 39                 </Appearance>
 40            </Shape>
 41 
 42                 <field name='heighttype='SFFloatvalue='2.0accessType='initializeOnly'
                appinfo='total height, includes top and bottom hemispheres'/>
 43                 <field name='radiustype='SFFloatvalue='0.5accessType='initializeOnly'
                appinfo='for cylinder and hemispherical end caps'/>
 44                 <field name='numberOfPointstype='SFInt32value='36accessType='initializeOnly'
                appinfo='horizontal resolution for cylinder and hemispherical end caps'/>
 45                 <field name='numberOfLevelstype='SFInt32value='10accessType='initializeOnly'
                appinfo='vertical resolution for cylinder and hemispherical end caps'/>
 46                 <field name='horizontalScaletype='SFFloatvalue='1.0accessType='initializeOnly'
                appinfo='radial scale factor'/>
 47                 <field name='verticalScaletype='SFFloatvalue='1.0accessType='initializeOnly'
                appinfo='vertical scale factor'/>
 48                 <field name='toptype='SFBoolvalue='trueaccessType='initializeOnly'
                appinfo='whether to draw top hemisphere'/>
 49                 <field name='sidetype='SFBoolvalue='trueaccessType='initializeOnly'
                appinfo='whether to draw side cylinder'/>
 50                 <field name='bottomtype='SFBoolvalue='trueaccessType='initializeOnly'
                appinfo='whether to draw bottom hemisphere'/>
 51                 <field name='pointsComputedtype='MFVec3faccessType='outputOnly'
                appinfo='points for Coordinate node'/>
 52                 <field name='indicesComputedtype='MFInt32accessType='outputOnly'
                appinfo='index values for IFS'/>
 53                 <field name='traceEnabledtype='SFBoolvalue='falseaccessType='initializeOnly'
                appinfo='whether to trace output values on X3D browser console'/>
 54                 <field name='geometryTypetype='SFStringvalue='polygonsaccessType='initializeOnly'
                appinfo='determines console output node type: polygons=IndexedFaceSet, lines=IndexedLineSet, points=PointSet'/>
 55            </Script>
 56            < ROUTE  fromNode='CapsuleGeneratorScript' fromField='indicesComputed' toNode='COMPUTED_IFS' toField='set_coordIndex'/>
 57            < ROUTE  fromNode='CapsuleGeneratorScript' fromField='pointsComputed' toNode='COMPUTED_COORDINATE' toField='set_point'/>
 58       </Scene>
 59  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: Capsule, CapsuleGeneratorScript, COMPUTED_COORDINATE, COMPUTED_IFS

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Background, Coordinate, field, head, IndexedFaceSet, Material, meta, ROUTE, Scene, Script, Shape, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table with 2 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.

CapsuleGeneratorScript
Script
indicesComputed
MFInt32

ROUTE
event to
(1)
COMPUTED_IFS
IndexedFaceSet
set_coordIndex
MFInt32
CapsuleGeneratorScript
Script
pointsComputed
MFVec3f

ROUTE
event to
(1)
COMPUTED_COORDINATE
Coordinate
set_point
MFVec3f
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/CapsuleGeneratorIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/CapsuleGenerator.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)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->