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=' CameraCompass36Example.x3d '/> |
6 | <meta name='description' content='A circular set of 36 compass bearings that follows the active viewpoint. Coordinate axis viewpoint shows that North = +X axis, East = +Z axis, up = +Y axis.'/> |
7 | <meta name='creator' content='Don Brutzman'/> |
8 | <meta name='created' content='17 June 2001'/> |
9 | <meta name='modified' content='28 November 2019'/> |
10 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompass36Example.x3d '/> |
11 | <meta name='inspiration' content='David Colleen'/> |
12 | <meta name='reference' content='http://www.planet9.com/earth/pearlharbor/vrml/tour.wrl'/> |
13 | <meta name='reference' content='http://www.planet9.com/earth/pearlharbor/vrml/compass.wrl'/> |
14 | <meta name='subject' content='compass display'/> |
15 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
16 | <meta name='license' content='../../license.html'/> |
17 | </head> |
18 | <Scene> |
19 | <WorldInfo title='CameraCompass36Example.x3d'/> |
20 | <ExternProtoDeclare name='CameraCompass36' appinfo='Circular set of compass bearings that follow the active viewpoint set at 360/36 = 10 degree intervals. North = +X axis East = +Z axis up = +Y axis.' url=' "CameraCompassPrototypes.x3d#CameraCompass36" "../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36" "CameraCompassPrototypes.wrl#CameraCompass36" "../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36" '> |
21 | <field name='enabled' type='SFBool' accessType='inputOutput'/> |
22 | <field name='positionOffsetFromCamera' type='SFVec3f' accessType='inputOutput'/> |
23 | <field name='markerColor' type='SFColor' accessType='inputOutput'/> |
24 | <field name='labelColor' type='SFColor' accessType='inputOutput'/> |
25 | </ExternProtoDeclare> |
26 | <ExternProtoDeclare name='ViewPositionOrientation' appinfo='ViewPositionOrientation prototype provides local position and orientation as user navigates with optional console output' url=' "../../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" '> |
27 |
<field name='enabled' type='SFBool' accessType='inputOutput'
appinfo='Whether or not ViewPositionOrientation sends output to console.'/> |
28 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='Output internal trace messages for debugging this node - developer use only can be ignored.'/> |
29 |
<field name='set_traceEnabled' type='SFBool' accessType='inputOnly'
appinfo='Ability to turn output tracing on/off at runtime.'/> |
30 |
<field name='position_changed' type='SFVec3f' accessType='outputOnly'
appinfo='Output local position.'/> |
31 |
<field name='orientation_changed' type='SFRotation' accessType='outputOnly'
appinfo='Output local orientation.'/> |
32 |
<field name='outputViewpointString' type='MFString' accessType='outputOnly'
appinfo='MFString value of new Viewpoint for example: <Viewpoint position="20 15 20" orientation="-0.516 0.83 0.212 0.9195"/>'/> |
33 | </ExternProtoDeclare> |
34 | <!-- ======================== --> |
35 | <Viewpoint description='walk and rotate to test heads-up display (HUD)' position='0 0 25'/> |
36 | <Viewpoint description='walk and rotate to test heads-up display (HUD)' orientation='0 1 0 -1.57' position='-14 0 0'/> |
37 | <NavigationInfo speed='10' type='"FLY" "ANY"'/> |
38 | <Background skyColor='0.7 0.7 0.9'/> |
39 | <PointLight location='0 20 0'/> |
40 | <!-- Test the compass prototype of interest. --> |
41 | <ProtoInstance name='CameraCompass36'> |
42 | <fieldValue name='enabled' value='true'/> |
43 | <fieldValue name='positionOffsetFromCamera' value='0 5 0'/> |
44 | <fieldValue name='markerColor' value='0.9 0.9 0.9'/> |
45 | <fieldValue name='labelColor' value='0.9 0.9 0.9'/> |
46 | </ProtoInstance> |
47 | <!-- Put a coordinate axis in to display orientation --> |
48 | <Transform translation='0 -2.5 0'> |
49 | <Inline DEF='CoordinateAxes' url=' "../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl" '/> |
50 | <Viewpoint description='Coordinate axes: x=North, y=Up, z=East' orientation='0 1 0 -1.4' position='-3.6 0.2 0.6'/> |
51 |
<!-- ROUTE information for AxisProximity node:
[from isActive to AxisNavigation.set_bind
]
-->
<ProximitySensor DEF='AxisProximity' size='10 10 10'/> |
52 |
<!-- ROUTE information for AxisNavigation node:
[from AxisProximity.isActive to set_bind
]
-->
<NavigationInfo DEF='AxisNavigation'/> |
53 | </Transform> |
54 | <Transform/> |
55 | <!-- Open the VRML console to see ViewPositionOrientation output. This demonstrates that more than one ProximitySensor can be active in the scene at a single time. --> |
56 | <ProtoInstance name='ViewPositionOrientation' DEF='ConsoleOutputViewPositionOrientation'> |
57 | <fieldValue name='enabled' value='true'/> |
58 | </ProtoInstance> |
59 | <Transform DEF='Floor' translation='0 -5 0'> |
60 | <Shape> |
61 | <Box size='5 0.4 5'/> |
62 | <Appearance> |
63 | <Material diffuseColor='0.3 0.7 0.3'/> |
64 | </Appearance> |
65 | </Shape> |
66 | <Shape> |
67 | <Box size='20 0.3 20'/> |
68 | <Appearance> |
69 | <Material diffuseColor='0.7 0.7 0.3'/> |
70 | </Appearance> |
71 | </Shape> |
72 | <Shape> |
73 | <Box size='50 0.2 50'/> |
74 | <Appearance> |
75 | <Material diffuseColor='0.8 0.8 1'/> |
76 | </Appearance> |
77 | </Shape> |
78 | <Shape> |
79 | <Box size='100 0.1 100'/> |
80 | <Appearance> |
81 | <Material diffuseColor='0.3 1 0.3'/> |
82 | </Appearance> |
83 | </Shape> |
84 | </Transform> |
85 | <Transform DEF='CenterInstructions' translation='0 0.75 0'> |
86 | <Billboard> |
87 | <Shape> |
88 | <Text string='"Walk and rotate to move scene while" "compass heads-up display (HUD)" "CameraCompass36 stays overhead"'> |
89 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
90 | </Text> |
91 | <Appearance> |
92 | <Material diffuseColor='0 0 0' emissiveColor='0.2 0.7 0.2'/> |
93 | </Appearance> |
94 | </Shape> |
95 | </Billboard> |
96 | </Transform> |
97 | < ROUTE fromNode='AxisProximity' fromField='isActive' toNode='AxisNavigation' toField='set_bind'/> |
98 | </Scene> |
99 | </X3D> |
Event Graph ROUTE Table with 1 ROUTE connection 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.
AxisProximity
ProximitySensor isActive SFBool |
AxisNavigation
NavigationInfo set_bind SFBool |
line 41
ProtoInstance CameraCompass36 |
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. |
ConsoleOutputViewPositionOrientation
ProtoInstance ViewPositionOrientation |
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.
-->