<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.1//EN"   "http://www.web3d.org/specifications/x3d-3.1.dtd">
<X3D profile='Immersiveversion='3.1xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation=' http://www.web3d.org/specifications/x3d-3.1.xsd '>
<head>
<meta name='titlecontent='KeySensor-Lefty.x3d'/>
<meta name='descriptioncontent='A KeySensor is used to change Viewpoints of the shark Lefty.'/>
<meta name='creatorcontent='Leonard Daly and Don Brutzman'/>
<meta name='createdcontent='10 June 2006'/>
<meta name='modifiedcontent='8 October 2007'/>
<meta name='referencecontent=' http://X3dGraphics.com '/>
<meta name='referencecontent=' http://www.web3d.org/x3d/content/examples/help.html '/>
<meta name='rightscontent='Copyright 2006, Leonard Daly and Don Brutzman'/>
<meta name='subjectcontent=' X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com '/>
<meta name='identifiercontent=' http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter08-UserInteractivity/KeySensor-Lefty.x3d '/>
<meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent='../license.html'/>
</head>
<!--

Index for DEF nodes: KeyDetector, KeyHandler, OrientationControl, OrientationDisplay, ReOrient, Rotator, View1, View2, View3, View4, View5, View6
Index for Viewpoint images: View1, View2, View3, View4, View5, View6
-->
<Scene>
<Background skyColor='1 1 1'/>
<!-- View1 ROUTE:  [from KeyHandler.bind_View1 to set_bind ] -->
<Viewpoint DEF='View1description='From the Front'/>
<!-- View2 ROUTE:  [from KeyHandler.bind_View2 to set_bind ] -->
<Viewpoint DEF='View2description='From the Rightorientation='0 1 0 1.57position='10 0 0'/>
<!-- View3 ROUTE:  [from KeyHandler.bind_View3 to set_bind ] -->
<Viewpoint DEF='View3description='From Behindorientation='0 1 0 3.14position='0 0 -10'/>
<!-- View4 ROUTE:  [from KeyHandler.bind_View4 to set_bind ] -->
<Viewpoint DEF='View4description='From the Leftorientation='0 1 0 -1.57position='-10 0 0'/>
<!-- View5 ROUTE:  [from KeyHandler.bind_View5 to set_bind ] -->
<Viewpoint DEF='View5description='From the Toporientation='1 0 0 -1.57position='0 10 0'/>
<!-- View6 ROUTE:  [from KeyHandler.bind_View6 to set_bind ] -->
<Viewpoint DEF='View6description='From the Bottomorientation='1 0 0 1.57position='0 -10 0'/>
<Transform translation='-2 2 0'>
<Billboard axisOfRotation='0 0 0'>
<Shape>
<Appearance>
<Material diffuseColor='0 0 0'/>
</Appearance>
<Text string='"'n' for next Viewpoint." "'p' for previous Viewpoint."solid='true'>
<FontStyle family='"SAN SERIF"size='.5'/>
</Text>
</Shape>
</Billboard>
</Transform>
<Transform DEF='OrientationControltranslation='2 -2 3'>
<!-- Rotator ROUTEs:  [from rotation_changed to OrientationDisplay.rotation ] [from rotation_changed to ReOrient.rotation ] -->
<SphereSensor DEF='Rotator'/>
<!-- OrientationDisplay ROUTE:  [from Rotator.rotation_changed to rotation ] -->
<Transform DEF='OrientationDisplay'>
<Shape>
<Appearance>
<Material diffuseColor='0 0 1'/>
</Appearance>
<Sphere radius='.5'/>
</Shape>
</Transform>
</Transform>
<Transform scale='3 3 3'> </Transform>
<ROUTE fromNode='RotatorfromField='rotation_changedtoNode='OrientationDisplaytoField='rotation'/>
<ROUTE fromNode='RotatorfromField='rotation_changedtoNode='ReOrienttoField='rotation'/>
<!-- KeyDetector ROUTE:  [from keyPress to KeyHandler.keyPress ] -->
<KeySensor DEF='KeyDetectorenabled='true'/>
<!-- KeyHandler ROUTEs:  [from KeyDetector.keyPress to keyPress ] [from bind_View1 to View1.set_bind ] [from bind_View2 to View2.set_bind ] [from bind_View3 to View3.set_bind ] [from bind_View4 to View4.set_bind ] [from bind_View5 to View5.set_bind ] [from bind_View6 to View6.set_bind ] -->
<Script DEF='KeyHandler'
  url=' "keySensor.js" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter08-UserInteractivity/keySensor.js" '>
<field name='keyPresstype='SFStringaccessType='inputOnly'/>
<field name='ptrtype='SFInt32value='1accessType='initializeOnly'/>
<field name='bind_View1type='SFBoolaccessType='outputOnly'/>
<field name='bind_View2type='SFBoolaccessType='outputOnly'/>
<field name='bind_View3type='SFBoolaccessType='outputOnly'/>
<field name='bind_View4type='SFBoolaccessType='outputOnly'/>
<field name='bind_View5type='SFBoolaccessType='outputOnly'/>
<field name='bind_View6type='SFBoolaccessType='outputOnly'/>
</Script>
<ROUTE fromNode='KeyDetectorfromField='keyPresstoNode='KeyHandlertoField='keyPress'/>
<ROUTE fromNode='KeyHandlerfromField='bind_View1toNode='View1toField='set_bind'/>
<ROUTE fromNode='KeyHandlerfromField='bind_View2toNode='View2toField='set_bind'/>
<ROUTE fromNode='KeyHandlerfromField='bind_View3toNode='View3toField='set_bind'/>
<ROUTE fromNode='KeyHandlerfromField='bind_View4toNode='View4toField='set_bind'/>
<ROUTE fromNode='KeyHandlerfromField='bind_View5toNode='View5toField='set_bind'/>
<ROUTE fromNode='KeyHandlerfromField='bind_View6toNode='View6toField='set_bind'/>
</Scene>
</X3D>
<!--

Index for DEF nodes: KeyDetector, KeyHandler, OrientationControl, OrientationDisplay, ReOrient, Rotator, View1, View2, View3, View4, View5, View6
Index for Viewpoint images: View1, View2, View3, View4, View5, View6
-->

<!-- Tag color codes: <Node DEF='idName' attribute='value'/> -->