mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Memoize Contacts, and add List-fetching functions to World (they return arrays)
--HG-- branch : box2d-update
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#include "World.h"
|
||||
#include "Physics.h"
|
||||
|
||||
#include <common/Memoizer.h>
|
||||
|
||||
namespace love
|
||||
{
|
||||
namespace physics
|
||||
@@ -31,10 +33,12 @@ namespace box2d
|
||||
Contact::Contact(b2Contact * contact)
|
||||
: contact(contact)
|
||||
{
|
||||
Memoizer::add(contact, this);
|
||||
}
|
||||
|
||||
Contact::~Contact()
|
||||
{
|
||||
Memoizer::remove(contact);
|
||||
}
|
||||
|
||||
int Contact::getPositions(lua_State * L)
|
||||
|
||||
Reference in New Issue
Block a user