Commit Graph

27 Commits

Author SHA1 Message Date
Matthias Richter
1d5196cd70 Fix #18: Invalid check for class-commons. 2012-07-22 12:13:10 +02:00
Matthias Richter
ebaabd22b7 Code refactoring 2012-07-10 16:29:34 +02:00
Matthias Richter
5125f35e71 Quick exit on shape:collidesWith(shape) 2012-07-10 16:18:20 +02:00
Matthias Richter
b20fc496eb Add shape:scale(s). 2012-07-05 17:30:13 +02:00
Matthias Richter
ce4b8011da Collision detection using GJK/EPA instead of SAT.
The Gilbert–Johnson–Keerthi collision detection algorithm is
significantly faster than collision detection using the separating axis
theorem. GJK can only determine whether two shapes collide, but not the
penetration vector. The expanding polytype algorithm can use information
from GJK to quickly find the required vector.
2012-05-20 16:50:35 +02:00
Matthias Richter
9ac3d870ff Remove output on console 2012-04-22 01:10:11 +02:00
Matthias Richter
5b12e72aae Switch to light vector module 2012-04-12 16:07:50 +02:00
Matthias Richter
87f964cb43 Fix shape:intersectsRay(). 2012-02-20 13:13:49 +01:00
Matthias Richter
940266e0dc Add shape:bbox(). Simplify hash aware functions 2012-02-11 19:38:09 +01: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
8b29ebc616 Add shape:setRotation() and shape:rotation() 2011-02-27 17:00:49 +01:00
Matthias Richter
736c9ba933 Fix PointShape:intersectsRay() - return true only of point on ray 2011-02-26 17:43:22 +01:00
Matthias Richter
787c980fdd Add point shape 2011-02-26 17:27:04 +01:00
Matthias Richter
7a97797108 Invert reported MTV when delaying collision detection to other shape 2011-02-23 18:04:45 +01:00
Matthias Richter
8ae0f831da Fix circle/circle collision, Fix MTV computation 2011-02-23 17:33:35 +01:00
Matthias Richter
a04a2ea773 Fix bug: moveTo fails 2011-02-07 17:51:51 +01:00
Matthias Richter
aec4a36cb0 Remove optional vector argument 2011-02-07 17:42:48 +01:00
Matthias Richter
5885d10294 Ray intersection returns ray parameter of intersection point 2011-02-07 17:38:44 +01:00
Matthias Richter
da6e772be7 add ray intersection 2011-02-07 00:08:02 +01:00
Matthias Richter
56737e7aa0 Add point location and broad phase 2011-02-06 17:40:06 +01:00
Matthias Richter
4554742579 Hide submodules. 2011-02-06 15:03:21 +01:00
Matthias Richter
1d8fee8b7a Remove double definition of Shape:moveTo() 2011-02-02 22:17:39 +01:00
Matthias Richter
fae80f07a0 Merge branch 'master' of github.com:vrld/HardonCollider 2011-02-01 23:42:04 +01:00
Matthias Richter
98dd876c5e Add Shape:moveTo() 2011-02-01 23:41:28 +01:00
Matthias Richter
896f58110e Add moveTo 2011-01-24 20:37:17 +01:00
Matthias Richter
b8c4462454 Rename file 2011-01-18 18:59:25 +01:00