Class FixedScreenViewport

java.lang.Object
com.badlogic.gdx.utils.viewport.Viewport
gaiasky.gui.vr.FixedScreenViewport

public class FixedScreenViewport extends com.badlogic.gdx.utils.viewport.Viewport
  • Constructor Summary

    Constructors
    Constructor
    Description
    FixedScreenViewport(int width, int height)
    Creates a new viewport using a new OrthographicCamera.
    FixedScreenViewport(int width, int height, com.badlogic.gdx.graphics.Camera camera)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(boolean centerCamera)
     
    float
     
    com.badlogic.gdx.math.Vector2
    toScreenCoordinates(com.badlogic.gdx.math.Vector2 worldCoords, com.badlogic.gdx.math.Matrix4 transformMatrix)
     
    com.badlogic.gdx.math.Vector2
    unproject(com.badlogic.gdx.math.Vector2 screenCoords)
     
    com.badlogic.gdx.math.Vector3
    unproject(com.badlogic.gdx.math.Vector3 screenCoords)
    Transforms the specified screen coordinate to world coordinates.
    void
    update(int screenWidth, int screenHeight, boolean centerCamera)
     

    Methods inherited from class com.badlogic.gdx.utils.viewport.Viewport

    apply, calculateScissors, getBottomGutterHeight, getCamera, getLeftGutterWidth, getPickRay, getRightGutterWidth, getRightGutterX, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getTopGutterHeight, getTopGutterY, getWorldHeight, getWorldWidth, project, project, setCamera, setScreenBounds, setScreenHeight, setScreenPosition, setScreenSize, setScreenWidth, setScreenX, setScreenY, setWorldHeight, setWorldSize, setWorldWidth, update

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FixedScreenViewport

      public FixedScreenViewport(int width, int height)
      Creates a new viewport using a new OrthographicCamera.
    • FixedScreenViewport

      public FixedScreenViewport(int width, int height, com.badlogic.gdx.graphics.Camera camera)
  • Method Details

    • unproject

      public com.badlogic.gdx.math.Vector2 unproject(com.badlogic.gdx.math.Vector2 screenCoords)
      Overrides:
      unproject in class com.badlogic.gdx.utils.viewport.Viewport
    • unproject

      public com.badlogic.gdx.math.Vector3 unproject(com.badlogic.gdx.math.Vector3 screenCoords)
      Transforms the specified screen coordinate to world coordinates.
      Overrides:
      unproject in class com.badlogic.gdx.utils.viewport.Viewport
      Returns:
      The vector that was passed in, transformed to world coordinates.
      See Also:
      • Camera.unproject(Vector3)
    • toScreenCoordinates

      public com.badlogic.gdx.math.Vector2 toScreenCoordinates(com.badlogic.gdx.math.Vector2 worldCoords, com.badlogic.gdx.math.Matrix4 transformMatrix)
      Overrides:
      toScreenCoordinates in class com.badlogic.gdx.utils.viewport.Viewport
    • update

      public void update(int screenWidth, int screenHeight, boolean centerCamera)
      Overrides:
      update in class com.badlogic.gdx.utils.viewport.Viewport
    • apply

      public void apply(boolean centerCamera)
      Overrides:
      apply in class com.badlogic.gdx.utils.viewport.Viewport
    • getUnitsPerPixel

      public float getUnitsPerPixel()