@Override public void interpolate(float f) { interpolatedPositionA.x = lastPhysicsPosA.x * f; interpolatedPositionA.x += joint.getAnchorA().x * (1 - f); interpolatedPositionA.y = lastPhysicsPosA.y * f; interpolatedPositionA.y += joint.getAnchorA().y * (1 - f); interpolatedPositionB.x = lastPhysicsPosB.x * f; interpolatedPositionB.x += joint.getAnchorB().x * (1 - f); interpolatedPositionB.y = lastPhysicsPosB.y * f; interpolatedPositionB.y += joint.getAnchorB().y * (1 - f); }
@Override public void storeCurrentState() { lastPhysicsPosA.set(joint.getAnchorA()); lastPhysicsPosB.set(joint.getAnchorB()); }
@Override public Vector2 getAnchorB() { return joint.getAnchorB(); }