<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.1//EN" "https://www.web3d.org/specifications/x3d-3.1.dtd">
<X3D profile='Immersive' version='3.1' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.1.xsd'>
  <head>
    <meta content='BollardHydraulicSecurityExample.x3d' name='title'/>
    <meta content='Rising/retractable security bollard: example use, showing multiple copies of a single triggered bollard.' name='description'/>
    <meta content='Don Brutzman and MV4205 Advanced XML class' name='creator'/>
    <meta content='5 September 2007' name='created'/>
    <meta content='20 October 2019' name='modified'/>
    <meta content='USE copies of the DEF&apos;ed bollard are not animating. Shouldn&apos;t they?' name='warning'/>
    <meta content='http://www.atgaccess.com' name='reference'/>
    <meta content='BollardHydraulicSecurityPrototype.x3d' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Savage/Buildings/SecurityPerimeter/BollardHydraulicSecurityPrototype.x3d' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Savage/Buildings/SecurityPerimeter/BollardHydraulicSecurityExample.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='BollardHydraulicSecurityExample.x3d'/>
    <ExternProtoDeclare appinfo='A security bollard can be raised or lowered to prevent vehicle access by blocking a road. Usually multiple bollards are installed side by side raised and lowered together.' name='BollardHydraulicSecurity' url='"BollardHydraulicSecurityPrototype.x3d#BollardHydraulicSecurity" "../../../Savage/Buildings/SecurityPerimeter/BollardHydraulicSecurityPrototype.x3d#BollardHydraulicSecurity" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/SecurityPerimeter/BollardHydraulicSecurityPrototype.x3d#BollardHydraulicSecurity" "BollardHydraulicSecurityPrototype.wrl#BollardHydraulicSecurity" "../../../Savage/Buildings/SecurityPerimeter/BollardHydraulicSecurityPrototype.wrl#BollardHydraulicSecurity" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/SecurityPerimeter/BollardHydraulicSecurityPrototype.wrl#BollardHydraulicSecurity"'>
      <field accessType='initializeOnly' name='radius' type='SFFloat'/>
      <field accessType='initializeOnly' name='height' type='SFFloat'/>
      <field accessType='inputOutput' name='textureUrl' type='MFString'/>
      <field accessType='inputOutput' name='diffuseColor' type='SFColor'/>
      <field accessType='inputOnly' appinfo='Command to raise the bollard.' name='raise' type='SFBool'/>
      <field accessType='inputOnly' appinfo='Command to lower the bollard.' name='lower' type='SFBool'/>
      <!-- TODO: add TimeDelaySensor nodes to report completion by the following output fields -->
      <field accessType='outputOnly' appinfo='Notification event sent when bollard is fully raised.' name='isRaised' type='SFBool'/>
      <field accessType='outputOnly' appinfo='Notification event sent when bollard is fully lowered.' name='isLowered' type='SFBool'/>
    </ExternProtoDeclare>
    <!-- ==================== -->
    <Viewpoint description='Bollard view' position='0 0 6'/>
    <!-- test locally during development, once complete we split this out into a separate Example scene. -->
    <ProtoInstance DEF='Bollard' name='BollardHydraulicSecurity'>
      <fieldValue name='height' value='0.85'/>
      <fieldValue name='radius' value='0.2'/>
      <fieldValue name='textureUrl' value='"fan.png"'/>
    </ProtoInstance>
    <Transform DEF='RightBollard' translation='2 0 0'>
      <ProtoInstance name='BollardHydraulicSecurity'/>
    </Transform>
    <Transform DEF='LeftBollard' translation='-2 0 0'>
      <ProtoInstance name='BollardHydraulicSecurity'/>
    </Transform>
    <Shape DEF='GroundLevel'>
      <Box size='10 0.01 10'/>
    </Shape>
    <Transform DEF='RaiseInterface' translation='-2 -1.5 0'>
      <Shape>
        <Text string='"Click to" "raise"'>
          <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.3'/>
        </Text>
      </Shape>
      <Shape>
        <Box size='3 2 0.01'/>
        <Appearance>
          <Material transparency='1'/>
        </Appearance>
      </Shape>
      <TouchSensor DEF='ClickToRaiseBollard' description='click to raise bollard'/>
      <ROUTE fromField='isActive' fromNode='ClickToRaiseBollard' toField='raise' toNode='Bollard'/>
    </Transform>
    <Transform DEF='LowerInterface' translation='2 -1.5 0'>
      <Shape>
        <Text string='"Click to" "lower"'>
          <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.3'/>
        </Text>
      </Shape>
      <Shape>
        <Box size='3 2 0.01'/>
        <Appearance>
          <Material transparency='1'/>
        </Appearance>
      </Shape>
      <TouchSensor DEF='ClickToLowerBollard' description='click tolower bollard'/>
      <ROUTE fromField='isActive' fromNode='ClickToLowerBollard' toField='lower' toNode='Bollard'/>
    </Transform>
  </Scene>
</X3D>