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='title' content=' Butakov.x3d '/> |
6 | <meta name='description' content='Brazilian Naval Academy Training Ship making a manoverboard manouver'/> |
7 | <meta name='creator' content='Claudio Coreixas'/> |
8 | <meta name='created' content='20 October 2009'/> |
9 | <meta name='modified' content='28 September 2023'/> |
10 | <meta name='reference' content='http://www.en.mar.mil.br'/> |
11 | <meta name='subject' content='ships manouvering'/> |
12 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/Butakov.x3d '/> |
13 | <meta name='generator' content='X3D-Edit, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
14 | <meta name='license' content='../../license.html'/> |
15 | </head> |
16 | <Scene> |
17 | <Sound maxBack='100' maxFront='100'> |
18 | <AudioClip DEF='boat' description='ambient sound' loop='true' url=' "boatSound.wav" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/boatSound.wav" '/> |
19 | </Sound> |
20 | <NavigationInfo type='"EXAMINE"'/> |
21 | <WorldInfo info='"an Butakov MOB scene"' title='Butakov'/> |
22 | <Background skyAngle='0.7 0' skyColor='0.478431 0.160784 1 0.701961 0.776471 1 0.380392 0.384314 1'/> |
23 | <Viewpoint description='top' orientation='1 0 0 -1.57' position='1.8 10 1.4'/> |
24 |
<!-- ROUTE information for MovementTimer node:
[from ControlScript.speed to cycleInterval
]
[from acceleratorSensor.touchTime to pauseTime
]
[from ControlScript.startTimeReset to resumeTime
]
[from fraction_changed to MovetheShip.set_fraction
]
[from fraction_changed to SpinTheShip.set_fraction
]
[from fraction_changed to SpinTheShip2.set_fraction
]
-->
<TimeSensor DEF='MovementTimer' cycleInterval='20' loop='true'/> |
25 |
<!-- ROUTE information for spintTimer node:
[from fraction_changed to SpinTheShip3.set_fraction
]
-->
<TimeSensor DEF='spintTimer' cycleInterval='4' loop='true'/> |
26 |
<!-- ROUTE information for MovetheShip node:
[from MovementTimer.fraction_changed to set_fraction
]
[from value_changed to Ship3.translation
]
-->
<PositionInterpolator DEF='MovetheShip' key='0.025 0.05 0.075 0.1 0.125 0.15 0.175 0.2 0.225 0.25 0.275 0.3 0.325 0.35 0.375 0.4 0.425 0.45 0.475 0.5 0.525 0.55 0.575 0.6 0.625 0.65 0.675 0.7 0.725 0.75 0.775 0.8 0.825 0.85 0.875 0.9 0.925 0.95 0.975 1' keyValue='-3 0 0 -2.5 0 0 -2 0 0 -1.5 0 0 -1 0 0 -0.5 0 0 0 0 0 0.48 0 0.1 0.95 0 0.28 1.35 0 0.55 1.65 0 0.95 1.88 0 1.4 1.96 0 1.9 2.05 0 2.45 2.25 0 2.9 2.5 0 3.3 2.9 0 3.68 3.3 0 3.9 3.8 0 4 4.3 0 4 4.8 0 3.9 5.2 0 3.65 5.6 0 3.3 5.85 0 2.9 6.02 0 2.4 6.08 0 1.9 5.95 0 1.4 5.78 0 0.95 5.42 0 0.55 5 0 0.25 4.55 0 0.05 4 0 0 3.5 0 0 3 0 0 2.5 0 0 2 0 0 1.5 0 0 1 0 0 0.5 0 0 0 0 0'/> |
27 | < ROUTE fromNode='MovementTimer' fromField='fraction_changed' toNode='MovetheShip' toField='set_fraction'/> |
28 |
<!-- ROUTE information for SpinTheShip node:
[from MovementTimer.fraction_changed to set_fraction
]
[from value_changed to Ship.rotation
]
-->
<OrientationInterpolator DEF='SpinTheShip' key='0 0.083333 0.166667 0.25 0.333333 0.416667 0.5 0.583333 0.666667 0.75 0.833333 0.916667 1' keyValue='1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 -0.25 1 0 0 0 1 0 0 0.25 1 0 0 0.3 1 0 0 0.35 1 0 0 0.3 1 0 0 0.25 1 0 0 0 1 1 0 0 1 1 0 0'/> |
29 | < ROUTE fromNode='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip' toField='set_fraction'/> |
30 |
<!-- ROUTE information for SpinTheShip2 node:
[from MovementTimer.fraction_changed to set_fraction
]
[from value_changed to Ship2.rotation
]
-->
<OrientationInterpolator DEF='SpinTheShip2' key='0 0.166667 0.333333 0.5 0.666667 0.833333 1' keyValue='0 1 0 0 0 1 0 0 0 1 0 -1.57 0 1 0 0 0 1 0 1.57 0 1 0 3.14 0 1 0 3.14'/> |
31 | < ROUTE fromNode='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip2' toField='set_fraction'/> |
32 |
<!-- ROUTE information for SpinTheShip3 node:
[from spintTimer.fraction_changed to set_fraction
]
[from value_changed to Ship4.rotation
]
-->
<OrientationInterpolator DEF='SpinTheShip3' key='0 0.5 1' keyValue='0 0 1 -0.05 0 0 1 0.05 0 0 1 -0.05'/> |
33 | < ROUTE fromNode='spintTimer' fromField='fraction_changed' toNode='SpinTheShip3' toField='set_fraction'/> |
34 |
<!-- ROUTE information for Ship3 node:
[from MovetheShip.value_changed to translation
]
-->
<Transform DEF='Ship3'> |
35 | < ROUTE fromNode='MovetheShip' fromField='value_changed' toNode='Ship3' toField='translation'/> |
36 | <Viewpoint description='topMoving' orientation='1 0 0 -1.57079' position='0 3 0'/> |
37 |
<!-- ROUTE information for Ship2 node:
[from SpinTheShip2.value_changed to rotation
]
-->
<Transform DEF='Ship2'> |
38 | < ROUTE fromNode='SpinTheShip2' fromField='value_changed' toNode='Ship2' toField='rotation'/> |
39 | <Viewpoint description='Stern' orientation='0 1 0 -1.57' position='-3 0.5 0'/> |
40 | <Viewpoint description='bow' orientation='0 1 0 1.57' position='3 0.5 0'/> |
41 | <Viewpoint description='bow Close' orientation='0 1 0 1.57' position='1 0.3 0'/> |
42 | <Viewpoint description='stb Bow' orientation='-0.3162 0.9487 0 0.8117' position='1 0.5 1'/> |
43 | <Viewpoint description='stb Bridge Outside' orientation='0 0.6247 0 0.8179' position='0.5 0.2 0.6'/> |
44 | <Viewpoint description='port Bow' orientation='0 0.9487 0 2.3299' position='1.5 0.5 -1.5'/> |
45 | <Viewpoint description='stb Quarter' orientation='-0.3162 -0.9487 0 0.8117' position='-1.5 0.25 1.5'/> |
46 | <Viewpoint description='port Quarter' orientation='0 -0.9487 0 2.3299' position='-1.5 0.25 -1.5'/> |
47 |
<!-- ROUTE information for Ship node:
[from SpinTheShip.value_changed to rotation
]
-->
<Transform DEF='Ship'> |
48 | < ROUTE fromNode='SpinTheShip' fromField='value_changed' toNode='Ship' toField='rotation'/> |
49 | <Viewpoint description='StbRudder' orientation='0 1 0 -1.57' position='-0.9 -0.1 0.14'/> |
50 |
<!-- ROUTE information for Ship4 node:
[from SpinTheShip3.value_changed to rotation
]
-->
<Transform DEF='Ship4'> |
51 | <Viewpoint description='.50 caliber gun' orientation='0 1 0 1.57' position='-0.05 0.28 0'/> |
52 | <Viewpoint description='Bridge' fieldOfView='0.43' orientation='0 -0.9935 0 1.57079' position='0.14 0.27 0'/> |
53 | <Viewpoint description='Radar' fieldOfView='0.45' orientation='-0.1888 -0.982 0 1.57079' position='-0.6 0.5 0'/> |
54 | < ROUTE fromNode='SpinTheShip3' fromField='value_changed' toNode='Ship4' toField='rotation'/> |
55 | <Transform scale='0.15 0.15 0.15'> |
56 | <Inline url=' "U11.x3d" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/U11.x3d" '/> |
57 | </Transform> |
58 | </Transform> |
59 | </Transform> |
60 | </Transform> |
61 | </Transform> |
62 | <Transform translation='0 -5 0'> |
63 | <Shape DEF='ocean'> |
64 | <Appearance> |
65 | <Material ambientIntensity='1' diffuseColor='0 0.219608 0.419608' shininess='1' transparency='0.16'/> |
66 | </Appearance> |
67 | <Box size='200 10 100' solid='false'/> |
68 | </Shape> |
69 | </Transform> |
70 | <Transform> |
71 | <Shape DEF='path'> |
72 | <Extrusion crossSection='0 0 0.01 0 0 -0.01 0 0.01 -0.01 0 0.01 0.01 0 0' spine='-3 0 0 -2.5 0 0 -2 0 0 -1.5 0 0 -1 0 0 -0.5 0 0 0 0 0 0.48 0 0.1 0.95 0 0.28 1.35 0 0.55 1.65 0 0.95 1.88 0 1.4 1.96 0 1.9 2.05 0 2.45 2.25 0 2.9 2.5 0 3.3 2.9 0 3.68 3.3 0 3.9 3.8 0 4 4.3 0 4 4.8 0 3.9 5.2 0 3.65 5.6 0 3.3 5.85 0 2.9 6.02 0 2.4 6.08 0 1.9 5.95 0 1.4 5.78 0 0.95 5.42 0 0.55 5 0 0.25 4.55 0 0.05 4 0 0 3.5 0 0 3 0 0 2.5 0 0 2 0 0 1.5 0 0 1 0 0 0.5 0 0 0 0 0 -0.5 0 0'/> |
73 | <Appearance> |
74 | <Material ambientIntensity='1' diffuseColor='0.858824 0.568627 0' shininess='0.56' transparency='0.36'/> |
75 | </Appearance> |
76 | </Shape> |
77 | </Transform> |
78 | <Transform translation='1 0 1'> |
79 | <Shape DEF='accel'> |
80 | <Box size='0.1 0.1 0.1'/> |
81 | <Appearance> |
82 | <Material ambientIntensity='1' diffuseColor='1 1 0.980392' shininess='0.56' transparency='0.36'/> |
83 | </Appearance> |
84 | </Shape> |
85 |
<!-- ROUTE information for acceleratorSensor node:
[from isActive to ControlScript.buttonMotionDone
]
[from touchTime to MovementTimer.pauseTime
]
[from touchTime to ControlScript.buttonPushTime
]
-->
<TouchSensor DEF='acceleratorSensor' description='Touch to change ships speed'/> |
86 | </Transform> |
87 |
<!-- ROUTE information for ControlScript node:
[from acceleratorSensor.isActive to buttonMotionDone
]
[from acceleratorSensor.touchTime to buttonPushTime
]
[from speed to MovementTimer.cycleInterval
]
[from startTimeReset to MovementTimer.resumeTime
]
-->
<Script DEF='ControlScript'> |
88 | <field name='buttonMotionDone' type='SFBool' accessType='inputOnly'/> |
89 | <field name='buttonPushCount' type='SFInt32' value='0' accessType='initializeOnly'/> |
90 | <field name='speed' type='SFTime' accessType='outputOnly'/> |
91 | <field name='buttonPushTime' type='SFTime' accessType='inputOnly'/> |
92 | <field name='startTimeReset' type='SFTime' accessType='outputOnly'/> |
<![CDATA[
ecmascript: // Filename: acceleratorScript.js // Author: Claudio Coreixas // Created: 7 October 2009 function buttonMotionDone (value) { if (value == false) { buttonPushCount ++; if (buttonPushCount > 3) { buttonPushCount = 0; } if (buttonPushCount == 0) { speed = new SFTime (20); } else if (buttonPushCount == 1) { speed = new SFTime (10); } else if (buttonPushCount == 2) { speed = new SFTime (20); } else if (buttonPushCount == 3) { speed = new SFTime (10); } startTimeReset = new SFTime (buttonPushTime + 5); } }
]]>
|
|
94 | </Script> |
95 | < ROUTE fromNode='acceleratorSensor' fromField='isActive' toNode='ControlScript' toField='buttonMotionDone'/> |
96 | < ROUTE fromNode='ControlScript' fromField='speed' toNode='MovementTimer' toField='cycleInterval'/> |
97 | < ROUTE fromNode='acceleratorSensor' fromField='touchTime' toNode='MovementTimer' toField='pauseTime'/> |
98 | < ROUTE fromNode='acceleratorSensor' fromField='touchTime' toNode='ControlScript' toField='buttonPushTime'/> |
99 | < ROUTE fromNode='ControlScript' fromField='startTimeReset' toNode='MovementTimer' toField='resumeTime'/> |
100 | </Scene> |
101 | </X3D> |
Event Graph ROUTE Table entries with 13 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.
spintTimer
TimeSensor fraction_changed SFFloat |
SpinTheShip3
OrientationInterpolator set_fraction SFFloat |
then
|
SpinTheShip3
OrientationInterpolator value_changed SFRotation |
Ship4
Transform rotation SFRotation |
<!--
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)
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->