<?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>
    <!-- NURBS component or Full profile needed to use CoordinateDouble node -->
    <!-- Geometry2D component or Full profile needed to use TriangleSet2D node -->
    <component level='1' name='NURBS'/>
    <component level='1' name='Geometry2D'/>
    <meta content='RenderingComponentExamples.x3d' name='title'/>
    <meta content='Examples showing use of new X3D Rendering component nodes (IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet LineSet TriangleFanSet TriangleSet TriangleStripSet), implemented as prototypes for backwards compatibility with VRML 97.' name='description'/>
    <meta content='Don Brutzman, Ken Curtin, Duane Davis, Christos Kalogrias' name='creator'/>
    <meta content='17 November 2003' name='created'/>
    <meta content='20 October 2019' name='modified'/>
    <meta content='Extract, move TriangleStripSet example to X3dSpecifications directory' name='TODO'/>
    <meta content='https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/rendering.html' name='reference'/>
    <meta content='RenderingComponentPrototypes.x3d' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/TriangleStripSetFigure.x3d' name='reference'/>
    <meta content='X3dToVrml97.xslt translation stylesheet automatically invokes these prototypes upon encountering any new Rendering nodes.' name='info'/>
    <meta content='https://www.web3d.org/x3d/stylesheets/X3dToVrml97.xslt' name='reference'/>
    <meta content='X3D Rendering component nodes (IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet LineSet TriangleFanSet TriangleSet TriangleStripSet)' name='subject'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Basic/development/RenderingComponentExamples.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='RenderingComponentExamples.x3d'/>
    <Viewpoint description='set viewpoint 35 meters along positive z axis' position='0 -5 35'/>
    <Background groundColor='1 1 1' skyColor='1 1 1'/>
    <!-- new node tests follow -->
    <Transform DEF='TestCoordinateDoubleColorRGBA' translation='0 5 0'>
      <Transform translation='-2 0 0'>
        <Shape>
          <IndexedLineSet coordIndex='0 1 2 3 0 -1 4 5 6 7 4 -1 0 4 -1 1 5 -1 2 6 -1 3 7'>
            <Coordinate point='-1.0 1 1.0 1.0 1 1.0 1.0 1 -1.0 -1.0 1 -1.0 -1.0 -1 1.0 1.0 -1 1.0 1.0 -1 -1.0 -1.0 -1 -1.0'/>
            <ColorRGBA color='0.9 0.9 0.9 0 1 0 0 0 0 1 0 0 0 0 1 0 0.5 0.5 0 0 0 0.5 0.5 0 0.5 0 0.5 0 0.37 0.93 0.87 0'>
              <MetadataString name='example 2' value='"test metadata child"'/>
            </ColorRGBA>
          </IndexedLineSet>
        </Shape>
      </Transform>
      <Transform translation='2 0 0'>
        <Shape>
          <IndexedLineSet coordIndex='0 1 2 3 0 -1 4 5 6 7 4 -1 0 4 -1 1 5 -1 2 6 -1 3 7'>
            <CoordinateDouble point='-1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0'>
              <MetadataString name='example 1' value='"test metadata child"'/>
            </CoordinateDouble>
            <Color color='0.9 0.9 0.9 1 0 0 0 1 0 0 0 1 0.5 0.5 0 0 0.5 0.5 0.5 0 0.5 0.37 0.93 0.87'/>
          </IndexedLineSet>
        </Shape>
      </Transform>
    </Transform>
    <Transform DEF='TestOrderedTriangleNodes' translation='-5 0 0'>
      <Transform>
        <Shape>
          <TriangleSet2D/>
          <Appearance DEF='DefaultAppearance'>
            <Material/>
          </Appearance>
        </Shape>
      </Transform>
      <Transform DEF='TestTriangleFanSet' translation='0 -6 0'>
        <Shape>
          <TriangleFanSet ccw='true' colorPerVertex='false' fanCount='6 6' normalPerVertex='true' solid='false'>
            <Coordinate point='0 0 0 -.5 -2 .5 -1.5 -2 1 -2.5 -1.5 0.5 -2.5 -.5 0 -2.5 1 .5 0 0 0 -2.5 1 .5 .5 2 0 1.5 1.5 .5 2.5 .5 0 -.5 -2 .5'/>
            <Color DEF='FanColors' color='0.5 0.1 0.5 0.8 0.3 0.8'/>
          </TriangleFanSet>
        </Shape>
      </Transform>
      <Transform>
        <Shape>
          <TriangleStripSet ccw='true' colorPerVertex='true' normalPerVertex='true' solid='true'/>
          <Appearance USE='DefaultAppearance'/>
        </Shape>
      </Transform>
    </Transform>
    <Transform DEF='TestIndexedTriangleNodes' translation='5 0 0'>
      <Transform>
        <Shape>
          <IndexedTriangleSet ccw='true' colorPerVertex='true' index='11 10 9 8 7 6 5 4 3 2 1 0' normalPerVertex='true' solid='false'>
            <Coordinate point='-6 .5 -.5 1.5 -3.5 -.5 0 0 1 -6 .5 -.5 0 0 1 2.0 2.0 -.5 0 0 1 1.5 -3.5 -.5 2.0 2.0 -.5 -6 .5 -.5 1.5 -3.5 -.5 2.0 2.0 -.5'/>
            <Color color='1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0.9 0.9 0.9 0 1 0 0 0 1 0.9 0.9 0.9 1 0 0 0.9 0.9 0.9 0 0 1'/>
          </IndexedTriangleSet>
        </Shape>
      </Transform>
      <Transform translation='0 -6 0'>
        <Shape>
          <IndexedTriangleFanSet ccw='true' colorPerVertex='false' index='0 1 2 3 4 5 -1 0 5 6 7 8 1 -1' normalPerVertex='true' solid='false'>
            <Coordinate point='0 0 0 -.5 -2 .5 -1.5 -2 1 -2.5 -1.5 0.5 -2.5 -.5 0 -2.5 1 .5 .5 2 0 1.5 1.5 .5 2.5 .5 0'/>
          </IndexedTriangleFanSet>
          <Appearance>
            <Material diffuseColor='0.5 0.1 0.5'/>
          </Appearance>
        </Shape>
      </Transform>
      <Transform translation='0 -10 0'>
        <Shape>
          <IndexedTriangleStripSet ccw='true' colorPerVertex='true' index='0 1 2 3 4 5 6 7 8 9 10 11 12 -1' normalPerVertex='true' solid='false'>
            <Coordinate point='-4.0 -1.0 -.5 -4.5 -2.0 -.5 -3.0 -.5 0 -2.5 -1.5 -.5 -2.0 -.5 -1 -1.5 -1.5 -.5 -.5 .5 -.5 0 0 0 1 .5 -.5 1.5 -2.0 -1 2.5 -2.0 -.5 2.5 -2.5 -.5 3.5 -2.0 -1.0'/>
          </IndexedTriangleStripSet>
          <Appearance>
            <Material diffuseColor='0 .3 .7'/>
          </Appearance>
        </Shape>
      </Transform>
    </Transform>
    <Transform DEF='TestLineSet' translation='0 -15 0'>
      <Shape>
        <IndexedLineSet coordIndex='0 1 2 3 0 -1 4 5 6 7 4 -1 0 4 -1 1 5 -1 2 6 -1 3 7'>
          <Coordinate point='-3.0 1.0 1.0 3.0 1.0 1.0 3.0 1.0 -1.0 -3.0 1.0 -1.0 -3.0 -1.0 1.0 3.0 -1.0 1.0 3.0 -1.0 -1.0 -3.0 -1.0 -1.0'/>
          <ColorRGBA color='1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0.5 0.5 0 0 0 0.5 0.5 0 0.5 0 0.5 0 0.37 0.93 0.87 0'/>
        </IndexedLineSet>
      </Shape>
    </Transform>
  </Scene>
</X3D>