<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='SeaStateElevationGridExample.x3d'/>
<meta name='descriptioncontent='Sea State animation using ElevationGrid.'/>
<meta name='creatorcontent='Don Brutzman, Marcus Simoes and MV3204 class'/>
<meta name='createdcontent='25 May 2001'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name=' warning content=' unfinished, but in progress... '/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/Environment/SeaState/SeaStateElevationGridExample.x3d '/>
<meta name='referencecontent='SeaStateExtrusionExample.x3d'/>
<meta name='subjectcontent='sea state, MFFloat interpolator script'/>
<meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!--

Index for DEF nodes : MFFloatInterpolatorScript, WaveClock, WaveGrid

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<WorldInfo title='SeaStateElevationGridExample.x3d'/>
<Viewpoint description='hello sea stateorientation='1 0 0 -0.78position='0 5 5'/>
<!-- ROUTE information for WaveClock node:  [from fraction_changed to MFFloatInterpolatorScript.set_fraction ] -->
<TimeSensor DEF='WaveClockcycleInterval='3loop='true'/>
<!-- WaveHeightCalculationScript -->
<!-- ROUTE information for MFFloatInterpolatorScript node:  [from WaveClock.fraction_changed to set_fraction ] [from value_changed to WaveGrid.set_height ] -->
<Script DEF='MFFloatInterpolatorScript'>
<field name='set_fractiontype='SFFloataccessType='inputOnly'/>
<field name='keytype='MFFloataccessType='inputOutput'/>
<field name='keyValuetype='MFFloataccessType='inputOutput'/>
<field name='value_changedtype='MFFloataccessType='outputOnly'/>
<![CDATA[
      
ecmascript:

function set_fraction (value, timestamp)
{
//	Browser.print ('received value=' + value);

//	interpolate between values in our keyValue array
}

    
]]>
</Script>
<Shape bboxCenter='0 0 0bboxSize='-1 -1 -1'>
<!-- ROUTE information for WaveGrid node:  [from MFFloatInterpolatorScript.value_changed to set_height ] -->
<ElevationGrid DEF='WaveGridxDimension='3zDimension='3height='0 0 0 0 0 0 0 0 0'/>
<Appearance>
<Material diffuseColor='0 0.6 0.6'/>
</Appearance>
</Shape>
<ROUTE fromNode='WaveClockfromField='fraction_changedtoNode='MFFloatInterpolatorScripttoField='set_fraction'/>
<ROUTE fromNode='MFFloatInterpolatorScriptfromField='value_changedtoNode='WaveGridtoField='set_height'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : MFFloatInterpolatorScript, WaveClock, WaveGrid

Index for Viewpoint image : Viewpoint_1
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->