150 else: |
151 else: |
151 print "Warning: chunk", ID,"("+str(size),"B) ignored" |
152 print "Warning: chunk", ID,"("+str(size),"B) ignored" |
152 f.read(size) |
153 f.read(size) |
153 (ID,size) = read_chunk(f) |
154 (ID,size) = read_chunk(f) |
154 return (points, faces, tags, surfaces) |
155 return (points, faces, tags, surfaces) |
155 |
|
156 def dot(a,b): |
|
157 sum = 0 |
|
158 for i in range(min(len(a),len(b))): |
|
159 sum += a[i]*b[i] |
|
160 return sum |
|
161 |
156 |
162 def LoadLightwaveLwoFile(rt, filename, scale=(1,1,1), trans=(0,0,0)): |
157 def LoadLightwaveLwoFile(rt, filename, scale=(1,1,1), trans=(0,0,0)): |
163 if (type(scale) == float or type(scale) == int): |
158 if (type(scale) == float or type(scale) == int): |
164 scale = (scale,)*3 |
159 scale = (scale,)*3 |
165 (points, faces, tags, surfaces) = read_lwo(filename) |
160 (points, faces, tags, surfaces) = read_lwo(filename) |