<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile='Immersive' version='3.2' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.2.xsd'>
  <head>
    <component level='2' name='Geometry2D'/>
    <meta content='Geometry2dComponentExamples.x3d' name='title'/>
    <meta content='Examples showing use of X3D Geometry2D component nodes (Arc2D ArcClose2D Circle2D Disk2D Polyline2D Polypoint2D Rectangle2D TriangleSet2D), implemented as prototypes for backwards compatibility with VRML 97. Also provides Unfilled ProtoInstance versions of some nodes since FillProperties not possible in VRML 97. 2D nodes are considered particularly helpful for building user interfaces such as Heads-Up Displays (HUDs).' name='description'/>
    <meta content='Christos Kalogrias, Don Brutzman, Ken Curtin, Duane Davis' name='creator'/>
    <meta content='16 November 2003' name='created'/>
    <meta content='24 February 2008' name='modified'/>
    <meta content='these examples are complete but only used for developmental testing, not regular use' name='warning'/>
    <meta content='Geometry2dComponentPrototypes.x3d' name='reference'/>
    <meta content='http://www.web3d.org/spec_editors/abstract/Part01/components/geometry2D.html' name='reference'/>
    <meta content='Geometry2D component nodes (Arc2D ArcClose2D Circle2D Disk2D Polyline2D Polypoint2D Rectangle2D TriangleSet2D)' name='subject'/>
    <meta content='http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentExamples.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit' name='generator'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <!-- ==================== -->
    <!-- Do not copy these ExternProtoDeclare statements! They are copied automatically to provide backwards compatibility for VRML97 when using X3dToVrml97.xslt stylesheet mappings. -->
    <!-- ==================== -->
    <ExternProtoDeclare name='Arc2D' url='"Geometry2dComponentPrototypes.wrl#Arc2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Arc2D" "Geometry2dComponentPrototypes.x3d#Arc2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Arc2D"'>
      <field accessType='initializeOnly' name='startAngle' type='SFFloat'/>
      <field accessType='initializeOnly' name='endAngle' type='SFFloat'/>
      <field accessType='initializeOnly' name='radius' type='SFFloat'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='ArcClose2D' url='"Geometry2dComponentPrototypes.wrl#ArcClose2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#ArcClose2D" "Geometry2dComponentPrototypes.x3d#ArcClose2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#ArcClose2D"'>
      <field accessType='initializeOnly' name='startAngle' type='SFFloat'/>
      <field accessType='initializeOnly' name='endAngle' type='SFFloat'/>
      <field accessType='initializeOnly' name='radius' type='SFFloat'/>
      <field accessType='initializeOnly' name='closureType' type='SFString'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='Circle2D' url='"Geometry2dComponentPrototypes.wrl#Circle2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Circle2D" "Geometry2dComponentPrototypes.x3d#Circle2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Circle2D"'>
      <field accessType='initializeOnly' name='radius' type='SFFloat'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='Disk2D' url='"Geometry2dComponentPrototypes.wrl#Disk2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Disk2D" "Geometry2dComponentPrototypes.x3d#Disk2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Disk2D"'>
      <field accessType='initializeOnly' name='innerRadius' type='SFFloat'/>
      <field accessType='initializeOnly' name='outerRadius' type='SFFloat'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='Polyline2D' url='"Geometry2dComponentPrototypes.wrl#Polyline2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Polyline2D" "Geometry2dComponentPrototypes.x3d#Polyline2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Polyline2D"'>
      <field accessType='initializeOnly' name='lineSegments' type='MFVec2f'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='Polypoint2D' url='"Geometry2dComponentPrototypes.wrl#Polypoint2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Polypoint2D" "Geometry2dComponentPrototypes.x3d#Polypoint2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Polypoint2D"'>
      <field accessType='initializeOnly' name='point' type='MFVec2f'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='Rectangle2D' url='"Geometry2dComponentPrototypes.wrl#Rectangle2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Rectangle2D" "Geometry2dComponentPrototypes.x3d#Rectangle2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Rectangle2D"'>
      <field accessType='initializeOnly' name='size' type='SFVec2f'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='TriangleSet2D' url='"Geometry2dComponentPrototypes.wrl#TriangleSet2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#TriangleSet2D" "Geometry2dComponentPrototypes.x3d#TriangleSet2D" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#TriangleSet2D"'>
      <field accessType='initializeOnly' name='vertices' type='MFVec2f'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <!-- ==================== -->
    <!-- Additional Unfilled versions since FillProperties node not possible in native VRML 97 -->
    <!-- ==================== -->
    <ExternProtoDeclare name='ArcClose2DUnfilled' url='"Geometry2dComponentPrototypes.wrl#ArcClose2DUnfilled" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#ArcClose2DUnfilled" "Geometry2dComponentPrototypes.x3d#ArcClose2DUnfilled" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#ArcClose2DUnfilled"'>
      <field accessType='initializeOnly' name='startAngle' type='SFFloat'/>
      <field accessType='initializeOnly' name='endAngle' type='SFFloat'/>
      <field accessType='initializeOnly' name='radius' type='SFFloat'/>
      <field accessType='initializeOnly' name='closureType' type='SFString'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare name='Rectangle2DUnfilled' url='"Geometry2dComponentPrototypes.wrl#Rectangle2DUnfilled" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Rectangle2DUnfilled" "Geometry2dComponentPrototypes.x3d#Rectangle2DUnfilled" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Rectangle2DUnfilled"'>
      <field accessType='initializeOnly' name='size' type='SFVec2f'/>
      <field accessType='initializeOnly' name='solid' type='SFBool'/>
      <field accessType='inputOutput' name='metadata' type='SFNode'/>
    </ExternProtoDeclare>
    <!-- ==================== -->
    <!-- ==================== -->
    <Background groundColor='0.3 0.3 0.3' skyColor='0.3 0.3 0.3'/>
    <Viewpoint description='Geometry2D Component Examples' position='0 0 12'/>
    <!-- ==================== -->
    <!-- Top row -->
    <Transform translation='-5 2 0'>
      <Shape>
        <ArcClose2D closureType='PIE' endAngle='3.0' radius='1' startAngle='0.7'/>
        <Appearance>
          <Material diffuseColor='0 0 1'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform DEF='ArcClose2DUnfilledTransform' translation='-2.5 2 0'>
      <Shape>
        <ProtoInstance containerField='geometry' name='ArcClose2DUnfilled'>
          <fieldValue name='closureType' value='PIE'/>
          <fieldValue name='startAngle' value='0.7'/>
          <fieldValue name='endAngle' value='3'/>
          <fieldValue name='radius' value='1'/>
        </ProtoInstance>
        <Appearance>
          <Material emissiveColor='0.2 0.2 1'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform translation='-0.5 2 0'>
      <Shape>
        <Arc2D endAngle='1.570796' radius='1' startAngle='0'/>
        <Appearance>
          <Material emissiveColor='1 1 0'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform translation='2 2 0'>
      <Shape>
        <Circle2D radius='1'/>
        <Appearance>
          <Material emissiveColor='1 0 0'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform translation='5 2 0'>
      <Shape>
        <Disk2D innerRadius='0.5' outerRadius='1'/>
        <Appearance>
          <Material diffuseColor='0.5 1 1'/>
        </Appearance>
      </Shape>
    </Transform>
    <!-- ==================== -->
    <!-- Bottom row -->
    <Transform translation='-5 -2 0'>
      <Shape>
        <Rectangle2D size='1 2'/>
        <Appearance>
          <Material diffuseColor='1 0 0'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform DEF='RectangleUnfilled' translation='-3 -2 0'>
      <Shape>
        <ProtoInstance containerField='geometry' name='Rectangle2DUnfilled'>
          <fieldValue name='size' value='1 2'/>
        </ProtoInstance>
        <Appearance>
          <Material emissiveColor='1 0.2 0.2'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform translation='-0.5 -2 0'>
      <Shape>
        <Polyline2D lineSegments='-1 0 -0.5 1 0 0 0.5 1 1 0'/>
        <Appearance>
          <Material diffuseColor='0 0 0' emissiveColor='1 0.5 1'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform translation='2.5 -2 0'>
      <Shape>
        <Polypoint2D point='-1 0 -0.5 1 0 0 0.5 1 1 0'/>
        <Appearance>
          <Material emissiveColor='1 1 1'/>
        </Appearance>
      </Shape>
      <Transform translation='0 0.5 -0.5'>
        <Shape>
          <Rectangle2D DEF='BackDrop' size='2.5 2'/>
          <Appearance>
            <Material diffuseColor='0 0 0'/>
          </Appearance>
        </Shape>
        <Transform translation='0 -0.15 0.2'>
          <Shape>
            <Text string='"PolyPoint2D" "5 points"'>
              <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.25' style='BOLD'/>
            </Text>
            <Appearance>
              <Material/>
            </Appearance>
          </Shape>
        </Transform>
      </Transform>
    </Transform>
    <Transform translation='5 -2 0'>
      <Shape>
        <TriangleSet2D vertices='0 0 1 1 -1 1 0 0 1 0.5 1 -0.5 0 0 -1 -2 -2 -1'/>
        <Appearance>
          <FillProperties DEF='TestFillProperties' filled='true' hatchColor='1 1 1' hatchStyle='1' hatched='true'/>
          <LineProperties DEF='TestLineProperties' linetype='1' linewidthScaleFactor='1'>
            <MetadataString DEF='TestLinePropertiesMetaData' name='test LineProperties metadata child'/>
          </LineProperties>
          <Material diffuseColor='0 1 0'/>
        </Appearance>
      </Shape>
    </Transform>
  </Scene>
</X3D>
