Alex Szpakowski
9ab9a393d5
Added Contact:getFixtures and Body:getContactList (see issue #905 ).
...
The list of Contacts associated with bodies changes during World:update (potentially multiple times), so you might miss collisions if you don't use the World callbacks at all.
2014-07-07 15:24:24 -03:00
Alex Szpakowski
2ae4e9cd5a
Fixed a potential memory leak in the love.physics World callbacks.
2014-06-18 16:24:38 -03:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
5e3a0fbc6e
Updated box2d from 2.2.1 to 2.3.0
...
--HG--
branch : box2d-2.3
2013-11-09 04:30:36 -04:00
Alex Szpakowski
95eedcd1be
Using auto for some iterators for less dense-looking code
2013-09-30 02:35:10 -03:00
Alex Szpakowski
93a782d445
Renamed World:setAllowSleeping and World:getAllowSleeping to World:setSleepingAllowed and World:isSleepingAllowed (see issue #691 , also consistent with the Body methods)
2013-08-31 21:15:09 -03:00
Alex Szpakowski
ec9dec6b80
Replaced luax_newtype with luax_pushtype (and added luax_rawnewtype for the old functionality of luax_newtype.)
...
luax_pushtype keeps the object in a weak table and checks the table before creating a new userdata, so it re-uses the object's existing wrapper userdata if it can, whenever the object is pushed to Lua.
This fixes some subtle issues with love objects, where using them as keys in tables would not always work as expected (https://love2d.org/forums/viewtopic.php?f=4&t=39398&p=112388#p112415 ). It also decreases the amount of new Lua objects created, saving the garbage collector some work.
2013-08-29 00:40:06 -03:00
Alex Szpakowski
96161c66f6
Updated copyright text for the new year
2013-02-05 05:32:49 -04:00
Boolsheet
cde5aa3307
Import box2d-contacts branch from love-experiments
...
Fix issues with Contact lifetime, based on the work of
Matteo "teomat" Goggi
2012-07-24 23:59:42 +02:00
Bart van Strien
7793e7f02f
CRLF to LF
2012-07-04 14:40:24 +02:00
rude
81c38e22d0
Applied the new style guidelines.
...
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Aidan Gauland
27b62b5c9c
Removed scaling of unit vectors.
2012-04-17 20:54:12 +12:00
Bart van Strien
66aef58075
Use a clearer error message when the raycast callback doesn't return a number (issue #356 )
2012-03-03 12:11:06 +01:00
Bart van Strien
0c9d8f3c41
Handle masks and categories in our contact filter
...
Turns out, setting our own contact filter bypasses the inbuilt mask and category handling,
this means, however, that masks and categories are processed before your contact filter is
called, so if you really want to do all the filtering manually, you should just make sure
you never change the default masks and category, or restore it.
2012-02-09 20:26:18 +01:00
Bill Meltsner
4aa3939311
Actually register Box2D worlds as contact filters
2012-02-04 19:07:24 -05:00
Bart van Strien
a67b5b501f
Fix a leak on destruction of a physics world
2012-01-24 23:00:18 +01:00
Bart van Strien
9dc4138366
Fix a comment
2012-01-12 11:26:22 +01:00
Bill Meltsner
be55579a22
Happy New Year, have an enormous diff
2012-01-09 02:41:11 -06:00
Bart van Strien
c1f68e058d
Use Box2D's callbacks for destruction of physics objects and wait until the end of the timestep before destroying them.
...
Merge of box2d-id2 from love-experiments
2012-01-08 13:16:50 +01:00
Bart van Strien
0aae9684b3
Automated formatting fix
2011-11-16 11:32:41 +01:00
Bart van Strien
cf2bfcc4a2
Fix more memory leaks (issue #327 )
2011-11-12 15:00:26 +01:00
Bill Meltsner
56ae3a95fc
Bring back some elements of better Body destruction that got lost in the merge
2011-10-12 13:51:47 -05:00
Bill Meltsner
16fb73e92a
Callbacks now actually fire when they're supposed to, instead of post-step (means PreSolve collision filtering works)
...
--HG--
branch : box2d-update
2011-09-26 20:22:03 -04:00
Bill Meltsner
413f5026fa
Fix invalid pointer issue in PostSolve callback
...
--HG--
branch : box2d-update
2011-09-26 19:13:44 -03:00
Bill Meltsner
5886977baa
Fix World:getCallbacks/getContactFilter to not return any arguments passed (though you shouldn't be passing any arguments anyway, that's silly)
...
--HG--
branch : box2d-update
2011-09-26 11:20:26 -04:00
Bill Meltsner
de908f3354
Missing retain() calls in get*List functions
...
--HG--
branch : box2d-update
2011-09-25 12:35:57 -04:00
Bill Meltsner
28c5982d92
Fix table creation for getList() functions, and ignore the ground body
...
--HG--
branch : box2d-update
2011-09-25 12:18:13 -04:00
Bill Meltsner
624e1bf8f5
Missed a bunch of retain() calls
...
--HG--
branch : box2d-update
2011-09-24 23:52:56 -04:00
Bill Meltsner
dd3993623b
Add World:isLocked and const-ify a few worthy methods
...
--HG--
branch : box2d-update
2011-09-24 16:59:45 -04:00
Bill Meltsner
6a0c5b485b
Memoize Contacts, and add List-fetching functions to World (they return arrays)
...
--HG--
branch : box2d-update
2011-09-24 16:46:07 -04:00
Bill Meltsner
f852c9bac2
Add World:rayCast
...
--HG--
branch : box2d-update
2011-09-24 16:26:41 -04:00
Bill Meltsner
e2b832015b
Add World:queryBoundingBox
...
--HG--
branch : box2d-update
2011-09-24 16:15:09 -04:00
Bill Meltsner
055238659b
Change Contact callbacks to pass the actual Fixtures instead of just the userdata
...
--HG--
branch : box2d-update
2011-09-24 13:51:11 -04:00
Bill Meltsner
7e039dd1ef
Add ContactFilter callback to World
...
--HG--
branch : box2d-update
2011-09-24 13:45:24 -04:00
Bill Meltsner
c705063597
First attempt at implementing Memoization for certain Box2D objects
...
--HG--
branch : box2d-update
2011-09-24 12:20:59 -04:00
Bill Meltsner
542ae2f736
Actually create groundBody when creating a World with gravity (i.e. all the time)
...
--HG--
branch : box2d-update
2011-09-24 01:16:34 -04:00
Bill Meltsner
367dbc2ecc
Update Body API.
...
--HG--
branch : box2d-update
2011-09-23 22:21:14 -04:00
Bill Meltsner
0678eac453
A first attempt at overhauling collision. New everything.
...
--HG--
branch : box2d-update
2011-09-23 21:25:41 -04:00
Bill Meltsner
95f6047417
Update World contact callback definitions, get ready for collision overhaul
...
--HG--
branch : box2d-update
2011-09-23 17:01:53 -04:00
Bill Meltsner
4980797afc
World no longer has an explicit size
...
--HG--
branch : box2d-update
2011-09-23 16:27:59 -04:00
Bill Meltsner
e69cafe868
Switched get/setMeter from being a World method to a love.physics function
...
--HG--
branch : box2d-update
2011-09-15 16:13:54 -04:00
Bill Meltsner
b4fae893fd
updating the Joints
...
--HG--
branch : box2d-update
2011-03-13 13:16:02 -04:00
vrld
e77b94f112
Make the compiler shut up about initialization order.
2011-03-10 13:35:18 +01:00
vrld
1c7e34715b
Add NULL initializers for pointers.
...
Constructing invalid shapes, e.g. a rectangle with width 0, could result
in a b2Assert to fail. In turn, Shape::~Shape tried to destroy a the shape
with an uninitialized pointer, yielding a segfault. Add NULL-initializers
and checks for NULL to prevent this.
2011-01-25 13:24:39 +01:00
Bill Meltsner
fde708160e
bringing in the new year by changing every 2010 to 2011
2011-01-15 14:40:27 -06:00
Bart van Strien
c0789b1da3
Remove references to old physics callbacks, fixes #139
2010-12-18 12:38:29 +01:00
Bart van Strien
908df65bdb
Added meter parameter to newWorld
2010-08-01 14:42:54 +02:00
rude
aa01c984b9
Updated all dates to 2010.
2010-01-31 16:54:47 +01:00
rude
d4a97d49f3
Added all callbacks to World.
2009-08-15 14:29:47 +02:00
rude
ba1a75e547
Added many comments, and changed function names for wrapper functions.
2009-08-09 21:08:55 +02:00