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
ConstructorDescriptionFixedScreenViewport
(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 TypeMethodDescriptionvoid
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
-
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:
unproject
in 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:
unproject
in 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:
toScreenCoordinates
in classcom.badlogic.gdx.utils.viewport.Viewport
-
update
public void update(int screenWidth, int screenHeight, boolean centerCamera) - Overrides:
update
in classcom.badlogic.gdx.utils.viewport.Viewport
-
apply
public void apply(boolean centerCamera) - Overrides:
apply
in classcom.badlogic.gdx.utils.viewport.Viewport
-
getUnitsPerPixel
public float getUnitsPerPixel()
-