<?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='Interactive' 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='Figure09.1SpinningCubeTouchSensor.x3d'/>
<meta name='creatorcontent='Figure 9.1, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
<meta name='referencecontent=' http://www.wiley.com/legacy/compbooks/vrml2sbk/ch09/09fig01.htm '/>
<meta name='transcribercontent='Don Brutzman'/>
<meta name='createdcontent='9 August 2000'/>
<meta name='modifiedcontent='25 March 2012'/>
<meta name='descriptioncontent='A cube that spins when the cursor moves over it. Also see Figure 9.2 for comparison.'/>
<meta name='referencecontent='Figure09.2SpinningCubeTouchSensorClicked.x3d'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09-SensingViewer/Figure09.1SpinningCubeTouchSensor.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<!-- Rotating Cube -->
<Group>
<!-- CUBE_TRANSFORM ROUTE:  [from CubePathInterpolator.value_changed to set_rotation ] -->
<Transform DEF='CUBE_TRANSFORM'>
<Shape>
<Box/>
<Appearance>
<Material diffuseColor='.5 .5 .5'/>
</Appearance>
</Shape>
</Transform>
<!-- MyTouchSensor ROUTE:  [from isOver to CLOCK.set_enabled ] -->
<TouchSensor DEF='MyTouchSensordescription='Point at box to spin it'/>
<!-- CLOCK ROUTEs:  [from MyTouchSensor.isOver to set_enabled ] [from fraction_changed to CubePathInterpolator.set_fraction ] -->
<TimeSensor DEF='CLOCKcycleInterval='4enabled='falseloop='true'/>
<!-- CubePathInterpolator ROUTEs:  [from CLOCK.fraction_changed to set_fraction ] [from value_changed to CUBE_TRANSFORM.set_rotation ] -->
<OrientationInterpolator DEF='CubePathInterpolatorkey='0.0 0.50 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 3.14 0.0 1.0 0.0 6.28'/>
</Group>
<!-- Note that we are connecting a Boolean output to a Boolean input in the first ROUTE. -->
<ROUTE fromNode='MyTouchSensorfromField='isOvertoNode='CLOCKtoField='set_enabled'/>
<ROUTE fromNode='CLOCKfromField='fraction_changedtoNode='CubePathInterpolatortoField='set_fraction'/>
<ROUTE fromNode='CubePathInterpolatorfromField='value_changedtoNode='CUBE_TRANSFORMtoField='set_rotation'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : CLOCK, CUBE_TRANSFORM, CubePathInterpolator, MyTouchSensor
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/> -->

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