Debian Codegraph @

models/oiv_compliance/indexedtrianglestripset.iv

raw
1 #Inventor V2.1 ascii
2
3 # Check all aspects of SoIndexedTriangleStripSet rendering.
4 #
5 # 19990414 mortene
6
7 Separator {
8 # Global settings.
9 Coordinate3 {
10 point [
11 -1 1 0, -1 -1 0, 1 -1 0, 1 1 0,
12 0 2 -1, -2 0 -1, 0 -2 -1, 2 0 -1,
13 ]
14 }
15 Material {
16 diffuseColor [
17 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1, 1 1 1, 0.5 0.5 0.5,
18 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1, 1 1 1, 0.5 0.5 0.5
19 ]
20 }
21 TextureCoordinate2 {
22 point [ 0 0, 0 1, 1 0, 1 1]
23 }
24 # Normal {
25 # vector [
26 # 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1, 1 1 1, 0.5 0 0
27 # ]
28 # }
29
30 Switch {
31 whichChild -2
32
33 DEF ifs IndexedTriangleStripSet {
34 coordIndex [
35 0, 1, 3, 2, -1,
36 0, 3, 4, -1,
37 0, 5, 1, -1,
38 1, 6, 2, -1,
39 2, 7, 3, -1
40 ]
41
42 materialIndex [
43 0, 1, 3, 2, 0,
44 0, 3, 4, 0,
45 0, 5, 1, 0,
46 1, 6, 2, 0,
47 2, 7, 3, 0 ]
48
49 textureCoordIndex [
50 0, 1, 3, 2, 0,
51 0, 1, 2, 0,
52 0, 1, 2, 0,
53 0, 1, 2, 0,
54 0, 1, 2, 0 ]
55
56 # normalIndex [
57 # 0, 1, 2, 3, -1,
58 # 0, 3, 4, -1,
59 # 0, 5, 1, -1,
60 # 1, 6, 2, -1,
61 # 2, 7, 3, -1 ]
62 }
63 }
64
65
66 # (ROW 0) MaterialBinding
67 Separator {
68 MaterialBinding { value OVERALL }
69 USE ifs
70
71 Translation { translation +5 0 0 }
72 MaterialBinding { value PER_PART }
73 USE ifs
74
75 Translation { translation +5 0 0 }
76 MaterialBinding { value PER_PART_INDEXED }
77 USE ifs
78
79 Translation { translation +5 0 0 }
80 MaterialBinding { value PER_FACE }
81 USE ifs
82
83 Translation { translation +5 0 0 }
84 MaterialBinding { value PER_FACE_INDEXED }
85 USE ifs
86
87 Translation { translation +5 0 0 }
88 MaterialBinding { value PER_VERTEX }
89 USE ifs
90
91 Translation { translation +5 0 0 }
92 MaterialBinding { value PER_VERTEX_INDEXED }
93 USE ifs
94 }
95
96 # (ROW 1) NormalBinding
97 Translation { translation 0 +6 0 }
98 Separator {
99 NormalBinding { value OVERALL }
100 USE ifs
101
102 Translation { translation +5 0 0 }
103 NormalBinding { value PER_PART }
104 USE ifs
105
106 Translation { translation +5 0 0 }
107 NormalBinding { value PER_PART_INDEXED }
108 USE ifs
109
110 Translation { translation +5 0 0 }
111 NormalBinding { value PER_FACE }
112 USE ifs
113
114 Translation { translation +5 0 0 }
115 NormalBinding { value PER_FACE_INDEXED }
116 USE ifs
117
118 Translation { translation +5 0 0 }
119 NormalBinding { value PER_VERTEX }
120 USE ifs
121
122 Translation { translation +5 0 0 }
123 NormalBinding { value PER_VERTEX_INDEXED }
124 USE ifs
125 }
126
127 # (ROW 2) Test how IndexedTriangleStripSet is affected by Complexity.
128 Translation { translation 0 +6 0 }
129 Separator {
130 Complexity { type BOUNDING_BOX }
131 USE ifs
132
133 Translation { translation +5 0 0 }
134 Complexity { type OBJECT_SPACE value 1.0 }
135 USE ifs
136
137 Translation { translation +5 0 0 }
138 Complexity { type OBJECT_SPACE value 0.2 }
139 USE ifs
140
141 Translation { translation +5 0 0 }
142 Complexity { type OBJECT_SPACE value 0.0 }
143 USE ifs
144 }
145
146
147 # (ROW 3) With different LightModel settings.
148 Translation { translation 0 +6 0 }
149 Separator {
150 LightModel { model BASE_COLOR }
151 USE ifs
152
153 Translation { translation +5 0 0 }
154 LightModel { model PHONG }
155 USE ifs
156 }
157
158 # (ROW 4) With different DrawStyle settings.
159 Translation { translation 0 +6 0 }
160 Separator {
161 DrawStyle { style INVISIBLE }
162 USE ifs
163
164 Translation { translation +5 0 0 }
165 DrawStyle { style LINES }
166 USE ifs
167
168 Translation { translation +5 0 0 }
169 DrawStyle { style LINES lineWidth 1 }
170 USE ifs
171
172 Translation { translation +5 0 0 }
173 DrawStyle { style LINES lineWidth 2 }
174 USE ifs
175
176 Translation { translation +5 0 0 }
177 DrawStyle { style LINES lineWidth 4 }
178 USE ifs
179
180 Translation { translation +5 0 0 }
181 DrawStyle { style LINES lineWidth 2 linePattern 0x0180 }
182 USE ifs
183
184 Translation { translation +5 0 0 }
185 DrawStyle { style POINTS }
186 USE ifs
187
188 Translation { translation +5 0 0 }
189 DrawStyle { style POINTS pointSize 3 }
190 USE ifs
191
192 Translation { translation +5 0 0 }
193 DrawStyle { style FILLED }
194 USE ifs
195 }
196
197 # (ROW 5) With different ShapeStyle settings.
198 Translation { translation 0 +6 0 }
199 Separator {
200 Translation { translation +5 0 0 }
201 ShapeHints { vertexOrdering CLOCKWISE }
202 USE ifs
203
204 Translation { translation +5 0 0 }
205 ShapeHints { vertexOrdering COUNTERCLOCKWISE }
206 USE ifs
207
208 Translation { translation +5 0 0 }
209 ShapeHints { shapeType UNKNOWN_SHAPE_TYPE }
210 USE ifs
211
212 Translation { translation +5 0 0 }
213 ShapeHints { shapeType SOLID }
214 USE ifs
215
216 Translation { translation +5 0 0 }
217 ShapeHints { faceType UNKNOWN_FACE_TYPE }
218 USE ifs
219
220 Translation { translation +5 0 0 }
221 ShapeHints { faceType CONVEX }
222 USE ifs
223
224 Translation { translation +5 0 0 }
225 ShapeHints { creaseAngle 0.5 }
226 USE ifs
227
228 Translation { translation +5 0 0 }
229 ShapeHints { creaseAngle 1.57 }
230 USE ifs
231 }
232
233 # (ROW 6) Test how IndexedTriangleStripSet is affected by texturemapping.
234 Translation { translation 0 +6 0 }
235 Separator {
236 Texture2 {
237 image 8 6 3
238 0xff000000 0xff000000 0x00000000 0x00000000 0xff00ff00 0xff00ff00
239 0xff000000 0xff000000 0x00000000 0x00000000 0xff00ff00 0xff00ff00
240 0xff000000 0xff000000 0x00000000 0x00000000 0xff00ff00 0xff00ff00
241 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
242 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
243 0xffff0000 0xffff0000 0x00000000 0x00000000 0xffffff00 0xffffff00
244 0xffff0000 0xffff0000 0x00000000 0x00000000 0xffffff00 0xffffff00
245 0xffff0000 0xffff0000 0x00000000 0x00000000 0xffffff00 0xffffff00
246 }
247
248 USE ifs
249
250 Translation { translation +5 0 0 }
251 TextureCoordinateBinding { value PER_VERTEX }
252 USE ifs
253
254 Translation { translation +5 0 0 }
255 TextureCoordinateBinding { value PER_VERTEX_INDEXED }
256 USE ifs
257 }
258 }