mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Switched get/setMeter from being a World method to a love.physics function
--HG-- branch : box2d-update
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
// Module
|
||||
#include "Body.h"
|
||||
#include "World.h"
|
||||
#include "Physics.h"
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -36,9 +37,9 @@ namespace box2d
|
||||
b2RopeJointDef def;
|
||||
def.bodyA = body1->body;
|
||||
def.bodyB = body2->body;
|
||||
def.localAnchorA = world->scaleDown(b2Vec2(x1,y1));
|
||||
def.localAnchorB = world->scaleDown(b2Vec2(x2,y2));
|
||||
def.maxLength = world->scaleDown(maxLength);
|
||||
def.localAnchorA = Physics::scaleDown(b2Vec2(x1,y1));
|
||||
def.localAnchorB = Physics::scaleDown(b2Vec2(x2,y2));
|
||||
def.maxLength = Physics::scaleDown(maxLength);
|
||||
def.collideConnected = collideConnected;
|
||||
joint = (b2RopeJoint*)createJoint(&def);
|
||||
}
|
||||
@@ -51,7 +52,7 @@ namespace box2d
|
||||
|
||||
float RopeJoint::getMaxLength() const
|
||||
{
|
||||
return world->scaleUp(joint->GetMaxLength());
|
||||
return Physics::scaleUp(joint->GetMaxLength());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user