####################################################################################################
#
# Invoking X3D model self-test:
#
#   $ python SanCarlosCathedral.py
#
# Python package x3d.py package is available on PyPI for import.
#   This approach simplifies Python X3D deployment and use.
#   https://pypi.org/project/x3d
#
# Installation:
#       pip install x3d
# or
#       python -m pip install x3d
#
# Developer options for loading x3d package in other Python programs:
#
#    from x3d import *  # preferred approach, terser source that avoids x3d.* class prefixes
#
# or
#    import x3d         # traditional way to subclass x3d package, all classes require x3d.* prefix,
#                       # but python source is very verbose, for example x3d.Material x3d.Shape etc.
#                       # X3dToPython.xslt stylesheet insertPackagePrefix=true supports this option.
#
####################################################################################################

from x3d import *

newModel=X3D(profile='Immersive',version='3.3',
  head=head(
    children=[
    meta(content='SanCarlosCathedral.x3d',name='title'),
    meta(content='This model of the San Carlos Cathedral shows the oldest continuously functioning church and the first stone building in the State of California.',name='description'),
    meta(content='Michele Foti, Don Brutzman',name='creator'),
    meta(content='15 December 2011',name='created'),
    meta(content='8 September 2025',name='modified'),
    meta(content='documentation/',name='reference'),
    meta(content='tests/',name='reference'),
    meta(content='TODO.html',name='reference'),
    meta(content='http://www.sancarloscathedral.net',name='reference'),
    meta(content='RoyalPresidioChapelHistoricalReferences.pdf',name='reference'),
    meta(content='originals/',name='reference'),
    meta(content='snapshots/SanCarlosCathedralFrontPlazaMarch2012.png',name='Image'),
    meta(content='snapshots/SanCarlosCathedralFrontAbove.2012February.png',name='Image'),
    meta(content='snapshots/SanCarlosCathedralWithLightingFromBalcony.png',name='Image'),
    meta(content='originals/ModelSanCarlosChurchFeb-3-2012.x3d',name='reference'),
    meta(content='https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/SanCarlosCathedral.x3d',name='identifier'),
    meta(content='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit',name='generator'),
    meta(content='../license.html',name='license')]),
  Scene=Scene(
    children=[
    WorldInfo(title='SanCarlosCathedral.x3d'),
    Background(groundAngle=[1.57],groundColor=[(0.9804,0.8235,0),(0.6,0.3254902,0)],skyColor=[(0.7216,0.8,0.9922)]),
    Group(DEF='NavigationNodes',
      #  Note that headlight='false' while inside cathedral in order to allow LightingAlternatives.x3d lights to work properly 
      children=[
      NavigationInfo(DEF='NavigationFly',avatarSize=[0.01,1.6,0.75],speed=4,type=["FLY","ANY"]),
      NavigationInfo(DEF='NavigationWalk',avatarSize=[0.01,1.6,0.75],speed=4,type=["WALK","ANY"]),
      NavigationInfo(DEF='NavigationExamine',avatarSize=[0.01,1.6,0.75],speed=4)]),
    Group(DEF='ViewpointNodes',
      children=[
      Viewpoint(DEF='ViewpointFrontFromGround',centerOfRotation=(5.8,0,-24.4),description='San Carlos Cathedral, front from ground',orientation=(1,0,0,0.3),position=(5.8,-0.5,15)),
      Viewpoint(DEF='ViewpointFront',centerOfRotation=(5.8,0,-24.4),description='San Carlos Cathedral, front',position=(4.3,5,25)),
      #  <ROUTE fromField='isBound' fromNode='ViewpointFrontAbove' toField='set_bind' toNode='NavigationExamine'/> <ROUTE fromField='isBound' fromNode='ViewpointFront' toField='set_bind' toNode='NavigationExamine'/> 
      Viewpoint(DEF='ViewpointFrontAbove',centerOfRotation=(5.8,0,-24.4),description='San Carlos Cathedral, front above',orientation=(1,0,0,-0.349),position=(5.3,16,30)),
      Viewpoint(DEF='ViewpointObliqueOutside1',centerOfRotation=(5.8,0,-24.4),description='Oblique outside view, left',orientation=(1,1,0,-0.5),position=(-12.8,15,20)),
      Viewpoint(DEF='ViewpointOverheadView',centerOfRotation=(5.8,0,-24.4),description='Overhead view',orientation=(1,0,0,-1.57),position=(5.8,70,-23)),
      Viewpoint(DEF='ViewpointObliqueOutside2',centerOfRotation=(5.8,0,-24.4),description='Oblique outside view right',orientation=(0,1,0,0.5),position=(20,4,20)),
      Viewpoint(DEF='ViewpointFacadeDetails',centerOfRotation=(5.8,0,-24.4),description='Facade details',orientation=(1,1,0,0.6),position=(9.2,4,7)),
      Viewpoint(DEF='ViewpointRightOutside',centerOfRotation=(5.8,0,-24.4),description='Right outside',orientation=(0,1,0,1.57),position=(50,-2,-26.5)),
      Viewpoint(DEF='ViewpointSacristyOutside',centerOfRotation=(5.8,0,-24.4),description='Sacristy outside',orientation=(0,1,0,2.37),position=(30,0,-55.5)),
      Viewpoint(DEF='ViewpointBackOutside',centerOfRotation=(5.8,0,-24.4),description='Back outside',orientation=(0,1,0,3.4),position=(-8,7,-75)),
      Viewpoint(DEF='ViewpointTowerBack',centerOfRotation=(5.8,0,-24.4),description='Tower, back',orientation=(0,1,0,-2.5),position=(-8,5,-25)),
      Viewpoint(DEF='ViewpointInteriorLeftRearBalcony',centerOfRotation=(5.8,0,-24.4),description='Interior Left rear balcony',orientation=(1,1,0,-0.3),position=(3,4,-5)),
      Viewpoint(DEF='ViewpointFrontDoors',centerOfRotation=(5.8,0,-24.4),description='Front doors, looking in',position=(5.8,-0.3,2)),
      Viewpoint(DEF='ViewpointEntranceConfessional',centerOfRotation=(5.8,0,-24.4),description='Entrance, confessional',orientation=(0,1,0,-1.3),position=(4.3,-0.9,-0.8)),
      Viewpoint(DEF='ViewpointRightSideWall1',centerOfRotation=(5.8,0,-24.4),description='Right side wall, looking north west',orientation=(0,1,0,-2.4),position=(5.1,-0.8,-8.2)),
      Viewpoint(DEF='ViewpointRightSideWall2',centerOfRotation=(5.8,0,-24.4),description='Right side wall, window',orientation=(0,1,0,-1.87),position=(5.1,1.5,-9.5)),
      Viewpoint(DEF='ViewpointRightSideWall3',centerOfRotation=(5.8,0,-24.4),description='Right side wall, picture',orientation=(0,1,0,-1.57),position=(7.7,1,-10.5)),
      Viewpoint(DEF='ViewpointRightSideWall4',centerOfRotation=(5.8,0,-24.4),description='Right side wall, looking south west',orientation=(0,1,0,-0.6),position=(5.1,1.5,-10.5)),
      Viewpoint(DEF='ViewpointFrontView',centerOfRotation=(5.8,0,-24.4),description='Front view',position=(5.8,0,-23)),
      Viewpoint(DEF='ViewpointBehindTheAltar',centerOfRotation=(5.8,0,-24.4),description='Behind the altar',orientation=(0,1,0,-0.3),position=(4.8,0,-33)),
      Viewpoint(DEF='ViewpointRightTransept',centerOfRotation=(5.8,0,-24.4),description='Right transept',orientation=(0,1,0,-1.3),position=(4.8,0,-33)),
      Viewpoint(DEF='ViewpointLateralEntrance',centerOfRotation=(5.8,0,-24.4),description='Right transept, lateral entrance',orientation=(0,1,0,2.8),position=(13.8,-0.5,-36)),
      Viewpoint(DEF='ViewpointLeftTransept',centerOfRotation=(5.8,0,-24.4),description='Left transept',orientation=(0,1,0,1.3),position=(9.8,0,-33)),
      Viewpoint(DEF='ViewpointAltarCrucifix',centerOfRotation=(5.8,0,-24.4),description='Altar, crucifix',orientation=(0,1,0,-0.1),position=(4.8,0,-33)),
      Viewpoint(DEF='ViewpointSacristy',centerOfRotation=(5.8,0,-24.4),description='Sacristy',orientation=(0,1,0,-0.8),position=(9.8,0,-40.5)),
      Viewpoint(DEF='ViewpointSacristyAndBackRoom',centerOfRotation=(5.8,0,-24.4),description='Sacristy interior and back room',orientation=(0,1,0,1.5),position=(17.8,0,-45.5)),
      Viewpoint(DEF='ViewpointNaveView',centerOfRotation=(5.8,0,-24.4),description='Nave, view',orientation=(0,1,0,3.14),position=(5.8,0,-42.5)),
      Viewpoint(DEF='ViewpointNaveAndBalcony',centerOfRotation=(5.8,0,-24.4),description='Nave and Balcony',orientation=(0,1,0,3.14),position=(5.8,0,-21)),
      Viewpoint(DEF='ViewpointPicture',centerOfRotation=(5.8,0,-24.4),description='Left side wall, picture',orientation=(0,1,0,1.57),position=(3.8,1,-21.4)),
      Viewpoint(DEF='ViewpointPortrait',centerOfRotation=(5.8,0,-24.4),description='Left side wall, picture, portrait of the man who commissioned the stations of the cross',orientation=(0,1,0,1.57),position=(3.2,0.85,-20.1)),
      Viewpoint(DEF='ViewpointLeftSideWall',centerOfRotation=(5.8,0,-24.4),description='Left side wall, looking north est',orientation=(0,1,0,2.6),position=(5.8,1,-18)),
      Viewpoint(DEF='ViewpointEntranceAndStair',centerOfRotation=(5.8,0,-24.4),description='Entrance, stairs to tower and balcony',orientation=(0,1,0,1.9),position=(6.8,-0.8,-2.5)),
      Viewpoint(DEF='ViewpointStairStairs',centerOfRotation=(5.8,0,-24.4),description='Stairs to tower and balcony',orientation=(0,1,0,1.57),position=(6.4,0,-1.5)),
      Viewpoint(DEF='ViewpointLanding',centerOfRotation=(5.8,0,-24.4),description='Landing',orientation=(1,1,0,-1.1),position=(-3.09,4.2,-0.7)),
      Viewpoint(DEF='ViewpointStairsToBalcony',centerOfRotation=(5.8,0,-24.4),description='Stairs to balcony',orientation=(0,1,0,-1.57),position=(-3.09,3,-1.5)),
      Viewpoint(DEF='ViewpointBalcony',centerOfRotation=(5.8,0,-24.4),description='Balcony',orientation=(0,1,0,-0.7),position=(2.1,4,-2.7)),
      Viewpoint(DEF='ViewpointBalconyWindow',centerOfRotation=(5.8,0,-24.4),description='Balcony, window',orientation=(0,1,0,-1.8),position=(2.1,4,-2.7)),
      Viewpoint(DEF='ViewpointLeftRearBalcony',centerOfRotation=(5.8,0,-24.4),description='Left rear balcony',orientation=(1,1,0,-0.3),position=(3,4,-5)),
      Viewpoint(DEF='ViewpointOrgan',centerOfRotation=(5.8,0,-24.4),description='Organ',orientation=(0,1,0,-2.3),position=(2.5,4,-7)),
      Viewpoint(DEF='ViewpointBalconyDoors',centerOfRotation=(5.8,0,-24.4),description='Balcony, doors',orientation=(0,1,0,2.2),position=(5,4,-5)),
      Viewpoint(DEF='ViewpointTopStairs',centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower',orientation=(0,1,0,1.57),position=(4.3,4,-1.2)),
      Viewpoint(DEF='ViewpointTopStairsCloser',centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower, closer',orientation=(0,1,0,1.8),position=(2.7,4,-0.9)),
      Viewpoint(DEF='ViewpointTopStairsAndBells',centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower and bells',orientation=(0,1,0,2.1),position=(1.4,4.9,-1)),
      Viewpoint(DEF='ViewpointBells',centerOfRotation=(5.8,0,-24.4),description='Bells',orientation=(0,1,0,2.9),position=(-0.2,5,-2)),
      Viewpoint(DEF='ViewpointTowerBells',centerOfRotation=(5.8,0,-24.4),description='Tower, Bells',orientation=(0,1,0,3.34),position=(-1.4,6,-3)),
      Viewpoint(DEF='ViewpointTowerArcs',centerOfRotation=(5.8,0,-24.4),description='Tower, arcs',orientation=(0,1,0,1.57),position=(-0.3,6.5,-2)),
      Viewpoint(DEF='ViewpointTowerEntrance',centerOfRotation=(5.8,0,-24.4),description='Tower, entrance',orientation=(0,1,0,-1.77),position=(-2.2,5.2,-1.8)),
      Viewpoint(DEF='ViewpointViewFromTheTower',centerOfRotation=(5.8,0,-24.4),description='View from the tower',orientation=(0,1,0,0.1),position=(-2,6,-0.3))]),
    Group(DEF='PrototypeDeclarations',
      #  ==================== <ExternProtoDeclare appinfo='Heads-up display (HUD) keeps child geometry aligned on screen in a consistent location' name='HeadsUpDisplay' url='"../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay"'> <field accessType='inputOutput' appinfo='X3D content positioned at HUD offset' name='children' type='MFNode'/> <field accessType='inputOutput' appinfo='offset position for HUD relative to current view location, default 0 0 -5' name='screenOffset' type='SFVec3f'/> <field accessType='outputOnly' appinfo='HUD position update (in world coordinates) relative to original location' name='position_changed' type='SFVec3f'/> <field accessType='outputOnly' appinfo='HUD orientation update relative to original location' name='orientation_changed' type='SFRotation'/> </ExternProtoDeclare> 
      #  ==================== 
      children=[
      ExternProtoDeclare(appinfo='Sequentially binds each Viewpoint in a set of Viewpoint USE nodes, creating an automatic tour for a scene',name='ViewpointSequencer',url=["../../Savage/Tools/Animation/ViewpointSequencerPrototype.x3d#ViewpointSequencer","https://savage.nps.edu/Savage/Tools/Animation/ViewpointSequencerPrototype.x3d#ViewpointSequencer","../../Savage/Tools/Animation/ViewpointSequencerPrototype.wrl#ViewpointSequencer","https://savage.nps.edu/Savage/Tools/Animation/ViewpointSequencerPrototype.wrl#ViewpointSequencer"],
        field=[
        field(accessType='initializeOnly',appinfo='Viewpoint USE nodes that are sequentially bound',name='viewpoints',type='MFNode',
          #  default value NULL node, overridden by ProtoInstance 
          ),
        field(accessType='inputOutput',appinfo='number of seconds between viewpoint shifts',name='interval',type='SFTime'),
        field(accessType='inputOutput',appinfo='whether ViewpointSequencer is enabled or not',name='enabled',type='SFBool'),
        field(accessType='inputOnly',appinfo='whether ViewpointSequencer is enabled or not',name='set_enabled',type='SFBool'),
        field(accessType='inputOnly',appinfo='bind previous Viewpoint in list',name='previous',type='SFBool'),
        field(accessType='inputOnly',appinfo='bind next Viewpoint in list',name='next',type='SFBool'),
        field(accessType='inputOutput',appinfo='Select message to toggle ViewpointSequencer',name='toggleMessage',type='MFString'),
        field(accessType='initializeOnly',appinfo='Font size for toggleMessage text',name='toggleMessageFontSize',type='SFFloat'),
        field(accessType='inputOutput',appinfo='Color for toggleMessage text',name='toggleMessageColor',type='SFColor'),
        field(accessType='inputOutput',appinfo='enable console output',name='traceEnabled',type='SFBool')]),
      ProtoDeclare(appinfo='TouchSensorSelected provides full TouchSensor functionality and adds output field isSelected, which only sends true events and filters out false events',name='TouchSensorSelected',
        ProtoInterface=ProtoInterface(
          field=[
          field(accessType='inputOutput',name='description',type='SFString'),
          field(accessType='inputOutput',appinfo='default value true',name='enabled',type='SFBool',value=True),
          field(accessType='inputOutput',name='metadata',type='SFNode',
            #  optional metadata about this node 
            ),
          field(accessType='outputOnly',name='hitNormal_changed',type='SFVec3f'),
          field(accessType='outputOnly',name='hitPoint_changed',type='SFVec3f'),
          field(accessType='outputOnly',name='hitTexCoord_changed',type='SFVec2f'),
          field(accessType='outputOnly',name='touchTime',type='SFTime'),
          field(accessType='outputOnly',name='isActive',type='SFBool'),
          field(accessType='outputOnly',name='isOver',type='SFBool'),
          field(accessType='outputOnly',name='isSelected',type='SFBool'),
          field(accessType='outputOnly',name='isSelected2',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected3',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected4',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected5',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected6',type='SFBool'),
          field(accessType='outputOnly',name='isSelected7',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected8',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected9',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected10',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected11',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected12',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected13',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected14',type='SFColor'),
          field(accessType='outputOnly',name='isSelected15',type='SFColor'),
          field(accessType='outputOnly',name='isSelected16',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected17',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected18',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected19',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected20',type='SFVec3f'),
          field(accessType='outputOnly',name='isSelected21',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected22',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected23',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected24',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected25',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected26',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected27',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected28',type='SFInt32'),
          field(accessType='outputOnly',name='isSelected29',type='SFInt32')]),
        ProtoBody=ProtoBody(
          children=[
          TouchSensor(DEF='TouchSensorRootNode',
            IS=IS(
              connect=[
              connect(nodeField='description',protoField='description'),
              connect(nodeField='enabled',protoField='enabled'),
              connect(nodeField='metadata',protoField='metadata'),
              connect(nodeField='hitNormal_changed',protoField='hitNormal_changed'),
              connect(nodeField='hitPoint_changed',protoField='hitPoint_changed'),
              connect(nodeField='hitTexCoord_changed',protoField='hitTexCoord_changed'),
              connect(nodeField='touchTime',protoField='touchTime'),
              connect(nodeField='isActive',protoField='isActive'),
              connect(nodeField='isOver',protoField='isOver')])),
          BooleanFilter(DEF='BooleanFilterIsActive',
            IS=IS(
              connect=[
              connect(nodeField='inputTrue',protoField='isSelected')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='BooleanFilterIsActive'),
          BooleanFilter(DEF='BooleanFilterIsActive2',
            IS=IS(
              connect=[
              connect(nodeField='inputFalse',protoField='isSelected6')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='BooleanFilterIsActive2'),
          TimeSensor(DEF='Time'),
          PositionInterpolator(DEF='Interpolator',key=[0,1],keyValue=[(0,0,0.2),(0,0,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected2')])),
          PositionInterpolator(DEF='Interpolator2',key=[0,1],keyValue=[(0,0,0),(0,0,0.2)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected3')])),
          PositionInterpolator(DEF='Interpolator3',key=[0,1],keyValue=[(0,0,0),(0,0,1)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected7')])),
          PositionInterpolator(DEF='Interpolator4',key=[0,1],keyValue=[(0,0,-1),(0,0,-1)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected8')])),
          PositionInterpolator(DEF='Interpolator5',key=[0,1],keyValue=[(1.3,-1.13,-1),(1.3,-1.13,-0.7)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected9')])),
          PositionInterpolator(DEF='Interpolator6',key=[0,1],keyValue=[(1.3,-1.13,-0.7),(1.3,-1.13,-1)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected10')])),
          PositionInterpolator(DEF='Interpolator7',key=[0,1],keyValue=[(0,0,-0.6),(0,0,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected11')])),
          PositionInterpolator(DEF='Interpolator8',key=[0,1],keyValue=[(0,0,0),(0,0,-0.6)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected12')])),
          PositionInterpolator(DEF='Interpolator9',key=[0,1],keyValue=[(0,-3,0),(0,0,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected13')])),
          PositionInterpolator(DEF='Interpolator10',key=[0,1],keyValue=[(0,0,-1),(0,0,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected16')])),
          PositionInterpolator(DEF='Interpolator11',key=[0,1],keyValue=[(0,0,0),(0,0,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected17')])),
          PositionInterpolator(DEF='Interpolator12',key=[0,1],keyValue=[(0,0,0),(0,0,-1)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected18')])),
          PositionInterpolator(DEF='Interpolator13',key=[0,1],keyValue=[(0,0,0),(0,-3,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected19')])),
          PositionInterpolator(DEF='Interpolator14',key=[0,1],keyValue=[(0,0,-0.2),(0,0,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected20')])),
          ROUTE(fromField='touchTime',fromNode='TouchSensorRootNode',toField='startTime',toNode='Time'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator2'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator3'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator4'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator5'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator6'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator7'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator8'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator9'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator10'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator11'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator12'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator13'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='Interpolator14'),
          ColorInterpolator(DEF='ColorInterpolator',key=[0,1],keyValue=[(0,0,0),(1,1,1)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected14')])),
          ColorInterpolator(DEF='ColorInterpolator2',key=[0,1],keyValue=[(0,0,0),(0,0,0)],
            IS=IS(
              connect=[
              connect(nodeField='value_changed',protoField='isSelected15')])),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='ColorInterpolator'),
          ROUTE(fromField='fraction_changed',fromNode='Time',toField='set_fraction',toNode='ColorInterpolator2'),
          IntegerTrigger(DEF='IntegerIsActive',integerKey=1,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected4')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive'),
          IntegerTrigger(DEF='IntegerIsActive2',integerKey=0,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected5')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive2'),
          IntegerTrigger(DEF='IntegerIsActive3',integerKey=1,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected21')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive3'),
          IntegerTrigger(DEF='IntegerIsActive4',integerKey=2,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected22')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive4'),
          IntegerTrigger(DEF='IntegerIsActive5',integerKey=3,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected23')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive5'),
          IntegerTrigger(DEF='IntegerIsActive6',integerKey=4,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected24')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive6'),
          IntegerTrigger(DEF='IntegerIsActive7',integerKey=5,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected25')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive7'),
          IntegerTrigger(DEF='IntegerIsActive8',integerKey=6,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected26')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive8'),
          IntegerTrigger(DEF='IntegerIsActive9',integerKey=7,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected27')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive9'),
          IntegerTrigger(DEF='IntegerIsActive10',integerKey=8,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected28')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive10'),
          IntegerTrigger(DEF='IntegerIsActive11',integerKey=9,
            IS=IS(
              connect=[
              connect(nodeField='triggerValue',protoField='isSelected29')])),
          ROUTE(fromField='isActive',fromNode='TouchSensorRootNode',toField='set_boolean',toNode='IntegerIsActive11')]))]),
    #  Here strts a big switch (it finishes at line -, useful to change from the present church to the historic church. It is made up of two groups: The first one () regards everything related to the present church, the second regards everything related to the historic churc. 
    Switch(DEF='PresentToHistorichChurch',whichChoice=0,
      #  PRESENT CHURCH 
      #  Yellow Panel of the present church 
      children=[
      Group(
        #  Here strts another big switch. (it finishes at line -, useful to hide or show the yellow panel. It is made up of two HUDs: The first one () is the writing 'Main menu' in the top right of the screen (when the panel is hidden), the second is the yellow panel and everything on it. 
        children=[
        Switch(DEF='MainmenuToMainpanel',whichChoice=0,
          children=[
          Group(
            children=[
            Transform(DEF='HudContainer1',
              children=[
              Transform(translation=(3,1.7,-5),
                children=[
                Group(
                  children=[
                  TouchSensor(DEF='touchUP',description='Main Menù'),
                  Shape(
                    geometry=Text(string=["Main Menu"],
                      fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                    appearance=Appearance(
                      material=Material(emissiveColor=(1,1,1)))),
                  Transform(DEF='MainMenuSphereLeft',scale=(1.05,1,2.3),translation=(-0.708,0.048,0.1),
                    children=[
                    Shape(
                      geometry=Sphere(radius=0.04),
                      appearance=Appearance(
                        material=Material(emissiveColor=(1,1,1))))]),
                  Transform(DEF='MainMenuSphereRight',rotation=(1,0,0,-0.23),scale=(0.88,1,1.5),translation=(0.589,0.039,0.1),
                    children=[
                    Shape(
                      geometry=Sphere(radius=0.04),
                      appearance=Appearance(
                        material=Material(emissiveColor=(1,1,1))))])])])]),
            ProximitySensor(DEF='HereIAm1',size=(10000000,10000000,10000000)),
            ROUTE(fromField='orientation_changed',fromNode='HereIAm1',toField='rotation',toNode='HudContainer1'),
            ROUTE(fromField='position_changed',fromNode='HereIAm1',toField='translation',toNode='HudContainer1')]),
          Group(
            children=[
            Transform(DEF='HudContainer2',
              children=[
              Transform(translation=(0,0.2,-5.5),
                children=[
                Group(
                  children=[
                  Transform(scale=(0.25,0.25,0.25),translation=(0,0,3),
                    #  Red pyramids are links to differents viewpoints. They are positioned in the small model of the church, on the yellow panel 
                    children=[
                    Transform(DEF='RedPyramidTransform',translation=(0,0,-1),
                      children=[
                      Transform(scale=(0.3,0.3,0.3),translation=(1.6,0.1,0.5),
                        #  Replacement 
                        children=[
                        ProtoInstance(DEF='SelectNave',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Nave')]),
                        ROUTE(fromField='isSelected',fromNode='SelectNave',toField='set_bind',toNode='ViewpointFrontView'),
                        #  Prior block start... <TouchSensor DEF='touchviewpointNave' description='Nave' enabled='false'/> <TimeSensor DEF='timeviewpointNave' cycleInterval='1' enabled='true' loop='false'/> <ROUTE fromField='touchTime' fromNode='touchviewpointNave' toField='startTime' toNode='timeviewpointNave'/> <BooleanSequencer DEF='SequencviewpointNave' key='0 1' keyValue='true true'/> <ROUTE fromField='fraction_changed' fromNode='timeviewpointNave' toField='set_fraction' toNode='SequencviewpointNave'/> <ROUTE fromField='value_changed' fromNode='SequencviewpointNave' toField='set_bind' toNode='ViewpointFrontView'/> ...prior block finish 
                        Shape(DEF='RedPyramidButton',
                          geometry=IndexedFaceSet(convex=False,coordIndex=[0,1,4,-1,3,4,0,-1,3,4,2,-1,2,4,1,-1,0,1,2,3,-1],solid=False,
                            coord=Coordinate(point=[(0,0,0),(0,0,0.25),(0.25,0,0.25),(0.25,0,0),(0.125,0.42,0.125)])),
                          appearance=Appearance(
                            material=Material(diffuseColor=(1,0.25,0.25))))]),
                      Transform(scale=(0.3,0.3,0.3),translation=(2.5,0.1,0.5),
                        children=[
                        ProtoInstance(DEF='SelectTranseptAxes',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Transept/Axes')]),
                        ROUTE(fromField='isSelected',fromNode='SelectTranseptAxes',toField='set_bind',toNode='ViewpointNaveView'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(2.9,-0.5,0.5),
                        children=[
                        ProtoInstance(DEF='SelectSacristy',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Sacristy')]),
                        ROUTE(fromField='isSelected',fromNode='SelectSacristy',toField='set_bind',toNode='ViewpointSacristyAndBackRoom'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(3.3,0.7,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideSouth',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside South')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideSouth',toField='set_bind',toNode='ViewpointBackOutside'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(1.4,0.6,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideEast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside East')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideEast',toField='set_bind',toNode='ViewpointTowerBack'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(1.4,-1,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideWest',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside West')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideWest',toField='set_bind',toNode='ViewpointRightOutside'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(-0.22,0,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideNorth',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside North')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideNorth',toField='set_bind',toNode='ViewpointFront'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(0.1,0,0.5),
                        children=[
                        ProtoInstance(DEF='SelectEntrance',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Entrance')]),
                        ROUTE(fromField='isSelected',fromNode='SelectEntrance',toField='set_bind',toNode='ViewpointFrontDoors'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(0.5,0.26,0.6),
                        children=[
                        ProtoInstance(DEF='SelectBalcony',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Balcony')]),
                        ROUTE(fromField='isSelected',fromNode='SelectBalcony',toField='set_bind',toNode='ViewpointLeftRearBalcony'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(0.26,0.6,0.7),
                        children=[
                        ProtoInstance(DEF='SelectTower',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Tower')]),
                        ROUTE(fromField='isSelected',fromNode='SelectTower',toField='set_bind',toNode='ViewpointTowerBells'),
                        Shape(USE='RedPyramidButton')])]),
                    #  Small models of the church on the yellow panel. One with the roof, the other without roof (249-260) 
                    Transform(DEF='ChurchModelTransform',rotation=(0,1,0,-1.57),scale=(0.6,0.6,0.6),translation=(0.2,0.4,0.3),
                      children=[
                      Transform(rotation=(0,0,1,-1.2),
                        children=[
                        Transform(rotation=(1,0,0,0),
                          #  Switch that permits to change from the small church with roof to the one without roof 
                          children=[
                          Switch(DEF='ChurcRoofToChurcModel',whichChoice=0,
                            children=[
                            Inline(DEF='ChurchRoof',url=["ChurchRoof.x3d","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/ChurchRoof.x3d","ChurchRoof.wrl","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/ChurchRoof.wrl"]),
                            Inline(DEF='ChurchModel',url=["ChurchModel.x3d","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/ChurchModel.x3d","ChurchModel.wrl","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/ChurchModel.wrl"])])])])]),
                    Transform(DEF='MainPanel',translation=(0.75,0,0),
                      children=[
                      Shape(
                        geometry=Box(size=(6.5,3,0.2)),
                        appearance=Appearance(
                          material=Material(diffuseColor=(1,0.75,0.25))))]),
                    #  This light is necessary when, clicking on the Lighting Button, HeadLight is turned off 
                    PointLight(DEF='PanelPointLight',ambientIntensity=1,location=(0.75,0,1),on=False,radius=1.1),
                    #  First panel, or the first screen of the panel (-) 
                    Transform(DEF='FirstPanel',translation=(0,0,0.2),
                      children=[
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='HidePanelText1',translation=(2.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton1',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel1',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel1',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NavigatingText',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Navigating"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NavigatingButton',translation=(-0.8,1.08,0),
                          children=[
                          ProtoInstance(DEF='touchNavigating',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Navigating')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNavigating',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected4',fromNode='touchNavigating',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected16',fromNode='touchNavigating',toField='translation',toNode='RedPyramidTransform'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='LightingText',translation=(0.25,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Lighting"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.25)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='LightingButton',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchLighting',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Lighting')]),
                          ROUTE(fromField='isSelected2',fromNode='touchLighting',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected6',fromNode='touchLighting',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLighting',toField='on',toNode='PanelPointLight'),
                          ROUTE(fromField='isSelected4',fromNode='touchLighting',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected16',fromNode='touchLighting',toField='translation',toNode='RedPyramidTransform'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PicturesText',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Pictures"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PicturesButton',translation=(-0.8,0.28,0),
                          children=[
                          ProtoInstance(DEF='touchPictures',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Pictures')]),
                          ROUTE(fromField='isSelected2',fromNode='touchPictures',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected4',fromNode='touchPictures',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected16',fromNode='touchPictures',toField='translation',toNode='RedPyramidTransform'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='SourcesText',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Sources"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='SourcesButton',translation=(-0.8,-0.12,0),
                          children=[
                          ProtoInstance(DEF='touchSources',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Sources')]),
                          ROUTE(fromField='isSelected2',fromNode='touchSources',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected4',fromNode='touchSources',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected16',fromNode='touchSources',toField='translation',toNode='RedPyramidTransform'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ModelingText',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Modeling"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Modeling',parameter=["target=blank"],url=["documentation/Modeling.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/Modeling.html"],
                          children=[
                          Transform(DEF='ModelingButton',translation=(-0.8,-0.52,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='HistoricCurchText',translation=(0.25,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Historic church"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.27)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HistoricCurchButton',translation=(-0.8,-0.92,0),
                          children=[
                          ProtoInstance(DEF='touchHistoricCurch',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Historic church')]),
                          ROUTE(fromField='isSelected2',fromNode='touchHistoricCurch',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected4',fromNode='touchHistoricCurch',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected16',fromNode='touchHistoricCurch',toField='translation',toNode='RedPyramidTransform'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelText1',translation=(-0.4,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Next Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelButton1',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchNextPanel1',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Next Panel')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNextPanel1',toField='translation',toNode='FirstPanel'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Second part of the First Panel, it appears clicking on Next Panel at the bottom () 
                    Transform(DEF='FirstPanelBis',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNextPanel1',toField='translation',toNode='FirstPanelBis'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='HidePanelText2',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton2',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel2',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel2',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ChurchHistoryText',translation=(0.2,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Church History"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Church History',parameter=["target=blank"],url=["documentation/ChurchHistory.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/ChurchHistory.html"],
                          children=[
                          Transform(DEF='ChurchHistoryButton',translation=(-0.8,1.08,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='BellsSoundText',translation=(0.2,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Bells sound"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BellsSoundButton',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchBellsSound',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Bells Sound')]),
                          ROUTE(fromField='isSelected2',fromNode='touchBellsSound',toField='translation',toNode='FirstPanelBis'),
                          ROUTE(fromField='isSelected4',fromNode='touchBellsSound',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected16',fromNode='touchBellsSound',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected',fromNode='touchBellsSound',toField='set_bind',toNode='ViewpointFrontFromGround'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='CoordinateSystemText',translation=(0.26,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Coordinate System"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.28)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='CoordinateSystemSphere',translation=(-0.8,0.28,0),
                          children=[
                          ProtoInstance(DEF='touchCoordinateSystem',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Coordinate System')]),
                          ROUTE(fromField='isSelected2',fromNode='touchCoordinateSystem',toField='translation',toNode='FirstPanelBis'),
                          ROUTE(fromField='isSelected4',fromNode='touchCoordinateSystem',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected16',fromNode='touchCoordinateSystem',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected',fromNode='touchCoordinateSystem',toField='set_bind',toNode='ViewpointFrontFromGround'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText1',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton1',translation=(-0.8,-0.12,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText2',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton2',translation=(-0.8,-0.52,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText3',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton3',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelText',translation=(-0.2,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Previous Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelButton1',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchPreviousPanel1',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Previous Panel')]),
                          ROUTE(fromField='isSelected3',fromNode='touchPreviousPanel1',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected2',fromNode='touchPreviousPanel1',toField='translation',toNode='FirstPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Navigating Panel, it appears clicking on the Navigating button on the first panel () 
                    Transform(DEF='NavigatingPanel',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNavigating',toField='translation',toNode='NavigatingPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='Note1',translation=(3,0.98,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoints"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButtonText1',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton1',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton1',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton1',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton1',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton1',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton1',toField='translation',toNode='NavigatingPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText3',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton3',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel3',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel3',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='FlyModeText',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Fly"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='FlyModeButton',translation=(-0.8,1.08,0),
                          children=[
                          ProtoInstance(DEF='touchFlyMode',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Fly')]),
                          ROUTE(fromField='isSelected',fromNode='touchFlyMode',toField='set_bind',toNode='NavigationFly'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='FlyModeColor',diffuseColor=(1,1,1))))]),
                        ROUTE(fromField='isSelected14',fromNode='touchFlyMode',toField='diffuseColor',toNode='FlyModeColor'),
                        Transform(DEF='WalkModeText',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Walk"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='WalkModeButton',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchWalkMode',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Walk')]),
                          ROUTE(fromField='isSelected15',fromNode='touchWalkMode',toField='diffuseColor',toNode='FlyModeColor'),
                          ROUTE(fromField='isSelected',fromNode='touchWalkMode',toField='set_bind',toNode='NavigationWalk'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='WalkModeColor',diffuseColor=(0,0,0))))]),
                        ROUTE(fromField='isSelected14',fromNode='touchWalkMode',toField='diffuseColor',toNode='WalkModeColor'),
                        ROUTE(fromField='isSelected15',fromNode='touchFlyMode',toField='diffuseColor',toNode='WalkModeColor'),
                        Transform(DEF='ExamineModeText',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Examine"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ExamineModeButton',translation=(-0.8,0.28,0),
                          children=[
                          ProtoInstance(DEF='touchExamineMode',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Examine')]),
                          ROUTE(fromField='isSelected15',fromNode='touchExamineMode',toField='diffuseColor',toNode='WalkModeColor'),
                          ROUTE(fromField='isSelected15',fromNode='touchExamineMode',toField='diffuseColor',toNode='FlyModeColor'),
                          ROUTE(fromField='isSelected',fromNode='touchExamineMode',toField='set_bind',toNode='NavigationExamine'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='ExamineModeColor',diffuseColor=(0,0,0))))]),
                        ROUTE(fromField='isSelected15',fromNode='touchFlyMode',toField='diffuseColor',toNode='ExamineModeColor'),
                        ROUTE(fromField='isSelected15',fromNode='touchWalkMode',toField='diffuseColor',toNode='ExamineModeColor'),
                        ROUTE(fromField='isSelected14',fromNode='touchExamineMode',toField='diffuseColor',toNode='ExamineModeColor'),
                        Switch(DEF='switchTour',whichChoice=0,
                          children=[
                          Transform(DEF='FullGuidedTourText',translation=(0.2,-0.2,0),
                            children=[
                            Shape(
                              geometry=Text(string=["Full Guided Tour"],
                                fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))]),
                          Transform(DEF='FullGuidedTourText2',translation=(0.2,-0.2,0),
                            children=[
                            Shape(
                              geometry=Text(string=["Resume Tour"],
                                fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='FullGuidedTourButton',translation=(-0.8,-0.12,0),
                          children=[
                          TouchSensor(DEF='touchFullGuidedTour',description='Full Guided Tour'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ShortGuidedTourText',translation=(0.2,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Short Guided Tour"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ShortGuidedTourButton',translation=(-0.8,-0.52,0),
                          children=[
                          TouchSensor(DEF='touchShortGuidedTour',description='Short Guided Tour'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='SacredFurnishingTourText',translation=(0.5,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Sacred Furnishing Tour"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='SacredFurnishingTourButton',translation=(-0.8,-0.92,0),
                          children=[
                          TouchSensor(DEF='touchSacredFurnishingTour',description='Sacred Furnishing Tour'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelText2',translation=(-0.4,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Next Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelButton2',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchNextPanel2',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Next Panel')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNextPanel2',toField='translation',toNode='NavigatingPanel'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Second part of the Navigating Panel, it appears clicking on Next Panel at the bottom () 
                    Transform(DEF='NavigatingPanelBis',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNextPanel2',toField='translation',toNode='NavigatingPanelBis'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText2',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton2',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton2',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton2',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton2',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton2',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton2',toField='translation',toNode='NavigatingPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText4',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton4',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel4',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel4',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note2',translation=(3,0.98,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='WeyPointInterpolatorTourText',translation=(0.27,1.1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Wey Point Interpolator","Tour"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.24)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='WeyPointInterpolatorTourButton',translation=(-0.8,1.08,0),
                          children=[
                          TouchSensor(DEF='touchWeyPointInterpolatorTour',description='Tour using WayPointInterpolator'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText4',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton4',translation=(-0.8,0.68,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText5',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Emptybutton5',translation=(-0.8,0.28,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText6',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton6',translation=(-0.8,-0.12,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText7',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Emptyutton7',translation=(-0.8,-0.52,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText8',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton8',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelText2',translation=(-0.3,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Previous Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelButton2',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchPreviousPanel2',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Previous Panel')]),
                          ROUTE(fromField='isSelected3',fromNode='touchPreviousPanel2',toField='translation',toNode='NavigatingPanel'),
                          ROUTE(fromField='isSelected2',fromNode='touchPreviousPanel2',toField='translation',toNode='NavigatingPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Lighting Panel, it appears clicking on the Lighting button on the First panel () 
                    Transform(DEF='LightingPanel',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchLighting',toField='translation',toNode='LightingPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText3',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton3',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton3',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton3',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton3',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton3',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton3',toField='translation',toNode='LightingPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText6',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton6',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel6',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel6',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note4',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ExteriorNavigationText',translation=(0.17,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior navigation","(Main light on)"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.25)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ExteriorNavigationButton',translation=(-0.8,1.08,0),
                          children=[
                          ProtoInstance(DEF='touchExteriorNavigation',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Exterior navigation (Main light on)')]),
                          ROUTE(fromField='isSelected',fromNode='touchExteriorNavigation',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected6',fromNode='touchExteriorNavigation',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='ExteriorNavigationColor',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light1Text',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light1"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light1Button',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchLight1',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 1')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight1',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight1',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light1Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light2Text',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light2"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light2button',translation=(-0.8,0.28,0),
                          children=[
                          ProtoInstance(DEF='touchLight2',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 2')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight2',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight2',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light2Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light3Text',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light3"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light3Button',translation=(-0.8,-0.12,0),
                          children=[
                          ProtoInstance(DEF='touchLight3',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 3')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight3',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight3',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light3Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light4Text',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light4"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light4Button',translation=(-0.8,-0.52,0),
                          children=[
                          ProtoInstance(DEF='touchLight4',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 4')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight4',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight4',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light4Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light5Text',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light5"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light5Button',translation=(-0.8,-0.92,0),
                          children=[
                          ProtoInstance(DEF='touchLight5',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 5')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight5',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight5',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light5Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelText3',translation=(-0.4,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Next Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPaneleButton3',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchNextPanel3',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Next Panel')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNextPanel3',toField='translation',toNode='LightingPanel'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Second part of the Lighting Panel, it appears clicking on Next Panel at the bottom () 
                    Transform(DEF='LightingPanelBis',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNextPanel3',toField='translation',toNode='LightingPanelBis'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText4',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton4',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton4',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton4',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton4',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton4',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton4',toField='translation',toNode='LightingPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText7',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton7',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel7',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel7',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note5',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light6Text',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light6"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light6Button',translation=(-0.8,1.08,0),
                          children=[
                          ProtoInstance(DEF='touchLight6',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 6')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight6',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight6',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light6Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light7Text',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light7"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light7Button',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchLight7',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 7')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight7',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight7',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light7Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light8Text',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light8"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light8Button',translation=(-0.8,0.28,0),
                          children=[
                          ProtoInstance(DEF='touchLight8',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 8')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight8',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight8',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light8Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light9Text',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light9"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light9Button',translation=(-0.8,-0.12,0),
                          children=[
                          ProtoInstance(DEF='touchLight9',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 9')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight9',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight9',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light9Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light10Text',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Light10"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Light10Button',translation=(-0.8,-0.52,0),
                          children=[
                          ProtoInstance(DEF='touchLight10',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Light 10')]),
                          ROUTE(fromField='isSelected6',fromNode='touchLight10',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected',fromNode='touchLight10',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='Light10Color',diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText13',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton13',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelText3',translation=(0,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Previous Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelButton3',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchPreviousPanel3',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Previous Panel')]),
                          ROUTE(fromField='isSelected3',fromNode='touchPreviousPanel3',toField='translation',toNode='LightingPanel'),
                          ROUTE(fromField='isSelected2',fromNode='touchPreviousPanel3',toField='translation',toNode='LightingPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  The following routes change color to buttons of the lighing panel 
                    ROUTE(fromField='isSelected14',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchExteriorNavigation',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight1',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight1',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight2',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight2',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight3',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight3',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight4',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight4',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight5',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight5',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight6',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight6',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight7',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight7',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight8',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight8',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight9',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight9',toField='diffuseColor',toNode='Light3Color'),
                    ROUTE(fromField='isSelected14',fromNode='touchLight10',toField='diffuseColor',toNode='Light10Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light1Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='ExteriorNavigationColor'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light2Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light4Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light5Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light6Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light7Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light8Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light9Color'),
                    ROUTE(fromField='isSelected15',fromNode='touchLight10',toField='diffuseColor',toNode='Light3Color'),
                    #  The following blue spheres represent the position of the sources of light (pointlights or spotlights) in the model 
                    Transform(DEF='SourcesOfLightSpheres',
                      children=[
                      ROUTE(fromField='isSelected17',fromNode='touchLighting',toField='translation',toNode='SourcesOfLightSpheres'),
                      ROUTE(fromField='isSelected18',fromNode='touchBackButton3',toField='translation',toNode='SourcesOfLightSpheres'),
                      ROUTE(fromField='isSelected18',fromNode='touchBackButton4',toField='translation',toNode='SourcesOfLightSpheres'),
                      Transform(DEF='SourcesOfLightFirstCombination',translation=(0,0,-1),
                        children=[
                        Transform(DEF='ThreeWindowsn',translation=(0.66,0.31,0.5),
                          children=[
                          Transform(DEF='SourcesOfLightSecondCombination',
                            children=[
                            Transform(DEF='BlueSphere1',
                              children=[
                              Shape(
                                geometry=Sphere(radius=0.05),
                                appearance=Appearance(
                                  material=Material(diffuseColor=(0,0,1))))]),
                            Transform(DEF='BlueSphere2',translation=(0.54,0,0),
                              children=[
                              Shape(
                                geometry=Sphere(radius=0.05),
                                appearance=Appearance(
                                  material=Material(diffuseColor=(0,0,1))))]),
                            Transform(DEF='BlueSphere3',translation=(1.08,0,0),
                              children=[
                              Shape(
                                geometry=Sphere(radius=0.05),
                                appearance=Appearance(
                                  material=Material(diffuseColor=(0,0,1))))])]),
                          Transform(DEF='BlueSphere4',translation=(0,-0.5,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere5',translation=(0.55,-0.5,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere6',translation=(1.1,-0.5,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))])])]),
                      Transform(DEF='SourcesOfLightThirdCombination',translation=(0,0,-1),
                        children=[
                        Transform(DEF='SourcesOfLightFourthCombination',translation=(0.66,0.31,0.5),
                          children=[
                          Transform(DEF='BlueSphere7',
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere8',translation=(0.54,0,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere9',translation=(1.08,0,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere10',translation=(1.6,0.38,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))])])]),
                      Transform(DEF='SourcesOfLightFifthCombination',translation=(0,0,-1),
                        children=[
                        Transform(DEF='SourcesOfLightSixthCombination',translation=(0.9,0.14,0.5),
                          children=[
                          Transform(DEF='BlueSphere11',
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere12',translation=(0.69,0,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere13',translation=(1.38,0,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere14',translation=(1.35,0.38,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))]),
                          Transform(DEF='BlueSphere15',translation=(1.42,-0.38,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.05),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,1))))])])])]),
                    #  The following routes change the blu spheres representing the souurces of light 
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected10',fromNode='touchExteriorNavigation',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight1',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight2',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight3',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight4',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected17',fromNode='touchLight4',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight5',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected17',fromNode='touchLight5',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight6',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected17',fromNode='touchLight6',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight7',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected17',fromNode='touchLight7',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight8',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected17',fromNode='touchLight8',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight9',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected17',fromNode='touchLight9',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    ROUTE(fromField='isSelected16',fromNode='touchLight10',toField='translation',toNode='SourcesOfLightFirstCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='SourcesOfLightFifthCombination'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='SourcesOfLightThirdCombination'),
                    ROUTE(fromField='isSelected17',fromNode='touchLight10',toField='translation',toNode='SourcesOfLightSecondCombination'),
                    #  Short descriptions of the various light. For example: Light 3 = Morning Beam. They appear in bottom right of the model. 
                    Transform(DEF='LightDescriptions',translation=(1.3,-1.13,-0.7),
                      children=[
                      ROUTE(fromField='isSelected9',fromNode='touchLighting',toField='translation',toNode='LightDescriptions'),
                      ROUTE(fromField='isSelected10',fromNode='touchBackButton3',toField='translation',toNode='LightDescriptions'),
                      ROUTE(fromField='isSelected10',fromNode='touchBackButton4',toField='translation',toNode='LightDescriptions'),
                      Transform(DEF='Light1Description',
                        children=[
                        Shape(
                          geometry=Text(string=["Simulating sun light (SpotLights)"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0)))),
                        Transform(DEF='NoteB',translation=(0.9,-0.22,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Blue spheres represent sources of light"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])]),
                      Transform(DEF='Light2Description',
                        children=[
                        Shape(
                          geometry=Text(string=["No Lights"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0))))]),
                      Transform(DEF='Light3Description',
                        children=[
                        Shape(
                          geometry=Text(string=["Morning Beam"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0)))),
                        Transform(USE='NoteB')]),
                      Transform(DEF='Light4Description',
                        children=[
                        Shape(
                          geometry=Text(string=["Morning Light"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0)))),
                        Transform(USE='NoteB')]),
                      Transform(DEF='Light5Description',
                        children=[
                        Shape(
                          geometry=Text(string=["Artificial light (PointLights from chandeliers)"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0)))),
                        Transform(USE='NoteB')]),
                      Transform(DEF='Light6Description',
                        children=[
                        Shape(
                          geometry=Text(string=["Artificial light (PointLights from chandeliers)"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0)))),
                        Transform(USE='NoteB')]),
                      Transform(DEF='Light78910Description',
                        children=[
                        Shape(
                          geometry=Text(string=["Simulating sun light (PointLights)"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0)))),
                        Transform(USE='NoteB')]),
                      Transform(DEF='ExteriorNavigationDescription',
                        children=[
                        Shape(
                          geometry=Text(string=["Headlight on"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0)))),
                        Transform(USE='NoteB')])]),
                    #  The following routes change the text that describe each light in the lighting panel 
                    ROUTE(fromField='isSelected7',fromNode='touchExteriorNavigation',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchExteriorNavigation',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchExteriorNavigation',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight1',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight1',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight1',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight2',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight2',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight2',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight3',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight3',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight3',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight4',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight4',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight4',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight5',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight5',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight5',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight6',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight6',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight6',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight7',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight7',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight7',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight8',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight8',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight8',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight9',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight9',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight9',toField='translation',toNode='LightDescriptions'),
                    ROUTE(fromField='isSelected7',fromNode='touchLight10',toField='translation',toNode='Light78910Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='ExteriorNavigationDescription'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='Light1Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='Light3Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='Light4Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='Light5Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='Light2Description'),
                    ROUTE(fromField='isSelected8',fromNode='touchLight10',toField='translation',toNode='Light6Description'),
                    ROUTE(fromField='isSelected9',fromNode='touchLight10',toField='translation',toNode='LightDescriptions'),
                    #  Pictures Panel, it appears clicking on the Pictures button on the First panel () 
                    Transform(DEF='PicturesPanel',
                      children=[
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText5',translation=(2,1.2,0),
                          children=[
                          ROUTE(fromField='isSelected3',fromNode='touchPictures',toField='translation',toNode='PicturesPanel'),
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton5',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton5',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton5',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton5',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton5',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton5',toField='translation',toNode='PicturesPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText8',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton8',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel8',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel8',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note6',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='FacadePicturesText',translation=(-0.27,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Facade"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Facade Pictures',parameter=["target=blank"],url=["documentation/pictures/Facade.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Facade.html"],
                          children=[
                          Transform(DEF='FacadePicturesButton',translation=(-0.8,1.08,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorLeftPicturesText',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior left"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior left',parameter=["target=blank"],url=["documentation/pictures/ExteriorLeft.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/ExteriorLeft.html"],
                          children=[
                          Transform(DEF='ExteriorLeftPicturesButton',translation=(-0.8,0.68,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorRightPicturesText',translation=(0.08,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior right"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior right',parameter=["target=blank"],url=["documentation/pictures/ExteriorRight.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/ExteriorRight.html"],
                          children=[
                          Transform(DEF='ExteriorRightPicturesButton',translation=(-0.8,0.28,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorBackPicturesText',translation=(0.07,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior back',parameter=["target=blank"],url=["documentation/pictures/ExteriorBack.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/ExteriorBack.html"],
                          children=[
                          Transform(DEF='ExteriorBackPicturesButton',translation=(-0.8,-0.12,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='EntrancePicturesText',translation=(-0.16,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Entrance"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Entrance',parameter=["target=blank"],url=["documentation/pictures/Entrance.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Entrance.html"],
                          children=[
                          Transform(DEF='EntrancePicturesButton',translation=(-0.8,-0.52,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='NavePicturesText',translation=(-0.34,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Nave"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Nave',parameter=["target=blank"],url=["documentation/pictures/Nave.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Nave.html"],
                          children=[
                          Transform(DEF='NavePicturesButton',translation=(-0.8,-0.92,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='NextPanelText4',translation=(-0.4,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Next Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelButton4',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchNextPanel4',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Next Panel')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNextPanel4',toField='translation',toNode='PicturesPanel'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Second part of the Pictures Panel, it appears clicking on Next Panel at the bottom () 
                    Transform(DEF='PicturesPanelBis',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNextPanel4',toField='translation',toNode='PicturesPanelBis'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText6',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton6',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton6',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton6',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton6',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton6',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton6',toField='translation',toNode='PicturesPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText9',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton9',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel9',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel9',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note7',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TranseptAndAxesPicturesText',translation=(0.11,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Transept and axes"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Transept and axes',parameter=["target=blank"],url=["documentation/pictures/TranseptAxes.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/TranseptAxes.html"],
                          children=[
                          Transform(DEF='TranseptAndAxesPicturesButton',translation=(-0.8,1.08,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='SacristyPicturesText',translation=(-0.2,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Sacristy"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Sacristy',parameter=["target=blank"],url=["documentation/pictures/Sacristy.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Sacristy.html"],
                          children=[
                          Transform(DEF='SacristyPicturesButton',translation=(-0.8,0.68,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='BalconyPicturesText',translation=(-0.2,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Balcony"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Balcony',parameter=["target=blank"],url=["documentation/pictures/Balcony.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Balcony.html"],
                          children=[
                          Transform(DEF='BalconyPicturesButton',translation=(-0.8,0.28,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='TowerPicturesText',translation=(-0.28,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Tower"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Tower',parameter=["target=blank"],url=["documentation/pictures/Tower.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Tower.html"],
                          children=[
                          Transform(DEF='TowerPicturesButton',translation=(-0.8,-0.12,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='FurnishingPicturesText',translation=(-0.04,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Furnishing"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Furnishing',parameter=["target=blank"],url=["documentation/pictures/Furnishing.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Furnishing.html"],
                          children=[
                          Transform(DEF='FurnishingPicturesButton',translation=(-0.8,-0.52,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='DecorationsPicturesText',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Decorations"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Decorations',parameter=["target=blank"],url=["documentation/pictures/Decorations.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pictures/Decorations.html"],
                          children=[
                          Transform(DEF='DecorationsPicturesButton',translation=(-0.8,-0.92,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='PreviousPanelText4',translation=(0,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Previous Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelButton4',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchPreviousPanel4',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Previous Panel')]),
                          ROUTE(fromField='isSelected3',fromNode='touchPreviousPanel4',toField='translation',toNode='PicturesPanel'),
                          ROUTE(fromField='isSelected2',fromNode='touchPreviousPanel4',toField='translation',toNode='PicturesPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Sources Panel, it appears clicking on the Sources button on the First panel () 
                    Transform(DEF='SourcesPanel',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchSources',toField='translation',toNode='SourcesPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText7',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton7',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton7',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton7',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton7',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton7',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton7',toField='translation',toNode='SourcesPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText10',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton10',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel10',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel10',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note8',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='FacadeSourcesText',translation=(-0.27,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Facade"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Facade',parameter=["target=blank"],url=["documentation/sources/Facade.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Facade.html"],
                          children=[
                          Transform(DEF='FacadeSourcesButton',translation=(-0.8,1.08,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorLeftSourcesText',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior left"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior left',parameter=["target=blank"],url=["documentation/sources/ExteriorLeft.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/ExteriorLeft.html"],
                          children=[
                          Transform(DEF='ExteriorLeftSourcesButton',translation=(-0.8,0.68,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorRightSourcesText',translation=(0.08,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior right"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior right',parameter=["target=blank"],url=["documentation/sources/ExteriorRight.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/ExteriorRight.html"],
                          children=[
                          Transform(DEF='ExteriorRightSourcesButton',translation=(-0.8,0.28,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorBackSourcesText',translation=(0.07,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior back',parameter=["target=blank"],url=["documentation/sources/ExteriorBack.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/ExteriorBack.html"],
                          children=[
                          Transform(DEF='ExteriorBackSourcesButton',translation=(-0.8,-0.12,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='EntranceSourcesText',translation=(-0.16,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Entrance"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Entrance',parameter=["target=blank"],url=["documentation/sources/Entrance.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Entrance.html"],
                          children=[
                          Transform(DEF='EntranceSourcesButton',translation=(-0.8,-0.52,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='NaveSourcesText',translation=(-0.34,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Nave"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Nave',parameter=["target=blank"],url=["documentation/sources/Nave.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Nave.html"],
                          children=[
                          Transform(DEF='NaveSourcesButton',translation=(-0.8,-0.92,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='NextPanelText5',translation=(-0.4,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Next Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelButton5',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchNextPanel5',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Next Panel')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNextPanel5',toField='translation',toNode='SourcesPanel'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Second part of the Sources Panel, it appears clicking on Next Panel at the bottom () 
                    Transform(DEF='SourcesPanelBis',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNextPanel5',toField='translation',toNode='SourcesPanelBis'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText8',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton8',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton8',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton8',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton8',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton8',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton8',toField='translation',toNode='SourcesPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText11',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton11',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel11',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel11',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note9',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TranseptAndAxesSourcesText',translation=(0.11,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Transept and axes"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Transept and axes',parameter=["target=blank"],url=["documentation/sources/TranseptAxes.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/TranseptAxes.html"],
                          children=[
                          Transform(DEF='TranseptAndAxesSourcesButton',translation=(-0.8,1.08,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='SacristySourcesText',translation=(-0.2,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Sacristy"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Sacristy',parameter=["target=blank"],url=["documentation/sources/Sacristy.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Sacristy.html"],
                          children=[
                          Transform(DEF='SacristySourcesButton',translation=(-0.8,0.68,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='BalconySourcesText',translation=(-0.2,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Balcony"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Balcony',parameter=["target=blank"],url=["documentation/sources/Balcony.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Balcony.html"],
                          children=[
                          Transform(DEF='BalconySourcesButton',translation=(-0.8,0.28,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='TowerSourcesText',translation=(-0.28,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Tower"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Tower',parameter=["target=blank"],url=["documentation/sources/Tower.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Tower.html"],
                          children=[
                          Transform(DEF='TowerSourcesButton',translation=(-0.8,-0.12,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='FurnishingSourcesText',translation=(-0.04,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Furnishing"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Furnishing',parameter=["target=blank"],url=["documentation/sources/Furnishing.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Furnishing.html"],
                          children=[
                          Transform(DEF='FurnishingSourcesButton',translation=(-0.8,-0.52,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='DecorationsSourcesText',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Decorations"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Decorations',parameter=["target=blank"],url=["documentation/sources/Decorations.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/sources/Decorations.html"],
                          children=[
                          Transform(DEF='DecorationsSourcesButton',translation=(-0.8,-0.92,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='PreviousPanelText5',translation=(0,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Previous Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelButton5',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchPreviousPanel5',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Previous Panel')]),
                          ROUTE(fromField='isSelected3',fromNode='touchPreviousPanel5',toField='translation',toNode='SourcesPanel'),
                          ROUTE(fromField='isSelected2',fromNode='touchPreviousPanel5',toField='translation',toNode='SourcesPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Historic Church Panel, it appears clicking on the Historic Church button on the First panel () 
                    Transform(DEF='HistoricChurchPanel',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchHistoricCurch',toField='translation',toNode='HistoricChurchPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText9',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton9',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton9',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton9',toField='translation',toNode='FirstPanel'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton9',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton9',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton9',toField='translation',toNode='HistoricChurchPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText5',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton5',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel5',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel5',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note3',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TodayText',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Today"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TodayButton',translation=(-0.8,1.08,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(1,1,1))))]),
                        Transform(DEF='Mid19thCenturyText',translation=(0.3,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Mid 19th Century"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Mid19thCenturyButton',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchMid19thCentury',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Mid 19th Century')]),
                          ROUTE(fromField='isSelected4',fromNode='touchMid19thCentury',toField='whichChoice',toNode='PresentToHistorichChurch'),
                          ROUTE(fromField='isSelected',fromNode='touchMid19thCentury',toField='headlight',toNode='NavigationFly'),
                          ROUTE(fromField='isSelected6',fromNode='touchMid19thCentury',toField='on',toNode='PanelPointLight'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText9',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton9',translation=(-0.8,0.28,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText10',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton10',translation=(-0.8,-0.12,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText11',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton11',translation=(-0.8,-0.52,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText12',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton12',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Bells Sound Panel, it appears clicking on the Bells Sound button on the First panel (). It brings you in front of bells 
                    Transform(DEF='BellsSoundPanel',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchBellsSound',toField='translation',toNode='BellsSoundPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText10',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton10',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton10',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton10',toField='translation',toNode='FirstPanelBis'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton10',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton10',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton10',toField='translation',toNode='BellsSoundPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText12',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton12',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel12',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel12',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note10',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note11',translation=(3,-1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Green references take you in front of bells"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TextBellsSound',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Click on bells in the main","model to start animation","and sound"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Green pyramids are links to viewpoints in front of bells. They are positioned in the small model of the church (only in the Bells Sound Panel), on the yellow panel 
                    Transform(DEF='GreenPyramidTransform',translation=(0,0,-1),
                      children=[
                      ROUTE(fromField='isSelected16',fromNode='touchBellsSound',toField='translation',toNode='GreenPyramidTransform'),
                      ROUTE(fromField='isSelected18',fromNode='touchBackButton10',toField='translation',toNode='GreenPyramidTransform'),
                      Transform(scale=(0.3,0.3,0.3),translation=(-0.22,0,0.51),
                        children=[
                        ProtoInstance(DEF='SelectBellsFromGround',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Bells From Ground')]),
                        ROUTE(fromField='isSelected',fromNode='SelectBellsFromGround',toField='set_bind',toNode='ViewpointFrontFromGround'),
                        Shape(DEF='GreenPyramidButton',
                          geometry=IndexedFaceSet(convex=False,coordIndex=[0,1,4,-1,3,4,0,-1,3,4,2,-1,2,4,1,-1,0,1,2,3,-1],solid=False,
                            coord=Coordinate(point=[(0,0,0),(0,0,0.25),(0.25,0,0.25),(0.25,0,0),(0.125,0.42,0.125)])),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0.235,0.698,0.141))))]),
                      Transform(scale=(0.3,0.3,0.3),translation=(0.26,0.6,0.71),
                        children=[
                        ProtoInstance(DEF='SelectBellsFromTower',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Bells From Tower')]),
                        ROUTE(fromField='isSelected',fromNode='SelectBellsFromTower',toField='set_bind',toNode='ViewpointTowerBells'),
                        Shape(USE='GreenPyramidButton')])]),
                    Transform(DEF='CoordinateSystemPanel',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchCoordinateSystem',toField='translation',toNode='CoordinateSystemPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText11',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton11',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton11',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton11',toField='translation',toNode='FirstPanelBis'),
                          ROUTE(fromField='isSelected5',fromNode='touchBackButton11',toField='whichChoice',toNode='ChurcRoofToChurcModel'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton11',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton11',toField='translation',toNode='CoordinateSystemPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText13',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton13',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel13',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected5',fromNode='touchHidePanel13',toField='whichChoice',toNode='MainmenuToMainpanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note12',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note13',translation=(3,-1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Green references take you in front of facade"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TextCoordinateSystem',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Click on left facade in the","main model to view the","center of coordinate system"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    Transform(DEF='GreenPyramidTransform2',translation=(0,0,-1),
                      children=[
                      ROUTE(fromField='isSelected16',fromNode='touchCoordinateSystem',toField='translation',toNode='GreenPyramidTransform2'),
                      ROUTE(fromField='isSelected18',fromNode='touchBackButton11',toField='translation',toNode='GreenPyramidTransform2'),
                      Transform(scale=(0.3,0.3,0.3),translation=(-0.22,0,0.51),
                        children=[
                        ProtoInstance(DEF='SelectCoordinateSystemFromGround',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='CoordinateSystem From Ground')]),
                        ROUTE(fromField='isSelected',fromNode='SelectCoordinateSystemFromGround',toField='set_bind',toNode='ViewpointFrontFromGround'),
                        Shape(USE='GreenPyramidButton')])])])])])]),
            ProximitySensor(DEF='HereIAm2',size=(10000000,10000000,10000000)),
            ROUTE(fromField='orientation_changed',fromNode='HereIAm2',toField='rotation',toNode='HudContainer2'),
            ROUTE(fromField='position_changed',fromNode='HereIAm2',toField='translation',toNode='HudContainer2')]),
          Group(
            children=[
            Transform(DEF='HudContainer3',
              children=[
              Transform(translation=(3,1.7,-5),
                children=[
                Group(
                  children=[
                  TouchSensor(DEF='touchStopTour',description='Pause Tour'),
                  Shape(
                    geometry=Text(string=["Pause Tour"],
                      fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                    appearance=Appearance(
                      material=Material(emissiveColor=(1,1,1)))),
                  Transform(DEF='StopTourSphereLeft',scale=(1.05,1,2.3),translation=(-0.708,0.048,0.1),
                    children=[
                    Shape(
                      geometry=Sphere(radius=0.04),
                      appearance=Appearance(
                        material=Material(emissiveColor=(1,1,1))))]),
                  Transform(DEF='StopTourSphereRight',rotation=(1,0,0,-0.23),scale=(0.88,1,1.5),translation=(0.589,0.039,0.1),
                    children=[
                    Shape(
                      geometry=Sphere(radius=0.04),
                      appearance=Appearance(
                        material=Material(emissiveColor=(1,1,1))))])])])]),
            ProximitySensor(DEF='HereIAm3',size=(10000000,10000000,10000000)),
            ROUTE(fromField='orientation_changed',fromNode='HereIAm3',toField='rotation',toNode='HudContainer3'),
            ROUTE(fromField='position_changed',fromNode='HereIAm3',toField='translation',toNode='HudContainer3')])]),
        TimeSensor(DEF='timeUP'),
        ROUTE(fromField='touchTime',fromNode='touchUP',toField='startTime',toNode='timeUP'),
        IntegerSequencer(DEF='SequencUP',key=[0,1],keyValue=[0,1]),
        ROUTE(fromField='fraction_changed',fromNode='timeUP',toField='set_fraction',toNode='SequencUP'),
        ROUTE(fromField='value_changed',fromNode='SequencUP',toField='whichChoice',toNode='MainmenuToMainpanel'),
        #  Model of the present church 
        Inline(DEF='Church',url=["Church.x3d","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/Church.x3d","Church.wrl","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/Church.wrl"])]),
      #  HISTORIC CHURCH 
      #  Yellow Panel of the historic church 
      Group(
        #  Blue small pyramids are links to the past documentation. They are positioned in the small model of the church, on the yellow panel, if requested 
        children=[
        Transform(DEF='BlueSmallPyramidTransform',translation=(0,-3,0),
          children=[
          Transform(translation=(4,0,-0.6),
            children=[
            Anchor(description='Exterior',parameter=["target=blank"],url=["documentation/pastDocumentation/Exterior.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Exterior.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(0,-0.5,6),
                children=[
                Shape(DEF='BlueSmallPyramidButton',
                  geometry=IndexedFaceSet(convex=False,coordIndex=[0,1,4,-1,3,4,0,-1,3,4,2,-1,2,4,1,-1,0,1,2,3,-1],solid=False,
                    coord=Coordinate(point=[(0,0,0),(0,0,0.25),(0.25,0,0.25),(0.25,0,0),(0.125,0.42,0.125)])),
                  appearance=Appearance(
                    material=Material(diffuseColor=(0,0,1))))])]),
            Anchor(description='Exterior',parameter=["target=blank"],url=["documentation/pastDocumentation/Exterior.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Exterior.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(-9,0.5,-8),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Interior',parameter=["target=blank"],url=["documentation/pastDocumentation/Interior.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Interior.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(2,-0.4,-11),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Furnishing',parameter=["target=blank"],url=["documentation/pastDocumentation/Furnishing.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Furnishing.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(2,-0.4,-26),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Baptistery',parameter=["target=blank"],url=["documentation/pastDocumentation/Baptistery.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Baptistery.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(-8,-0.4,-26),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Sacristy',parameter=["target=blank"],url=["documentation/pastDocumentation/Sacristy.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Sacristy.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(11,-0.4,-26),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Floor Plan',parameter=["target=blank"],url=["documentation/pastDocumentation/FloorPlan.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/FloorPlan.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(8,-0.5,6),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Wall Decoration',parameter=["target=blank"],url=["documentation/pastDocumentation/WallDecoration.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/WallDecoration.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(-1.4,-0.4,-18),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Balcony',parameter=["target=blank"],url=["documentation/pastDocumentation/Balcony.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Balcony.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(3.5,3,-2),
                children=[
                Shape(USE='BlueSmallPyramidButton')])]),
            Anchor(description='Tower Plan',parameter=["target=blank"],url=["documentation/pastDocumentation/Tower.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Tower.html"],
              children=[
              Transform(scale=(0.4,0.4,0.4),translation=(-6.2,6,-1),
                children=[
                Shape(USE='BlueSmallPyramidButton')])])])]),
        #  Here strts a big switch. (it finishes at line -, useful to hide or show the yellow panel. It is made up of two HUDs: The first one () is the yellow panel and everything on it , the second is the writing 'Main menu' in the top right of the screen (when the panel is hidden). 
        Switch(DEF='MainmenuToMainPanelPast',whichChoice=0,
          children=[
          Group(
            children=[
            Transform(DEF='HudContainer5',
              children=[
              Transform(translation=(0,0.2,-5.5),
                children=[
                Group(
                  #  Red pyramids are links to differents viewpoints. They are positioned in the small model of the church, on the yellow panel 
                  children=[
                  Transform(scale=(0.25,0.25,0.25),translation=(0,0,3),
                    #  Red pyramids are links to differents viewpoints. They are positioned in the small model of the church, on the yellow panel 
                    children=[
                    Transform(DEF='RedPyramidTransformPast',
                      children=[
                      Transform(scale=(0.3,0.3,0.3),translation=(1.6,0.1,0.5),
                        #  Replacement 
                        children=[
                        ProtoInstance(DEF='SelectNavePast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Nave')]),
                        ROUTE(fromField='isSelected',fromNode='SelectNavePast',toField='set_bind',toNode='ViewpointFrontView'),
                        #  Prior block start... <TouchSensor DEF='touchviewpointNave' description='Nave' enabled='false'/> <TimeSensor DEF='timeviewpointNave' cycleInterval='1' enabled='true' loop='false'/> <ROUTE fromField='touchTime' fromNode='touchviewpointNave' toField='startTime' toNode='timeviewpointNave'/> <BooleanSequencer DEF='SequencviewpointNave' key='0 1' keyValue='true true'/> <ROUTE fromField='fraction_changed' fromNode='timeviewpointNave' toField='set_fraction' toNode='SequencviewpointNave'/> <ROUTE fromField='value_changed' fromNode='SequencviewpointNave' toField='set_bind' toNode='ViewpointFrontView'/> ...prior block finish 
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(2.5,0.1,0.5),
                        children=[
                        ProtoInstance(DEF='SelectTranseptAxesPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Transept/Axes')]),
                        ROUTE(fromField='isSelected',fromNode='SelectTranseptAxesPast',toField='set_bind',toNode='ViewpointNaveView'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(2.9,-0.5,0.5),
                        children=[
                        ProtoInstance(DEF='SelectSacristyPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Sacristy')]),
                        ROUTE(fromField='isSelected',fromNode='SelectSacristyPast',toField='set_bind',toNode='ViewpointSacristyAndBackRoom'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(3.3,0.7,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideSouthPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside South')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideSouthPast',toField='set_bind',toNode='ViewpointBackOutside'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(1.4,0.6,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideEastPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside East')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideEastPast',toField='set_bind',toNode='ViewpointTowerBack'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(1.4,-1,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideWestPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside West')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideWestPast',toField='set_bind',toNode='ViewpointRightOutside'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(-0.22,0,0.5),
                        children=[
                        ProtoInstance(DEF='SelectOutsideNorthPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Outside North')]),
                        ROUTE(fromField='isSelected',fromNode='SelectOutsideNorthPast',toField='set_bind',toNode='ViewpointFront'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(0.1,0,0.5),
                        children=[
                        ProtoInstance(DEF='SelectEntrancePast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Entrance')]),
                        ROUTE(fromField='isSelected',fromNode='SelectEntrancePast',toField='set_bind',toNode='ViewpointFrontDoors'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(0.5,0.26,0.6),
                        children=[
                        ProtoInstance(DEF='SelectBalconyPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Balcony')]),
                        ROUTE(fromField='isSelected',fromNode='SelectBalconyPast',toField='set_bind',toNode='ViewpointLeftRearBalcony'),
                        Shape(USE='RedPyramidButton')]),
                      Transform(scale=(0.3,0.3,0.3),translation=(0.26,0.6,0.7),
                        children=[
                        ProtoInstance(DEF='SelectTowerPast',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Tower')]),
                        ROUTE(fromField='isSelected',fromNode='SelectTowerPast',toField='set_bind',toNode='ViewpointTowerBells'),
                        Shape(USE='RedPyramidButton')])]),
                    #  Blue big pyramids are links to the past documentation. They are positioned in the main model of the church, if requested. 
                    Transform(DEF='BlueBigPyramidTransform',translation=(0,0,-0.6),
                      children=[
                      Anchor(description='Exterior front',parameter=["target=blank"],url=["documentation/pastDocumentation/ExteriorFront.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/ExteriorFront.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(1.6,0.1,0.5),
                          children=[
                          Shape(DEF='BlueBigPyramidButton',
                            geometry=IndexedFaceSet(convex=False,coordIndex=[0,1,4,-1,3,4,0,-1,3,4,2,-1,2,4,1,-1,0,1,2,3,-1],solid=False,
                              coord=Coordinate(point=[(0,0,0),(0,0,0.25),(0.25,0,0.25),(0.25,0,0),(0.125,0.42,0.125)])),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,1))))])]),
                      Anchor(description='Interior',parameter=["target=blank"],url=["documentation/pastDocumentation/Interior.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Interior.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(1,0.1,0.5),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Sacristy',parameter=["target=blank"],url=["documentation/pastDocumentation/Sacristy.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Sacristy.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(1.8,-0.4,0.5),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Baptistery',parameter=["target=blank"],url=["documentation/pastDocumentation/Baptistery.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Baptistery.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(1.7,0.5,0.5),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Wall decorations',parameter=["target=blank"],url=["documentation/pastDocumentation/WallDecorations.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/WallDecorations.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(1.2,0.3,0.55),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Exterior',parameter=["target=blank"],url=["documentation/pastDocumentation/ExteriorFront.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Exterior.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(1.1,0.6,0.5),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Exterior',parameter=["target=blank"],url=["documentation/pastDocumentation/Exterior.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Exterior.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(-0.07,0.3,0.5),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Furnishing',parameter=["target=blank"],url=["documentation/pastDocumentation/Furnishing.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Furnishing.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(1.75,0.1,0.5),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Floor Plan',parameter=["target=blank"],url=["documentation/pastDocumentation/FloorPlan.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/FloorPlan.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(0.5,-0.5,0.5),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Balcony',parameter=["target=blank"],url=["documentation//pastDocumentation/Balcony.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation//pastDocumentation/Balcony.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(0.32,0.05,0.6),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Anchor(description='Tower',parameter=["target=blank"],url=["documentation//pastDocumentation/Tower.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation//pastDocumentation/Tower.html"],
                        children=[
                        Transform(scale=(0.3,0.3,0.3),translation=(0.32,0.5,0.7),
                          children=[
                          Shape(USE='BlueBigPyramidButton')])]),
                      Transform(DEF='Note14',translation=(1.6,-1.3,0.2),
                        children=[
                        Shape(
                          geometry=Text(string=["Blue references open a link to the sources of the reconstruction"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0))))]),
                      Transform(DEF='HidePanelLinksText',translation=(0.28,-1.05,0.2),
                        children=[
                        Shape(
                          geometry=Text(string=["Hide Panel links"],
                            fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.27)),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0))))]),
                      Transform(DEF='HidePanelLinksButton',translation=(-0.5,-1,0.1),
                        children=[
                        ProtoInstance(DEF='touchHidePanelLinks',name='TouchSensorSelected',
                          fieldValue=[
                          fieldValue(name='description',value='Hide Panel links')]),
                        ROUTE(fromField='isSelected12',fromNode='touchHidePanelLinks',toField='translation',toNode='BlueBigPyramidTransform'),
                        ROUTE(fromField='isSelected19',fromNode='touchHidePanelLinks',toField='translation',toNode='BlueSmallPyramidTransform'),
                        Shape(
                          geometry=Sphere(radius=0.1),
                          appearance=Appearance(
                            material=Material(diffuseColor=(0,0,0))))])]),
                    Transform(DEF='ChurchModelTransformPast',rotation=(0,1,0,-1.57),scale=(0.6,0.6,0.6),translation=(0.2,0.4,0.3),
                      children=[
                      Transform(rotation=(0,0,1,-1.2),
                        children=[
                        Transform(rotation=(1,0,0,0),
                          children=[
                          Switch(DEF='Century19thModelToCentury19thModel2',whichChoice=0,
                            children=[
                            Inline(DEF='Century19thModel',url=["Century19thModel.x3d","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/Century19thModel.x3d","Century19thModel.wrl","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/Altar.wrl"]),
                            Inline(DEF='Century19thModel2',url=["Century19thModel2.x3d","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/Century19thModel2.x3d","Century19thModel.wrl","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/Century19thModel.wrl"])])])])]),
                    Transform(DEF='MainPanelPast',translation=(0.75,0,0),
                      children=[
                      Shape(
                        geometry=Box(size=(6.5,3,0.2)),
                        appearance=Appearance(
                          material=Material(diffuseColor=(1,0.75,0.25))))]),
                    Transform(DEF='FirstPanelPast',
                      children=[
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='HidePanelText14',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton14',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel14',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected4',fromNode='touchHidePanel14',toField='whichChoice',toNode='MainmenuToMainPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NavigatingTextPast',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Navigating"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NavigatingButtonPast',translation=(-0.8,1.08,0),
                          children=[
                          ProtoInstance(DEF='touchNavigatingPast',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Navigating')]),
                          ROUTE(fromField='isSelected16',fromNode='touchNavigatingPast',toField='translation',toNode='RedPyramidTransform'),
                          ROUTE(fromField='isSelected2',fromNode='touchNavigatingPast',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected16',fromNode='touchNavigatingPast',toField='translation',toNode='RedPyramidTransformPast'),
                          ROUTE(fromField='isSelected5',fromNode='touchNavigatingPast',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PresentAndHistoricChurchText',translation=(-0.56,0.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Present and historic church"],
                              fontStyle=FontStyle(justify=["BEGIN","BEGIN"],size=0.25)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PresentAndHistoricChurchButton',translation=(-0.8,0.28,0),
                          children=[
                          ProtoInstance(DEF='touchPresentAndHistoricChurch',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Present and historic church')]),
                          ROUTE(fromField='isSelected2',fromNode='touchPresentAndHistoricChurch',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected5',fromNode='touchPresentAndHistoricChurch',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          ROUTE(fromField='isSelected11',fromNode='touchPresentAndHistoricChurch',toField='translation',toNode='RedPyramidTransformPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PastdocumentationText',translation=(-0.151,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Past documentation"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PastDocumentationButton',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchPastDocumentation',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Past documentation')]),
                          ROUTE(fromField='isSelected2',fromNode='touchPastDocumentation',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected5',fromNode='touchPastDocumentation',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          ROUTE(fromField='isSelected16',fromNode='touchPastDocumentation',toField='translation',toNode='RedPyramidTransformPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText14',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton14',translation=(-0.8,-0.12,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText15',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton15',translation=(-0.8,-0.52,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText16',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton16',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Present and historic church panel, it appears when the historic church is shown for the first time and clicking on the Present and historic church button (in the FirstPanelPast) 
                    Transform(DEF='PresentAndHistoricChurchPanel',translation=(0,0,0.2),
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchPresentAndHistoricChurch',toField='translation',toNode='PresentAndHistoricChurchPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='NavigationAndSourcesText',translation=(2.1,1.28,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Navigation","and sources"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.22)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NavigationAndSourcesButton',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchNavigationAndSources',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Navigation and sources')]),
                          ROUTE(fromField='isSelected3',fromNode='touchNavigationAndSources',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected2',fromNode='touchNavigationAndSources',toField='translation',toNode='PresentAndHistoricChurchPanel'),
                          ROUTE(fromField='isSelected4',fromNode='touchNavigationAndSources',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          ROUTE(fromField='isSelected12',fromNode='touchNavigationAndSources',toField='translation',toNode='RedPyramidTransformPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText15',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton15',translation=(3.05,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel15',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected4',fromNode='touchHidePanel15',toField='whichChoice',toNode='MainmenuToMainPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note15',translation=(3,-1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoints"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TodayTextPast',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Today"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='TodayButtonPast',translation=(-0.8,1.08,0),
                          children=[
                          ProtoInstance(DEF='touchToday',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Today')]),
                          ROUTE(fromField='isSelected5',fromNode='touchToday',toField='whichChoice',toNode='PresentToHistorichChurch'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Mid19thCenturyTextPast',translation=(0.3,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Mid 19th Century"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Mid19thCenturyButtonPast',translation=(-0.8,0.68,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(1,1,1))))]),
                        Transform(DEF='EmptyText17',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton17',translation=(-0.8,0.28,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText18',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton18',translation=(-0.8,-0.12,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText19',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton19',translation=(-0.8,-0.52,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText20',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton20',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Navigating Panel Past, it appears clicking on the Navigating button on the First Panel Past () 
                    Transform(DEF='NavigatingPanelPast',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNavigatingPast',toField='translation',toNode='NavigatingPanelPast'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText12',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton12',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton12',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton12',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected4',fromNode='touchBackButton12',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton12',toField='translation',toNode='RedPyramidTransformPast'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton12',toField='translation',toNode='NavigatingPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText16',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton16',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel16',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected4',fromNode='touchHidePanel16',toField='whichChoice',toNode='MainmenuToMainPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='FlyModeTextPast',translation=(0,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Fly"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='FlyModeButtonPast',translation=(-0.8,1.08,0),
                          children=[
                          ProtoInstance(DEF='touchFlyModePast',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Fly')]),
                          ROUTE(fromField='isSelected',fromNode='touchFlyModePast',toField='set_bind',toNode='NavigationFly'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='FlyModeColorPast',diffuseColor=(1,1,1))))]),
                        ROUTE(fromField='isSelected14',fromNode='touchFlyModePast',toField='diffuseColor',toNode='FlyModeColorPast'),
                        Transform(DEF='WalkModeTextPast',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Walk"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='WalkModeButtonPast',translation=(-0.8,0.68,0),
                          children=[
                          ProtoInstance(DEF='touchWalkModePast',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Walk')]),
                          ROUTE(fromField='isSelected',fromNode='touchWalkModePast',toField='set_bind',toNode='NavigationWalk'),
                          ROUTE(fromField='isSelected15',fromNode='touchWalkModePast',toField='diffuseColor',toNode='FlyModeColorPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='WalkModeColorPast',diffuseColor=(0,0,0))))]),
                        ROUTE(fromField='isSelected15',fromNode='touchFlyModePast',toField='diffuseColor',toNode='WalkModeColorPast'),
                        ROUTE(fromField='isSelected14',fromNode='touchWalkModePast',toField='diffuseColor',toNode='WalkModeColorPast'),
                        Transform(DEF='ExamineModeTextPast',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Examine"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ExamineModeButtonPast',translation=(-0.8,0.28,0),
                          children=[
                          ProtoInstance(DEF='touchExamineModePast',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Examine')]),
                          ROUTE(fromField='isSelected15',fromNode='touchExamineModePast',toField='diffuseColor',toNode='FlyModeColorPast'),
                          ROUTE(fromField='isSelected15',fromNode='touchExamineModePast',toField='diffuseColor',toNode='WalkModeColorPast'),
                          ROUTE(fromField='isSelected',fromNode='touchExamineModePast',toField='set_bind',toNode='NavigationExamine'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(DEF='ExamineModeColorPast',diffuseColor=(0,0,0))))]),
                        ROUTE(fromField='isSelected14',fromNode='touchExamineModePast',toField='diffuseColor',toNode='ExamineModeColorPast'),
                        ROUTE(fromField='isSelected15',fromNode='touchWalkModePast',toField='diffuseColor',toNode='ExamineModeColorPast'),
                        ROUTE(fromField='isSelected15',fromNode='touchFlyModePast',toField='diffuseColor',toNode='ExamineModeColorPast'),
                        Transform(DEF='FullGuidedTourTextPast',translation=(0.2,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Full Guided Tour"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='FullGuidedTourButtonPast',translation=(-0.8,-0.12,0),
                          children=[
                          TouchSensor(DEF='touchFullGuidedTourPast',description='Full guided tour'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ShortGuidedTourTextPast',translation=(0.26,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Short Guided Tour"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ShortGuidedTourButtonPast',translation=(-0.8,-0.52,0),
                          children=[
                          TouchSensor(DEF='touchShortGuidedTourPast',description='Short Guided Tour'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='SacredFurnishingTourTextPast',translation=(0.55,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Sacred Furnishing Tour"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.26)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='SacredFurnishingTourButtonPast',translation=(-0.8,-0.92,0),
                          children=[
                          TouchSensor(DEF='touchSacredFurnishingTourPast',description='Sacred Furnishing Tour'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelText6',translation=(-0.4,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Next Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelButton6',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchNextPanel6',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Next Panel')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNextPanel6',toField='translation',toNode='NavigatingPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Second part of the Navigating Panel Past, it appears clicking on Next Panel at the bottom () 
                    Transform(DEF='NavigatingPanelPastBis',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNextPanel6',toField='translation',toNode='NavigatingPanelPastBis'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText13',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton13',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton13',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton13',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected4',fromNode='touchBackButton13',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton13',toField='translation',toNode='RedPyramidTransformPast'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton13',toField='translation',toNode='NavigatingPanelPastBis'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText17',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelButton17',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel17',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected4',fromNode='touchHidePanel17',toField='whichChoice',toNode='MainmenuToMainPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='WeyPointInterpolatorTourTextPast',translation=(0.27,1.1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Wey Point Interpolator","Tour"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.24)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='WeyPointInterpolatorTourButtonPast',translation=(-0.8,1.08,0),
                          children=[
                          TouchSensor(DEF='touchWeyPointInterpolatorTourPast',description='Way Point Interpolator Tour'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText21',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton21',translation=(-0.8,0.68,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText22',translation=(0,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton22',translation=(-0.8,0.28,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText23',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton23',translation=(-0.8,-0.12,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText24',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton24',translation=(-0.8,-0.52,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText25',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton25',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelText6',translation=(-0.2,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Previous Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelButton6',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchPreviousPanel6',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Previous Panel')]),
                          ROUTE(fromField='isSelected3',fromNode='touchPreviousPanel6',toField='translation',toNode='NavigatingPanelPast'),
                          ROUTE(fromField='isSelected2',fromNode='touchPreviousPanel6',toField='translation',toNode='NavigatingPanelPastBis'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Past Documentation Panel, it appears clicking on the Past Documentation button on the First Panel Past () 
                    Transform(DEF='PastDocumentationPanel',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchPastDocumentation',toField='translation',toNode='PastDocumentationPanel'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText14',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton14',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton14',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Backnn')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton14',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected4',fromNode='touchBackButton14',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton14',toField='translation',toNode='RedPyramidTransformPast'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton14',toField='translation',toNode='PastDocumentationPanel'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText18',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelbutton18',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel18',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected4',fromNode='touchHidePanel18',toField='whichChoice',toNode='MainmenuToMainPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note16',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ShowPastDocumentation',
                          children=[
                          ROUTE(fromField='isSelected20',fromNode='touchHidePanelLinks',toField='translation',toNode='ShowPastDocumentation'),
                          Transform(translation=(3,-1.02,0),
                            children=[
                            Shape(
                              geometry=Text(string=["SHOW links to past documentation","while navigating in the main model"],
                                fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.27)),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))]),
                          Transform(DEF='ShowPastDocumentationButton',translation=(0.7,-1,0),
                            children=[
                            ProtoInstance(DEF='touchShowPastDocumentation',name='TouchSensorSelected',
                              fieldValue=[
                              fieldValue(name='description',value='SHOW links to past documentation while navigating in the main model')]),
                            ROUTE(fromField='isSelected11',fromNode='touchShowPastDocumentation',toField='translation',toNode='BlueBigPyramidTransform'),
                            ROUTE(fromField='isSelected8',fromNode='touchShowPastDocumentation',toField='translation',toNode='ShowPastDocumentation'),
                            ROUTE(fromField='isSelected13',fromNode='touchShowPastDocumentation',toField='translation',toNode='BlueSmallPyramidTransform'),
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorFrontPastDocumentationText',translation=(-0.18,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior Front"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior front',parameter=["target=blank"],url=["documentation/pastDocumentation/ExteriorFront.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/ExteriorFront.html"],
                          children=[
                          Transform(DEF='ExteriorFrontPastDocumentationButton',translation=(-0.8,1.08,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='ExteriorPastDocumentationText',translation=(-0.07,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Exterior"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Exterior',parameter=["target=blank"],url=["documentation/pastDocumentation/Exterior.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Exterior.html"],
                          children=[
                          Transform(DEF='ExteriorPastDocumentationButton',translation=(-0.8,0.68,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='FloorPlanPastDocumentationText',translation=(-0.2,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Floor plan"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Floor Plan',parameter=["target=blank"],url=["documentation/pastDocumentation/FloorPlan.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/FloorPlan.html"],
                          children=[
                          Transform(DEF='FloorPlanPastDocumentationButton',translation=(-0.8,0.28,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='InteriorPastDocumentationText',translation=(0.27,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Interior"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Interior',parameter=["target=blank"],url=["documentation/pastDocumentation/Interior.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Interior.html"],
                          children=[
                          Transform(DEF='InteriorPastDocumentationButton',translation=(-0.8,-0.12,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='WallDecorationsPastDocumentationText',translation=(-0.01,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Wall decorations"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Wall decorations',parameter=["target=blank"],url=["documentation/pastDocumentation/WallDecorations.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/WallDecorations.html"],
                          children=[
                          Transform(DEF='WallDecorationsPastDocumentationButton',translation=(-0.8,-0.52,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='FurnishingPastDocumentationText',translation=(-0.25,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Furnishing"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Furnishing',parameter=["target=blank"],url=["documentation/pastDocumentation/Furnishing.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Furnishing.html"],
                          children=[
                          Transform(DEF='FurnishingPastDocumentationButton',translation=(-0.8,-0.92,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='NextPanelText7',translation=(-0.4,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Next Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='NextPanelButton7',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchNextPanel7',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Next Panel')]),
                          ROUTE(fromField='isSelected2',fromNode='touchNextPanel7',toField='translation',toNode='PastDocumentationPanel'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])]),
                    #  Second part of the Past Documentatation Panel, it appears clicking on Next Panel at the bottom () 
                    Transform(DEF='PastDocumentationPanelBis',
                      children=[
                      ROUTE(fromField='isSelected3',fromNode='touchNextPanel7',toField='translation',toNode='PastDocumentationPanelBis'),
                      Transform(translation=(-1.2,0,0),
                        children=[
                        Transform(DEF='BackButtonText15',translation=(2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Back"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='BackButton15',translation=(1.5,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchBackButton15',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Back')]),
                          ROUTE(fromField='isSelected3',fromNode='touchBackButton15',toField='translation',toNode='FirstPanelPast'),
                          ROUTE(fromField='isSelected4',fromNode='touchBackButton15',toField='whichChoice',toNode='Century19thModelToCentury19thModel2'),
                          ROUTE(fromField='isSelected18',fromNode='touchBackButton15',toField='translation',toNode='RedPyramidTransformPast'),
                          ROUTE(fromField='isSelected2',fromNode='touchBackButton15',toField='translation',toNode='PastDocumentationPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='HidePanelText19',translation=(3.2,1.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Hide Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Hidepanelbutton19',translation=(2.7,1.28,0),
                          children=[
                          ProtoInstance(DEF='touchHidePanel19',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Hide panel')]),
                          ROUTE(fromField='isSelected4',fromNode='touchHidePanel19',toField='whichChoice',toNode='MainmenuToMainPanelPast'),
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='Note17',translation=(3,0.96,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Red links go to corresponding viewpoint"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='ShowPastDocumentationTextBis',
                          children=[
                          ROUTE(fromField='isSelected20',fromNode='touchHidePanelLinks',toField='translation',toNode='ShowPastDocumentationTextBis'),
                          ROUTE(fromField='isSelected8',fromNode='touchShowPastDocumentation',toField='translation',toNode='ShowPastDocumentationTextBis'),
                          Transform(translation=(3,-1.02,0),
                            children=[
                            Shape(
                              geometry=Text(string=["SHOW links to past documentation","while navigating in the main model"],
                                fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.27)),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))]),
                          Transform(DEF='ShowPastDocumentationButtonBis',translation=(0.7,-1,0),
                            children=[
                            ProtoInstance(DEF='touchShowPastDocumentationBis',name='TouchSensorSelected',
                              fieldValue=[
                              fieldValue(name='description',value='SHOW links to past documentation while navigating in the main model')]),
                            ROUTE(fromField='isSelected11',fromNode='touchShowPastDocumentationBis',toField='translation',toNode='BlueBigPyramidTransform'),
                            ROUTE(fromField='isSelected8',fromNode='touchShowPastDocumentationBis',toField='translation',toNode='ShowPastDocumentationTextBis'),
                            ROUTE(fromField='isSelected13',fromNode='touchShowPastDocumentationBis',toField='translation',toNode='BlueSmallPyramidTransform'),
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='TowerPastDocumentationText',translation=(-0.115,1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Tower"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Tower',parameter=["target=blank"],url=["documentation/pastDocumentation/Tower.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Tower.html"],
                          children=[
                          Transform(DEF='TowerPastDocumentationButton',translation=(-0.8,1.08,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='BalconyPastDocumentationText',translation=(0,0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Balcony"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Balcony',parameter=["target=blank"],url=["documentation/pastDocumentation/Balcony.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Balcony.html"],
                          children=[
                          Transform(DEF='BalconyPastDocumentationButton',translation=(-0.8,0.68,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='BaptisteryPastDocumentationText',translation=(-0.1,0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Baptistery"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Baptistery',parameter=["target=blank"],url=["documentation/pastDocumentation/Baptistery.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Baptistery.html"],
                          children=[
                          Transform(DEF='BaptisteryPastDocumentationButton',translation=(-0.8,0.28,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='SacristyPastDocumentationText',translation=(0,-0.2,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Sacristy"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Anchor(description='Sacristy',parameter=["target=blank"],url=["documentation/pastDocumentation/Sacristy.html","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/documentation/pastDocumentation/Sacristy.html"],
                          children=[
                          Transform(DEF='SacristyPastDocumentationButton',translation=(-0.8,-0.12,0),
                            children=[
                            Shape(
                              geometry=Sphere(radius=0.1),
                              appearance=Appearance(
                                material=Material(diffuseColor=(0,0,0))))])]),
                        Transform(DEF='EmptyText26',translation=(0,-0.6,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton26',translation=(-0.8,-0.52,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyText27',translation=(0,-1,0),
                          children=[
                          Shape(
                            geometry=Text(string=["x"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='EmptyButton27',translation=(-0.8,-0.92,0),
                          children=[
                          Shape(
                            geometry=Sphere(radius=0.1),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelText7',translation=(-0.2,-1.3,0),
                          children=[
                          Shape(
                            geometry=Text(string=["Previous Panel"],
                              fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.2)),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))]),
                        Transform(DEF='PreviousPanelButton7',translation=(-0.8,-1.25,0),
                          children=[
                          ProtoInstance(DEF='touchPreviousPanel7',name='TouchSensorSelected',
                            fieldValue=[
                            fieldValue(name='description',value='Previous Panel')]),
                          ROUTE(fromField='isSelected3',fromNode='touchPreviousPanel7',toField='translation',toNode='PastDocumentationPanel'),
                          ROUTE(fromField='isSelected2',fromNode='touchPreviousPanel7',toField='translation',toNode='PastDocumentationPanelBis'),
                          Shape(
                            geometry=Sphere(radius=0.05),
                            appearance=Appearance(
                              material=Material(diffuseColor=(0,0,0))))])])])])])])]),
            ProximitySensor(DEF='HereIAm5',size=(10000000,10000000,10000000)),
            ROUTE(fromField='orientation_changed',fromNode='HereIAm5',toField='rotation',toNode='HudContainer5'),
            ROUTE(fromField='position_changed',fromNode='HereIAm5',toField='translation',toNode='HudContainer5')]),
          Group(
            children=[
            Transform(DEF='HudContainer4',
              children=[
              Transform(translation=(3,1.7,-5),
                children=[
                Group(
                  children=[
                  TouchSensor(DEF='touchUpHistory',description='Main Menù'),
                  Shape(
                    geometry=Text(string=["Main Menu"],
                      fontStyle=FontStyle(justify=["MIDDLE","MIDDLE"],size=0.3)),
                    appearance=Appearance(
                      material=Material(emissiveColor=(1,1,1)))),
                  Transform(DEF='MainMenuSphereLeftPast',scale=(1.05,1,2.3),translation=(-0.708,0.048,0.1),
                    children=[
                    Shape(
                      geometry=Sphere(radius=0.04),
                      appearance=Appearance(
                        material=Material(emissiveColor=(1,1,1))))]),
                  Transform(DEF='MainMenuSphereRightPast',rotation=(1,0,0,-0.23),scale=(0.88,1,1.5),translation=(0.589,0.039,0.1),
                    children=[
                    Shape(
                      geometry=Sphere(radius=0.04),
                      appearance=Appearance(
                        material=Material(emissiveColor=(1,1,1))))])])])]),
            ProximitySensor(DEF='HereIAm4',size=(10000000,10000000,10000000)),
            ROUTE(fromField='orientation_changed',fromNode='HereIAm4',toField='rotation',toNode='HudContainer4'),
            ROUTE(fromField='position_changed',fromNode='HereIAm4',toField='translation',toNode='HudContainer4')])]),
        TimeSensor(DEF='timeUpHistory'),
        ROUTE(fromField='touchTime',fromNode='touchUpHistory',toField='startTime',toNode='timeUpHistory'),
        IntegerSequencer(DEF='SequencUpHistory',key=[0,1],keyValue=[1,0]),
        ROUTE(fromField='fraction_changed',fromNode='timeUpHistory',toField='set_fraction',toNode='SequencUpHistory'),
        ROUTE(fromField='value_changed',fromNode='SequencUpHistory',toField='whichChoice',toNode='MainmenuToMainPanelPast'),
        #  Model of the historic church 
        Inline(DEF='history',url=["SanCarlosChurchHistory.x3d","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/SanCarlosChurchHistory.x3d","SanCarlosChurchHistory.wrl","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/SanCarlosChurchHistory.wrl"])])]),
    #  ViewPointSequencer 
    Transform(scale=(0.5,0.5,0.5),translation=(100,0,0),
      children=[
      ProtoInstance(DEF='ExampleViewpointSequencer',name='ViewpointSequencer',
        fieldValue=[
        fieldValue(name='viewpoints',
          children=[
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='San Carlos Cathedral, front from ground',orientation=(1,0,0,0.3),position=(5.8,-0.5,15)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='San Carlos Cathedral, front',position=(4.3,5,25)),
          #  <ROUTE fromField='isBound' fromNode='ViewpointFrontAbove' toField='set_bind' toNode='NavigationExamine'/> <ROUTE fromField='isBound' fromNode='ViewpointFront' toField='set_bind' toNode='NavigationExamine'/> 
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='San Carlos Cathedral, front above',orientation=(1,0,0,-0.349),position=(5.3,16,30)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Oblique outside view',orientation=(1,1,0,-0.5),position=(-12.8,15,20)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Overhead view',orientation=(1,0,0,-1.57),position=(5.8,70,-23)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Oblique outside view',orientation=(0,1,0,0.5),position=(20,4,20)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Facade details',orientation=(1,1,0,0.6),position=(9.2,4,7)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Right outside',orientation=(0,1,0,1.57),position=(50,-2,-26.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Sacristy',orientation=(0,1,0,2.37),position=(30,0,-55.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Back outside',orientation=(0,1,0,3.4),position=(-8,7,-75)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Back outside',orientation=(0,1,0,-2.5),position=(-8,5,-25)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Interior Left rear balcony',orientation=(1,1,0,-0.3),position=(3,4,-5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Front doors, looking in',position=(5.8,-0.3,2)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Front doors, looking in',orientation=(0,1,0,-1.3),position=(4.3,-0.9,-0.8)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Front doors, looking in',orientation=(0,1,0,-2.4),position=(5.1,-0.8,-8.2)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Front doors, looking in',orientation=(0,1,0,-1.87),position=(5.1,1.5,-9.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Front doors, looking in',orientation=(0,1,0,-1.57),position=(7.7,1,-10.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Front doors, looking in',orientation=(0,1,0,-0.6),position=(5.1,1.5,-10.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Interior Front2',position=(5.8,0,-23)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Rear',orientation=(0,1,0,-0.3),position=(4.8,0,-33)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Transept',orientation=(0,1,0,-1.3),position=(4.8,0,-33)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Transept',orientation=(0,1,0,2.8),position=(13.8,-0.5,-36)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Rear',orientation=(0,1,0,1.3),position=(9.8,0,-33)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Rear',orientation=(0,1,0,-0.1),position=(4.8,0,-33)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Sacristy',orientation=(0,1,0,-0.8),position=(9.8,0,-40.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Sacristy',orientation=(0,1,0,1.5),position=(17.8,0,-45.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Nave - View',orientation=(0,1,0,3.14),position=(5.8,0,-40.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Nave - Balcony',orientation=(0,1,0,3.14),position=(5.8,0,-21)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Nave - Balcony',orientation=(0,1,0,1.57),position=(3.8,1,-21.4)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Nave - Balcony',orientation=(0,1,0,1.57),position=(3.2,0.85,-20.1)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Nave - Balcony',orientation=(0,1,0,2.6),position=(5.8,1,-18)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Nave - Balcony',orientation=(0,1,0,1.9),position=(6.8,-0.8,-2.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Entrance - Stairs to tower',orientation=(0,1,0,1.57),position=(6.4,0,-1.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Stairs to tower and balcony',orientation=(1,1,0,-1.1),position=(-3.09,4.2,-0.7)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Stairs to tower and balcony',orientation=(0,1,0,-1.57),position=(-3.09,3,-1.5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Left rear balcony1',orientation=(0,1,0,-0.7),position=(2.1,4,-2.7)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Left rear balcony1',orientation=(0,1,0,-1.8),position=(2.1,4,-2.7)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Left rear balcony1',orientation=(1,1,0,-0.3),position=(3,4,-5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Left rear balcony2 - Organ',orientation=(0,1,0,-2.3),position=(2.5,4,-7)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Left rear balcony3',orientation=(0,1,0,2.2),position=(5,4,-5)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower',orientation=(0,1,0,1.57),position=(4.3,4,-1.2)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower',orientation=(0,1,0,1.8),position=(2.7,4,-0.9)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower',orientation=(0,1,0,2.1),position=(1.4,4.9,-1)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower',orientation=(0,1,0,2.9),position=(-0.2,5,-2)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Tower - Bells',orientation=(0,1,0,3.34),position=(-1.4,6,-2.2)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower',orientation=(0,1,0,1.57),position=(-0.3,6.5,-2)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Top stairs to tower',orientation=(0,1,0,-1.77),position=(-2.2,5.2,-1.8)),
          Viewpoint(centerOfRotation=(5.8,0,-24.4),description='Tower - View',orientation=(0,1,0,0.1),position=(-2,6,-0.3))]),
        fieldValue(name='interval',value=2),
        #  initially enabled is off, scene provides selectable text to activate 
        fieldValue(name='enabled',value=False)])]),
    BooleanToggle(DEF='ToggleSequencer'),
    ROUTE(fromField='isActive',fromNode='touchFullGuidedTour',toField='set_boolean',toNode='ToggleSequencer'),
    ROUTE(fromField='toggle_changed',fromNode='ToggleSequencer',toField='enabled',toNode='ExampleViewpointSequencer'),
    IntegerTrigger(DEF='IntStop',integerKey=2),
    ROUTE(fromField='isActive',fromNode='touchFullGuidedTour',toField='set_boolean',toNode='IntStop'),
    ROUTE(fromField='triggerValue',fromNode='IntStop',toField='whichChoice',toNode='MainmenuToMainpanel'),
    IntegerTrigger(DEF='IntStop2',integerKey=1),
    ROUTE(fromField='isActive',fromNode='touchStopTour',toField='set_boolean',toNode='IntStop2'),
    ROUTE(fromField='triggerValue',fromNode='IntStop2',toField='whichChoice',toNode='MainmenuToMainpanel'),
    ROUTE(fromField='isActive',fromNode='touchStopTour',toField='set_boolean',toNode='ToggleSequencer'),
    IntegerTrigger(DEF='IntStop3',integerKey=1),
    ROUTE(fromField='isActive',fromNode='touchStopTour',toField='set_boolean',toNode='IntStop3'),
    ROUTE(fromField='triggerValue',fromNode='IntStop3',toField='whichChoice',toNode='switchTour'),
    #  Example use: https://savage.nps.edu/Savage/Tools/Animation/ViewpointSequencerExample.x3d 
    #  ==================== 
    #  Light Switch 
    Switch(DEF='LightSwitch',whichChoice=0,
      children=[
      Group(DEF='AlternativeLight1',
        #  Spotlights from windows (left side) 
        children=[
        SpotLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),cutOffAngle=1,direction=(20,1,-40),intensity=0.2,location=(-6,1,-35)),
        SpotLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),cutOffAngle=1,direction=(20,1,-30),intensity=0.2,location=(1.7,1,-25.4)),
        SpotLight(ambientIntensity=0.2,color=(0.7,0.7,0.7),cutOffAngle=1,direction=(20,1,-20),intensity=0.4,location=(1.7,1,-17))]),
      Group(DEF='AlternativeLight2',
        #  DirectionalLights. They don't seem to work when child of a group node 
        children=[
        DirectionalLight(color=(0.4,0.4,0.4),direction=(-20,1,0)),
        DirectionalLight(color=(0.4,0.4,0.4),direction=(20,1,0)),
        DirectionalLight(color=(0.4,0.4,0.4),direction=(0,1,20)),
        DirectionalLight(color=(0.4,0.4,0.4),direction=(0,1,-60))]),
      Group(DEF='AlternativeLight3',
        #  Spotlights from windows (left side). It simulates a "First morning beam" 
        children=[
        DirectionalLight(color=(0.5,0.5,0.5),direction=(20,1,30),intensity=0.5),
        DirectionalLight(color=(0.5,0.5,0.5),direction=(-20,1,30),intensity=0.5),
        SpotLight(ambientIntensity=0.4,beamWidth=1.5,cutOffAngle=1,direction=(20,1,-50),location=(-6,1,-35),radius=10),
        SpotLight(ambientIntensity=0.4,beamWidth=1.5,cutOffAngle=1,direction=(20,1,-40),location=(1.7,1,-25.4),radius=10),
        SpotLight(ambientIntensity=0.4,beamWidth=1.5,cutOffAngle=1,direction=(20,1,-57),location=(1.7,1,-17),radius=10)]),
      Group(DEF='AlternativeLight4',
        #  Spotlights from windows (left side). It simulates a "Morning Light" 
        children=[
        DirectionalLight(color=(0.6,0.6,0.6),direction=(20,1,-30),intensity=0.6),
        DirectionalLight(color=(0.6,0.6,0.6),direction=(-20,1,-30),intensity=0.6),
        SpotLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),cutOffAngle=1,direction=(20,1,-40),intensity=0.6,location=(-6,1,-35),radius=10),
        SpotLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),cutOffAngle=1,direction=(20,1,-30),intensity=0.6,location=(1.7,1,-25.4),radius=10),
        SpotLight(ambientIntensity=0.2,beamWidth=1,color=(0.6,0.6,0.6),cutOffAngle=1,direction=(20,1,-20),intensity=0.6,location=(1.7,1,-17),radius=10)]),
      Group(DEF='AlternativeLight5',
        #  PointLights from chandeliers, simulating artificial light 
        children=[
        PointLight(DEF='Point1',color=(0.8,0.8,0.8),intensity=0.8,location=(5.8,2.4,-11.5),radius=12.5),
        PointLight(DEF='Point2',color=(0.8,0.8,0.8),intensity=0.8,location=(5.8,2.4,-23),radius=12.5),
        PointLight(DEF='Point3',color=(0.8,0.8,0.8),intensity=0.8,location=(-1.4,2.4,-34.5),radius=12.5),
        PointLight(DEF='Point4',color=(0.8,0.8,0.8),intensity=0.8,location=(13,2.4,-34.5),radius=12.5),
        PointLight(DEF='Point5',color=(0.8,0.8,0.8),intensity=0.8,location=(5.8,2.4,-34.5),radius=12.5),
        PointLight(DEF='Point6',color=(0.8,0.8,0.8),intensity=0.8,location=(5.8,1,-1),radius=12.5),
        PointLight(DEF='Point7',color=(0.8,0.8,0.8),intensity=0.8,location=(5.8,1,-5),radius=12.5)]),
      Group(DEF='AlternativeLight6',
        #  PointLights from chandeliers, simulating artificial light. Tested with HeadLight ON 
        children=[
        PointLight(DEF='Point1a',color=(0.5,0.5,0.5),intensity=0.5,location=(5.8,2.4,-11.5),radius=8),
        PointLight(DEF='Point2a',color=(0.5,0.5,0.5),intensity=0.5,location=(5.8,2.4,-23),radius=8),
        PointLight(DEF='Point3a',color=(0.5,0.5,0.5),intensity=0.5,location=(-1.4,2.4,-34.5),radius=8),
        PointLight(DEF='Point4a',color=(0.5,0.5,0.5),intensity=0.5,location=(13,2.4,-34.5),radius=8),
        PointLight(DEF='Point5a',color=(0.5,0.5,0.5),intensity=0.5,location=(5.8,2.4,-34.5),radius=8),
        PointLight(DEF='Point6a',color=(0.5,0.5,0.5),intensity=0.5,location=(5.8,1,-1),radius=8),
        PointLight(DEF='Point7a',color=(0.5,0.5,0.5),intensity=0.5,location=(5.8,1,-5),radius=8)]),
      Group(DEF='AlternativeLight7',
        #  PointLights from windows (left side). Simulating sunlight 
        children=[
        PointLight(intensity=0.5,location=(-6,1,-35)),
        PointLight(color=(0.1,0.1,0.1),intensity=0.05,location=(1.7,1,-25.4),radius=10),
        PointLight(ambientIntensity=0.4,color=(0.5,0.5,0.5),intensity=0.7,location=(1.7,1,-17),radius=10),
        PointLight(ambientIntensity=0.4,color=(0.5,0.5,0.5),intensity=0.8,location=(1.7,1,-7.5),radius=10)]),
      Group(DEF='AlternativeLight8',
        #  PointLights from windows (left side). Simulating sunlight. Changing Radius Changes the "Intensity" 
        children=[
        PointLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),intensity=0.2,location=(-6,1,-35),radius=30),
        PointLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),intensity=0.2,location=(1.7,1,-25.4),radius=30),
        PointLight(ambientIntensity=0.4,color=(0.7,0.7,0.7),intensity=0.4,location=(1.7,1,-17),radius=30),
        PointLight(ambientIntensity=0.4,color=(0.7,0.7,0.7),intensity=0.4,location=(1.7,1,-7.5),radius=30)]),
      Group(DEF='AlternativeLight9',
        #  PointLights from windows (both sides, six windows). Good inside navigation. 
        children=[
        PointLight(ambientIntensity=0.6,color=(0.5,0.5,0.5),intensity=0.6,location=(1.7,1,-25.4),radius=30),
        PointLight(ambientIntensity=0.3,color=(0.7,0.7,0.7),intensity=0.3,location=(1.7,1,-17),radius=10),
        PointLight(ambientIntensity=0.01,color=(0.4,0.4,0.4),intensity=0.01,location=(1.7,1,-7.5),radius=5),
        PointLight(ambientIntensity=0.6,color=(0.5,0.5,0.5),intensity=0.6,location=(9,1,-25.4),radius=30),
        PointLight(ambientIntensity=0.3,color=(0.7,0.7,0.7),intensity=0.3,location=(9,1,-17),radius=10),
        PointLight(ambientIntensity=0.01,color=(0.1,0.1,0.1),intensity=0.01,location=(9,1,-7.5),radius=5)]),
      Group(DEF='AlternativeLight10',
        #  PointLights from windows (left side). Good inside navigation, but the light is too uniform on one side 
        children=[
        PointLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),intensity=0.2,location=(-6,1,-35)),
        PointLight(ambientIntensity=0.2,color=(0.4,0.4,0.4),intensity=0.2,location=(1.7,1,-25.4)),
        PointLight(ambientIntensity=0.4,color=(0.7,0.7,0.7),intensity=0.4,location=(1.7,1,-17)),
        PointLight(ambientIntensity=0.4,color=(0.7,0.7,0.7),intensity=0.4,location=(1.7,1,-7.5))])]),
    ROUTE(fromField='isSelected5',fromNode='touchMid19thCentury',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected5',fromNode='touchExteriorNavigation',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected5',fromNode='touchLight1',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected21',fromNode='touchLight2',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected22',fromNode='touchLight3',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected23',fromNode='touchLight4',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected24',fromNode='touchLight5',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected25',fromNode='touchLight6',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected26',fromNode='touchLight7',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected27',fromNode='touchLight8',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected28',fromNode='touchLight9',toField='whichChoice',toNode='LightSwitch'),
    ROUTE(fromField='isSelected28',fromNode='touchLight10',toField='whichChoice',toNode='LightSwitch')])
) # X3D model complete

####################################################################################################
# Self-test diagnostics
####################################################################################################

print('Self-test diagnostics for SanCarlosCathedral.py:')
if        metaDiagnostics(newModel): # built-in utility method in X3D class
    print(metaDiagnostics(newModel)) # display meta info, hint, warning, error, TODO values in this model
# print('check newModel.XML() serialization...')
newModelXML= newModel.XML() # test export method XML() for exceptions during export
newModel.XMLvalidate()
# print(newModelXML) # diagnostic

try:
#   print('check newModel.VRML() serialization...')
    newModelVRML=newModel.VRML() # test export method VRML() for exceptions during export
    # print(prependLineNumbers(newModelVRML)) # debug
    print("Python-to-VRML export of VRML output successful", flush=True)
except Exception as err: # usually BaseException
    # https://stackoverflow.com/questions/18176602/how-to-get-the-name-of-an-exception-that-was-caught-in-python
    print("*** Python-to-VRML export of VRML output failed:", type(err).__name__, err)
    if newModelVRML: # may have failed to generate
        print(prependLineNumbers(newModelVRML, err.lineno))

try:
#   print('check newModel.JSON() serialization...')
    newModelJSON=newModel.JSON() # test export method JSON() for exceptions during export
#   print(prependLineNumbers(newModelJSON)) # debug
    print("Python-to-JSON export of JSON output successful (under development)")
except Exception as err: # usually SyntaxError
    print("*** Python-to-JSON export of JSON output failed:", type(err).__name__, err)
    if newModelJSON: # may have failed to generate
        print(prependLineNumbers(newModelJSON,err.lineno))

print("python SanCarlosCathedral.py load and self-test diagnostics complete.")
