mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Updated to Box2D 2.2, added new joints, some other updates to match the API changes (still plenty more to go though)
--HG-- branch : box2d-update
This commit is contained in:
@@ -58,7 +58,7 @@ namespace box2d
|
||||
return world->scaleDown(joint->GetJointSpeed());
|
||||
}
|
||||
|
||||
void PrismaticJoint::setMotorEnabled(bool motor)
|
||||
void PrismaticJoint::enableMotor(bool motor)
|
||||
{
|
||||
return joint->EnableMotor(motor);
|
||||
}
|
||||
@@ -70,30 +70,30 @@ namespace box2d
|
||||
|
||||
void PrismaticJoint::setMaxMotorForce(float force)
|
||||
{
|
||||
joint->SetMaxMotorForce(force);
|
||||
joint->SetMaxMotorForce(world->scaleDown(force));
|
||||
}
|
||||
|
||||
void PrismaticJoint::setMotorSpeed(float speed)
|
||||
{
|
||||
joint->SetMotorSpeed(speed);
|
||||
joint->SetMotorSpeed(world->scaleDown(speed));
|
||||
}
|
||||
|
||||
float PrismaticJoint::getMotorSpeed() const
|
||||
{
|
||||
return joint->GetMotorSpeed();
|
||||
return world->scaleUp(joint->GetMotorSpeed());
|
||||
}
|
||||
|
||||
float PrismaticJoint::getMotorForce() const
|
||||
float PrismaticJoint::getMotorForce(float inv_dt) const
|
||||
{
|
||||
return joint->GetMotorForce();
|
||||
return world->scaleUp(joint->GetMotorForce(inv_dt));
|
||||
}
|
||||
|
||||
void PrismaticJoint::setLimitsEnabled(bool limit)
|
||||
void PrismaticJoint::enableLimit(bool limit)
|
||||
{
|
||||
joint->EnableLimit(limit);
|
||||
}
|
||||
|
||||
bool PrismaticJoint::isLimitsEnabled() const
|
||||
bool PrismaticJoint::isLimitEnabled() const
|
||||
{
|
||||
return joint->IsLimitEnabled();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user