mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
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
This commit is contained in:
@@ -62,8 +62,8 @@ namespace box2d
|
||||
protected:
|
||||
|
||||
Body * body;
|
||||
b2Fixture * fixture;
|
||||
fixtureudata * data;
|
||||
b2Fixture * fixture;
|
||||
|
||||
public:
|
||||
|
||||
@@ -90,6 +90,11 @@ namespace box2d
|
||||
**/
|
||||
Shape * getShape() const;
|
||||
|
||||
/**
|
||||
* Returns true if the fixture is active in a Box2D world.
|
||||
**/
|
||||
bool isValid() const;
|
||||
|
||||
/**
|
||||
* Checks whether this Fixture acts as a sensor.
|
||||
* @return True if sensor, false otherwise.
|
||||
@@ -206,6 +211,11 @@ namespace box2d
|
||||
* This operation may be expensive.
|
||||
**/
|
||||
int getMassData(lua_State * L) const;
|
||||
|
||||
/**
|
||||
* Destroys this fixture.
|
||||
**/
|
||||
void destroy(bool implicit = false);
|
||||
};
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user