<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 ' >
<head>
<meta name='titlecontent=' HudKelpForest.x3d '/>
<meta name='descriptioncontent='Demonstrates use of a ProximitySensor in building a HUD, with display values showing current view location.'/>
<meta name='creatorcontent='Leonard Daly and Don Brutzman'/>
<meta name='createdcontent='15 July 2006'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='Imagecontent='HudKelpForestScreenshot.png' />
<meta name='referencecontent=' https://X3dGraphics.com '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/>
<meta name='rightscontent='Copyright 2006, Daly Realism and Don Brutzman'/>
<meta name='subjectcontent=' X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: BottomLabel, BottomLine, ConvertValueScript, HeadsUpDisplayInstance, HudContent, TopLabel, TopLine Index for ExternProtoDeclare definitions: HeadsUpDisplay, TextString
-->
<Scene>
<WorldInfo title='HudKelpForest.x3d'/>
<ExternProtoDeclare name='HeadsUpDisplayappinfo='Heads-up display (HUD) keeps child geometry aligned on screen in a consistent location'
  url=' "HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" ' >
<field name='screenOffsettype='SFVec3faccessType='inputOutput'
 appinfo='offset position for HUD relative to current view location, default 0 0 -5' />

<field name='childrentype='MFNodeaccessType='inputOutput'
 appinfo='X3D content positioned at HUD offset' />

<field name='position_changedtype='SFVec3faccessType='outputOnly'
 appinfo='HUD position update (in world coordinates) relative to original location' />

<field name='orientation_changedtype='SFRotationaccessType='outputOnly'
 appinfo='HUD orientation update relative to original location' />
</ExternProtoDeclare>
<ExternProtoDeclare name='TextString'
  url=' "TextStringPrototype.x3d#TextString" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/TextStringPrototype.x3d#TextString" "TextStringPrototype.wrl#TextString" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/TextStringPrototype.wrl#TextString" ' >
<field name='offsettype='SFVec3faccessType='inputOutput'/>
<field name='stringtype='MFStringaccessType='inputOutput'/>
<field name='colortype='SFColoraccessType='inputOutput'/>
<field name='sizetype='SFFloataccessType='initializeOnly'/>
<field name='justifytype='MFStringaccessType='initializeOnly'/>
<field name='styletype='SFStringaccessType='initializeOnly'/>
<field name='familytype='MFStringaccessType='initializeOnly'/>
</ExternProtoDeclare>
<Background groundAngle='1.309 1.5707groundColor='0.1 0.1 0 0.4 0.25 0.2 0.6 0.6 0.6skyAngle='1.309 1.5707skyColor='0 0.5 1 0 0 1 0 0 1'
  backUrl=' "urn:web3d:media:textures/panoramas/horizon_3_back.jpg" "horizon_3_back.jpg " "../../Basic/UniversalMediaPanoramas/horizon_3_back.jpg " "https://www.web3d.org/WorkingGroups/media/textures/panoramas/horizon_3_back.jpg " "https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/horizon_3_back.jpg " "http://www.web3dmedia.com/UniversalMedia/textures/panoramas/horizon_3_back.jpg " "http://www.officetowers.com/UniversalMedia/textures/panoramas/horizon_3_back.jpg " "http://geometrek.com/UniversalMedia/textures/panoramas/horizon_3_back.jpg " "http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/horizon_3_back.jpg " '
  bottomUrl=' "urn:web3d:media:textures/panoramas/horizon_3_bottom.jpg" "horizon_3_bottom.jpg " "../../Basic/UniversalMediaPanoramas/horizon_3_bottom.jpg " "https://www.web3d.org/WorkingGroups/media/textures/panoramas/horizon_3_bottom.jpg " "https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/horizon_3_bottom.jpg " "http://www.web3dmedia.com/UniversalMedia/textures/panoramas/horizon_3_bottom.jpg " "http://www.officetowers.com/UniversalMedia/textures/panoramas/horizon_3_bottom.jpg " "http://geometrek.com/UniversalMedia/textures/panoramas/horizon_3_bottom.jpg " "http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/horizon_3_bottom.jpg " '
  frontUrl=' "urn:web3d:media:textures/panoramas/horizon_3_front.jpg" "horizon_3_front.jpg " "../../Basic/UniversalMediaPanoramas/horizon_3_front.jpg " "https://www.web3d.org/WorkingGroups/media/textures/panoramas/horizon_3_front.jpg " "https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/horizon_3_front.jpg " "http://www.web3dmedia.com/UniversalMedia/textures/panoramas/horizon_3_front.jpg " "http://www.officetowers.com/UniversalMedia/textures/panoramas/horizon_3_front.jpg " "http://geometrek.com/UniversalMedia/textures/panoramas/horizon_3_front.jpg " "http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/horizon_3_front.jpg " '
  leftUrl=' "urn:web3d:media:textures/panoramas/horizon_3_left.jpg" "horizon_3_left.jpg " "../../Basic/UniversalMediaPanoramas/horizon_3_left.jpg " "https://www.web3d.org/WorkingGroups/media/textures/panoramas/horizon_3_left.jpg " "https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/horizon_3_left.jpg " "http://www.web3dmedia.com/UniversalMedia/textures/panoramas/horizon_3_left.jpg " "http://www.officetowers.com/UniversalMedia/textures/panoramas/horizon_3_left.jpg " "http://geometrek.com/UniversalMedia/textures/panoramas/horizon_3_left.jpg " "http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/horizon_3_left.jpg " '
  rightUrl=' "urn:web3d:media:textures/panoramas/horizon_3_right.jpg" "horizon_3_right.jpg " "../../Basic/UniversalMediaPanoramas/horizon_3_right.jpg " "https://www.web3d.org/WorkingGroups/media/textures/panoramas/horizon_3_right.jpg " "https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/horizon_3_right.jpg " "http://www.web3dmedia.com/UniversalMedia/textures/panoramas/horizon_3_right.jpg " "http://www.officetowers.com/UniversalMedia/textures/panoramas/horizon_3_right.jpg " "http://geometrek.com/UniversalMedia/textures/panoramas/horizon_3_right.jpg " "http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/horizon_3_right.jpg " '
  topUrl=' "urn:web3d:media:textures/panoramas/horizon_3_top.jpg" "horizon_3_top.jpg " "../../Basic/UniversalMediaPanoramas/horizon_3_top.jpg " "https://www.web3d.org/WorkingGroups/media/textures/panoramas/horizon_3_top.jpg " "https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/horizon_3_top.jpg " "http://www.web3dmedia.com/UniversalMedia/textures/panoramas/horizon_3_top.jpg " "http://www.officetowers.com/UniversalMedia/textures/panoramas/horizon_3_top.jpg " "http://geometrek.com/UniversalMedia/textures/panoramas/horizon_3_top.jpg " "http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/horizon_3_top.jpg " ' />

<Switch whichChoice='-1'>
<Transform DEF='HudContenttranslation='-0.5 -0.5 .1'>
<ProtoInstance name='TextStringDEF='TopLabel'>
<fieldValue name='offsetvalue='-0.07 -.2 0'/>
<fieldValue name='stringvalue='"Position: "'/>
<fieldValue name='colorvalue='0 0 0'/>
<fieldValue name='sizevalue='.1'/>
</ProtoInstance>
<ProtoInstance name='TextStringDEF='BottomLabel'>
<fieldValue name='offsetvalue='-0.13 -.3 0'/>
<fieldValue name='stringvalue='"Orientation: "'/>
<fieldValue name='colorvalue='0 0 0'/>
<fieldValue name='sizevalue='.1'/>
</ProtoInstance>
<!-- ROUTE information for TopLine node:  [from ConvertValueScript.sfVec3fString to string ] -->
<ProtoInstance name='TextStringDEF='TopLine'>
<fieldValue name='offsetvalue='.5 -.2 0'/>
<fieldValue name='stringvalue='""'/>
<fieldValue name='colorvalue='0 0 1'/>
<fieldValue name='sizevalue='.1'/>
</ProtoInstance>
<!-- ROUTE information for BottomLine node:  [from ConvertValueScript.sfRotationString to string ] -->
<ProtoInstance name='TextStringDEF='BottomLine'>
<fieldValue name='offsetvalue='.5 -.3 0'/>
<fieldValue name='stringvalue='"0 1 0 0"'/>
<fieldValue name='colorvalue='0.1 .7 0.1'/>
<fieldValue name='sizevalue='.1'/>
</ProtoInstance>
<Transform translation='0.27 -0.25 -0.1'>
<Shape>
<Box size='1.4 0.25 0.01'/>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9transparency='0.5'/>
</Appearance>
</Shape>
</Transform>
</Transform>
</Switch>
<!-- ROUTE information for HeadsUpDisplayInstance node:  [from position_changed to ConvertValueScript.sfVec3f ] [from orientation_changed to ConvertValueScript.sfRotation ] -->
<ProtoInstance name='HeadsUpDisplayDEF='HeadsUpDisplayInstance'>
<fieldValue name='screenOffsetvalue='0.2 0.5 -2'/>
<fieldValue name='children'>
<Transform USE=' HudContent'/>
</fieldValue>
</ProtoInstance>
<field name='sfVec3ftype='SFVec3faccessType='inputOnly'/>
<field name='sfRotationtype='SFRotationaccessType='inputOnly'/>
<field name='sfVec3fStringtype='MFStringaccessType='outputOnly'/>
<field name='sfRotationStringtype='MFStringaccessType='outputOnly'/>
</Script>
< ROUTE  fromNode=' HeadsUpDisplayInstance' fromField='position_changed' toNode=' ConvertValueScript' toField='sfVec3f'/>
< ROUTE  fromNode=' HeadsUpDisplayInstance' fromField='orientation_changed' toNode=' ConvertValueScript' toField='sfRotation'/>
< ROUTE  fromNode=' ConvertValueScript' fromField='sfVec3fString' toNode=' TopLine' toField='string'/>
< ROUTE  fromNode=' ConvertValueScript' fromField='sfRotationString' toNode=' BottomLine' toField='string'/>
<Inline
  url=' "../KelpForestExhibit/KelpForestMain.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpForestMain.x3d" "../KelpForestExhibit//KelpForestMain.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpForestMain.wrl" ' />
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: BottomLabel, BottomLine, ConvertValueScript, HeadsUpDisplayInstance, HudContent, TopLabel, TopLine Index for ExternProtoDeclare definitions: HeadsUpDisplay, TextString
-->

Event Graph ROUTE Table entries with 4 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.

BottomLabel
ProtoInstance
TextString
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


      BottomLine
ProtoInstance
TextString
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


HeadsUpDisplayInstance
ProtoInstance
position_changed
SFVec3f

ROUTE
event to
(1)
ConvertValueScript
Script
sfVec3f
SFVec3f

 
 
then
ConvertValueScript
Script
sfRotationString
MFString

ROUTE
event to
(2)
BottomLine
ProtoInstance
string
MFString
 
 
 
then
ConvertValueScript
Script
sfVec3fString
MFString

ROUTE
event to
(2)
TopLine
ProtoInstance
string
MFString
HeadsUpDisplayInstance
ProtoInstance
orientation_changed
SFRotation

ROUTE
event to
(1)
ConvertValueScript
Script
sfRotation
SFRotation

 
 
then
ConvertValueScript
Script
sfRotationString
MFString

ROUTE
event to
(2)
BottomLine
ProtoInstance
string
MFString
 
 
 
then
ConvertValueScript
Script
sfVec3fString
MFString

ROUTE
event to
(2)
TopLine
ProtoInstance
string
MFString


TopLabel
ProtoInstance
TextString
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


      TopLine
ProtoInstance
TextString
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForestIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.x3d -->

<!-- Color 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> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->