demos/render_nff.py
branchpyrit
changeset 74 09aedbf5f95f
parent 73 a5127346fbcd
child 75 20dee9819b17
equal deleted inserted replaced
73:a5127346fbcd 74:09aedbf5f95f
    82 			normal = (float(ln[3]), float(ln[4]), float(ln[5]))
    82 			normal = (float(ln[3]), float(ln[4]), float(ln[5]))
    83 			vertices.append(NormalVertex(vertex, normal))
    83 			vertices.append(NormalVertex(vertex, normal))
    84 		rt.addshape(Triangle(vertices[0], vertices[1], vertices[2], mat))
    84 		rt.addshape(Triangle(vertices[0], vertices[1], vertices[2], mat))
    85 		for i in range(vertex_count)[3:]:
    85 		for i in range(vertex_count)[3:]:
    86 			rt.addshape(Triangle(vertices[0], vertices[i-1], vertices[i], mat))
    86 			rt.addshape(Triangle(vertices[0], vertices[i-1], vertices[i], mat))
       
    87 	elif ln[0] == '#':	# Comment
       
    88 		pass
    87 	else:
    89 	else:
    88 		print "Not implemented:", line
    90 		print "Not implemented:", line
    89 f.close()
    91 f.close()
    90 
    92 
    91 data = rt.render(imagesize)
    93 data = rt.render(imagesize)