projects
/
tabakrolletjie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01dc6fd
)
Keep number of vertices low during ray tracing.
author
Simon Cross
<hodgestar@gmail.com>
Sun, 4 Sep 2016 21:19:24 +0000
(23:19 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Sun, 4 Sep 2016 21:19:24 +0000
(23:19 +0200)
tabakrolletjie/lights.py
patch
|
blob
|
history
diff --git
a/tabakrolletjie/lights.py
b/tabakrolletjie/lights.py
index ece9c4ef950ae698817bd6d2a549dbfbb85497f8..ecb6cedd44391a5e2e293b01b4d3bd37f67f1087 100644
(file)
--- a/
tabakrolletjie/lights.py
+++ b/
tabakrolletjie/lights.py
@@
-50,6
+50,8
@@
def calculate_ray_polys(space, body, position):
new_poly = pymunk.Poly(body, vertices[:-1])
vertices = [position, vertices[-1]]
ray_polys.append(new_poly)
+ else:
+ vertices = trial_poly.get_vertices() + [point]
if len(vertices) > 2:
ray_polys.append(pymunk.Poly(body, vertices))
end_time = time.time()