<?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='BooleanSequencerExample.x3d'/>
<meta name='descriptioncontent='This example shows how to use the BooleanSequencer prototype in an animated scenario.'/>
<meta name='creatorcontent='Don Brutzman, Estuko Lippi, Jeff Weekley, Jane Wu'/>
<meta name='createdcontent='10 August 2001'/>
<meta name='modifiedcontent='12 January 2014'/>
<meta name='referencecontent=' http://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#ScalarInterpolator '/>
<meta name='subjectcontent='boolean sequencer'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Basic/development/BooleanSequencerExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<Group DEF='HUDGroup'>
<!-- ROUTE information for WhereSensor node:  [from position_changed to BillboardWhereTransform.set_translation ] [from orientation_changed to BillboardWhereTransform.set_rotation ] -->
<ProximitySensor DEF='WhereSensorsize='1000 1000 1000'/>
<!-- ROUTE information for BillboardWhereTransform node:  [from WhereSensor.position_changed to set_translation ] [from WhereSensor.orientation_changed to set_rotation ] -->
<Transform DEF='BillboardWhereTransform'>
<Transform rotation='1 0 0 -0.03translation='0 0 -12'>
<Billboard>
<Transform DEF='BillboardPlaneTransform'>
<!-- ROUTE information for Toucher node:  [from touchTime to Clock.set_startTime ] -->
<TouchSensor DEF='Toucherdescription='Click text to start clock and run multiple BooleanSequencers'/>
<Shape>
<Appearance>
<Material diffuseColor='0 1 1'/>
</Appearance>
<Text string='"Click text to start clock, run" "multiple BooleanSequencers" "" "" "" "See Viewpoint description" "for bound Viewpoint number"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
</Shape>
</Transform>
</Billboard>
</Transform>
</Transform>
<ROUTE fromNode='WhereSensorfromField='position_changedtoNode='BillboardWhereTransformtoField='set_translation'/>
<ROUTE fromNode='WhereSensorfromField='orientation_changedtoNode='BillboardWhereTransformtoField='set_rotation'/>
</Group>
<!-- ROUTE information for Clock node:  [from Toucher.touchTime to set_startTime ] [from fraction_changed to LeftViewBinder.set_fraction ] [from fraction_changed to BackViewBinder.set_fraction ] [from fraction_changed to RightViewBinder.set_fraction ] [from fraction_changed to TopViewBinder.set_fraction ] [from fraction_changed to FrontDownViewBinder.set_fraction ] [from fraction_changed to BottomViewBinder.set_fraction ] [from fraction_changed to Debug.setFraction ] -->
<TimeSensor DEF='ClockcycleInterval='10'/>
<ROUTE fromNode='ToucherfromField='touchTimetoNode='ClocktoField='set_startTime'/>
<!-- ROUTE information for FrontUpViewpoint node:  [from isBound to Debug.setFrontUpViewBind ] -->
<Viewpoint DEF='FrontUpViewpointdescription='View 0, Front Up'/>
<Group DEF='AnimatedView1'>
<!-- ROUTE information for LeftViewpoint node:  [from LeftViewBinder.value_changed to set_bind ] [from isBound to Debug.setLeftViewBind ] -->
<Viewpoint DEF='LeftViewpointdescription='View 1, Leftorientation='0 1 0 -1.57position='-10 0 0'/>
<!-- ROUTE information for LeftViewBinder node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to LeftViewpoint.set_bind ] [from value_changed to Debug.setLeftBSOutput ] -->
<BooleanSequencer DEF='LeftViewBinderkey='0 0.1 0.25keyValue='false true falsecontainerField='children'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='LeftViewBindertoField='set_fraction'/>
<ROUTE fromNode='LeftViewBinderfromField='value_changedtoNode='LeftViewpointtoField='set_bind'/>
</Group>
<Group DEF='AnimatedView2'>
<!-- ROUTE information for BackViewpoint node:  [from BackViewBinder.value_changed to set_bind ] [from isBound to Debug.setBackViewBind ] -->
<Viewpoint DEF='BackViewpointdescription='View 2, Backorientation='0 1 0 -3.14position='0 0 -10'/>
<!-- ROUTE information for BackViewBinder node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to BackViewpoint.set_bind ] [from value_changed to Debug.setBackBSOutput ] -->
<BooleanSequencer DEF='BackViewBinderkey='0 0.375 0.475keyValue='false true falsecontainerField='children'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='BackViewBindertoField='set_fraction'/>
<ROUTE fromNode='BackViewBinderfromField='value_changedtoNode='BackViewpointtoField='set_bind'/>
</Group>
<Group DEF='AnimatedView3'>
<!-- ROUTE information for RightViewpoint node:  [from RightViewBinder.value_changed to set_bind ] [from isBound to Debug.setRightViewBind ] -->
<Viewpoint DEF='RightViewpointdescription='View 3, Rightorientation='0 1 0 1.57position='10 0 0'/>
<!-- ROUTE information for RightViewBinder node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to RightViewpoint.set_bind ] [from value_changed to Debug.setRightBSOutput ] -->
<BooleanSequencer DEF='RightViewBinderkey='0 0.5 0.6keyValue='false true falsecontainerField='children'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='RightViewBindertoField='set_fraction'/>
<ROUTE fromNode='RightViewBinderfromField='value_changedtoNode='RightViewpointtoField='set_bind'/>
</Group>
<Group DEF='AnimatedView4'>
<!-- ROUTE information for TopViewpoint node:  [from TopViewBinder.value_changed to set_bind ] [from isBound to Debug.setTopViewBind ] -->
<Viewpoint DEF='TopViewpointdescription='View 4, Toporientation='1 0 0 -1.57position='0 10 0'/>
<!-- ROUTE information for TopViewBinder node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to TopViewpoint.set_bind ] [from value_changed to Debug.setTopBSOutput ] -->
<BooleanSequencer DEF='TopViewBinderkey='0.625 0.725keyValue='true falsecontainerField='children'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='TopViewBindertoField='set_fraction'/>
<ROUTE fromNode='TopViewBinderfromField='value_changedtoNode='TopViewpointtoField='set_bind'/>
</Group>
<Group DEF='AnimatedView5'>
<!-- ROUTE information for FrontDownViewpoint node:  [from FrontDownViewBinder.value_changed to set_bind ] [from isBound to Debug.setFrontDownViewBind ] -->
<Viewpoint DEF='FrontDownViewpointdescription='View 5, Front Downorientation='1 0 0 -3.14position='0 0 -10'/>
<!-- ROUTE information for FrontDownViewBinder node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to FrontDownViewpoint.set_bind ] [from value_changed to Debug.setFrontDownBSOutput ] -->
<BooleanSequencer DEF='FrontDownViewBinderkey='0.75 0.85keyValue='true falsecontainerField='children'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='FrontDownViewBindertoField='set_fraction'/>
<ROUTE fromNode='FrontDownViewBinderfromField='value_changedtoNode='FrontDownViewpointtoField='set_bind'/>
</Group>
<Group DEF='AnimatedView6'>
<!-- ROUTE information for BottomViewpoint node:  [from BottomViewBinder.value_changed to set_bind ] [from isBound to Debug.setBottomViewBind ] -->
<Viewpoint DEF='BottomViewpointdescription='View 6, Bottomorientation='1 0 0 1.57position='0 -10 0'/>
<!-- ROUTE information for BottomViewBinder node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to BottomViewpoint.set_bind ] [from value_changed to Debug.setBottomBSOutput ] -->
<BooleanSequencer DEF='BottomViewBinderkey='0.875 0.975keyValue='true falsecontainerField='children'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='BottomViewBindertoField='set_fraction'/>
<ROUTE fromNode='BottomViewBinderfromField='value_changedtoNode='BottomViewpointtoField='set_bind'/>
</Group>
<Switch DEF='DebugSwitchwhichChoice='0'>
<Group>
<!-- ROUTE information for Debug node:  [from Clock.fraction_changed to setFraction ] [from FrontUpViewpoint.isBound to setFrontUpViewBind ] [from LeftViewpoint.isBound to setLeftViewBind ] [from BackViewpoint.isBound to setBackViewBind ] [from RightViewpoint.isBound to setRightViewBind ] [from TopViewpoint.isBound to setTopViewBind ] [from FrontDownViewpoint.isBound to setFrontDownViewBind ] [from BottomViewpoint.isBound to setBottomViewBind ] [from LeftViewBinder.value_changed to setLeftBSOutput ] [from BackViewBinder.value_changed to setBackBSOutput ] [from RightViewBinder.value_changed to setRightBSOutput ] [from TopViewBinder.value_changed to setTopBSOutput ] [from FrontDownViewBinder.value_changed to setFrontDownBSOutput ] [from BottomViewBinder.value_changed to setBottomBSOutput ] -->
<Script DEF='Debug'>
<field name='setFractiontype='SFFloataccessType='inputOnly'/>
<field name='setFrontUpViewBindtype='SFBoolaccessType='inputOnly'/>
<field name='setLeftViewBindtype='SFBoolaccessType='inputOnly'/>
<field name='setBackViewBindtype='SFBoolaccessType='inputOnly'/>
<field name='setRightViewBindtype='SFBoolaccessType='inputOnly'/>
<field name='setTopViewBindtype='SFBoolaccessType='inputOnly'/>
<field name='setFrontDownViewBindtype='SFBoolaccessType='inputOnly'/>
<field name='setBottomViewBindtype='SFBoolaccessType='inputOnly'/>
<field name='setFrontUpBSOutputtype='SFBoolaccessType='inputOnly'/>
<field name='setLeftBSOutputtype='SFBoolaccessType='inputOnly'/>
<field name='setBackBSOutputtype='SFBoolaccessType='inputOnly'/>
<field name='setRightBSOutputtype='SFBoolaccessType='inputOnly'/>
<field name='setTopBSOutputtype='SFBoolaccessType='inputOnly'/>
<field name='setFrontDownBSOutputtype='SFBoolaccessType='inputOnly'/>
<field name='setBottomBSOutputtype='SFBoolaccessType='inputOnly'/>
<![CDATA[
          
ecmascript:

function setFraction(value, timeStamp)
{
	Browser.print ('fraction =' + value);
}

function setFrontUpViewBind(value, timeStamp)
{
	Browser.print ('FrontUpView bind:' + value);
}

function setLeftViewBind(value, timeStamp)
{
	Browser.print ('LeftView bind:' + value);
}

function setBackViewBind(value, timeStamp)
{
	Browser.print ('BackView bind:' + value);
}

function setRightViewBind(value, timeStamp)
{
	Browser.print ('RightView bind:' + value);
}

function setTopViewBind(value, timeStamp)
{
	Browser.print ('TopView bind:' + value);
}

function setFrontDownViewBind(value, timeStamp)
{
	Browser.print ('FrontDownView bind:' + value);
}

function setBottomViewBind(value, timeStamp)
{
	Browser.print ('BottomView bind:' + value);
}

function setFrontUpBSOutput(value, timeStamp)
{
	Browser.print ('BooleanSequencer output for FrontUpViewpoint:' + value);
}

function setLeftBSOutput(value, timeStamp)
{
	Browser.print ('BooleanSequencer output for LeftViewpoint:' + value);
}

function setBackBSOutput(value, timeStamp)
{
	Browser.print ('BooleanSequencer output for BackViewpoint:' + value);
}

function setRightBSOutput(value, timeStamp)
{
	Browser.print ('BooleanSequencer output for RightViewpoint:' + value);
}

function setTopBSOutput(value, timeStamp)
{
	Browser.print ('BooleanSequencer output for TopViewpoint:' + value);
}

function setFrontDownBSOutput(value, timeStamp)
{
	Browser.print ('BooleanSequencer output for FrontDownViewpoint:' + value);
}

function setBottomBSOutput(value, timeStamp)
{
	Browser.print ('BooleanSequencer output for BottomViewpoint:' + value);
}

        
]]>
</Script>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='DebugtoField='setFraction'/>
<ROUTE fromNode='FrontUpViewpointfromField='isBoundtoNode='DebugtoField='setFrontUpViewBind'/>
<ROUTE fromNode='LeftViewpointfromField='isBoundtoNode='DebugtoField='setLeftViewBind'/>
<ROUTE fromNode='BackViewpointfromField='isBoundtoNode='DebugtoField='setBackViewBind'/>
<ROUTE fromNode='RightViewpointfromField='isBoundtoNode='DebugtoField='setRightViewBind'/>
<ROUTE fromNode='TopViewpointfromField='isBoundtoNode='DebugtoField='setTopViewBind'/>
<ROUTE fromNode='FrontDownViewpointfromField='isBoundtoNode='DebugtoField='setFrontDownViewBind'/>
<ROUTE fromNode='BottomViewpointfromField='isBoundtoNode='DebugtoField='setBottomViewBind'/>
<ROUTE fromNode='LeftViewBinderfromField='value_changedtoNode='DebugtoField='setLeftBSOutput'/>
<ROUTE fromNode='BackViewBinderfromField='value_changedtoNode='DebugtoField='setBackBSOutput'/>
<ROUTE fromNode='RightViewBinderfromField='value_changedtoNode='DebugtoField='setRightBSOutput'/>
<ROUTE fromNode='TopViewBinderfromField='value_changedtoNode='DebugtoField='setTopBSOutput'/>
<ROUTE fromNode='FrontDownViewBinderfromField='value_changedtoNode='DebugtoField='setFrontDownBSOutput'/>
<ROUTE fromNode='BottomViewBinderfromField='value_changedtoNode='DebugtoField='setBottomBSOutput'/>
</Group>
</Switch>
<Transform>
<Shape>
<Appearance>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Box size='2 0.1 0.35'/>
</Shape>
<Transform translation='-1 0 0'>
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Sphere radius='0.2'/>
</Shape>
</Transform>
<Transform translation='1 0 0'>
<Shape>
<Appearance>
<Material diffuseColor='0 1 0'/>
</Appearance>
<Sphere radius='0.2'/>
</Shape>
</Transform>
</Transform>
<Transform>
<Shape>
<Appearance>
<Material diffuseColor='0 0 1'/>
</Appearance>
<Cone/>
</Shape>
</Transform>
</Scene>
</X3D>
<!--

Index for DEF nodes : AnimatedView1, AnimatedView2, AnimatedView3, AnimatedView4, AnimatedView5, AnimatedView6, BackViewBinder, BackViewpoint, BillboardPlaneTransform, BillboardWhereTransform, BottomViewBinder, BottomViewpoint, Clock, Debug, DebugSwitch, FrontDownViewBinder, FrontDownViewpoint, FrontUpViewpoint, HUDGroup, LeftViewBinder, LeftViewpoint, RightViewBinder, RightViewpoint, TopViewBinder, TopViewpoint, Toucher, WhereSensor

Index for Viewpoint images : BackViewpoint, BottomViewpoint, FrontDownViewpoint, FrontUpViewpoint, LeftViewpoint, RightViewpoint, TopViewpoint
-->

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