Commit Graph

24 Commits

Author SHA1 Message Date
Matthias Richter
358c7a80b5 Fix #48 2018-04-08 14:37:02 +02:00
Ignazio Setti
6080839feb Fix indenting 2016-06-01 13:17:57 +02:00
Ignazio Setti
d34709c426 Allows traversing the spatialhash with a ray 2016-06-01 13:13:23 +02:00
Matthias Richter
01e8e17b92 Simplify interface. HC is now immediate mode. 2015-10-09 23:09:35 +02:00
Matthias Richter
5d100c703f Adhere to new class commons specs. 2013-07-21 12:51:35 +02:00
Matthias Richter
ec2cc20a6b Better check if cell is empty in Hash:draw() 2013-02-09 22:04:18 +01:00
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