<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Interchange' version='3.3'
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'
xsd:noNamespaceSchemaLocation
='
https://www.web3d.org/specifications/x3d-3.3.xsd
'>
<head>
</head>
<!--
-->
<Scene>
<WorldInfo title='ColorPerVertexExamples.x3d'/>
<Viewpoint description='ColorPerVertex Examples' position='0 0 6'/>
<Background groundColor='0.1 0.1 0.1' skyColor='0.1 0.1 0.1'/>
<Transform translation='-0.5 0 0'>
<Transform translation='-3 0 0'>
<Shape>
<!-- Default settings: colorPerVertex='true' and solid='true' (single-sided polygon) -->
<IndexedFaceSet colorIndex='0 1 2 3 0 -1' coordIndex='0 1 2 3 0 -1'>
<Coordinate DEF='FourPoints' point='0 0 0 1 0 0 1 1 0 0 1 0'/>
<Color DEF='FourColors' color='1 0 0 0 1 0 0 0 1 0.8 0.8 0.8'/>
</IndexedFaceSet>
</Shape>
</Transform>
<Transform translation='-1 0 0'>
<Shape>
<!-- Non-default settings: colorPerVertex='false' and solid='false' (double-sided polygon) -->
<IndexedFaceSet colorPerVertex='false' solid='false' colorIndex='2' coordIndex='0 1 2 3 0 -1'>
<!-- Note that only 4 points are needed to create a 4-vertex polygon. -->
<Coordinate USE='FourPoints'/>
<ColorRGBA DEF='FourColorsRGBA' color='1 0 0 1 0 1 0 1 0 0 1 0.5 0.8 0.8 0.8 0'/>
</IndexedFaceSet>
</Shape>
</Transform>
<Transform translation='1 0 0'>
<Shape>
<!-- Student TODO: try different color indices. -->
<IndexedLineSet colorIndex='0 1 2 3 0 -1' coordIndex='0 1 2 3 0 -1'>
</IndexedLineSet>
</Shape>
</Transform>
<Transform translation='3 0 0'>
<Shape>
<!-- Note that 5 points are needed to create 4 complete line segments. -->
<IndexedLineSet colorPerVertex='false' colorIndex='0' coordIndex='0 1 2 3 0 -1'>
</IndexedLineSet>
</Shape>
</Transform>
</Transform>
</Scene>
</X3D>
<!--
-->
<!--
Color key:
<X3dNode
DEF='idName' field='value'/>
matches
<XmlElement
DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources and X3D Scene Authoring Hints.
-->