| 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='ViewPositionOrientationHUD.x3d'/> |
| 6 | <meta name='description' content='ViewPositionOrientation Heads-Up Display (HUD) to show position and orientation on screen. Drag to move, click text to toggle console trace. Used as an Inline node, assumes local coordinate system where invoked.'/> |
| 7 | <meta name='creator' content='Don Brutzman'/> |
| 8 | <meta name='created' content='13 June 2004'/> |
| 9 | <meta name='modified' content='28 November 2019'/> |
| 10 | <meta name='identifier' content='https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/ViewPositionOrientationHUD.x3d'/> |
| 11 | <meta name='generator' content='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/> |
| 12 | <meta name='license' content='../../license.html'/> |
| 13 | </head> |
| 14 | <Scene> |
| 15 | <WorldInfo title='ViewPositionOrientationHUD.x3d'/> |
| 16 | <ExternProtoDeclare name='HeadsUpDisplay' url=' "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" '> |
| 17 |
<field name='children' type='MFNode' accessType='inputOutput'
appinfo='Displayed subscene positioned as a HUD.'/> |
| 18 |
<field name='dragChildren' type='MFNode' accessType='inputOutput'
appinfo='Additional HUD geometry which can be touched and dragged for repositioning. If this geometry goes offscreen (perhaps due to screen resizing) then it snaps back to original position.'/> |
| 19 |
<field name='locationOffset' type='SFVec3f' accessType='initializeOnly'
appinfo='Modified screen location and distance (for size).'/> |
| 20 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='Enable/disable console output for troubleshooting.'/> |
| 21 | </ExternProtoDeclare> |
| 22 | <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://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" '> |
| 23 |
<field name='enabled' type='SFBool' accessType='inputOutput'
appinfo='Whether or not ViewPositionOrientation sends output to console.'/> |
| 24 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='Output internal trace messages for debugging this node - developer use only can be ignored.'/> |
| 25 |
<field name='set_traceEnabled' type='SFBool' accessType='inputOnly'
appinfo='Ability to turn output tracing on/off at runtime.'/> |
| 26 |
<field name='position_changed' type='SFVec3f' accessType='outputOnly'
appinfo='Output local position.'/> |
| 27 |
<field name='orientation_changed' type='SFRotation' accessType='outputOnly'
appinfo='Output local orientation.'/> |
| 28 |
<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"/>'/> |
| 29 | </ExternProtoDeclare> |
| 30 | <!-- ==================== --> |
| 31 | <ProtoInstance name='HeadsUpDisplay'> |
| 32 | <fieldValue name='children'> |
| 33 | <Group> |
| 34 | <Shape> |
| 35 | <Appearance> |
| 36 | <Material diffuseColor='0 1 1' emissiveColor='0 0.1 0.1'/> |
| 37 | </Appearance> |
| 38 |
<!-- ROUTE information for DisplayText node:
[from VPO.outputViewpointString to string
]
-->
<Text DEF='DisplayText' string='"ViewPositionOrientationHUD"'> |
| 39 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.4'/> |
| 40 | </Text> |
| 41 | </Shape> |
| 42 |
<!-- ROUTE information for TraceToggleTouchSensor node:
[from isActive to TraceToggle.set_boolean
]
-->
<TouchSensor DEF='TraceToggleTouchSensor' description='toggle console trace'/> |
| 43 |
<!-- ROUTE information for TraceToggle node:
[from TraceToggleTouchSensor.isActive to set_boolean
]
[from toggle_changed to VPO.set_traceEnabled
]
-->
<BooleanToggle DEF='TraceToggle' containerField='children'/> |
| 44 | </Group> |
| 45 | </fieldValue> |
| 46 | <fieldValue name='dragChildren'> |
| 47 | <Transform translation='0 -0.1 -0.1'> |
| 48 | <Shape> |
| 49 | <Box size='11 0.45 0.001'/> |
| 50 | <Appearance> |
| 51 | <Material diffuseColor='1 1 1' transparency='0.95'/> |
| 52 | </Appearance> |
| 53 | </Shape> |
| 54 | </Transform> |
| 55 | </fieldValue> |
| 56 | <fieldValue name='locationOffset' value='0 -3 0'/> |
| 57 | </ProtoInstance> |
| 58 |
<!-- ROUTE information for VPO node:
[from TraceToggle.toggle_changed to set_traceEnabled
]
[from outputViewpointString to DisplayText.string
]
-->
<ProtoInstance name='ViewPositionOrientation' DEF='VPO'> |
| 59 | <fieldValue name='enabled' value='true'/> |
| 60 | <fieldValue name='traceEnabled' value='false'/> |
| 61 | </ProtoInstance> |
| 62 | < ROUTE fromNode='VPO' fromField='outputViewpointString' toNode='DisplayText' toField='string'/> |
| 63 | < ROUTE fromNode='TraceToggleTouchSensor' fromField='isActive' toNode='TraceToggle' toField='set_boolean'/> |
| 64 | < ROUTE fromNode='TraceToggle' fromField='toggle_changed' toNode='VPO' toField='set_traceEnabled'/> |
| 65 | </Scene> |
| 66 | </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.
|
TraceToggleTouchSensor
TouchSensor isActive SFBool |
TraceToggle
BooleanToggle set_boolean SFBool |
then
|
TraceToggle
BooleanToggle toggle_changed SFBool |
VPO
ProtoInstance set_traceEnabled SFBool |
then
|
VPO
ProtoInstance outputViewpointString MFString |
DisplayText
Text string MFString |
| line 31
ProtoInstance HeadsUpDisplay |
No ROUTE connection found for output events 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. |
|
VPO
ProtoInstance outputViewpointString MFString |
DisplayText
Text string MFString |
<!--
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.
-->