demos/plyreader.py
branchpyrit
changeset 90 f6a72eb99631
parent 75 20dee9819b17
child 97 2a853d284a6a
equal deleted inserted replaced
89:fcf1487b398b 90:f6a72eb99631
     1 # Stanford .ply file loader
     1 # Stanford .ply file loader
     2 
     2 
     3 from raytracer import Triangle, NormalVertex
     3 from pyrit import Triangle, NormalVertex
     4 
     4 
     5 def LoadStanfordPlyFile(rt, filename, mat, scale=(1,1,1), trans=(0,0,0)):
     5 def LoadStanfordPlyFile(rt, filename, mat, scale=(1,1,1), trans=(0,0,0)):
     6 	if (type(scale) == float or type(scale) == int):
     6 	if (type(scale) == float or type(scale) == int):
     7 		scale = (scale,)*3
     7 		scale = (scale,)*3
     8 	vertices = []
     8 	vertices = []