Commit Graph

151 Commits

Author SHA1 Message Date
Bill Meltsner fae16c712d make Body::applyForce(fx, fy) semantically clearer 2012-02-04 19:09:20 -05:00
Bill Meltsner 4aa3939311 Actually register Box2D worlds as contact filters 2012-02-04 19:07:24 -05:00
Bill Meltsner 2a88ed1fa5 Fix issues with Shape retention in Fixture:getShape() 2012-02-04 18:55:48 -05:00
Bill Meltsner e5cabe3b3f Remove Shape:destroy().
With the changes to Shapes rendering them mere blocks of information with no role in the World save being attached to Bodies and discarded, Shape:destroy no longer has any justification for its continued existence. Truly, on several levels, it has been hoist with its own petard.
2012-02-04 18:35:30 -05:00
Bill Meltsner dac757b688 remove scaling for density.
while technically density is (according to the Box2D docs) in kg/m^2, it seems like a number that can be safely left un-scaled, for simplicity's sake; the concept of a shape/fixture's density seems sufficiently divorced from the MKS system as to render this a non-issue. if this proves to be a problem in use, scaling can be re-added.
2012-02-04 18:26:43 -05:00
Bill Meltsner f3d770e5e7 Scale Body inertia 2012-02-04 17:54:16 -05:00
Bill Meltsner 223f9eebef Provide a default density of 1.0 for Fixtures 2012-02-04 17:21:42 -05:00
Bill Meltsner e482f32da3 Allow vertices in either clockwise or counter-clockwise order for newPolygonShape (fixes issue #326) 2012-02-04 17:18:57 -05:00
Bill Meltsner f00b5f03f2 catch a possible Box2D exception in setMassData (fixes issue #342) 2012-02-04 16:55:09 -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 f6e9f4cac7 Stop Body:getWorldPoints from overflowing the lua stack 2012-01-15 11:09:38 +01:00
Bart van Strien 9dc4138366 Fix a comment 2012-01-12 11:26:22 +01:00
Linus Sjögren 7f13fc47c7 Damn you, copy paste! 2012-01-10 04:24:13 +01:00
Linus Sjögren afd0ef1d9e Add a custom Body:setMass function. 2012-01-10 04:14:17 +01:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bart van Strien 7c1e1fd0db Return nil if the raycasts don't hit anything (issue #335) 2012-01-08 13:27:10 +01: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 ae833449d4 Move some includes over to the right file, fixing an include loop in the process 2011-12-29 13:47:39 +01:00
Bart van Strien 5ad9821290 ASSERT_GUARD raycasts 2011-12-29 13:37:42 +01:00
Bart van Strien c707a4ca45 Properly export all lua-facing functions and use those for initialization (love.cpp no longer explicitly mentions implementations) 2011-12-24 01:10:40 +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
Bart van Strien bc2dd6f75b Enola Gay delivers again 2011-10-12 21:49:04 +02:00
Bill Meltsner cb6bde5ad7 Always use protection 2011-10-12 14:42:51 -05:00
Bart van Strien b32464f0d3 Forward box2d asserts to exception, then catch those in the new* functions 2011-10-12 21:36:46 +02: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 d40b25c1e6 Hindenmerge 2011-10-12 13:40:56 -05:00
Bill Meltsner 705fa14736 Forgot to put the second anchor points in local coordinates
--HG--
branch : box2d-update
2011-10-02 10:28:37 -04:00
Bill Meltsner f38655a934 Add second body anchor point to FrictionJoint/WeldJoint constructors
--HG--
branch : box2d-update
2011-10-02 10:06:31 -04:00
Bill Meltsner 735c52b228 make love.physics.setMeter error on invalid meters (anything less than 1)
--HG--
branch : box2d-update
2011-10-02 09:33:42 -04:00
Bill Meltsner ffef6f58a9 Make Joint::getReactionForce use the right stack position
--HG--
branch : box2d-update
2011-10-02 09:28:39 -04:00
Bill Meltsner 5d26c564e0 Add EdgeShape:getPoints()
--HG--
branch : box2d-update
2011-09-29 11:19:30 -04:00
Bill Meltsner fa58c87605 Add PrismaticJoint:getMaxMotorForce
--HG--
branch : box2d-update
2011-09-29 11:14:42 -04:00
Bill Meltsner 53cdd0ea7d Add RevoluteJoint:getMaxMotorTorque
--HG--
branch : box2d-update
2011-09-29 11:12:03 -04:00
Bill Meltsner c5cd6d709b Fix a lot of scaling issues
--HG--
branch : box2d-update
2011-09-29 11:09:08 -04:00
Bill Meltsner d4703960a4 Do the same for WheelJoint
--HG--
branch : box2d-update
2011-09-27 16:38:46 -04:00
Bill Meltsner 5244463109 Add second body anchor point as a parameter to love.physics.newPrismaticJoint, and fix some scaling issues with PrismaticJoint
--HG--
branch : box2d-update
2011-09-27 15:48:29 -04:00
Bill Meltsner 356b3c880d Fixture:getShape() returns a Shape of the type it actually is
--HG--
branch : box2d-update
2011-09-26 21:35:44 -04: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 80fb261b5a Better ChainShape API consistency
--HG--
branch : box2d-update
2011-09-25 22:29:30 -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 b6f3d2114f Remove legacy meter setting from love.physics.newWorld
--HG--
branch : box2d-update
2011-09-25 11:32:46 -04:00
Bill Meltsner 5cd2ce05fd Fix scaling errors with CircleShape's radius
--HG--
branch : box2d-update
2011-09-25 11:30:58 -04:00
Bill Meltsner 56ce9a2e17 Expose love.physics.getDistance
--HG--
branch : box2d-update
2011-09-25 11:21:05 -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 680dd65c19 Add love.physics.getDistance(fixtureA, fixtureB) - gets the distance between and the closest points of two fixtures
--HG--
branch : box2d-update
2011-09-24 17:29:42 -04:00
Bill Meltsner 3bd2316c6c Remove Fixture:getNext, it was just for testing
--HG--
branch : box2d-update
2011-09-24 17:14:03 -04:00