X3D Model Documentation: ExtrusionCrossSectionExampleShip.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
  3  <X3D profile='Immersive' version='3.2 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'>
  4       <head>
  5            <meta name='titlecontent='ExtrusionCrossSectionExampleShip.x3d'/>
  6            <meta name='creatorcontent='Don Brutzman'/>
  7            <meta name='createdcontent='20 December 1999'/>
  8            <meta name='modifiedcontent='20 October 2019'/>
  9            <meta name='descriptioncontent='Ship model as example use of ExtrusionCrossSectionPrototype for drawing several different Extrusion spines and cross sections.'/>
 10            <meta name='Imagecontent='ExtrusionCrossSectionExampleShip.png'/>
 11            <meta name='hintcontent='Utilize ExtrusionCrossSection ProtoInstance as a Shape node (with containerField="children") rather than an Extrusion node (with containerField="geometry").'/>
 12            <meta name='referencecontent='ExtrusionExampleShip.x3d'/>
 13            <meta name='referencecontent='ExtrusionCrossSectionExampleTorus.x3d'/>
 14            <meta name='referencecontent='ExtrusionCrossSectionPrototype.x3d'/>
 15            <meta name='referencecontent='VRML 97 Specification, 6.18 Extrusion'/>
 16            <meta name='referencecontent='https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#Extrusion'/>
 17            <meta name='Imagecontent='VRML 97 Specification, Figure 6.6'/>
 18            <meta name='Imagecontent='https://www.web3d.org/technicalinfo/specifications/vrml97/part1/Images/Extrusion.gif'/>
 19            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionExampleShip.x3d'/>
 20            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 21            <meta name='licensecontent='../license.html'/>
 22       </head>
<!--

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

<!-- to top Index for DEF nodes: CoordinateAxes, Hull, HullPosition, Smoke, SmokeClock, SmokePosition, SmokeSpineInterpolator, Stack, StackPosition, Superstructure, SuperstructurePosition, TouchSmoke

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5

Index for ExternProtoDeclare definition: ExtrusionCrossSection
-->
 23       <Scene>
 24            <!-- Utilize ExtrusionCrossSection ProtoInstance as a Shape node (with containerField="children") rather than an Extrusion node (with containerField="geometry"). -->
 25            <WorldInfo title='ExtrusionCrossSectionExampleShip.x3d'/>
 26            <ExternProtoDeclare name='ExtrusionCrossSectionappinfo='Shape prototype for Extrusion node that also draws spine line plus oriented scaled cross sections at each spine point' documentation='https://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionPrototype.x3d'   url=' "ExtrusionCrossSectionPrototype.x3d#ExtrusionCrossSection" "https://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionPrototype.x3d#ExtrusionCrossSection" "ExtrusionCrossSectionPrototype.wrl#ExtrusionCrossSection" "https://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionPrototype.wrl#ExtrusionCrossSection" '>
 27                 <!-- run-time eventIn Extrusion-modification interfaces for VRML 97 compatibility -->
 28                 <field name='nametype='SFStringaccessType='initializeOnly'
                appinfo='Extrusion name'/>
 29                 <field name='crossSectiontype='MFVec2faccessType='initializeOnly'
                appinfo='Extrusion field'/>
 30                 <field name='spinetype='MFVec3faccessType='initializeOnly'
                appinfo='Extrusion field'/>
 31                 <field name='scaletype='MFVec2faccessType='initializeOnly'
                appinfo='Extrusion field'/>
 32                 <field name='orientationtype='MFRotationaccessType='initializeOnly'
                appinfo='Extrusion field'/>
 33                 <field name='beginCaptype='SFBoolaccessType='initializeOnly'
                appinfo='Extrusion field'/>
 34                 <field name='endCaptype='SFBoolaccessType='initializeOnly'
                appinfo='Extrusion field'/>
 35                 <field name='ccwtype='SFBoolaccessType='initializeOnly'
                appinfo='Extrusion field'/>
 36                 <field name='convextype='SFBoolaccessType='initializeOnly'
                appinfo='Extrusion field'/>
 37                 <field name='creaseAngletype='SFFloataccessType='initializeOnly'
                appinfo='Extrusion field'/>
 38                 <field name='solidtype='SFBoolaccessType='initializeOnly'
                appinfo='Extrusion field'/>
 39                 <field name='spineColortype='SFColoraccessType='inputOutput'
                appinfo='emissiveColor of spine'/>
 40                 <field name='crossSectionColortype='SFColoraccessType='inputOutput'
                appinfo='diffuseColor of crossSection'/>
 41                 <field name='crossSectionTransparencytype='SFFloataccessType='inputOutput'
                appinfo='transparency of crossSection'/>
 42                 <field name='extrusionColortype='SFColoraccessType='inputOutput'
                appinfo='diffuseColor of extrusion hull'/>
 43                 <field name='extrusionTransparencytype='SFFloataccessType='inputOutput'
                appinfo='transparency of extrusion hull'/>
 44                 <field name='extrusionImageTexturetype='SFNodeaccessType='initializeOnly'
                appinfo='Image to apply to Extrusion'/>
 45                 <field name='extrusionTextureTransformtype='SFNodeaccessType='initializeOnly'
                appinfo='TextureTransform coordinates of image applied to Extrusion'/>
 46                 <field name='set_crossSectiontype='MFVec2faccessType='inputOnly'
                appinfo='Extrusion field'/>
 47                 <field name='set_spinetype='MFVec3faccessType='inputOnly'
                appinfo='Extrusion field'/>
 48                 <field name='set_scaletype='MFVec2faccessType='inputOnly'
                appinfo='Extrusion field'/>
 49                 <field name='set_orientationtype='MFRotationaccessType='inputOnly'
                appinfo='Extrusion field'/>
 50                 <field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
                appinfo='Whether to provide initialization trace statements showing node construction'/>
 51            </ExternProtoDeclare>
 52            <!-- ==================== -->
 53            <!-- Example instance -->
 54            <NavigationInfo speed='4'/>
 55            <Viewpoint description='ship hullposition='0 0 40'/>
 56            <Viewpoint description='stackposition='8 5 20'/>
 57            <Viewpoint description='smoke extrusion startposition='6.8 7 10'/>
 58            <Viewpoint description='forward starboard quarterorientation='0 1 0 0.5position='20 3 25'/>
 59            <Transform rotation='0 1 0 1.57translation='15 30 0'>
 60                 <Viewpoint description='touch smoke to animateorientation='1 0 0 -1position='0 0 0'/>
 61            </Transform>
 62            <Background groundColor='0.7 0.7 0.7skyAngle='0.05 1.5 1.59skyColor='0.6 0.6 0.4 0.4 0.4 0.7 0.3 0.3 0.6 0.1 0.1 0.3'/>
 63            <!-- ==================== -->
 64            <Transform DEF='SmokePositiontranslation='5.8 7 0'>
 65                 <!-- Smoke shows that crossSection, spine, scale and orientation can be animated -->
 66 
               <!-- ROUTE information for Smoke node:  [from SmokeSpineInterpolator.value_changed to set_spine ] -->
               <ProtoInstance name='ExtrusionCrossSectionDEF='Smoke'>
 67                      <fieldValue name='namevalue='Smoke'/>
 68                      <fieldValue name='crossSectionvalue='0 1 -1 0 0 -0.5 1.5 0 0 1'/>
 69                      <fieldValue name='spinevalue='0 0 0 -1 0 0 -2 0 0 -3 0 0 -5 0 0'/>
 70                      <fieldValue name='scalevalue='0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.3 0.4 0.2'/>
 71                      <fieldValue name='orientationvalue='0 1 0 0 0 1 0 0 0 1 0 -0.4 0 1 0 0 1 0 0 0.4'/>
 72                      <fieldValue name='creaseAnglevalue='1'/>
 73                      <fieldValue name='solidvalue='false'/>
 74                      <fieldValue name='spineColorvalue='1 1 1'/>
 75                      <fieldValue name='crossSectionColorvalue='0.2 0.2 0.6'/>
 76                      <fieldValue name='extrusionColorvalue='0.0 0.9 0.9'/>
 77                      <fieldValue name='extrusionTransparencyvalue='0.5'/>
 78                      <fieldValue name='traceEnabledvalue='false'/>
 79                 </ProtoInstance>
 80 
               <!-- ROUTE information for TouchSmoke node:  [from touchTime to SmokeClock.startTime ] -->
               <TouchSensor DEF='TouchSmokedescription='click smoke to animate'/>
 81 
               <!-- ROUTE information for SmokeClock node:  [from TouchSmoke.touchTime to startTime ] [from fraction_changed to SmokeSpineInterpolator.set_fraction ] -->
               <TimeSensor DEF='SmokeClockcycleInterval='30startTime='-1'/>
 82 
               <!-- ROUTE information for SmokeSpineInterpolator node:  [from SmokeClock.fraction_changed to set_fraction ] [from value_changed to Smoke.set_spine ] -->
               <CoordinateInterpolator DEF='SmokeSpineInterpolatorkey='0 0.2 0.5 0.8 1keyValue='0 0 0 -1 0 0 -2 0 0 -3 0 0 -5 0 0 0 0 0 -2 0 0 -4 -0.5 0 -6 -1 0 -8 -2 0 0 0 0 -4 0 0 -8 -1 0 -13 -2 0 -20 -2.5 0 0 0 0 -2 0 0 -4 -0.5 0 -6 -1 0 -8 -2 0 0 0 0 -1 0 0 -2 0 0 -3 0 0 -5 0 0'/>
 83                 < ROUTE  fromNode='TouchSmoke' fromField='touchTime' toNode='SmokeClock' toField='startTime'/>
 84                 < ROUTE  fromNode='SmokeClock' fromField='fraction_changed' toNode='SmokeSpineInterpolator' toField='set_fraction'/>
 85                 < ROUTE  fromNode='SmokeSpineInterpolator' fromField='value_changed' toNode='Smoke' toField='set_spine'/>
 86            </Transform>
 87            <Transform DEF='SuperstructurePositiontranslation='12 1 0'>
 88                 <ProtoInstance name='ExtrusionCrossSectionDEF='Superstructure'>
 89                      <fieldValue name='namevalue='Superstructure'/>
 90                      <fieldValue name='crossSectionvalue='0.1 1 0.1 -1 -1 -1 -1 1 0.1 1'/>
 91                      <fieldValue name='spinevalue='0 0 0 0 1 0 0 1.95 0 0 1.96 0 0 3 0'/>
 92                      <fieldValue name='scalevalue='6 2 6 2 6 2 1 1.8 1 1.8'/>
 93                      <fieldValue name='spineColorvalue='0.7 0.7 0'/>
 94                      <fieldValue name='ccwvalue='true'/>
 95                      <fieldValue name='crossSectionColorvalue='0.6 0.6 0.2'/>
 96                      <fieldValue name='extrusionColorvalue='0.3 0.6 0.6'/>
 97                      <fieldValue name='extrusionTransparencyvalue='0.6'/>
 98                      <fieldValue name='traceEnabledvalue='false'/>
 99                 </ProtoInstance>
100            </Transform>
101            <Transform DEF='StackPositiontranslation='8 1 0'>
102                 <ProtoInstance name='ExtrusionCrossSectionDEF='Stack'>
103                      <fieldValue name='namevalue='Stack'/>
104                      <fieldValue name='crossSectionvalue='0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0 0.92 -0.38 0.71 -0.71 0.38 -0.92 0 -1 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1'/>
105                      <fieldValue name='spinevalue='0.1 2 0 0 5 0 -0.4 5.6 0 -1 6 0'/>
106                      <fieldValue name='scalevalue='1 1 1 1 0.9 0.85 0.8 0.4'/>
107                      <fieldValue name='orientationvalue='0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0.4'/>
108                      <fieldValue name='spineColorvalue='1 1 1'/>
109                      <fieldValue name='creaseAnglevalue='1'/>
110                      <fieldValue name='crossSectionColorvalue='0.8 0.2 0.2'/>
111                      <fieldValue name='crossSectionTransparencyvalue='0.1'/>
112                      <fieldValue name='extrusionColorvalue='0.3 0.3 0.3'/>
113                      <fieldValue name='extrusionTransparencyvalue='0.5'/>
114                      <fieldValue name='traceEnabledvalue='false'/>
115                 </ProtoInstance>
116            </Transform>
117            <Transform DEF='HullPositiontranslation='0 1 0'>
118                 <ProtoInstance name='ExtrusionCrossSectionDEF='Hull'>
119                      <fieldValue name='namevalue='Hull'/>
120                      <fieldValue name='solidvalue='false'/>
121                      <fieldValue name='crossSectionvalue='0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0 0.92 -0.38 0.71 -0.71 0.38 -0.92 0 -1'/>
122                      <fieldValue name='spinevalue='-20 0 0 -17 0 0 0 0 0 10 0 0 22 1 0'/>
123                      <fieldValue name='scalevalue='3 4 4 4 4 4 4 4 5 .1'/>
124                      <fieldValue name='orientationvalue='1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -0.5'/>
125                      <fieldValue name='traceEnabledvalue='false'/>
126                 </ProtoInstance>
127            </Transform>
128            <!-- ==================== -->
129            <!-- Display world coordinate axes at (0 0 0) -->
130            <Transform scale='5 5 5'>
131 
132            </Transform>
133            <!-- Display smoke extrusion coordinate axes: y along spine, x pointing up -->
134            <Transform translation='6 8.5 0'>
135                 <Transform rotation='0 0 1 1.57'>
136                      <Inline USE='CoordinateAxes'/>
137                 </Transform>
138            </Transform>
139       </Scene>
140  </X3D>
<!--

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

<!-- to top Index for DEF nodes: CoordinateAxes, Hull, HullPosition, Smoke, SmokeClock, SmokePosition, SmokeSpineInterpolator, Stack, StackPosition, Superstructure, SuperstructurePosition, TouchSmoke

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5

Index for ExternProtoDeclare definition: ExtrusionCrossSection
-->
X3D Tooltips element index: Background, CoordinateInterpolator, ExternProtoDeclare, field, fieldValue, head, Inline, meta, NavigationInfo, ProtoInstance, ROUTE, Scene, TimeSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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

TouchSmoke
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
SmokeClock
TimeSensor
startTime
SFTime
then
 
 
 
SmokeClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
SmokeSpineInterpolator
CoordinateInterpolator
set_fraction
SFFloat
then
 
 
 
SmokeSpineInterpolator
CoordinateInterpolator
value_changed
MFVec3f

ROUTE
event to
(3)
Smoke
ProtoInstance
set_spine
MFVec3f

Hull
ProtoInstance
ExtrusionCrossSection
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

Stack
ProtoInstance
ExtrusionCrossSection
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 

Superstructure
ProtoInstance
ExtrusionCrossSection
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 
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/Basic/course/ExtrusionCrossSectionExampleShipIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/course/ExtrusionCrossSectionExampleShip.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)
    <ProtoInstance name='ProtoName'> <field name='fieldName'/> </ProtoInstance> -->

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