<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.3.xsd '>
<meta name='titlecontent='SphereSensorLefty.x3d'/>
<meta name='descriptioncontent='Using a separate SphereSensor, Lefty shark can be oriented in any direction by remote control. Navigation locked so that no other scene rotation is possible.'/>
<meta name='creatorcontent='Leonard Daly and Don Brutzman'/>
<meta name='createdcontent='10 June 2006'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name=' warning content=' Xj3D not supporting SphereSensor autoOffset field correctly '/>
<meta name='referencecontent=' https://X3dGraphics.com '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.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=' https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter08UserInteractivity/SphereSensorLefty.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
<!-- -->
<WorldInfo title='SphereSensorLefty.x3d'/>
<Background skyColor='1 1 1'/>
<NavigationInfo DEF='LockUserSceneRotationtype='"NONE"'/>
<Viewpoint description='Book Vieworientation='0 -1 0 0.05position='-0.06 -0.29 8.78'/>
<Transform DEF='UserInterfaceTranslationtranslation='2 -2 3'>
<!-- Note that splitting the single Transform into two, and embedding SphereSensor here, shields it from affecting other nodes in scene -->
<!-- ROUTE information for Rotator node:  [from rotation_changed to SharkRotation.rotation ] [from rotation_changed to UserInterfaceRotation.rotation ] -->
<SphereSensor DEF='Rotatordescription='drag sphere to rotate Lefty'/>
<!-- this nested Transform allows rotation about the center of the local coordinate frame -->
<!-- ROUTE information for UserInterfaceRotation node:  [from Rotator.rotation_changed to rotation ] -->
<Transform DEF='UserInterfaceRotation'>
<Material diffuseColor='0 0 1'/>
<Sphere radius='.5'/>
<!-- note that the shark is translated to a different coordinate reference frame, so the SphereSensor is like a remote control -->
<!-- ROUTE information for SharkRotation node:  [from Rotator.rotation_changed to rotation ] -->
<Transform DEF='SharkRotationtranslation='0 0 7'> </Transform>
<ROUTE fromNode='RotatorfromField='rotation_changedtoNode='SharkRotationtoField='rotation'/>
<!-- note that the shark will rotate without this ROUTE but that user interaction feels smoother and more natural -->
<ROUTE fromNode='RotatorfromField='rotation_changedtoNode='UserInterfaceRotationtoField='rotation'/>

Index for DEF nodes : LockUserSceneRotation, Rotator, SharkRotation, UserInterfaceRotation, UserInterfaceTranslation

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)

<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources and X3D Scene Authoring Hints. -->