Debian Codegraph @

models/oiv_compliance/indexedfaceset.iv

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