equal
deleted
inserted
replaced
34 while (face_num): |
34 while (face_num): |
35 tokens = fp.readline().split() |
35 tokens = fp.readline().split() |
36 if (tokens[0] != "3"): |
36 if (tokens[0] != "3"): |
37 print "ply warning: faces of %d vertices not supported" % tokens[0] |
37 print "ply warning: faces of %d vertices not supported" % tokens[0] |
38 f = [vertices[int(x)] for x in tokens[1:4]] |
38 f = [vertices[int(x)] for x in tokens[1:4]] |
39 face = Triangle(f[0], f[1], f[2], mat) |
39 face = Triangle(NormalVertex(f[0]), NormalVertex(f[1]), NormalVertex(f[2]), mat) |
40 rt.addshape(face) |
40 rt.addshape(face) |
41 face_num -= 1 |
41 face_num -= 1 |
42 |
42 |
43 rt = Raytracer() |
43 rt = Raytracer() |
44 mat = Material(colour=(0.9, 0.9, 0.9)) |
44 mat = Material(colour=(0.9, 0.9, 0.9)) |