Esempio n. 1
0
  @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);
  }
Esempio n. 2
0
  @Override
  public void storeCurrentState() {

    lastPhysicsPosA.set(joint.getAnchorA());
    lastPhysicsPosB.set(joint.getAnchorB());
  }
Esempio n. 3
0
 @Override
 public Vector2 getAnchorA() {
   return joint.getAnchorA();
 }