| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
|
| 3 | <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'> |
| 4 | <head> |
| 5 | <meta name='title' content=' ColorPerVertexExamples.x3d '/> |
| 6 | <meta name='description' content='Geometry Polygons Nodes: Color, Coordinate, IndexedFaceSet, IndexedLineSet, PointSet'/> |
| 7 | <meta name='creator' content='Don Brutzman'/> |
| 8 | <meta name='created' content='5 September 2005'/> |
| 9 | <meta name='modified' content='11 May 2021'/> |
| 10 |
<meta name='Image' content='ColorPerVertexExamples.png' />
|
| 11 | <meta name=' TODO ' content=' Blender import problems '/> |
| 12 |
<meta name='Image' content='ColorPerVertexExamplesBlender.png' />
|
| 13 | <meta name=' TODO ' content=' Xj3D rendering problems '/> |
| 14 |
<meta name='Image' content='ColorPerVertexExamplesXj3D.png' />
|
| 15 | <meta name='reference' content='https://www.web3d.org/x3d/tooltips/X3dTooltips.html#IndexedFaceSet'/> |
| 16 | <meta name='reference' content='https://www.web3d.org/x3d/tooltips/X3dTooltips.html#IndexedLineSet'/> |
| 17 | <meta name='reference' content='https://www.web3d.org/x3d/tooltips/X3dTooltips.html#Coordinate'/> |
| 18 | <meta name='reference' content='https://www.web3d.org/x3d/tooltips/X3dTooltips.html#Color'/> |
| 19 | <meta name='rights' content='Copyright (c) 2005, Daly Realism and Don Brutzman'/> |
| 20 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ColorPerVertexExamples.x3d '/> |
| 21 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 22 | <meta name='license' content='../license.html'/> |
| 23 | </head> |
| 24 | <Scene> |
| 25 | <WorldInfo title='ColorPerVertexExamples.x3d'/> |
| 26 | <Viewpoint description='ColorPerVertex Examples' position='0 0 6'/> |
| 27 | <Background groundColor='0.1 0.1 0.1' skyColor='0.1 0.1 0.1'/> |
| 28 | <Transform translation='-0.5 0 0'> |
| 29 | <Transform translation='-3 0 0'> |
| 30 | <Shape> |
| 31 | <!-- Default settings: colorPerVertex='true' and solid='true' (single-sided polygon) --> |
| 32 | <IndexedFaceSet colorIndex='0 1 2 3 0 -1' coordIndex='0 1 2 3 0 -1'> |
| 33 |
<!-- Coordinate
FourPoints is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 --> <Coordinate DEF='FourPoints' point='0 0 0 1 0 0 1 1 0 0 1 0'/> |
| 34 |
<!-- Color
FourColors is a DEF node that has 2 USE nodes: USE_1, USE_2 --> <Color DEF='FourColors' color='1 0 0 0 1 0 0 0 1 0.8 0.8 0.8'/> |
| 35 | </IndexedFaceSet> |
| 36 | </Shape> |
| 37 | </Transform> |
| 38 | <Transform translation='-1 0 0'> |
| 39 | <Shape> |
| 40 | <!-- Non-default settings: colorPerVertex='false' and solid='false' (double-sided polygon) --> |
| 41 | <IndexedFaceSet colorPerVertex='false' solid='false' colorIndex='2' coordIndex='0 1 2 3 0 -1'> |
| 42 | <!-- Note that only 4 points are needed to create a 4-vertex polygon. --> |
| 43 | <Coordinate USE='FourPoints'/> |
| 44 | <ColorRGBA DEF='FourColorsRGBA' color='1 0 0 1 0 1 0 1 0 0 1 0.5 0.8 0.8 0.8 0'/> |
| 45 | </IndexedFaceSet> |
| 46 | </Shape> |
| 47 | </Transform> |
| 48 | <Transform translation='1 0 0'> |
| 49 | <Shape> |
| 50 | <!-- Student TODO: try different color indices. --> |
| 51 | <IndexedLineSet colorIndex='0 1 2 3 0 -1' coordIndex='0 1 2 3 0 -1'> |
| 52 | <Coordinate USE='FourPoints'/> |
| 53 | <Color USE='FourColors'/> |
| 54 | </IndexedLineSet> |
| 55 | </Shape> |
| 56 | </Transform> |
| 57 | <Transform translation='3 0 0'> |
| 58 | <Shape> |
| 59 | <!-- Note that 5 points are needed to create 4 complete line segments. --> |
| 60 | <IndexedLineSet colorPerVertex='false' colorIndex='0' coordIndex='0 1 2 3 0 -1'> |
| 61 | <Coordinate USE='FourPoints'/> |
| 62 | <Color USE='FourColors'/> |
| 63 | </IndexedLineSet> |
| 64 | </Shape> |
| 65 | </Transform> |
| 66 | </Transform> |
| 67 | </Scene> |
| 68 | </X3D> |
<!--
Color-coding legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->