demos/objreader.py
branchpyrit
changeset 75 20dee9819b17
parent 41 c1080cb5bd6d
child 90 f6a72eb99631
equal deleted inserted replaced
74:09aedbf5f95f 75:20dee9819b17
    14 			v = [scale*float(x) for x in ln[1:4]]
    14 			v = [scale*float(x) for x in ln[1:4]]
    15 			vertices.append(tuple(v))
    15 			vertices.append(tuple(v))
    16 		if ln[0] == "f":
    16 		if ln[0] == "f":
    17 			f = [vertices[int(x)-1] for x in ln[1:4]]
    17 			f = [vertices[int(x)-1] for x in ln[1:4]]
    18 			face = Triangle(NormalVertex(f[0]), NormalVertex(f[1]), NormalVertex(f[2]), mat)
    18 			face = Triangle(NormalVertex(f[0]), NormalVertex(f[1]), NormalVertex(f[2]), mat)
    19 			rt.addshape(face)
    19 			rt.addShape(face)