<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile='Immersiveversion='3.2xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation=' http://www.web3d.org/specifications/x3d-3.2.xsd '>
<head>
<meta name='titlecontent='CameraExamples.x3d'/>
<meta name='descriptioncontent='Camera, CameraShot and CameraMove examples that demonstrate storyboard capabilities and precise camera operation. This is a developmental effort for potential X3D Specification improvement.'/>
<meta name='creatorcontent='Don Brutzman and Jeff Weekley'/>
<meta name='createdcontent='18 June 2009'/>
<meta name='modifiedcontent='25 December 2010'/>
<meta name='TODOcontent='Schematron rules, backed up by initialize() checks'/>
<meta name='referencecontent='BeyondViewpointCameraNodesWeb3D2009.pdf'/>
<meta name='referencecontent=' http://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/navigation.html '/>
<meta name='subjectcontent='Camera nodes for Viewpoint navigation control'/>
<meta name='referencecontent='CameraPrototypes.x3d'/>
<meta name='referencecontent='CameraExamplesConsoleLog.txt'/>
<meta name='referencecontent=' http://x3d.svn.sourceforge.net/viewvc/x3d/www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.avi '/>
<meta name='referencecontent=' http://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/gridBack.x3d '/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.x3d '/>
<meta name='identifiercontent=' http://x3d.svn.sourceforge.net/viewvc/x3d/www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<!-- =============== Camera ============== -->
<ExternProtoDeclare name='Cameraappinfo='Camera node provides direct control of scene view to enable cinematic camera animation shot by shot and move by move along with still digital-photography settings for offline rendering of camera images'
  url=' "CameraPrototypes.x3d#Camera" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#Camera" "CameraPrototypes.wrl#Camera" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#Camera" '>
<!-- Viewpoint-related fields, NavigationInfo-related fields and Camera-unique fields -->
<field name='descriptiontype='SFStringaccessType='inputOutput'
 appinfo='Text description to be displayed for this Camera'/>
<field name='positiontype='SFVec3faccessType='inputOutput'
 appinfo='Camera position in local transformation frame, which is default prior to first CameraShot initialPosition getting activated'/>
<field name='orientationtype='SFRotationaccessType='inputOutput'
 appinfo='Camera rotation in local transformation frame, which is default prior to first CameraShot initialPosition getting activated'/>
<field name='fieldOfViewtype='SFFloataccessType='inputOutput'
 appinfo='pi/4'/>
<field name='set_fractiontype='SFFloataccessType='inputOnly'
 appinfo='input fraction drives interpolators'/>
<field name='set_bindtype='SFBoolaccessType='inputOnly'
 appinfo='input event binds or unbinds this Camera'/>
<field name='bindTimetype='SFTimeaccessType='outputOnly'
 appinfo='output event indicates when this Camera is bound'/>
<field name='isBoundtype='SFBoolaccessType='outputOnly'
 appinfo='output event indicates whether this Camera is bound or unbound'/>
<field name='nearClipPlanetype='SFFloataccessType='inputOutput'
 appinfo='Vector distance to near clipping plane corresponds to NavigationInfo.avatarSize[0]'/>
<field name='farClipPlanetype='SFFloataccessType='inputOutput'
 appinfo='Vector distance to far clipping plane corresponds to NavigationInfo.visibilityLimit'/>
<field name='shotstype='MFNodeaccessType='inputOutput'
 appinfo='Array of CameraShot nodes which in turn contain CameraMovement nodes'/>
<field name='headlighttype='SFBoolaccessType='inputOutput'
 appinfo='Whether camera headlight is on or off'/>
<field name='headlightColortype='SFColoraccessType='inputOutput'
 appinfo='Camera headlight color'/>
<field name='headlightIntensitytype='SFFloataccessType='inputOutput'
 appinfo='Camera headlight intensity'/>
<field name='filterColortype='SFColoraccessType='inputOutput'
 appinfo='Camera filter color that modifies virtual lens capture'/>
<field name='filterTransparencytype='SFFloataccessType='inputOutput'
 appinfo='Camera filter transparency that modifies virtual lens capture'/>
<field name='upVectortype='SFVec3faccessType='inputOutput'
 appinfo='upVector changes modify camera orientation (and possibly vice versa)'/>
<field name='fStoptype='SFFloataccessType='inputOutput'
 appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/>
<field name='focusDistancetype='SFFloataccessType='inputOutput'
 appinfo='Distance to focal plane of sharpest focus'/>
<field name='isActivetype='SFBoolaccessType='outputOnly'
 appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/>
<field name='totalDurationtype='SFTimeaccessType='outputOnly'
 appinfo='Total duration of contained enabled CameraShot (and thus CameraMovement) move durations'/>
<field name='offlineRendertype='SFNodeaccessType='inputOutput'
 appinfo='OfflineRender node'/>
<field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
 appinfo='enable console output to trace script computations and prototype progress'/>
</ExternProtoDeclare>
<!-- =============== CameraShot ============== -->
<ExternProtoDeclare name='CameraShotappinfo='CameraShot collects a specific set of CameraMovement animations that make up an individual shot'
  url=' "CameraPrototypes.x3d#CameraShot" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#CameraShot" "CameraPrototypes.wrl#CameraShot" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#CameraShot" '>
<field name='descriptiontype='SFStringaccessType='inputOutput'
 appinfo='Text description to be displayed for this CameraShot'/>
<field name='enabledtype='SFBoolaccessType='inputOutput'
 appinfo='Whether this CameraShot can be activated'/>
<field name='movestype='MFNodeaccessType='inputOutput'
 appinfo='Set of CameraMovement nodes'/>
<field name='initialPositiontype='SFVec3faccessType='inputOutput'
 appinfo='Setup to reinitialize camera position for this shot'/>
<field name='initialOrientationtype='SFRotationaccessType='inputOutput'
 appinfo='Setup to reinitialize camera rotation for this shot'/>
<field name='initialAimPointtype='SFVec3faccessType='inputOutput'
 appinfo='Setup to reinitialize aimpoint (relative location for camera direction) for this shot'/>
<field name='initialFieldOfViewtype='SFFloataccessType='inputOutput'
 appinfo='pi/4'/>
<field name='initialFStoptype='SFFloataccessType='inputOutput'
 appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/>
<field name='initialFocusDistancetype='SFFloataccessType='inputOutput'
 appinfo='Distance to focal plane of sharpest focus'/>
<field name='shotDurationtype='SFTimeaccessType='outputOnly'
 appinfo='Subtotal duration of contained CameraMovement move durations'/>
<field name='isActivetype='SFBoolaccessType='outputOnly'
 appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/>
<field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
 appinfo='enable console output to trace script computations and prototype progress'/>
</ExternProtoDeclare>
<!-- =============== CameraMovement ============== -->
<ExternProtoDeclare name='CameraMovementappinfo='CameraMovement defines a single camera movement animation'
  url=' "CameraPrototypes.x3d#CameraMovement" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#CameraMovement" "CameraPrototypes.wrl#CameraMovement" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#CameraMovement" '>
<field name='descriptiontype='SFStringaccessType='inputOutput'
 appinfo='Text description to be displayed for this CameraMovement'/>
<field name='enabledtype='SFBoolaccessType='inputOutput'
 appinfo='Whether this CameraMovement can be activated'/>
<field name='durationtype='SFFloataccessType='inputOutput'
 appinfo='Duration in seconds for this move'/>
<field name='goalPositiontype='SFVec3faccessType='inputOutput'
 appinfo='Goal camera position for this move'/>
<field name='goalOrientationtype='SFRotationaccessType='inputOutput'
 appinfo='Goal camera rotation for this move'/>
<field name='trackingtype='SFBoolaccessType='inputOutput'
 appinfo='Whether or not camera direction is tracking towards the aimPoint'/>
<field name='goalAimPointtype='SFVec3faccessType='inputOutput'
 appinfo='Goal aimPoint for this move, ignored if tracking=false'/>
<field name='goalFieldOfViewtype='SFFloataccessType='inputOutput'
 appinfo='Goal fieldOfView for this move'/>
<field name='goalFStoptype='SFFloataccessType='inputOutput'
 appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/>
<field name='goalFocusDistancetype='SFFloataccessType='inputOutput'
 appinfo='Distance to focal plane of sharpest focus'/>
<field name='isActivetype='SFBoolaccessType='outputOnly'
 appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/>
<field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
 appinfo='enable console output to trace script computations and prototype progress'/>
</ExternProtoDeclare>
<!-- =============== OfflineRender ============== -->
<ExternProtoDeclare name='OfflineRenderappinfo='OfflineRender defines a parameters for offline rendering of Camera animation output to a movie file (or possibly a still shot)'
  url=' "CameraPrototypes.x3d#OfflineRender" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#OfflineRender" "CameraPrototypes.wrl#OfflineRender" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#OfflineRender" '>
<!-- TODO non-photorealistic rendering (NPR) parameters -->
<field name='descriptiontype='SFStringaccessType='inputOutput'
 appinfo='Text description to be displayed for this OfflineRender'/>
<field name='enabledtype='SFBoolaccessType='inputOutput'
 appinfo='Whether this OfflineRender can be activated'/>
<field name='frameRatetype='SFFloataccessType='inputOutput'
 appinfo='Frames per second recorded for this rendering'/>
<field name='frameSizetype='SFVec2faccessType='inputOutput'
 appinfo='Size of frame in number of pixels width and height'/>
<field name='pixelAspectRatiotype='SFFloataccessType='inputOutput'
 appinfo='Relative dimensions of pixel height/width typically 1.33 or 1'/>
<field name='set_startTimetype='SFTimeaccessType='inputOnly'
 appinfo='Begin render operation'/>
<field name='progresstype='SFFloataccessType='outputOnly'
 appinfo='Progress performing render operation (0..1)'/>
<field name='renderCompleteTimetype='SFTimeaccessType='outputOnly'
 appinfo='Render operation complete'/>
<field name='movieFormattype='MFStringaccessType='initializeOnly'
 appinfo='Format of rendered output movie (mpeg mp4 etc.), use first supported format'/>
<field name='imageFormattype='MFStringaccessType='initializeOnly'
 appinfo='Format of rendered output images (png jpeg gif tiff etc.) use first supported format'/>
<field name='traceEnabledtype='SFBoolaccessType='initializeOnly'
 appinfo='enable console output to trace script computations and prototype progress'/>
</ExternProtoDeclare>
<!-- =============== Lights, camera, action! ============== -->
<DirectionalLight direction='0 -1 0global='trueintensity='0.8'/>
<NavigationInfo type='"EXAMINE" "FLY" "ANY"transitionType='"ANIMATE"transitionTime='1.0'/>
<Viewpoint description='Camera test scene entry viewposition='0 2 12retainUserOffsets='false'/>
<Viewpoint description='Camera test scene from aboveorientation='1 0 0 -1.57079position='0 150 0retainUserOffsets='false'/>
<!-- Keep prototype instances in same file while developing, then move later -->
<!-- We will create examples matching those in the paper -->
<!-- =============== Camera.SimpleShotsTest ============== -->
<!-- Camera.SimpleShotsTest ROUTEs:  [from CameraTimer.SimpleShots.fraction_changed to set_fraction ] [from TextTouchActive.SimpleShotsFilter.inputTrue to set_bind ] [from totalDuration to CameraTimer.SimpleShots.cycleInterval ] [from position_changed to CameraShapeTransform.translation ] [from orientation_changed to CameraShapeTransform.rotation ] [from isBound to CrossHairInstance.set_enabled ] -->
<ProtoInstance name='CameraDEF='Camera.SimpleShotsTest'>
<fieldValue name='descriptionvalue='SimpleShotsTest for camera Zoom Dolly Pan Boom and Tilt'/>
<fieldValue name='headlightvalue='true'/>
<fieldValue name='positionvalue='-4 4 10'/>
<fieldValue name='shots'>
<ProtoInstance name='CameraShotDEF='Zoom'>
<fieldValue name='descriptionvalue='Simple shot of Camera Zoom'/>
<fieldValue name='initialPositionvalue='-50 1 -10'/>
<fieldValue name='initialOrientationvalue='0 1 0 0'/>
<fieldValue name='moves'>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Zoom In'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-50 1 -15'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Zoom Out'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-50 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Pause'/>
<fieldValue name='durationvalue='1'/>
<fieldValue name='goalPositionvalue='-50 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<ProtoInstance name='CameraShotDEF='Dolly'>
<fieldValue name='descriptionvalue='Simple shot of Camera Dolly'/>
<fieldValue name='initialPositionvalue='-40 1 -10'/>
<fieldValue name='initialOrientationvalue='0 1 0 0'/>
<fieldValue name='moves'>
<ProtoInstance name='CameraMovementDEF='DollyMove1'>
<fieldValue name='descriptionvalue='Camera Dolly from Right to Left'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-45 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Dolly from Left to Right'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-40 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Pause'/>
<fieldValue name='durationvalue='1'/>
<fieldValue name='goalPositionvalue='-40 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<ProtoInstance name='CameraShotDEF='Pan'>
<fieldValue name='descriptionvalue='Simple shot of Camera Pan left right and back to center'/>
<fieldValue name='initialPositionvalue='-30 1 -10'/>
<fieldValue name='initialOrientationvalue='0 1 0 0'/>
<fieldValue name='moves'>
<ProtoInstance name='CameraMovementDEF='PanLeft'>
<fieldValue name='descriptionvalue='Pan Left'/>
<fieldValue name='durationvalue='2'/>
<fieldValue name='goalPositionvalue='-30 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0.4'/>
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='PanRight'>
<fieldValue name='descriptionvalue='Pan Right'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-30 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 -0.4'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Pan back to Center'/>
<fieldValue name='durationvalue='2'/>
<fieldValue name='goalPositionvalue='-30 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Pause'/>
<fieldValue name='durationvalue='2'/>
<fieldValue name='goalPositionvalue='-30 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<ProtoInstance name='CameraShotDEF='CameraBoom'>
<fieldValue name='descriptionvalue='Camera Boom'/>
<fieldValue name='initialPositionvalue='-20 1 -10'/>
<fieldValue name='initialOrientationvalue='0 1 0 0'/>
<fieldValue name='moves'>
<ProtoInstance name='CameraMovementDEF='CameraBoomUp'>
<fieldValue name='descriptionvalue='Camera Boom Up'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-20 5 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='BoomDown'>
<fieldValue name='descriptionvalue='Camera Boom Down'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-20 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='BoomPause'>
<fieldValue name='descriptionvalue='Camera Pause'/>
<fieldValue name='durationvalue='2'/>
<fieldValue name='goalPositionvalue='-20 1 -10'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<ProtoInstance name='CameraShotDEF='CameraTilt'>
<fieldValue name='descriptionvalue='Camera Tilt'/>
<fieldValue name='initialPositionvalue='-10 1 -10'/>
<fieldValue name='initialOrientationvalue='0 0 1 0'/>
<fieldValue name='traceEnabledvalue='true'/>
<fieldValue name='moves'>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Tilt Pause'/>
<fieldValue name='durationvalue='1'/>
<fieldValue name='goalPositionvalue='-10 1 -10'/>
<fieldValue name='goalOrientationvalue='0 0 1 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='TiltDown'>
<fieldValue name='descriptionvalue='Camera Tilt Left'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-10 1 -10'/>
<fieldValue name='goalOrientationvalue='0 0 1 0.785'/>
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='TiltPause'>
<fieldValue name='descriptionvalue='Camera Tilt Pause'/>
<fieldValue name='durationvalue='1'/>
<fieldValue name='goalPositionvalue='-10 1 -10'/>
<fieldValue name='goalOrientationvalue='0 0 1 0.785'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Tilt Right'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='-10 1 -10'/>
<fieldValue name='goalOrientationvalue='0 0 1 -0.785'/>
</ProtoInstance>
<ProtoInstance name='CameraMovement'>
<fieldValue name='descriptionvalue='Camera Tilt Pause'/>
<fieldValue name='durationvalue='1'/>
<fieldValue name='goalPositionvalue='-10 1 -10'/>
<fieldValue name='goalOrientationvalue='0 0 1 -0.785'/>
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='TiltReset'>
<fieldValue name='descriptionvalue='Camera Tilt Reset'/>
<fieldValue name='durationvalue='1'/>
<fieldValue name='goalPositionvalue='-10 1 -10'/>
<fieldValue name='goalOrientationvalue='0 0 1 0'/>
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='TiltUp'>
<fieldValue name='descriptionvalue='Return to home'/>
<fieldValue name='durationvalue='2'/>
<fieldValue name='goalPositionvalue='0 2 12'/>
<fieldValue name='goalOrientationvalue='0 0 1 0'/>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<Group DEF='AnimationGroup.SimpleShots'>
<!-- CameraTimer.SimpleShots ROUTEs:  [from Camera.SimpleShotsTest.totalDuration to cycleInterval ] [from TextTouch.SimpleShots.touchTime to startTime ] [from fraction_changed to Camera.SimpleShotsTest.set_fraction ] -->
<TimeSensor DEF='CameraTimer.SimpleShots'/>
<!-- initialize clock to match totalDuration of combined Shot Moves -->
<ROUTE fromNode='Camera.SimpleShotsTestfromField='totalDurationtoNode='CameraTimer.SimpleShotstoField='cycleInterval'/>
<!-- TimeSensor animates the CameraClock since that maintains the computed PositionInterpolator and OrientationInterpolator -->
<ROUTE fromNode='CameraTimer.SimpleShotsfromField='fraction_changedtoNode='Camera.SimpleShotsTesttoField='set_fraction'/>
<Transform DEF='Trigger.SimpleShotstranslation='-4 4 0'>
<!-- TextTouchActive.SimpleShotsFilter ROUTEs:  [from TextTouch.SimpleShots.isActive to set_boolean ] [from inputTrue to Camera.SimpleShotsTest.set_bind ] -->
<BooleanFilter DEF='TextTouchActive.SimpleShotsFiltercontainerField='children'/>
<!-- TextTouch.SimpleShots ROUTEs:  [from isActive to TextTouchActive.SimpleShotsFilter.set_boolean ] [from touchTime to CameraTimer.SimpleShots.startTime ] -->
<TouchSensor DEF='TextTouch.SimpleShotsdescription='touch to animate Camera SimpleShotsTest'/>
<ROUTE fromNode='TextTouchActive.SimpleShotsFilterfromField='inputTruetoNode='Camera.SimpleShotsTesttoField='set_bind'/>
<ROUTE fromNode='TextTouch.SimpleShotsfromField='isActivetoNode='TextTouchActive.SimpleShotsFiltertoField='set_boolean'/>
<ROUTE fromNode='TextTouch.SimpleShotsfromField='touchTimetoNode='CameraTimer.SimpleShotstoField='startTime'/>
<Shape>
<Text string='"Click to animate" "SimpleShotsTest"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material DEF='ArtDeco5ambientIntensity='0.24diffuseColor='0.945455 0.318988 0.321717shininess='0.01specularColor='0.072727 0.021705 0.010732'>
<!-- Universal Media Library: ArtDeco 5 -->
</Material>
</Appearance>
</Shape>
<!-- Simplify intersection test for user selecting text -->
<Shape DEF='TransparentBox'>
<Appearance>
<Material transparency='1'/>
</Appearance>
<Box size='6 2 0.0001'/>
</Shape>
</Transform>
</Group>
<Group DEF='SimpleShotsTargets'>
<Transform DEF='TargetBoxZoomtranslation='-50 1 -20'>
<Shape>
<Box/>
<Appearance> </Appearance>
</Shape>
<Transform translation='0 2 0'>
<Shape>
<Text string='"Zoom in, out"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material/>
</Appearance>
</Shape>
</Transform>
</Transform>
<Transform DEF='TargetBoxDollytranslation='-40 1 -20'>
<Shape>
<Box/>
<Appearance> </Appearance>
</Shape>
<Transform translation='0 2 0'>
<Shape>
<Text string='"Dolly left, right"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material/>
</Appearance>
</Shape>
</Transform>
</Transform>
<Transform DEF='TargetBoxPantranslation='-30 1 -20'>
<Shape>
<Box/>
<Appearance> </Appearance>
</Shape>
<Transform translation='0 2 0'>
<Shape>
<Text string='"Pan left, right"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material/>
</Appearance>
</Shape>
</Transform>
</Transform>
<Transform DEF='TargetBoxBoomtranslation='-20 1 -20'>
<Shape>
<Box/>
<Appearance> </Appearance>
</Shape>
<Transform translation='0 2 0'>
<Shape>
<Text string='"Boom up, down"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material/>
</Appearance>
</Shape>
</Transform>
</Transform>
<Transform DEF='TargetBoxTilttranslation='-10 1 -20'>
<Shape>
<Box/>
<Appearance> </Appearance>
</Shape>
<Transform translation='0 2 0'>
<Shape>
<Text string='"Tilt left, right"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material/>
</Appearance>
</Shape>
</Transform>
</Transform>
</Group>
<!-- =============== Camera.AimPointTest ============== -->
<!-- Camera.AimPointTest ROUTEs:  [from CameraTimer.AimPointTest.fraction_changed to set_fraction ] [from TextTouchActive.AimPointFilter.inputTrue to set_bind ] [from totalDuration to CameraTimer.AimPointTest.cycleInterval ] [from position to CameraShapeTransform.translation ] [from orientation_changed to CameraShapeTransform.rotation ] [from isBound to CrossHairInstance.set_enabled ] -->
<ProtoInstance name='CameraDEF='Camera.AimPointTest'>
<fieldValue name='descriptionvalue='AimPointTest for moving camera tracking moving target'/>
<fieldValue name='positionvalue='4 4 10'/>
<fieldValue name='shots'>
<ProtoInstance name='CameraShotDEF='Shot5'>
<fieldValue name='descriptionvalue='#3 Tracking shot'/>
<fieldValue name='initialPositionvalue='6 6 10'/>
<fieldValue name='initialOrientationvalue='0 1 0 0'/>
<fieldValue name='moves'>
<!-- MoveAimPoint3.1 ROUTE:  [from BoxPath.value_changed to goalAimPoint ] -->
<ProtoInstance name='CameraMovementDEF='MoveAimPoint3.1'>
<fieldValue name='descriptionvalue='AimPoint 3.1 moving BoxPath'/>
<fieldValue name='trackingvalue='true'/>
<fieldValue name='durationvalue='8'/>
<fieldValue name='goalPositionvalue='6 6 10'/>
<!-- goalAimPoint modified by ROUTE to match moving Box -->
</ProtoInstance>
<!-- MoveAimPoint3.2 ROUTE:  [from BoxPath.value_changed to goalAimPoint ] -->
<ProtoInstance name='CameraMovementDEF='MoveAimPoint3.2'>
<fieldValue name='descriptionvalue='AimPoint 3.2 pan right while tracking'/>
<fieldValue name='trackingvalue='true'/>
<fieldValue name='durationvalue='8'/>
<fieldValue name='goalPositionvalue='40 6 12'/>
<!-- goalAimPoint modified by ROUTE to match moving Box -->
</ProtoInstance>
<!-- MoveAimPoint3.3 ROUTE:  [from BoxPath.value_changed to goalAimPoint ] -->
<ProtoInstance name='CameraMovementDEF='MoveAimPoint3.3'>
<fieldValue name='descriptionvalue='AimPoint 3.3 boom up while tracking'/>
<fieldValue name='trackingvalue='true'/>
<fieldValue name='durationvalue='3'/>
<fieldValue name='goalPositionvalue='40 20 13'/>
<!-- goalAimPoint modified by ROUTE to match moving Box -->
</ProtoInstance>
<ProtoInstance name='CameraMovementDEF='MoveAimPoint3.4'>
<fieldValue name='descriptionvalue='AimPoint 3.4 restore camera back to home'/>
<!-- can test tracking or not using following values -->
<fieldValue name='trackingvalue='true'/>
<fieldValue name='durationvalue='5'/>
<fieldValue name='goalPositionvalue='4 4 10'/>
<fieldValue name='goalAimPointvalue='4 4 0'/>
<fieldValue name='goalOrientationvalue='0 1 0 0'/>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<Group DEF='AnimationGroup.AimPointTest'>
<!-- CameraTimer.AimPointTest ROUTEs:  [from Camera.AimPointTest.totalDuration to cycleInterval ] [from TextTouch.AimPointTest.touchTime to startTime ] [from fraction_changed to Camera.AimPointTest.set_fraction ] -->
<TimeSensor DEF='CameraTimer.AimPointTest'/>
<!-- initialize clock to match totalDuration of combined Shot Moves -->
<ROUTE fromNode='Camera.AimPointTestfromField='totalDurationtoNode='CameraTimer.AimPointTesttoField='cycleInterval'/>
<!-- TimeSensor animates the CameraClock since that maintains the computed PositionInterpolator and OrientationInterpolator -->
<ROUTE fromNode='CameraTimer.AimPointTestfromField='fraction_changedtoNode='Camera.AimPointTesttoField='set_fraction'/>
<Transform DEF='Trigger.AimPointTesttranslation='4 4 0'>
<!-- TextTouchActive.AimPointFilter ROUTEs:  [from TextTouch.AimPointTest.isActive to set_boolean ] [from inputTrue to Camera.AimPointTest.set_bind ] -->
<BooleanFilter DEF='TextTouchActive.AimPointFiltercontainerField='children'/>
<!-- TextTouch.AimPointTest ROUTEs:  [from isActive to TextTouchActive.AimPointFilter.set_boolean ] [from touchTime to CameraTimer.AimPointTest.startTime ] -->
<TouchSensor DEF='TextTouch.AimPointTestdescription='touch to animate Camera AimPointTest'/>
<ROUTE fromNode='TextTouchActive.AimPointFilterfromField='inputTruetoNode='Camera.AimPointTesttoField='set_bind'/>
<ROUTE fromNode='TextTouch.AimPointTestfromField='isActivetoNode='TextTouchActive.AimPointFiltertoField='set_boolean'/>
<ROUTE fromNode='TextTouch.AimPointTestfromField='touchTimetoNode='CameraTimer.AimPointTesttoField='startTime'/>
<Shape>
<Text string='"Click to animate" "AimPointTest"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material USE='ArtDeco5'/>
</Appearance>
</Shape>
<Shape USE='TransparentBox'/>
</Transform>
</Group>
<!-- TODO build a test once implemented -->
<ProtoInstance name='OfflineRender'/>
<!-- =============== animate a camera shape to visualize view changes ============== -->
<!-- CameraShapeTransform ROUTEs:  [from Camera.SimpleShotsTest.position_changed to translation ] [from Camera.SimpleShotsTest.orientation_changed to rotation ] [from Camera.AimPointTest.position to translation ] [from Camera.AimPointTest.orientation_changed to rotation ] -->
<Transform DEF='CameraShapeTransformtranslation='0 0.5 0'>
<!-- move CameraShape using active Camera -->
<ROUTE fromNode='Camera.SimpleShotsTestfromField='position_changedtoNode='CameraShapeTransformtoField='translation'/>
<ROUTE fromNode='Camera.SimpleShotsTestfromField='orientation_changedtoNode='CameraShapeTransformtoField='rotation'/>
<ROUTE fromNode='Camera.AimPointTestfromField='positiontoNode='CameraShapeTransformtoField='translation'/>
<ROUTE fromNode='Camera.AimPointTestfromField='orientation_changedtoNode='CameraShapeTransformtoField='rotation'/>
<Transform DEF='CameraOffsetTransformtranslation='0 0 0.25'>
<!-- CameraShapeTouched ROUTE:  [from isActive to ViewFrustumToggle.set_boolean ] -->
<TouchSensor DEF='CameraShapeTouched'/>
<Inline DEF='CameraShape'
  url=' "CameraShape.x3d" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraShape.x3d" '/>
<Shape DEF='SightLine'>
<IndexedLineSet coordIndex='0 1'>
<Coordinate point='0 0 0 0 0 -100'/>
</IndexedLineSet>
<Appearance>
<Material emissiveColor='0.8 0.8 0.4'/>
</Appearance>
</Shape>
</Transform>
<!-- Display frustum to show camera view within the scene, toggled by user selecting CameraShape -->
<ExternProtoDeclare name='ViewFrustumappinfo='Display view frustum associated with a given pair of Viewpoint NavigationInfo nodes'
  url=' "../../X3dForWebAuthors/Chapter14-Prototypes/ViewFrustumPrototype.x3d#ViewFrustum" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14-Prototypes/ViewFrustumPrototype.x3d#ViewFrustum" "../../X3dForWebAuthors/Chapter14-Prototypes/ViewFrustumPrototype.wrl#ViewFrustum" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14-Prototypes/ViewFrustumPrototype.wrl#ViewFrustum" '>
<field name='ViewpointNodetype='SFNodeaccessType='initializeOnly'
 appinfo='required: insert Viewpoint DEF or USE node for view of interest'/>
<field name='NavigationInfoNodetype='SFNodeaccessType='initializeOnly'
 appinfo='required: insert NavigationInfo DEF or USE node of interest'/>
<field name='visibletype='SFBoolaccessType='inputOutput'
 appinfo='whether or not frustum geometry is rendered'/>
<field name='lineColortype='SFColoraccessType='inputOutput'
 appinfo='RGB color of ViewFrustum outline, default value 0.9 0.9 0.9'/>
<field name='frustumColortype='SFColoraccessType='inputOutput'
 appinfo='RGB color of ViewFrustum hull geometry, default value 0.8 0.8 0.8'/>
<field name='transparencytype='SFFloataccessType='inputOutput'
 appinfo='transparency of ViewFrustum hull geometry, default value 0.5'/>
<field name='aspectRatiotype='SFFloataccessType='inputOutput'
 appinfo='assumed ratio height/width, default value 0.75'/>
<field name='tracetype='SFBoolaccessType='initializeOnly'
 appinfo='debug support, default false'/>
</ExternProtoDeclare>
<!-- ViewFrustumNode ROUTE:  [from ViewFrustumToggle.toggle to set_visible ] -->
<ProtoInstance name='ViewFrustumDEF='ViewFrustumNode'>
<fieldValue name='ViewpointNode'>
<Viewpoint DEF='FrustumViewpointdescription='viewpoint for ViewFrustumposition='0 0 0retainUserOffsets='false'/>
</fieldValue>
<fieldValue name='NavigationInfoNode'>
<NavigationInfo DEF='TestNavigationInfotransitionType='"ANIMATE"visibilityLimit='100type='"EXAMINE" "ANY"transitionTime='1.0'/>
</fieldValue>
<fieldValue name='visiblevalue='false'/>
<fieldValue name='lineColorvalue='0.9 0.9 0.9'/>
<fieldValue name='frustumColorvalue='0.8 0.8 0.8'/>
<fieldValue name='transparencyvalue='0.95'/>
</ProtoInstance>
<!-- ViewFrustumToggle ROUTEs:  [from CameraShapeTouched.isActive to set_boolean ] [from toggle to ViewFrustumNode.set_visible ] -->
<BooleanToggle DEF='ViewFrustumToggletoggle='falsecontainerField='children'/>
<ROUTE fromNode='CameraShapeTouchedfromField='isActivetoNode='ViewFrustumToggletoField='set_boolean'/>
<ROUTE fromNode='ViewFrustumTogglefromField='toggletoNode='ViewFrustumNodetoField='set_visible'/>
</Transform>
<!-- =============== add checkerboard, axes and other things to look at while animating ============== -->
<Background skyColor='0.282353 0.380392 0.470588transparency='0'/>
<Transform rotation='1 0 0 -1.57079scale='10 10 10'>
<Shape>
<Appearance>
<Material ambientIntensity='0.01diffuseColor='1.0 1.0 1.0shininess='0.05'/>
</Appearance>
<IndexedFaceSet colorPerVertex='falsenormalPerVertex='falsesolid='falsecolorIndex='0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0coordIndex='0 8 9 1 -1 1 9 10 2 -1 2 10 11 3 -1 3 11 12 4 -1 4 12 13 5 -1 5 13 14 6 -1 6 14 15 7 -1 8 16 17 9 -1 9 17 18 10 -1 10 18 19 11 -1 11 19 20 12 -1 12 20 21 13 -1 13 21 22 14 -1 14 22 23 15 -1 16 24 25 17 -1 17 25 26 18 -1 18 26 27 19 -1 19 27 28 20 -1 20 28 29 21 -1 21 29 30 22 -1 22 30 31 23 -1 24 32 33 25 -1 25 33 34 26 -1 26 34 35 27 -1 27 35 36 28 -1 28 36 37 29 -1 29 37 38 30 -1 30 38 39 31 -1 32 40 41 33 -1 33 41 42 34 -1 34 42 43 35 -1 35 43 44 36 -1 36 44 45 37 -1 37 45 46 38 -1 38 46 47 39 -1 40 48 49 41 -1 41 49 50 42 -1 42 50 51 43 -1 43 51 52 44 -1 44 52 53 45 -1 45 53 54 46 -1 46 54 55 47 -1 48 56 57 49 -1 49 57 58 50 -1 50 58 59 51 -1 51 59 60 52 -1 52 60 61 53 -1 53 61 62 54 -1 54 62 63 55 -1'>
<Coordinate point='-5.25 5.25 0.0 -3.75 5.25 0.0 -2.25 5.25 0.0 -0.75 5.25 0.0 0.75 5.25 0.0 2.25 5.25 0.0 3.75 5.25 0.0 5.25 5.25 0.0 -5.25 3.75 0.0 -3.75 3.75 0.0 -2.25 3.75 0.0 -0.75 3.75 0.0 0.75 3.75 0.0 2.25 3.75 0.0 3.75 3.75 0.0 5.25 3.75 0.0 -5.25 2.25 0.0 -3.75 2.25 0.0 -2.25 2.25 0.0 -0.75 2.25 0.0 0.75 2.25 0.0 2.25 2.25 0.0 3.75 2.25 0.0 5.25 2.25 0.0 -5.25 0.75 0.0 -3.75 0.75 0.0 -2.25 0.75 0.0 -0.75 0.75 0.0 0.75 0.75 0.0 2.25 0.75 0.0 3.75 0.75 0.0 5.25 0.75 0.0 -5.25 -0.75 0.0 -3.75 -0.75 0.0 -2.25 -0.75 0.0 -0.75 -0.75 0.0 0.75 -0.75 0.0 2.25 -0.75 0.0 3.75 -0.75 0.0 5.25 -0.75 0.0 -5.25 -2.25 0.0 -3.75 -2.25 0.0 -2.25 -2.25 0.0 -0.75 -2.25 0.0 0.75 -2.25 0.0 2.25 -2.25 0.0 3.75 -2.25 0.0 5.25 -2.25 0.0 -5.25 -3.75 0.0 -3.75 -3.75 0.0 -2.25 -3.75 0.0 -0.75 -3.75 0.0 0.75 -3.75 0.0 2.25 -3.75 0.0 3.75 -3.75 0.0 5.25 -3.75 0.0 -5.25 -5.25 0.0 -3.75 -5.25 0.0 -2.25 -5.25 0.0 -0.75 -5.25 0.0 0.75 -5.25 0.0 2.25 -5.25 0.0 3.75 -5.25 0.0 5.25 -5.25 0.0'/>
<Color color='0.435294 0.741176 0 0 0.560784 0.580392'/>
</IndexedFaceSet>
</Shape>
</Transform>
<Transform scale='3 3 3translation='0 0.25 0'> </Transform>
<!-- MovingBoxTransform ROUTE:  [from BoxPath.value_changed to translation ] -->
<Transform DEF='MovingBoxTransform'>
<!-- BoxPath ROUTEs:  [from BoxTimer.fraction_changed to set_fraction ] [from value_changed to MovingBoxTransform.translation ] [from value_changed to MoveAimPoint3.1.goalAimPoint ] [from value_changed to MoveAimPoint3.2.goalAimPoint ] [from value_changed to MoveAimPoint3.3.goalAimPoint ] -->
<PositionInterpolator DEF='BoxPathkey='0 0.25 0.5 0.75 1keyValue='-5 1 5 45 1 5 45 1 -45 -5 1 -45 -5 1 5'/>
<!-- BoxTimer ROUTE:  [from fraction_changed to BoxPath.set_fraction ] -->
<TimeSensor DEF='BoxTimercycleInterval='10loop='true'/>
<ROUTE fromNode='BoxPathfromField='value_changedtoNode='MovingBoxTransformtoField='translation'/>
<ROUTE fromNode='BoxPathfromField='value_changedtoNode='MoveAimPoint3.1toField='goalAimPoint'/>
<ROUTE fromNode='BoxPathfromField='value_changedtoNode='MoveAimPoint3.2toField='goalAimPoint'/>
<ROUTE fromNode='BoxPathfromField='value_changedtoNode='MoveAimPoint3.3toField='goalAimPoint'/>
<ROUTE fromNode='BoxTimerfromField='fraction_changedtoNode='BoxPathtoField='set_fraction'/>
<Shape>
<Box/>
<Appearance> </Appearance>
</Shape>
</Transform>
<!-- ================ CrossHair visualization for center of screen ================ -->
<ExternProtoDeclare name='CrossHairappinfo='CrossHair prototype provides a heads-up display (HUD) crosshair at the view center, which is useful for assessing NavigationInfo lookAt point'
  url=' "../../Savage/Tools/HeadsUpDisplays/CrossHairPrototype.x3d#CrossHair" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairPrototype.x3d#CrossHair" "../../Savage/Tools/HeadsUpDisplays/CrossHairPrototype.wrl#CrossHair" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairPrototype.wrl#CrossHair" '>
<field name='enabledtype='SFBoolaccessType='initializeOnly'
 appinfo='whether CrissHair orititype is enabled or not'/>
<field name='set_enabledtype='SFBoolaccessType='inputOnly'
 appinfo='control whether enabled/disabled'/>
<field name='markerColortype='SFColoraccessType='inputOutput'
 appinfo='color of CrossHair marker'/>
<field name='scaletype='SFVec3faccessType='inputOutput'
 appinfo='size of CrossHair in meters'/>
<field name='positionOffsetFromCameratype='SFVec3faccessType='inputOutput'
 appinfo='distance in front of HUD viewpoint'/>
</ExternProtoDeclare>
<!-- CrossHairInstance ROUTEs:  [from Camera.SimpleShotsTest.isBound to set_enabled ] [from Camera.AimPointTest.isBound to set_enabled ] -->
<ProtoInstance name='CrossHairDEF='CrossHairInstance'>
<fieldValue name='enabledvalue='true'/>
<fieldValue name='markerColorvalue='1 0.5 0'/>
<fieldValue name='scalevalue='1 1 1'/>
<fieldValue name='positionOffsetFromCameravalue='0 0 -6'/>
</ProtoInstance>
<!-- turn on CrossHairInstance when animated camera viewpoints are bound -->
<ROUTE fromNode='Camera.SimpleShotsTestfromField='isBoundtoNode='CrossHairInstancetoField='set_enabled'/>
<ROUTE fromNode='Camera.AimPointTestfromField='isBoundtoNode='CrossHairInstancetoField='set_enabled'/>
<!-- turn off CrossHairInstance when animated camera viewpoints are unbound <BooleanFilter DEF='NegateCrossHair'/> <ROUTE fromField='isBound' fromNode='Camera.SimpleShotsTest' toField='set_boolean' toNode='NegateCrossHair'/> <ROUTE fromField='isBound' fromNode='Camera.AimPointTest' toField='set_boolean' toNode='NegateCrossHair'/> <ROUTE fromField='inputNegate' fromNode='NegateCrossHair' toField='set_enabled' toNode='CrossHairInstance'/> -->
<!-- =============== TODO Launch Prototype Example ============== -->
<Anchor description='launch CameraExample sceneparameter='"target=_blank"'
  url=' "CameraExample.x3d" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraExample.x3d" "CameraExample.wrl" "http://www.web3d.org/x3d/content/examples/Basic/development/CameraExample.wrl" '>
<Transform translation='0 -3 0'>
<Shape>
<Text string='"CameraPrototype" "defines a prototype" "" "Click on this text to see" "CameraExample scene"solid='false'>
<FontStyle justify='"MIDDLE" "MIDDLE"size='0.5'/>
</Text>
<Appearance>
<Material diffuseColor='1 1 0.2'/>
</Appearance>
</Shape>
</Transform>
</Anchor>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definitions: Camera, CameraShot, CameraMovement, OfflineRender, ViewFrustum, CrossHair
Index for DEF nodes: AnimationGroup.AimPointTest, AnimationGroup.SimpleShots, ArtDeco5, BoomDown, BoomPause, BoxPath, BoxTimer, Camera.AimPointTest, Camera.SimpleShotsTest, CameraBoom, CameraBoomUp, CameraOffsetTransform, CameraShape, CameraShapeTouched, CameraShapeTransform, CameraTilt, CameraTimer.AimPointTest, CameraTimer.SimpleShots, CoordinateAxes, CrossHairInstance, Dolly, DollyMove1, FrustumViewpoint, MoveAimPoint3.1, MoveAimPoint3.2, MoveAimPoint3.3, MoveAimPoint3.4, MovingBoxTransform, Pan, PanLeft, PanRight, Shot5, SightLine, SimpleShotsTargets, TargetBoxBoom, TargetBoxDolly, TargetBoxPan, TargetBoxTilt, TargetBoxZoom, TestNavigationInfo, TextTouch.AimPointTest, TextTouch.SimpleShots, TextTouchActive.AimPointFilter, TextTouchActive.SimpleShotsFilter, TiltDown, TiltPause, TiltReset, TiltUp, TransparentBox, Trigger.AimPointTest, Trigger.SimpleShots, ViewFrustumNode, ViewFrustumToggle, Zoom
Index for Viewpoint images: Viewpoint_1, Viewpoint_2, FrustumViewpoint
-->

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