| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
|
| 3 | <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'> |
| 4 | <head> |
| 5 | <!-- NURBS component or Full profile needed to use CoordinateDouble node --> |
| 6 | <!-- Geometry2D component or Full profile needed to use TriangleSet2D node --> |
| 7 | <component level='1' name='NURBS'/> |
| 8 | <component level='1' name='Geometry2D'/> |
| 9 | <meta name='title' content=' RenderingComponentExamples.x3d '/> |
| 10 | <meta name='description' 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.'/> |
| 11 | <meta name='creator' content='Don Brutzman, Ken Curtin, Duane Davis, Christos Kalogrias'/> |
| 12 | <meta name='created' content='17 November 2003'/> |
| 13 | <meta name='modified' content='20 October 2019'/> |
| 14 | <meta name=' TODO ' content=' Extract, move TriangleStripSet example to X3dSpecifications directory '/> |
| 15 | <meta name='reference' content=' https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/rendering.html '/> |
| 16 | <meta name='reference' content=' RenderingComponentPrototypes.x3d '/> |
| 17 | <meta name='reference' content=' https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/TriangleStripSetFigure.x3d '/> |
| 18 | <meta name='info' content='X3dToVrml97.xslt translation stylesheet automatically invokes these prototypes upon encountering any new Rendering nodes.'/> |
| 19 | <meta name='reference' content=' https://www.web3d.org/x3d/stylesheets/X3dToVrml97.xslt '/> |
| 20 | <meta name='subject' content='X3D Rendering component nodes (IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet LineSet TriangleFanSet TriangleSet TriangleStripSet)'/> |
| 21 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Basic/development/RenderingComponentExamples.x3d '/> |
| 22 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 23 | <meta name='license' content='../license.html'/> |
| 24 | </head> |
| 25 | <Scene> |
| 26 | <WorldInfo title='RenderingComponentExamples.x3d'/> |
| 27 | <Viewpoint description='set viewpoint 35 meters along positive z axis' position='0 -5 35'/> |
| 28 | <Background groundColor='1 1 1' skyColor='1 1 1'/> |
| 29 | <!-- new node tests follow --> |
| 30 | <Transform DEF='TestCoordinateDoubleColorRGBA' translation='0 5 0'> |
| 31 | <Transform translation='-2 0 0'> |
| 32 | <Shape> |
| 33 | <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'> |
| 34 | <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'/> |
| 35 | <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'> |
| 36 | <MetadataString name='example 2' value='"test metadata child"'/> |
| 37 | </ColorRGBA> |
| 38 | </IndexedLineSet> |
| 39 | </Shape> |
| 40 | </Transform> |
| 41 | <Transform translation='2 0 0'> |
| 42 | <Shape> |
| 43 | <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'> |
| 44 | <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'> |
| 45 | <MetadataString name='example 1' value='"test metadata child"'/> |
| 46 | </CoordinateDouble> |
| 47 | <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'/> |
| 48 | </IndexedLineSet> |
| 49 | </Shape> |
| 50 | </Transform> |
| 51 | </Transform> |
| 52 | <Transform DEF='TestOrderedTriangleNodes' translation='-5 0 0'> |
| 53 | <Transform> |
| 54 | <Shape> |
| 55 | <TriangleSet2D/> |
| 56 |
<!-- Appearance
DefaultAppearance is a DEF node that has 1 USE node: USE_1 -->
<Appearance DEF='DefaultAppearance'> |
| 57 | <Material/> |
| 58 | </Appearance> |
| 59 | </Shape> |
| 60 | </Transform> |
| 61 | <Transform DEF='TestTriangleFanSet' translation='0 -6 0'> |
| 62 | <Shape> |
| 63 | <TriangleFanSet ccw='true' colorPerVertex='false' fanCount='6 6' normalPerVertex='true' solid='false' containerField='geometry'> |
| 64 | <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'/> |
| 65 | <Color DEF='FanColors' color='0.5 0.1 0.5 0.8 0.3 0.8'/> |
| 66 | </TriangleFanSet> |
| 67 | </Shape> |
| 68 | </Transform> |
| 69 | <Transform> |
| 70 | <Shape> |
| 71 | <TriangleStripSet ccw='true' colorPerVertex='true' normalPerVertex='true' solid='true' containerField='geometry'/> |
| 72 | <Appearance USE='DefaultAppearance'/> |
| 73 | </Shape> |
| 74 | </Transform> |
| 75 | </Transform> |
| 76 | <Transform DEF='TestIndexedTriangleNodes' translation='5 0 0'> |
| 77 | <Transform> |
| 78 | <Shape> |
| 79 | <IndexedTriangleSet ccw='true' colorPerVertex='true' index='11 10 9 8 7 6 5 4 3 2 1 0' normalPerVertex='true' solid='false' containerField='geometry'> |
| 80 | <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'/> |
| 81 | <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'/> |
| 82 | </IndexedTriangleSet> |
| 83 | </Shape> |
| 84 | </Transform> |
| 85 | <Transform translation='0 -6 0'> |
| 86 | <Shape> |
| 87 | <IndexedTriangleFanSet ccw='true' colorPerVertex='false' index='0 1 2 3 4 5 -1 0 5 6 7 8 1 -1' normalPerVertex='true' solid='false' containerField='geometry'> |
| 88 | <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'/> |
| 89 | </IndexedTriangleFanSet> |
| 90 | <Appearance> |
| 91 | <Material diffuseColor='0.5 0.1 0.5'/> |
| 92 | </Appearance> |
| 93 | </Shape> |
| 94 | </Transform> |
| 95 | <Transform translation='0 -10 0'> |
| 96 | <Shape> |
| 97 | <IndexedTriangleStripSet ccw='true' colorPerVertex='true' index='0 1 2 3 4 5 6 7 8 9 10 11 12 -1' normalPerVertex='true' solid='false' containerField='geometry'> |
| 98 | <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'/> |
| 99 | </IndexedTriangleStripSet> |
| 100 | <Appearance> |
| 101 | <Material diffuseColor='0 .3 .7'/> |
| 102 | </Appearance> |
| 103 | </Shape> |
| 104 | </Transform> |
| 105 | </Transform> |
| 106 | <Transform DEF='TestLineSet' translation='0 -15 0'> |
| 107 | <Shape> |
| 108 | <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'> |
| 109 | <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'/> |
| 110 | <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'/> |
| 111 | </IndexedLineSet> |
| 112 | </Shape> |
| 113 | </Transform> |
| 114 | </Scene> |
| 115 | </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.
-->