#X3D V3.0 utf8 PROFILE Immersive # [X3D] version=3.0 # [X3D] noNamespaceSchemaLocation=https://www.web3d.org/specifications/x3d-3.0.xsd # X3D-to-ClassicVRML XSL translation autogenerated by X3dToClassicVrmlEncoding.xslt and X3dToVrml97.xslt # https://www.web3d.org/x3d/content/X3dToClassicVrmlEncoding.xslt # https://www.web3d.org/x3d/content/X3dToVrml97.xslt # Transformation using XSLT processor: Saxonica # head META "title" "ViewPositionOrientationHUD.x3d" META "description" "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." META "creator" "Don Brutzman" META "created" "13 June 2004" META "modified" "28 November 2019" META "identifier" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/ViewPositionOrientationHUD.x3d" META "generator" "X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit" META "license" "../../license.html" # [Scene] ========== ========== ========== WorldInfo { title "ViewPositionOrientationHUD.x3d" } EXTERNPROTO HeadsUpDisplay [ inputOutput MFNode children # [appinfo] Displayed subscene positioned as a HUD. inputOutput MFNode dragChildren # [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. initializeOnly SFVec3f locationOffset # [appinfo] Modified screen location and distance (for size). initializeOnly SFBool traceEnabled # [appinfo] Enable/disable console output for troubleshooting. ][ "../../../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" ] EXTERNPROTO ViewPositionOrientation [ # [appinfo] ViewPositionOrientation prototype provides local position and orientation as user navigates with optional console output inputOutput SFBool enabled # [appinfo] Whether or not ViewPositionOrientation sends output to console. initializeOnly SFBool traceEnabled # [appinfo] Output internal trace messages for debugging this node - developer use only can be ignored. inputOnly SFBool set_traceEnabled # [appinfo] Ability to turn output tracing on/off at runtime. outputOnly SFVec3f position_changed # [appinfo] Output local position. outputOnly SFRotation orientation_changed # [appinfo] Output local orientation. outputOnly MFString outputViewpointString # [appinfo] MFString value of new Viewpoint for example: ][ "../../../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" ] # ==================== HeadsUpDisplay { children [ Group { children [ Shape { appearance Appearance { material Material { diffuseColor 0 1 1 emissiveColor 0 0.1 0.1 } } geometry DEF DisplayText Text { string [ "ViewPositionOrientationHUD" ] fontStyle FontStyle { justify [ "MIDDLE" "MIDDLE" ] size 0.4 } } } DEF TraceToggleTouchSensor TouchSensor { description "toggle console trace" } DEF TraceToggle BooleanToggle { } ] } ] dragChildren [ Transform { translation 0 -0.1 -0.1 children [ Shape { geometry Box { size 11 0.45 0.001 } appearance Appearance { material Material { diffuseColor 1 1 1 transparency 0.95 } } } ] } ] locationOffset 0 -3 0 } DEF VPO ViewPositionOrientation { enabled TRUE traceEnabled FALSE } ROUTE VPO.outputViewpointString TO DisplayText.string ROUTE TraceToggleTouchSensor.isActive TO TraceToggle.set_boolean ROUTE TraceToggle.toggle_changed TO VPO.set_traceEnabled