1#Inventor V2.1 ascii
2
3# Check all aspects of rendering with SoMaterialBinding nodes.
4# FIXME: include more SoShape primitives in the check?
5#
6# 19990504 mortene
7
8Separator {
9   Switch {
10      whichChild -1
11      DEF primitives Separator {
12	 Cube { }
13	 Translation { translation +3 0 0 }
14	 Cone { }
15	 Translation { translation +3 0 0 }
16	 Cylinder { }
17	 Translation { translation +3 0 0 }
18	 Sphere { }
19	 Translation { translation +6 0 0 }
20	 Coordinate3 {
21	    point [
22	     -2 -1 0, -1 -1 0, 1 -1 0, 2 -1 0,
23	     -2 1 0, -1 1 0, 1 1 0, 2 1 0,
24	    ]
25	 }
26	 IndexedFaceSet {
27	    coordIndex [ 0, 1, 5, 4, -1, 1, 2, 6, 5, -1, 2, 3, 7, 6, -1]
28	 }
29      }
30   }
31
32   Material {
33      ambientColor 0.2 0.2 0.2
34      diffuseColor [ 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1, 1 1 1, 0 0 0 ]
35      specularColor 0.0 0.0 0.0
36      emissiveColor 0.0 0.0 0.0
37      shininess 0.2
38      transparency [ 0.0, 0.1, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0 ]
39   }
40
41   # (ROW 0) Test different materialbinding values
42   Separator {
43      USE primitives
44
45      MaterialBinding { value PER_VERTEX_INDEXED }
46      Translation { translation 0 +3 0 }
47      USE primitives
48
49      MaterialBinding { value PER_VERTEX }
50      Translation { translation 0 +3 0 }
51      USE primitives
52
53      MaterialBinding { value PER_FACE_INDEXED }
54      Translation { translation 0 +3 0 }
55      USE primitives
56
57      MaterialBinding { value PER_FACE }
58      Translation { translation 0 +3 0 }
59      USE primitives
60
61      MaterialBinding { value PER_PART_INDEXED }
62      Translation { translation 0 +3 0 }
63      USE primitives
64
65      MaterialBinding { value PER_PART }
66      Translation { translation 0 +3 0 }
67      USE primitives
68
69      MaterialBinding { value OVERALL }
70      Translation { translation 0 +3 0 }
71      USE primitives
72   }
73
74   # (ROW 1) Check ignored flag
75   Translation { translation 0 -6 0 }
76   Separator {
77      USE primitives
78
79      MaterialBinding { value PER_VERTEX_INDEXED ~ }
80      Translation { translation 0 -3 0 }
81      USE primitives
82   }
83}
84