11package assimp.md3
22
3+ import assimp.AiBlendMode
34import assimp.AiShadingMode
45import assimp.AiTexture
56import assimp.Importer
@@ -155,19 +156,67 @@ object europeanFnt {
155156
156157 name.isEmpty() shouldBe true
157158 }
158- // numMaterials shouldBe 1
159- //
160- // with(materials[0]) {
161- // shadingModel shouldBe AiShadingMode.gouraud
162- // with(color!!) {
163- // ambient shouldBe Vec3(0.0500000007)
164- // diffuse shouldBe Vec3(1f)
165- // specular shouldBe Vec3(1f)
166- // }
167- // textures[0].flags shouldBe AiTexture.Flags.ignoreAlpha.i
168- // textures[0].file shouldBe "water_can.tga"
169- // name shouldBe "MD3_[default][watercan]"
170- // }
159+ numMaterials shouldBe 5
160+
161+ with (materials[0 ]) {
162+ shadingModel shouldBe AiShadingMode .gouraud
163+ with (color!! ) {
164+ ambient shouldBe Vec3 (0.0500000007 )
165+ diffuse shouldBe Vec3 (1f )
166+ specular shouldBe Vec3 (1f )
167+ }
168+ name shouldBe " MD3_[default][windscreen]"
169+ textures[0 ].file shouldBe " textures/sfx/glass.tga.tga"
170+ textures[0 ].flags shouldBe AiTexture .Flags .ignoreAlpha.i
171+ }
172+ with (materials[1 ]) {
173+ shadingModel shouldBe AiShadingMode .gouraud
174+ with (color!! ) {
175+ ambient shouldBe Vec3 (0.0500000007 )
176+ diffuse shouldBe Vec3 (1f )
177+ specular shouldBe Vec3 (1f )
178+ }
179+ name shouldBe " MD3_[default][steering]"
180+ twoSided shouldBe true
181+ blendFunc shouldBe AiBlendMode .default
182+ textures[0 ].file shouldBe " euro_frnt_2.tga"
183+ textures[0 ].flags shouldBe AiTexture .Flags .useAlpha.i
184+ }
185+ with (materials[2 ]) {
186+ shadingModel shouldBe AiShadingMode .gouraud
187+ with (color!! ) {
188+ ambient shouldBe Vec3 (0.0500000007 )
189+ diffuse shouldBe Vec3 (1f )
190+ specular shouldBe Vec3 (1f )
191+ }
192+ name shouldBe " MD3_[default][body]"
193+ textures[0 ].file shouldBe " european_fnt.tga"
194+ textures[0 ].flags shouldBe AiTexture .Flags .ignoreAlpha.i
195+ }
196+ with (materials[3 ]) {
197+ shadingModel shouldBe AiShadingMode .gouraud
198+ with (color!! ) {
199+ ambient shouldBe Vec3 (0.0500000007 )
200+ diffuse shouldBe Vec3 (1f )
201+ specular shouldBe Vec3 (1f )
202+ }
203+ name shouldBe " MD3_[default][wheels]"
204+ textures[0 ].file shouldBe " european_fnt.tga"
205+ textures[0 ].flags shouldBe AiTexture .Flags .ignoreAlpha.i
206+ }
207+ with (materials[4 ]) {
208+ shadingModel shouldBe AiShadingMode .gouraud
209+ with (color!! ) {
210+ ambient shouldBe Vec3 (0.0500000007 )
211+ diffuse shouldBe Vec3 (1f )
212+ specular shouldBe Vec3 (1f )
213+ }
214+ name shouldBe " MD3_[default][wheel_arches]"
215+ twoSided shouldBe true
216+ blendFunc shouldBe AiBlendMode .default
217+ textures[0 ].file shouldBe " euro_frnt_2.tga"
218+ textures[0 ].flags shouldBe AiTexture .Flags .useAlpha.i
219+ }
171220 }
172221 }
173222}
0 commit comments