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 | <meta name='title' content='Geometry2dComponentExternProtos.x3d'/> |
6 | <meta name='description' content='ExternProto declarations and examples for developmental use showing 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 CADPart geometry and building user interfaces such as Heads-Up Displays (HUDs).'/> |
7 | <meta name='creator' content='Christos Kalogrias, Don Brutzman, Ken Curtin, Duane Davis'/> |
8 | <meta name='created' content='16 November 2003'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name=' TODO ' content=' Check Polypoint2D and point rendering order '/> |
11 | <meta name=' warning ' content=' These examples are complete but only used for developmental testing, not regular X3D authoring. '/> |
12 | <meta name='reference' content='Geometry2dComponentPrototypes.x3d'/> |
13 | <meta name='reference' content='Geometry2dComponentExamples.x3d'/> |
14 | <meta name='reference' content='https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/geometry2D.html'/> |
15 | <meta name='subject' content='Geometry2D component nodes (Arc2D ArcClose2D Circle2D Disk2D Polyline2D Polypoint2D Rectangle2D TriangleSet2D)'/> |
16 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentExternProtos.x3d'/> |
17 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
18 | <meta name='license' content='../license.html'/> |
19 | </head> |
20 | <Scene> |
21 | <!-- ==================== --> |
22 | <!-- Do not copy these ExternProtoDeclare statements! They are copied automatically to provide backwards compatibility for VRML97 when using X3dToVrml97.xslt stylesheet mappings. --> |
23 | <!-- ==================== --> |
24 | <WorldInfo title='Geometry2dComponentExternProtos.x3d'/> |
25 | <ExternProtoDeclare name='Arc2D' url=' "Geometry2dComponentPrototypes.wrl#Arc2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Arc2D" "Geometry2dComponentPrototypes.x3d#Arc2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Arc2D" '> |
26 | <field name='startAngle' type='SFFloat' accessType='initializeOnly'/> |
27 | <field name='endAngle' type='SFFloat' accessType='initializeOnly'/> |
28 | <field name='radius' type='SFFloat' accessType='initializeOnly'/> |
29 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
30 | </ExternProtoDeclare> |
31 | <ExternProtoDeclare name='ArcClose2D' url=' "Geometry2dComponentPrototypes.wrl#ArcClose2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#ArcClose2D" "Geometry2dComponentPrototypes.x3d#ArcClose2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#ArcClose2D" '> |
32 | <field name='startAngle' type='SFFloat' accessType='initializeOnly'/> |
33 | <field name='endAngle' type='SFFloat' accessType='initializeOnly'/> |
34 | <field name='radius' type='SFFloat' accessType='initializeOnly'/> |
35 | <field name='closureType' type='SFString' accessType='initializeOnly'/> |
36 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
37 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
38 | </ExternProtoDeclare> |
39 | <ExternProtoDeclare name='Circle2D' url=' "Geometry2dComponentPrototypes.wrl#Circle2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Circle2D" "Geometry2dComponentPrototypes.x3d#Circle2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Circle2D" '> |
40 | <field name='radius' type='SFFloat' accessType='initializeOnly'/> |
41 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
42 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
43 | </ExternProtoDeclare> |
44 | <ExternProtoDeclare name='Disk2D' url=' "Geometry2dComponentPrototypes.wrl#Disk2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Disk2D" "Geometry2dComponentPrototypes.x3d#Disk2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Disk2D" '> |
45 | <field name='innerRadius' type='SFFloat' accessType='initializeOnly'/> |
46 | <field name='outerRadius' type='SFFloat' accessType='initializeOnly'/> |
47 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
48 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
49 | </ExternProtoDeclare> |
50 | <ExternProtoDeclare name='Polyline2D' url=' "Geometry2dComponentPrototypes.wrl#Polyline2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Polyline2D" "Geometry2dComponentPrototypes.x3d#Polyline2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Polyline2D" '> |
51 | <field name='lineSegments' type='MFVec2f' accessType='initializeOnly'/> |
52 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
53 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
54 | </ExternProtoDeclare> |
55 | <ExternProtoDeclare name='Polypoint2D' url=' "Geometry2dComponentPrototypes.wrl#Polypoint2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Polypoint2D" "Geometry2dComponentPrototypes.x3d#Polypoint2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Polypoint2D" '> |
56 | <field name='point' type='MFVec2f' accessType='initializeOnly'/> |
57 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
58 | </ExternProtoDeclare> |
59 | <ExternProtoDeclare name='Rectangle2D' url=' "Geometry2dComponentPrototypes.wrl#Rectangle2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Rectangle2D" "Geometry2dComponentPrototypes.x3d#Rectangle2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Rectangle2D" '> |
60 | <field name='size' type='SFVec2f' accessType='initializeOnly'/> |
61 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
62 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
63 | </ExternProtoDeclare> |
64 | <ExternProtoDeclare name='TriangleSet2D' url=' "Geometry2dComponentPrototypes.wrl#TriangleSet2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#TriangleSet2D" "Geometry2dComponentPrototypes.x3d#TriangleSet2D" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#TriangleSet2D" '> |
65 | <field name='vertices' type='MFVec2f' accessType='initializeOnly'/> |
66 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
67 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
68 | </ExternProtoDeclare> |
69 | <!-- ==================== --> |
70 | <!-- Additional Unfilled versions since FillProperties node not possible in native VRML 97 --> |
71 | <!-- ==================== --> |
72 | <ExternProtoDeclare name='ArcClose2DUnfilled' url=' "Geometry2dComponentPrototypes.wrl#ArcClose2DUnfilled" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#ArcClose2DUnfilled" "Geometry2dComponentPrototypes.x3d#ArcClose2DUnfilled" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#ArcClose2DUnfilled" '> |
73 | <field name='startAngle' type='SFFloat' accessType='initializeOnly'/> |
74 | <field name='endAngle' type='SFFloat' accessType='initializeOnly'/> |
75 | <field name='radius' type='SFFloat' accessType='initializeOnly'/> |
76 | <field name='closureType' type='SFString' accessType='initializeOnly'/> |
77 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
78 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
79 | </ExternProtoDeclare> |
80 | <ExternProtoDeclare name='Rectangle2DUnfilled' url=' "Geometry2dComponentPrototypes.wrl#Rectangle2DUnfilled" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.wrl#Rectangle2DUnfilled" "Geometry2dComponentPrototypes.x3d#Rectangle2DUnfilled" "https://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d#Rectangle2DUnfilled" '> |
81 | <field name='size' type='SFVec2f' accessType='initializeOnly'/> |
82 | <field name='solid' type='SFBool' accessType='initializeOnly'/> |
83 | <field name='metadata' type='SFNode' accessType='inputOutput'/> |
84 | </ExternProtoDeclare> |
85 | <!-- ==================== --> |
86 | <!-- ==================== --> |
87 | <Background groundColor='0.3 0.3 0.3' skyColor='0.3 0.3 0.3'/> |
88 | <Viewpoint description='Geometry2D Component Examples' position='0 0 12'/> |
89 | <!-- ==================== --> |
90 | <!-- Top row --> |
91 | <Transform translation='-5 2 0'> |
92 | <Shape> |
93 | <ProtoInstance name='ArcClose2D' containerField='geometry'> |
94 | <fieldValue name='closureType' value='PIE'/> |
95 | <fieldValue name='startAngle' value='0.7'/> |
96 | <fieldValue name='endAngle' value='3'/> |
97 | <fieldValue name='radius' value='1'/> |
98 | </ProtoInstance> |
99 | <Appearance> |
100 | <Material diffuseColor='0 0 1'/> |
101 | </Appearance> |
102 | </Shape> |
103 | </Transform> |
104 | <Transform DEF='ArcClose2DUnfilledTransform' translation='-2.5 2 0'> |
105 | <Shape> |
106 | <ProtoInstance name='ArcClose2DUnfilled' containerField='geometry'> |
107 | <fieldValue name='closureType' value='PIE'/> |
108 | <fieldValue name='startAngle' value='0.7'/> |
109 | <fieldValue name='endAngle' value='3'/> |
110 | <fieldValue name='radius' value='1'/> |
111 | </ProtoInstance> |
112 | <Appearance> |
113 | <Material emissiveColor='0.2 0.2 1'/> |
114 | </Appearance> |
115 | </Shape> |
116 | </Transform> |
117 | <Transform translation='-0.5 2 0'> |
118 | <Shape> |
119 | <ProtoInstance name='Arc2D' containerField='geometry'> |
120 | <fieldValue name='startAngle' value='0'/> |
121 | <fieldValue name='endAngle' value='1.570796'/> |
122 | <fieldValue name='radius' value='1'/> |
123 | </ProtoInstance> |
124 | <Appearance> |
125 | <Material emissiveColor='1 1 0'/> |
126 | </Appearance> |
127 | </Shape> |
128 | </Transform> |
129 | <Transform translation='2 2 0'> |
130 | <Shape> |
131 | <ProtoInstance name='Circle2D' containerField='geometry'> |
132 | <fieldValue name='radius' value='1'/> |
133 | </ProtoInstance> |
134 | <Appearance> |
135 | <Material emissiveColor='1 0 0'/> |
136 | </Appearance> |
137 | </Shape> |
138 | </Transform> |
139 | <Transform translation='5 2 0'> |
140 | <Shape> |
141 | <ProtoInstance name='Disk2D' containerField='geometry'> |
142 | <fieldValue name='innerRadius' value='0.5'/> |
143 | <fieldValue name='outerRadius' value='1'/> |
144 | </ProtoInstance> |
145 | <Appearance> |
146 | <Material diffuseColor='0.5 1 1'/> |
147 | </Appearance> |
148 | </Shape> |
149 | </Transform> |
150 | <!-- ==================== --> |
151 | <!-- Bottom row --> |
152 | <Transform translation='-5 -2 0'> |
153 | <Shape> |
154 | <ProtoInstance name='Rectangle2D' containerField='geometry'> |
155 | <fieldValue name='size' value='1 2'/> |
156 | </ProtoInstance> |
157 | <Appearance> |
158 | <Material diffuseColor='1 0 0'/> |
159 | </Appearance> |
160 | </Shape> |
161 | </Transform> |
162 | <Transform DEF='RectangleUnfilled' translation='-3 -2 0'> |
163 | <Shape> |
164 | <ProtoInstance name='Rectangle2DUnfilled' containerField='geometry'> |
165 | <fieldValue name='size' value='1 2'/> |
166 | </ProtoInstance> |
167 | <Appearance> |
168 | <Material emissiveColor='1 0.2 0.2'/> |
169 | </Appearance> |
170 | </Shape> |
171 | </Transform> |
172 | <Transform translation='-0.5 -2 0'> |
173 | <Shape> |
174 | <ProtoInstance name='Polyline2D' containerField='geometry'> |
175 | <fieldValue name='lineSegments' value='-1 0 -0.5 1 0 0 0.5 1 1 0'/> |
176 | </ProtoInstance> |
177 | <Appearance> |
178 | <Material diffuseColor='0 0 0' emissiveColor='1 0.5 1'/> |
179 | </Appearance> |
180 | </Shape> |
181 | </Transform> |
182 | <Transform translation='2.5 -2 0'> |
183 | <Shape> |
184 | <ProtoInstance name='Polypoint2D' containerField='geometry'> |
185 | <fieldValue name='point' value='-1 0 -0.5 1 0 0 0.5 1 1 0'/> |
186 | </ProtoInstance> |
187 | <Appearance> |
188 | <Material emissiveColor='1 1 1'/> |
189 | </Appearance> |
190 | </Shape> |
191 | <Transform translation='0 0.5 -0.5'> |
192 | <Shape> |
193 | <ProtoInstance name='Rectangle2D' DEF='BackDrop' containerField='geometry'> |
194 | <fieldValue name='size' value='2.5 2'/> |
195 | </ProtoInstance> |
196 | <Appearance> |
197 | <Material diffuseColor='0 0 0'/> |
198 | </Appearance> |
199 | </Shape> |
200 | <Transform translation='0 -0.15 0.2'> |
201 | <Shape> |
202 | <Text string='"PolyPoint2D" "5 points"'> |
203 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.25' style='BOLD'/> |
204 | </Text> |
205 | <Appearance> |
206 | <Material/> |
207 | </Appearance> |
208 | </Shape> |
209 | </Transform> |
210 | </Transform> |
211 | </Transform> |
212 | <Transform translation='5 -2 0'> |
213 | <Shape> |
214 | <ProtoInstance name='TriangleSet2D' containerField='geometry'> |
215 | <fieldValue name='vertices' value='0 0 1 1 -1 1 0 0 1 0.5 1 -0.5 0 0 -1 -2 -2 -1'/> |
216 | </ProtoInstance> |
217 | <Appearance> |
218 | <FillProperties DEF='TestFillProperties' containerField='fillProperties'/> |
219 | <LineProperties DEF='TestLineProperties' linewidthScaleFactor='1' containerField='lineProperties'> |
220 | <MetadataString DEF='TestLinePropertiesMetaData' name='test LineProperties metadata child'/> |
221 | </LineProperties> |
222 | <Material diffuseColor='0 1 0'/> |
223 | </Appearance> |
224 | </Shape> |
225 | </Transform> |
226 | </Scene> |
227 | </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)
<ProtoInstance name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->