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='title' content='SoundVisualization.x3d'/> |
6 | <meta name='description' content='An example of the Sound node for testing X3D-Edit author-assist visualization'/> |
7 | <meta name='created' content='15 November 2009'/> |
8 | <meta name='modified' content='27 October 2023'/> |
9 | <meta name='Image' content='SoundVisualization.png'/> |
10 | <meta name='reference' content='https://X3dGraphics.com'/> |
11 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dResources.html'/> |
12 | <meta name='creator' content='Don Brutzman'/> |
13 | <meta name='rights' content='Copyright 2009, Daly Realism and Don Brutzman'/> |
14 | <meta name='subject' content='X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com'/> |
15 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundVisualization.x3d'/> |
16 | <meta name='generator' content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/> |
17 | <meta name='license' content='../license.html'/> |
18 | </head> |
19 | <Scene> |
20 | <!-- Note that navigation mode shifts to WALK when ViewInside is bound, otherwise default is EXAMINE --> |
21 | <WorldInfo title='SoundVisualization.x3d'/> |
22 |
<!-- ROUTE information for ViewOutside node:
[from isBound to NavOutside.set_bind
]
-->
<Viewpoint DEF='ViewOutside' description='outside' position='0 8 40'/> |
23 |
<!-- ROUTE information for NavOutside node:
[from ViewOutside.isBound to set_bind
]
[from ViewAbove.isBound to set_bind
]
-->
<NavigationInfo DEF='NavOutside'/> |
24 | < ROUTE fromNode='ViewOutside' fromField='isBound' toNode='NavOutside' toField='set_bind'/> |
25 |
<!-- ROUTE information for ViewInside node:
[from isBound to NavInside.set_bind
]
-->
<Viewpoint DEF='ViewInside' description='inside' position='0 1.6 6'/> |
26 |
<!-- ROUTE information for NavInside node:
[from ViewInside.isBound to set_bind
]
-->
<NavigationInfo DEF='NavInside' type='"WALK" "ANY"'/> |
27 | < ROUTE fromNode='ViewInside' fromField='isBound' toNode='NavInside' toField='set_bind'/> |
28 |
<!-- ROUTE information for ViewAbove node:
[from isBound to NavOutside.set_bind
]
-->
<Viewpoint DEF='ViewAbove' description='above' orientation='1 0 0 -1.57079' position='0 40 0'/> |
29 | <Inline DEF='GridXZ_20x20Fixed' url=' "../../Savage/Tools/Authoring/GridXZ_20x20Fixed.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/GridXZ_20x20Fixed.x3d" "../../Savage/Tools/Authoring/GridXZ_20x20Fixed.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/GridXZ_20x20Fixed.wrl" '/> |
30 | < ROUTE fromNode='ViewAbove' fromField='isBound' toNode='NavOutside' toField='set_bind'/> |
31 | <!-- Sound node example --> |
32 | <Sound direction='1 0 1' location='-3 1.6 -3' maxBack='6' minBack='5'> |
33 | <AudioClip DEF='WaterSounds' description='Running Water' url=' "aqua.wav" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/aqua.wav" '/> |
34 | </Sound> |
35 | <!-- ================== --> |
36 | <!-- Sound outlines, patterned after https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundAudioClip.x3d --> |
37 | <!-- Approximate ellipsoidal footprints and envelope using Cylinders and Spheres, respectively --> |
38 | <!-- Sound direction is x axis, so minimum-attenuation minLength = (minBack + minFront) and minRadius = minLength/2 along x axis --> |
39 | <!-- and so width, height dimensions ~= maximum-attenuation halfwidth = maxWidth ~= 45 along y, z axes --> |
40 | <!-- Ellipsoid focus is (0 0 0) but geometric center offset for spheroidal approximation is (-minBack + minRadius) --> |
41 | <Transform rotation='0 1 0 -2.356194490192345' translation='-3 1.6 -3'> |
42 | <Transform rotation='1 0 0 0.0'> |
43 | <!-- here is local center of sound ellipse, with local X axis pointed along direction vector --> |
44 | <Inline DEF='CoordinateAxes' url=' "../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" "../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" '/> |
45 | <Transform scale='6.0 2.23606797749979 2.23606797749979' translation='-2 0 0'> |
46 | <Collision enabled='false'> |
47 | <Shape> |
48 | <Cylinder height='0.04' radius='0.5' side='false'/> |
49 | <Appearance> |
50 | <Material diffuseColor='0.8 0.6 0.4' emissiveColor='0.8 0.6 0.4' transparency='0.7'/> |
51 | </Appearance> |
52 | </Shape> |
53 | <Shape> |
54 | <Sphere radius='0.5'/> |
55 | <Appearance> |
56 | <Material diffuseColor='0.8 0.6 0.4' emissiveColor='0.8 0.6 0.4' transparency='0.7'/> |
57 | </Appearance> |
58 | </Shape> |
59 | </Collision> |
60 | </Transform> |
61 | <Transform scale='16.0 7.745966692414834 7.745966692414834' translation='2 0 0'> |
62 | <Collision enabled='false'> |
63 | <Shape> |
64 | <Cylinder height='0.02' radius='0.5' side='false'/> |
65 | <Appearance> |
66 | <Material diffuseColor='0.4 0.3 0.2' emissiveColor='0.4 0.3 0.2' transparency='0.85'/> |
67 | </Appearance> |
68 | </Shape> |
69 | <Shape> |
70 | <Sphere radius='0.5'/> |
71 | <Appearance> |
72 | <Material diffuseColor='0.4 0.3 0.2' emissiveColor='0.4 0.3 0.2' transparency='0.85'/> |
73 | </Appearance> |
74 | </Shape> |
75 | </Collision> |
76 | </Transform> |
77 | </Transform> |
78 | </Transform> |
79 | <!-- ================== --> |
80 | </Scene> |
81 | </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.
ViewAbove
Viewpoint isBound SFBool |
NavOutside
NavigationInfo set_bind SFBool |
ViewInside
Viewpoint isBound SFBool |
NavInside
NavigationInfo set_bind SFBool |
ViewOutside
Viewpoint isBound SFBool |
NavOutside
NavigationInfo set_bind SFBool |
<!--
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. -->