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=' HarpoonPrototype.x3d '/> |
6 | <meta name='description' content='RGM84D, Harpoon Anti-Ship Cruise Missile prototype with built-in animation.'/> |
7 | <meta name='creator' content='James Harney'/> |
8 | <meta name='created' content='9 August 2001'/> |
9 | <meta name='modified' content='5 July 2025'/> |
10 | <meta name=' warning ' content=' needs to be realigned with X-axis nose and Y-axis up. '/> |
11 | <meta name='reference' content=' https://www.fas.org/man/dod-101/sys/smart/agm-84.htm '/> |
12 |
<meta name='reference' content='https://www.fas.org/man/dod-101/sys/smart/harpn01.jpg'![]() |
13 |
<meta name='reference' content='harpn01.jpg'![]() |
14 | <meta name='reference' content='AGM-84-Harpoon-SLAM-SmartWeapons_files'/> |
15 | <meta name='reference' content=' https://www.web3d.org/x3d/content/examples/Savage/CruiserUnitedStates/Cruiser.x3d '/> |
16 | <meta name='reference' content=' http://www.specialoperations.com/multimedia/sounds.html '/> |
17 | <meta name='reference' content=' http://www.specialoperations.com/multimedia/sounds.html '/> |
18 | <meta name='reference' content=' See url "soundpermissions.html" for copyright info and use on missile1.au and exp03.au that are converted to missile1.wav and exp03.wav for use in this file/model '/> |
19 | <meta name='accessRights' content=' soundpermissions.html '/> |
20 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/HarpoonPrototype.x3d '/> |
21 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
22 | <meta name='license' content='../../license.html'/> |
23 | </head> |
24 | <Scene> |
25 | <WorldInfo title='HarpoonPrototype.x3d'/> |
26 | <ProtoDeclare name='RGM84D'> |
27 | <ProtoInterface> |
28 | <field name='STARTLAUNCH' type='SFBool' accessType='inputOnly'/> |
29 | <field name='THETIME' type='SFTime' accessType='inputOnly'/> |
30 | </ProtoInterface> |
31 | <ProtoBody> |
32 | <Transform DEF='RGMSSM' rotation='0 0 1 -1.57' translation='2.5 0 0'> |
33 | <Transform> |
34 | <!-- Built as well as possible to scale from pictures on FAS web site. Missile speed and distance for engagement are not what they are in real life for demonstration purposes. --> |
35 | <!-- Used with permission. See soundpermissions.html for details. --> |
36 | <Sound maxBack='50000' maxFront='50000'> |
37 |
<!-- ROUTE information for RGMSOUND node:
[from RGMCLOCK.startTime to startTime
]
[from RGMCLOCK.stopTime to set_stopTime
]
-->
<AudioClip DEF='RGMSOUND' description='Missile flight' url=' "MISSILE1.wav" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/MISSILE1.wav" '/> |
38 | </Sound> |
39 | <Transform translation='0 -2.22 0'> |
40 | <Group DEF='MISSILEBODY'> |
41 | <Transform> |
42 | <Shape> |
43 | |
44 | <Material diffuseColor='1 1 1' shininess='.7' specularColor='1 1 1'/> |
45 | </Appearance> |
46 | <Cylinder height='4.55' radius='.3429'/> |
47 | </Shape> |
48 | </Transform> |
49 | </Group> |
50 | </Transform> |
51 | <Transform scale='1.31 1.31 1.31'> |
52 | <Group DEF='CONE'> |
53 | <Shape> |
54 | <Appearance USE='RGMCOLOR'/> |
55 | <Extrusion creaseAngle='1.785' crossSection='0.267 0.000 0.231 -0.134 0.134 -0.231 0.0 -0.267 -0.134 -0.231 -0.231 -0.134 -0.267 0.000 -0.231 0.134 -0.134 0.231 0.0 0.267 0.134 0.231 0.231 0.134 0.267 0.0' scale='1.00 1.00 0.95 0.95 0.88 0.88 0.76 0.76 0.48 0.48' spine='0.00 0.00 0.00 0.00 0.10 0.00 0.00 0.20 0.00 0.00 0.30 0.00 0.00 0.40 0.00'/> |
56 | </Shape> |
57 | </Group> |
58 | </Transform> |
59 | <Transform> |
60 | <Group DEF='MIDFIN'> |
61 | <Transform translation='.34 -3.02 0'> |
62 | |
63 | <IndexedFaceSet solid='false' coordIndex='0 1 2 3 4 -1'> |
64 | <Coordinate point='0 0 0 0 1.1 0 .5 .75 0 .5 .25 0 0 0 0'/> |
65 | </IndexedFaceSet> |
66 | |
67 | <Material diffuseColor='.9 .9 .9'/> |
68 | </Appearance> |
69 | </Shape> |
70 | </Transform> |
71 | <Transform rotation='0 1 0 1.57' translation='0 -3.02 -.34'> |
72 | <Shape USE='FIN'/> |
73 | </Transform> |
74 | <Transform rotation='0 1 0 -1.57' translation='0 -3.02 .34'> |
75 | <Shape USE='FIN'/> |
76 | </Transform> |
77 | <Transform rotation='0 1 0 3.14' translation='-.34 -3.02 0'> |
78 | <Shape USE='FIN'/> |
79 | </Transform> |
80 | </Group> |
81 | <Group DEF='AFTFIN'> |
82 | <Transform translation='.34 -4.4 0'> |
83 | |
84 | <Appearance USE='FINCOLOR'/> |
85 | <IndexedFaceSet solid='false' coordIndex='0 1 2 3 4 -1'> |
86 | <Coordinate point='0 0 0 0 .5 0 .5 .35 0 .5 .15 0 0 0 0'/> |
87 | </IndexedFaceSet> |
88 | </Shape> |
89 | </Transform> |
90 | <Transform rotation='0 1 0 1.57' translation='0 -4.4 -.34'> |
91 | <Shape USE='BACKFIN'/> |
92 | </Transform> |
93 | <Transform rotation='0 1 0 3.14' translation='-.34 -4.4 0'> |
94 | <Shape USE='BACKFIN'/> |
95 | </Transform> |
96 | <Transform rotation='0 1 0 -1.57' translation='0 -4.4 .34'> |
97 | <Shape USE='BACKFIN'/> |
98 | </Transform> |
99 | <Transform translation='0 -4.45 0'> |
100 | <Shape> |
101 | <Cylinder height='.1' radius='.35'/> |
102 | <Appearance> |
103 | <Material diffuseColor='1 0 0'/> |
104 | </Appearance> |
105 | </Shape> |
106 | </Transform> |
107 | </Group> |
108 | </Transform> |
109 | <Transform DEF='BOOSTSECT'> |
110 | <Group DEF='BOOSTER'> |
111 | <Transform translation='0 -4.85 0'> |
112 | <Shape> |
113 | <Appearance USE='RGMCOLOR'/> |
114 | <Cylinder height='.69' radius='.3429'/> |
115 | </Shape> |
116 | </Transform> |
117 | <Group DEF='BOOSTERFIN'> |
118 | <Transform translation='.34 -5.2 0'> |
119 | |
120 | <Appearance USE='FINCOLOR'/> |
121 | <IndexedFaceSet solid='false' coordIndex='0 1 2 3 4 -1'> |
122 | <Coordinate point='0 0 0 0 .5 0 .5 .35 0 .5 0 0 0 0 0'/> |
123 | </IndexedFaceSet> |
124 | </Shape> |
125 | </Transform> |
126 | <Transform rotation='0 1 0 1.57' translation='0 -5.2 -.34'> |
127 | <Shape USE='BFIN'/> |
128 | </Transform> |
129 | <Transform rotation='0 1 0 3.14' translation='-.34 -5.2 0'> |
130 | <Shape USE='BFIN'/> |
131 | </Transform> |
132 | <Transform rotation='0 1 0 -1.57' translation='0 -5.2 .34'> |
133 | <Shape USE='BFIN'/> |
134 | </Transform> |
135 | </Group> |
136 | </Group> |
137 |
<!-- ROUTE information for EXHAUST node:
[from EXHINT.value_changed to set_scale
]
-->
<Transform DEF='EXHAUST' rotation='0 1 0 3.14' scale='0.5 0.5 0.5' translation='0 -7.51 0'> |
138 | <!-- Exhaust flames are from the torch example in the source book. --> |
139 | |
140 | <!-- No appearance, use emissive shading --> |
141 | <IndexedFaceSet coordIndex='0 1 2 -1 3 4 5 -1 6 7 8 -1'> |
142 | <Coordinate point='0.25 0.0 0.00 0.15 1.0 0.10 0.05 0.0 0.15 0.18 0.0 0.05 0.00 1.2 0.05 -0.10 0.0 0.05 -0.00 0.0 0.15 -0.13 0.8 0.10 -0.25 -0.25 0.00'/> |
143 | <Color color='1.0 0.0 0.0 0.9 0.5 0 1.0 0.0 0.0 0.9 0.3 0 1.0 1.0 0.0 0.9 0.3 0 0.7 0.1 0.2 0.9 0.8 0 1.0 0.0 0.0'/> |
144 | </IndexedFaceSet> |
145 | <Appearance> |
146 | <Material transparency='.15'/> |
147 | </Appearance> |
148 | </Shape> |
149 | <Transform rotation='0 1 0 1.57' scale='0.9 0.9 1'> |
150 | <Shape USE='Flames'/> |
151 | </Transform> |
152 | <Transform rotation='0 1 0 -1.57' scale='0.9 0.9 1'> |
153 | <Shape USE='Flames'/> |
154 | </Transform> |
155 | </Transform> |
156 | </Transform> |
157 | <Transform> |
158 | <Group DEF='BANDS'> |
159 | <Transform translation='0 -1.87 0'> |
160 | <Shape> |
161 | <Cylinder height='.1' radius='.35'/> |
162 | <Appearance> |
163 | <Material diffuseColor='1 0 0'/> |
164 | </Appearance> |
165 | </Shape> |
166 | </Transform> |
167 | <Transform translation='0 -1.62 0'> |
168 | <Shape> |
169 | <Cylinder height='.1' radius='.35'/> |
170 | <Appearance> |
171 | <Material diffuseColor='1 0 0'/> |
172 | </Appearance> |
173 | </Shape> |
174 | </Transform> |
175 | </Group> |
176 | </Transform> |
177 | </Transform> |
178 |
<!-- ROUTE information for EXHINT node:
[from EXHAUSTCLOCK.fraction_changed to set_fraction
]
[from value_changed to EXHAUST.set_scale
]
-->
<PositionInterpolator DEF='EXHINT' key='0 .25 .5 .75 1' keyValue='1.4 1.4 1.4 2 2 2 2.5 2.5 2.5 2 2 2 1.4 1.4 1.4'/> |
179 |
<!-- ROUTE information for EXHAUSTCLOCK node:
[from TimeFilter2.startEventTime to set_startTime
]
[from fraction_changed to EXHINT.set_fraction
]
-->
<TimeSensor DEF='EXHAUSTCLOCK' loop='true'/> |
180 |
<!-- ROUTE information for RGMCLOCK node:
[from TimeFilter2.startEventTime to set_startTime
]
[from startTime to RGMSOUND.startTime
]
[from stopTime to RGMSOUND.set_stopTime
]
-->
<TimeSensor DEF='RGMCLOCK' cycleInterval='28'/> |
181 |
<!-- ROUTE information for TimeFilter2 node:
[from startEventTime to RGMCLOCK.set_startTime
]
[from startEventTime to EXHAUSTCLOCK.set_startTime
]
-->
<Script DEF='TimeFilter2'> |
182 | <field name='setStart' type='SFBool' accessType='inputOnly'/> |
183 | <field name='InputTime' type='SFTime' accessType='inputOnly'/> |
184 | <field name='startEventTime' type='SFTime' accessType='outputOnly'/> |
185 | <IS> |
186 | <connect nodeField='setStart' protoField='STARTLAUNCH'/> |
187 | <connect nodeField='InputTime' protoField='THETIME'/> |
188 | </IS> |
<![CDATA[
ecmascript: function setStart ( value, InputTime ) { startEventTime = InputTime ; }
]]>
|
|
190 | </Script> |
191 | </Transform> |
192 | < ROUTE fromNode='TimeFilter2' fromField='startEventTime' toNode='RGMCLOCK' toField='set_startTime'/> |
193 | < ROUTE fromNode='RGMCLOCK' fromField='startTime' toNode='RGMSOUND' toField='startTime'/> |
194 | < ROUTE fromNode='RGMCLOCK' fromField='stopTime' toNode='RGMSOUND' toField='set_stopTime'/> |
195 | < ROUTE fromNode='TimeFilter2' fromField='startEventTime' toNode='EXHAUSTCLOCK' toField='set_startTime'/> |
196 | < ROUTE fromNode='EXHAUSTCLOCK' fromField='fraction_changed' toNode='EXHINT' toField='set_fraction'/> |
197 | < ROUTE fromNode='EXHINT' fromField='value_changed' toNode='EXHAUST' toField='set_scale'/> |
198 | </ProtoBody> |
199 | </ProtoDeclare> |
200 | <!-- ==================== --> |
201 | <Background skyColor='0.604 0.753 0.804'/> |
202 | <Anchor description='Harpoon Example' parameter='"target=_blank"' url=' "HarpoonExample.x3d" "../../Weapons/Missiles/HarpoonExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/HarpoonExample.x3d" "HarpoonExample.wrl" "../../Weapons/Missiles/HarpoonExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/HarpoonExample.wrl" '> |
203 | <Shape> |
204 | <Text string='"HarpoonPrototype" "is a prototype declaration file" "" "To see an example scene" "click on this text and view" "HarpoonExample"'> |
205 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
206 | </Text> |
207 | <Appearance> |
208 | <Material diffuseColor='0.4 0.4 0.4'/> |
209 | </Appearance> |
210 | </Shape> |
211 | </Anchor> |
212 | </Scene> |
213 | </X3D> |
Event Graph ROUTE Table entries with 6 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.
TimeFilter2
Script startEventTime SFTime |
RGMCLOCK
TimeSensor set_startTime SFTime |
then
|
RGMCLOCK
TimeSensor startTime SFTime |
RGMSOUND
AudioClip startTime SFTime |
||||||
then
|
RGMCLOCK
TimeSensor stopTime SFTime |
RGMSOUND
AudioClip set_stopTime SFTime |
||||||||
TimeFilter2
Script startEventTime SFTime |
EXHAUSTCLOCK
TimeSensor set_startTime SFTime |
then
|
EXHAUSTCLOCK
TimeSensor fraction_changed SFFloat |
EXHINT
PositionInterpolator set_fraction SFFloat |
then
|
EXHINT
PositionInterpolator value_changed SFVec3f |
EXHAUST
Transform set_scale SFVec3f |
line 202
Anchor |
description='Harpoon Example' User-interaction hint for this node. |
<!--
Color-coding 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)
<ProtoDeclare name='ProtoName'>
<field
name='fieldName'/> </ProtoDeclare>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->