Commit Graph

18 Commits

Author SHA1 Message Date
Matthias Richter
f1ad856da9 Remove Spatialhash:getNeighbors() in favor of :inRange() 2012-07-10 16:21:33 +02:00
Matthias Richter
9badb23125 Add Spatialhash:inRange() and Spatialhash:rangeIter() 2012-07-10 16:18:53 +02:00
Matthias Richter
e03ea9b0a2 Spatial hash to use number instead of table arguments 2012-05-30 15:27:09 +02:00
Matthias Richter
bf95f1e5fc Remove debug print in hash:update() 2012-04-26 20:29:33 +02:00
Matthias Richter
7d09bd30e2 Fix issue #10. Fix spatialhash drawing.
Shapes were not inserted into the spatial hash when not moved. Shapes
set to passive directly after creation would not be in the hash,
resulting in no collision reports.

Spatialhash drawing updated to the new cell indexing method.
2012-04-22 01:10:28 +02:00
Matthias Richter
5b12e72aae Switch to light vector module 2012-04-12 16:07:50 +02:00
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
956df262d5 Avoid using module(). Make main module a class. 2011-11-13 14:15:46 +01:00
Matthias Richter
68af2448fd Fix typo 2011-02-26 21:39:24 +01:00
Matthias Richter
4e6d4be0e9 rawset! 2011-02-26 18:57:21 +01: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
2b83c9f93f More profiling based optimisation 2011-02-07 19:03:19 +01:00
Matthias Richter
4554742579 Hide submodules. 2011-02-06 15:03:21 +01:00
Matthias Richter
ec10437644 Performance tweaks 2011-02-02 21:04:00 +01:00
Matthias Richter
f28685bc16 Make proper lua modules 2011-01-18 18:55:51 +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