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=' BeamConeExample.x3d '/> |
6 | <meta name='creator' content='Don Brutzman'/> |
7 | <meta name='created' content='11 December 2000'/> |
8 | <meta name='modified' content='15 January 2020'/> |
9 | <meta name='description' content='Produce wireframe or transparent beam cones.'/> |
10 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamConeExample.x3d '/> |
11 | <meta name='reference' content=' https://www.web3d.org/WorkingGroups/vrtp/demo/auv/BeamConeExample.x3d '/> |
12 | <meta name='reference' content=' http://faculty.nps.edu/brutzman/vrtp/demo/auv/BeamConeExample.x3d '/> |
13 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
14 | <meta name='license' content='../../license.html'/> |
15 | </head> |
16 | <Scene> |
17 | <Background skyColor='0 0.3 0.5'/> |
18 | <WorldInfo info='"Produce wireframe or transparent beam cones"' title='BeamConeExample'/> |
19 | <Viewpoint description='BeamCone example' position='5 0 10'/> |
20 | <ExternProtoDeclare name='BeamCone' appinfo='Produce wireframe or transparent beam cones. Typical uses include propeller/thruster water flow or line-of-sight sonar/radar/light beams. Negative range values invert base and apex at same relative location. Default: beam with apex at (0 0 0) and base of radius 1 in x-z plane at (1 0 0).' url=' "BeamConePrototype.x3d#BeamCone" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamConePrototype.x3d#BeamCone" "BeamConePrototype.wrl#BeamCone" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamConePrototype.wrl#BeamCone" '> |
21 |
<field name='name' type='SFString' accessType='initializeOnly'
appinfo='BeamCone name aids in node identification and tracing'/> |
22 |
<field name='contact' type='SFBool' accessType='inputOnly'
appinfo='(communications) is transmitted signal in contact with receiver or (sensor) is a target return detected?'/> |
23 |
<field name='range' type='SFFloat' accessType='inputOnly'
appinfo='distance in meters along x axis'/> |
24 |
<field name='defaultRange' type='SFFloat' accessType='initializeOnly'
appinfo='distance in meters used until eventIn range sent'/> |
25 |
<field name='wireframe' type='SFBool' accessType='initializeOnly'
appinfo='whether wireframe beam is drawn'/> |
26 |
<field name='solid' type='SFBool' accessType='initializeOnly'
appinfo='whether solid beam is drawn'/> |
27 |
<field name='beamHeightDegrees' type='SFFloat' accessType='initializeOnly'
appinfo='degrees across vertical y axis'/> |
28 |
<field name='beamWidthDegrees' type='SFFloat' accessType='initializeOnly'
appinfo='degrees across horizontal z axis'/> |
29 |
<field name='contactColor' type='SFColor' accessType='initializeOnly'
appinfo='rendering color when contact=true'/> |
30 |
<field name='noContactColor' type='SFColor' accessType='initializeOnly'
appinfo='rendering color when contact=false'/> |
31 |
<field name='transparency' type='SFFloat' accessType='inputOutput'
appinfo='1 = fully transparent wireframe only'/> |
32 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='flag to turn on Script tracing'/> |
33 | </ExternProtoDeclare> |
34 | <!-- Viewable geometry for this scene --> |
35 | <Group> |
36 |
<!-- ROUTE information for BeamConeInstance node:
[from TextTouch.isOver to contact
]
[from RangeInterpolator.value_changed to range
]
[from TransparencyInterpolator.value_changed to transparency
]
-->
<ProtoInstance name='BeamCone' DEF='BeamConeInstance'> |
37 | <fieldValue name='name' value='BeamConeInstance'/> |
38 | <fieldValue name='defaultRange' value='5'/> |
39 | <fieldValue name='beamHeightDegrees' value='24'/> |
40 | <fieldValue name='beamWidthDegrees' value='5'/> |
41 | <fieldValue name='transparency' value='0.2'/> |
42 | <fieldValue name='wireframe' value='true'/> |
43 | <fieldValue name='solid' value='true'/> |
44 | <fieldValue name='traceEnabled' value='true'/> |
45 | <!-- default contactColor, noContactColor --> |
46 | </ProtoInstance> |
47 | <Transform translation='5 -3 0'> |
48 | <Billboard> |
49 | <Shape> |
50 | <Appearance> |
51 | <Material diffuseColor='.8 .8 0'/> |
52 | </Appearance> |
53 | <Text string='"touch text to toggle contact-mode rendering"'> |
54 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.6'/> |
55 | </Text> |
56 | </Shape> |
57 | <Shape> |
58 | <!-- transparent Box as text-selection assist --> |
59 | <Box size='10 1 .001'/> |
60 | <Appearance> |
61 | <Material transparency='1'/> |
62 | </Appearance> |
63 | </Shape> |
64 | </Billboard> |
65 |
<!-- ROUTE information for TextTouch node:
[from isOver to BeamConeInstance.contact
]
-->
<TouchSensor DEF='TextTouch' description='touch text to toggle contactColor noContactColor'/> |
66 | < ROUTE fromNode='TextTouch' fromField='isOver' toNode='BeamConeInstance' toField='contact'/> |
67 | </Transform> |
68 | </Group> |
69 | <Group DEF='AnimationGroup'> |
70 |
<!-- ROUTE information for Clock node:
[from fraction_changed to RangeInterpolator.set_fraction
]
[from fraction_changed to TransparencyInterpolator.set_fraction
]
-->
<TimeSensor DEF='Clock' cycleInterval='10' loop='true'/> |
71 |
<!-- ROUTE information for RangeInterpolator node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to BeamConeInstance.range
]
-->
<ScalarInterpolator DEF='RangeInterpolator' key='0 .4 .4 .5 .5 .9 .9 1' keyValue='0.01 10 0 0 -0.01 -10 0 0'/> |
72 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='RangeInterpolator' toField='set_fraction'/> |
73 | < ROUTE fromNode='RangeInterpolator' fromField='value_changed' toNode='BeamConeInstance' toField='range'/> |
74 | <!-- ========== --> |
75 |
<!-- ROUTE information for TransparencyInterpolator node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to BeamConeInstance.transparency
]
-->
<ScalarInterpolator DEF='TransparencyInterpolator' key='0 .4 .4 .5 .5 .9 .9 1' keyValue='0 1 1 1 0 1 1 1'/> |
76 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='TransparencyInterpolator' toField='set_fraction'/> |
77 | < ROUTE fromNode='TransparencyInterpolator' fromField='value_changed' toNode='BeamConeInstance' toField='transparency'/> |
78 | </Group> |
79 | </Scene> |
80 | </X3D> |
Event Graph ROUTE Table entries with 5 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.
TextTouch
TouchSensor isOver SFBool |
BeamConeInstance
ProtoInstance contact SFBool |
Clock
TimeSensor fraction_changed SFFloat |
RangeInterpolator
ScalarInterpolator set_fraction SFFloat |
then
|
RangeInterpolator
ScalarInterpolator value_changed SFFloat |
BeamConeInstance
ProtoInstance range SFFloat |
||
Clock
TimeSensor fraction_changed SFFloat |
TransparencyInterpolator
ScalarInterpolator set_fraction SFFloat |
then
|
TransparencyInterpolator
ScalarInterpolator value_changed SFFloat |
BeamConeInstance
ProtoInstance transparency SFFloat |
BeamConeInstance
ProtoInstance BeamCone |
No direct ROUTE connection found for events to/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. |
<!--
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)
<ProtoInstance name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->