1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
|
3 | <X3D profile='Immersive' version='3.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'> |
4 | <head> |
5 | <meta name='title' content='ExtrusionExampleShip.x3d'/> |
6 | <meta name='creator' content='Don Brutzman'/> |
7 | <meta name='created' content='3 September 2005'/> |
8 | <meta name='modified' content='20 October 2019'/> |
9 | <meta name='description' content='Ship model for drawing several different Extrusion spines and cross sections - see ExtrusionCrossSectionExampleShip for corresponding use of ExtrusionCrossSectionPrototype.'/> |
10 | <meta name='Image' content='ExtrusionExampleShip.png'/> |
11 | <meta name='reference' content='ExtrusionCrossSectionExampleShip.x3d'/> |
12 | <meta name='reference' content='ExtrusionCrossSectionExampleTorus.x3d'/> |
13 | <meta name='reference' content='ExtrusionCrossSectionPrototype.x3d'/> |
14 | <meta name='reference' content='VRML 97 Specification, 6.18 Extrusion'/> |
15 | <meta name='reference' content='https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#Extrusion'/> |
16 | <meta name='Image' content='VRML 97 Specification, Figure 6.6'/> |
17 | <meta name='Image' content='https://www.web3d.org/technicalinfo/specifications/vrml97/part1/Images/Extrusion.gif'/> |
18 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/course/ExtrusionExampleShip.x3d'/> |
19 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
20 | <meta name='license' content='../license.html'/> |
21 | </head> |
22 | <Scene> |
23 | <!-- ==================== --> |
24 | <!-- Example instance --> |
25 | <WorldInfo title='ExtrusionExampleShip.x3d'/> |
26 | <NavigationInfo speed='4'/> |
27 | <Viewpoint description='ship hull' position='0 0 40'/> |
28 | <Viewpoint description='stack' position='8 5 20'/> |
29 | <Viewpoint description='smoke extrusion start' position='6.8 7 10'/> |
30 | <Viewpoint description='forward starboard quarter' orientation='0 1 0 0.5' position='20 3 25'/> |
31 | <Transform rotation='0 1 0 1.57' translation='15 30 0'> |
32 | <Viewpoint description='touch smoke to animate' orientation='1 0 0 -1' position='0 0 0'/> |
33 | </Transform> |
34 | <Background groundColor='0.7 0.7 0.7' skyAngle='0.05 1.5 1.59' skyColor='0.6 0.6 0.4 0.4 0.4 0.7 0.3 0.3 0.6 0.1 0.1 0.3'/> |
35 | <!-- ==================== --> |
36 | <Transform DEF='SmokePosition' translation='5.8 7 0'> |
37 | <!-- Smoke shows that crossSection, spine, scale and orientation can be animated --> |
38 | <Shape> |
39 |
<!-- ROUTE information for Smoke node:
[from SmokeSpineInterpolator.value_changed to set_spine
]
-->
<Extrusion DEF='Smoke' creaseAngle='1' crossSection='0 1 -1 0 0 -0.5 1.5 0 0 1' orientation='0 1 0 0 0 1 0 0 0 1 0 -0.4 0 1 0 0 1 0 0 0.4' scale='0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.3 0.4 0.2' solid='false' spine='0 0 0 -1 0 0 -2 0 0 -3 0 0 -5 0 0'/> |
40 | <Appearance> |
41 | <Material diffuseColor='0.0 0.9 0.9' transparency='0.3'/> |
42 | </Appearance> |
43 | </Shape> |
44 |
<!-- ROUTE information for TouchSmoke node:
[from touchTime to SmokeClock.startTime
]
-->
<TouchSensor DEF='TouchSmoke' description='click smoke to animate'/> |
45 |
<!-- ROUTE information for SmokeClock node:
[from TouchSmoke.touchTime to startTime
]
[from fraction_changed to SmokeSpineInterpolator.set_fraction
]
-->
<TimeSensor DEF='SmokeClock' cycleInterval='30' startTime='-1'/> |
46 |
<!-- ROUTE information for SmokeSpineInterpolator node:
[from SmokeClock.fraction_changed to set_fraction
]
[from value_changed to Smoke.set_spine
]
-->
<CoordinateInterpolator DEF='SmokeSpineInterpolator' key='0 0.2 0.5 0.8 1' keyValue='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'/> |
47 | < ROUTE fromNode='TouchSmoke' fromField='touchTime' toNode='SmokeClock' toField='startTime'/> |
48 | < ROUTE fromNode='SmokeClock' fromField='fraction_changed' toNode='SmokeSpineInterpolator' toField='set_fraction'/> |
49 | < ROUTE fromNode='SmokeSpineInterpolator' fromField='value_changed' toNode='Smoke' toField='set_spine'/> |
50 | </Transform> |
51 | <Transform DEF='SuperstructurePosition' translation='12 1 0'> |
52 | <Shape> |
53 | <Extrusion DEF='Superstructure' crossSection='0.1 1 0.1 -1 -1 -1 -1 1 0.1 1' scale='6 2 6 2 6 2 1 1.8 1 1.8' spine='0 0 0 0 1 0 0 1.95 0 0 1.96 0 0 3 0'/> |
54 | <Appearance> |
55 | <Material diffuseColor='0.3 0.6 0.6'/> |
56 | </Appearance> |
57 | </Shape> |
58 | </Transform> |
59 | <Transform DEF='StackPosition' translation='8 1 0'> |
60 | <Shape> |
61 | <Extrusion DEF='Stack' creaseAngle='1' crossSection='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' orientation='0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0.4' scale='1 1 1 1 0.9 0.85 0.8 0.4' spine='0.1 2 0 0 5 0 -0.4 5.6 0 -1 6 0'/> |
62 | <Appearance> |
63 | <Material diffuseColor='0.3 0.3 0.3' transparency='0.5'/> |
64 | </Appearance> |
65 | </Shape> |
66 | </Transform> |
67 | <Transform DEF='HullPosition' translation='0 1 0'> |
68 | <Shape> |
69 | <Extrusion DEF='Hull' creaseAngle='3.14' crossSection='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' orientation='1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -0.5' scale='3 4 4 4 4 4 4 4 5 .1' solid='false' spine='-20 0 0 -17 0 0 0 0 0 10 0 0 22 1 0'/> |
70 | <Appearance> |
71 | <Material diffuseColor='0.5 0.5 0.5'/> |
72 | </Appearance> |
73 | </Shape> |
74 | </Transform> |
75 | <!-- ==================== --> |
76 | <!-- Display world coordinate axes at (0 0 0) --> |
77 | <Transform scale='5 5 5'> |
78 |
<!-- Inline
CoordinateAxes is a DEF node that has 1 USE node: USE_1 --> <Inline DEF='CoordinateAxes' url=' "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl" '/> |
79 | </Transform> |
80 | <!-- Display smoke extrusion coordinate axes: y along spine, x pointing up --> |
81 | <Transform translation='6 8.5 0'> |
82 | <Transform rotation='0 0 1 1.57'> |
83 | <Inline USE='CoordinateAxes'/> |
84 | </Transform> |
85 | </Transform> |
86 | </Scene> |
87 | </X3D> |
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 |
SmokeClock
TimeSensor startTime SFTime |
then
|
SmokeClock
TimeSensor fraction_changed SFFloat |
SmokeSpineInterpolator
CoordinateInterpolator set_fraction SFFloat |
then
|
SmokeSpineInterpolator
CoordinateInterpolator value_changed MFVec3f |
Smoke
Extrusion set_spine MFVec3f |
<!--
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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->