Commit Graph

21 Commits

Author SHA1 Message Date
Matthias Richter
c681391033 Fix triangulation. Use class-commons. Add hash:draw()
Polygon triangulation bug:
In some cases Kongs triangulation algorithm produces triangles
with collinear points. The Polygon constructor removes one of
these and throws an error because there are not enough vertices.
Checking if the current points in a triangulation step are
collinear and discarding those triangles fixes the problem.

Class-commons lets you use any supporting class system as
backend for HC.

Add SpatialHash:draw() for debug purposes.
2012-01-22 00:09:54 +01:00
Matthias Richter
ab08c5744b Silly me, Lua doesn't work this way 2011-11-13 16:00:08 +01:00
Matthias Richter
956df262d5 Avoid using module(). Make main module a class. 2011-11-13 14:15:46 +01:00
Matthias Richter
5aa6b335be Add HC.clear() 2011-08-12 13:00:54 +02:00
Matthias Richter
06dc6bed68 Merge start and persits callback. Add HC.setPassive 2011-06-03 18:06:42 +02:00
Matthias Richter
787c980fdd Add point shape 2011-02-26 17:27:04 +01:00
Matthias Richter
36fb13a69a SpatialHash to return set instead of array 2011-02-10 14:36:10 +01:00
Matthias Richter
7803b0c11b Fix bug: param `times' ignored in setAutoUpdate() 2011-02-07 19:02:41 +01:00
Matthias Richter
476907a516 Add number parameter to setAutoUpdate() 2011-02-07 17:38:22 +01:00
Matthias Richter
75ea879e90 Check for shape validity in main module and hide submodules 2011-02-06 00:25:20 +01:00
Matthias Richter
ec10437644 Performance tweaks 2011-02-02 21:04:00 +01:00
Matthias Richter
ae58b7e822 Add auto update hook 2011-02-01 23:39:59 +01:00
Matthias Richter
4a24422e54 Fix reference errors 2011-01-18 23:33:11 +01:00
Matthias Richter
b8c4462454 Rename file 2011-01-18 18:59:25 +01:00
Matthias Richter
f28685bc16 Make proper lua modules 2011-01-18 18:55:51 +01:00
Matthias Richter
e43125d4b8 Add groups and permeable shapes 2011-01-18 15:04:27 +01:00
Matthias Richter
d79755d11e Make main module agnostig of shape._type 2011-01-16 17:10:35 +01:00
Matthias Richter
4ceac7040a Rename adding functions 2011-01-14 23:25:24 +01:00
Matthias Richter
940fc40f8e Fix package path problem 2011-01-13 16:28:05 +01:00
Matthias Richter
7a67c3f924 Fix errors in spatial hash coordinates 2011-01-13 16:15:35 +01:00
Matthias Richter
3ad0242195 Initial commit 2011-01-13 14:38:36 +01:00