Package gaiasky.gui.vr
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
ConstructorsConstructorDescriptionFixedScreenViewport(int width, int height) Creates a new viewport using a newOrthographicCamera.FixedScreenViewport(int width, int height, com.badlogic.gdx.graphics.Camera camera) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(boolean centerCamera) floatcom.badlogic.gdx.math.Vector2toScreenCoordinates(com.badlogic.gdx.math.Vector2 worldCoords, com.badlogic.gdx.math.Matrix4 transformMatrix) com.badlogic.gdx.math.Vector2unproject(com.badlogic.gdx.math.Vector2 screenCoords) com.badlogic.gdx.math.Vector3unproject(com.badlogic.gdx.math.Vector3 screenCoords) Transforms the specified screen coordinate to world coordinates.voidupdate(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
-
Constructor Details
-
FixedScreenViewport
public FixedScreenViewport(int width, int height) Creates a new viewport using a newOrthographicCamera. -
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:
unprojectin classcom.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:
unprojectin classcom.badlogic.gdx.utils.viewport.Viewport- Returns:
- The vector that was passed in, transformed to world coordinates.
- See Also:
-
toScreenCoordinates
public com.badlogic.gdx.math.Vector2 toScreenCoordinates(com.badlogic.gdx.math.Vector2 worldCoords, com.badlogic.gdx.math.Matrix4 transformMatrix) - Overrides:
toScreenCoordinatesin classcom.badlogic.gdx.utils.viewport.Viewport
-
update
public void update(int screenWidth, int screenHeight, boolean centerCamera) - Overrides:
updatein classcom.badlogic.gdx.utils.viewport.Viewport
-
apply
public void apply(boolean centerCamera) - Overrides:
applyin classcom.badlogic.gdx.utils.viewport.Viewport
-
getUnitsPerPixel
public float getUnitsPerPixel()
-