<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  <head>
    <meta content='Chair.x3d' name='title'/>
    <meta content='A chair for a room, modeled as a Prototype for reuse.' name='description'/>
    <meta content='Frederic Roussille' name='creator'/>
    <meta content='Don Brutzman' name='contributor'/>
    <meta content='1 April 2001' name='created'/>
    <meta content='20 October 2019' name='modified'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Chair.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='Chair.x3d'/>
    <Viewpoint description='Chair example ProtoInstance' position='0 0 4'/>
    <ProtoDeclare name='Chair'>
      <ProtoInterface>
        <field accessType='inputOutput' name='diffuseColor' type='SFColor' value='0.7 0.7 0.4'/>
      </ProtoInterface>
      <ProtoBody>
        <Transform scale='0.15 0.15 0.15' translation='0 0.52 0'>
          <Transform DEF='seat'>
            <Transform rotation='1 0 0 1.57'>
              <!-- seat -->
              <Shape>
                <Appearance DEF='chair_color'>
                  <Material DEF='color'>
                    <IS>
                      <connect nodeField='diffuseColor' protoField='diffuseColor'/>
                    </IS>
                  </Material>
                </Appearance>
                <Extrusion DEF='ExtrusionSeatCushion' ccw='false' creaseAngle='1.57' crossSection='-2 0 2 0 2.3 0.3 2.4 0.4 2.5 0.5 2.5 1 -2 1 -2 0' scale='0.5 1' solid='false' spine='1 0 0 0.92 -0.38 0 0.71 -0.71 0 0.38 -0.92 0 0 -1 0 -0.38 -0.92 0 -0.71 -0.71 0 -0.92 -0.38 0 -1 0 0 -0.92 0.38 0 -0.71 0.71 0 -0.38 0.92 0 0 1 0 0.38 0.92 0 0.71 0.71 0 0.92 0.38 0 1 0 0'/>
              </Shape>
            </Transform>
            <Transform translation='0 1 1'>
              <!-- back -->
              <Shape>
                <Appearance USE='chair_color'/>
                <Extrusion DEF='ExtrusionSeatBack' convex='false' creaseAngle='1.57' crossSection='1 0 0.8 0 0.736 0.304 0.568 0.568 0.304 0.736 0 0.8 -0.304 0.736 -0.568 0.568 -0.736 0.304 -0.8 0 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0 0.8 0' scale='1.4 1 2 1' solid='false' spine='0 0 0 0 4 0'/>
              </Shape>
            </Transform>
            <CylinderSensor DEF='SeatRotationCylinderSensor' description='Swivel chair'/>
          </Transform>
          <Transform rotation='1 0 0 -1.57'>
            <!-- foot -->
            <Shape>
              <Appearance USE='chair_color'/>
              <Extrusion DEF='ExtrusionSeatBase' beginCap='false' convex='false' creaseAngle='1.57' crossSection='0 0 0.2 0 0.23 2 0.28 3 1 3.3 1.5 3.5 0 3.5 0 0' endCap='false' solid='false' spine='0.1 0 0 0.092 -0.038 0 0.071 -0.071 0 0.038 -0.092 0 0 -0.1 0 -0.038 -0.092 0 -0.071 -0.071 0 -0.092 -0.038 0 -0.1 0 0 -0.092 0.038 0 -0.071 0.071 0 -0.038 0.092 0 0 0.1 0 0.038 0.092 0 0.071 0.071 0 0.092 0.038 0 0.1 0 0'/>
            </Shape>
          </Transform>
        </Transform>
        <ROUTE fromField='rotation_changed' fromNode='SeatRotationCylinderSensor' toField='set_rotation' toNode='seat'/>
      </ProtoBody>
    </ProtoDeclare>
    <ProtoInstance DEF='chaise' name='Chair'/>
  </Scene>
</X3D>