java.lang.Object
de.pirckheimer_gymnasium.jbox2d.testbed.framework.TestbedCamera

public class TestbedCamera extends Object
  • Constructor Details

    • TestbedCamera

      public TestbedCamera(Vec2 initPosition, float initScale, float zoomScaleDiff)
  • Method Details

    • reset

      public void reset()
      Resets the camera to the initial position
    • setCamera

      public void setCamera(Vec2 worldCenter)
      Sets the camera center position
    • setCamera

      public void setCamera(Vec2 worldCenter, float scale)
      Sets the camera center position and scale
    • zoomToPoint

      public void zoomToPoint(Vec2 screenPosition, TestbedCamera.ZoomType zoomType)
      Zooms the camera to a point on the screen. The zoom amount is given on camera initialization.
    • moveWorld

      public void moveWorld(Vec2 screenDiff)
      Moves the camera by the given distance in screen coordinates.
    • getTransform

      public IViewportTransform getTransform()