<?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='Figure09.8ClickDragTouchSensorPlaneSensorWithAxes.x3d'/>
<meta name='creatorcontent='Figure 9.8, 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/09fig08.htm '/>
<meta name='transcribercontent='Don Brutzman'/>
<meta name='createdcontent='12 August 2000'/>
<meta name='modifiedcontent='9 March 2014'/>
<meta name='descriptioncontent='A cube that spins when the cursor moves over it and translates when the cursor drags it, with coordinate axes superimposed to show X3D/VRML directions.'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter09-SensingViewer/Figure09.8ClickDragTouchSensorPlaneSensorWithAxes.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<!-- Click and drag to spin and move shapes. Superfluous Group nodes removed. -->
<Group>
<!-- ROTATING_SHAPE_TRANSFORM ROUTEs:  [from SPIN_PATH.value_changed to set_rotation ] [from DRAG_SENSOR.translation_changed to set_translation ] -->
<Transform DEF='ROTATING_SHAPE_TRANSFORM'>
<Shape>
<Box size='1.414 1.414 1.414'/>
<Appearance>
<Material diffuseColor='.1 .9 .9emissiveColor='.05 .2 .2'/>
</Appearance>
</Shape>
</Transform>
<!-- IS_OVER_SENSOR ROUTE:  [from isOver to CLOCK.set_enabled ] -->
<TouchSensor DEF='IS_OVER_SENSORdescription='Touch to spin'/>
<!-- DRAG_SENSOR ROUTE:  [from translation_changed to ROTATING_SHAPE_TRANSFORM.set_translation ] -->
<PlaneSensor DEF='DRAG_SENSORdescription='Click to drag in planemaxPosition='4 4minPosition='-4 -4'/>
<!-- CLOCK ROUTEs:  [from IS_OVER_SENSOR.isOver to set_enabled ] [from fraction_changed to SPIN_PATH.set_fraction ] -->
<TimeSensor DEF='CLOCKcycleInterval='4enabled='falseloop='true'/>
<!-- SPIN_PATH ROUTEs:  [from CLOCK.fraction_changed to set_fraction ] [from value_changed to ROTATING_SHAPE_TRANSFORM.set_rotation ] -->
<OrientationInterpolator DEF='SPIN_PATHkey='0 0.5 1keyValue='0 1 0 0 0 1 0 3.14 0 1 0 6.28'/>
</Group>
<!-- A small transparent box is added to indicate the virtual geometry of the PlaneSensor -->
<Transform DEF='TRANSPARENT_BOX_TRANSFORM'>
<Shape>
<Box size='8 8 0.1'/>
<Appearance>
<Material diffuseColor='.7 .7 .7transparency='.5'/>
</Appearance>
</Shape>
</Transform>
<!-- Adding this Inline reference to another scene superimposes X3D/VRML coordinate system axes. -->
<Transform scale='4 4 4'> </Transform>
<!-- Note that we are connecting a chain of behavior engines in these ROUTEs. The event types passed via each ROUTE must each match. -->
<ROUTE fromNode='IS_OVER_SENSORfromField='isOvertoNode='CLOCKtoField='set_enabled'/>
<ROUTE fromNode='CLOCKfromField='fraction_changedtoNode='SPIN_PATHtoField='set_fraction'/>
<ROUTE fromNode='SPIN_PATHfromField='value_changedtoNode='ROTATING_SHAPE_TRANSFORMtoField='set_rotation'/>
<ROUTE fromNode='DRAG_SENSORfromField='translation_changedtoNode='ROTATING_SHAPE_TRANSFORMtoField='set_translation'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : CLOCK, CoordinateAxes, DRAG_SENSOR, IS_OVER_SENSOR, ROTATING_SHAPE_TRANSFORM, SPIN_PATH, TRANSPARENT_BOX_TRANSFORM
-->

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