Class CameraUtils
java.lang.Object
gaiasky.util.camera.CameraUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetLonLat(FocusView f, com.badlogic.ashley.core.Entity e, ICamera camera, int sx, int sy, com.badlogic.gdx.math.Vector3 v0, com.badlogic.gdx.math.Vector3 v1, com.badlogic.gdx.math.Vector3 vec, com.badlogic.gdx.math.Vector3 intersection, Vector3D in, Vector3D out, com.badlogic.gdx.math.Matrix4 localTransformInv, double[] lonlat) static booleanintersectScreenSphere(IFocus f, com.badlogic.ashley.core.Entity e, ICamera camera, int sx, int sy, com.badlogic.gdx.math.Vector3 v0, com.badlogic.gdx.math.Vector3 v1, com.badlogic.gdx.math.Vector3 vec, com.badlogic.gdx.math.Vector3 intersection) Checks if the entity e is hit by the screen position x and y.static voidunproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight, int screenHeight) static voidunproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, int screenWidth, int screenHeight)
-
Constructor Details
-
CameraUtils
public CameraUtils()
-
-
Method Details
-
intersectScreenSphere
public static boolean intersectScreenSphere(IFocus f, com.badlogic.ashley.core.Entity e, ICamera camera, int sx, int sy, com.badlogic.gdx.math.Vector3 v0, com.badlogic.gdx.math.Vector3 v1, com.badlogic.gdx.math.Vector3 vec, com.badlogic.gdx.math.Vector3 intersection) Checks if the entity e is hit by the screen position x and y.- Parameters:
e- The entity.- Returns:
- Whether an intersection has occurred
-
getLonLat
public static boolean getLonLat(FocusView f, com.badlogic.ashley.core.Entity e, ICamera camera, int sx, int sy, com.badlogic.gdx.math.Vector3 v0, com.badlogic.gdx.math.Vector3 v1, com.badlogic.gdx.math.Vector3 vec, com.badlogic.gdx.math.Vector3 intersection, Vector3D in, Vector3D out, com.badlogic.gdx.math.Matrix4 localTransformInv, double[] lonlat) -
unproject
public static void unproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight, int screenHeight) -
unproject
public static void unproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, int screenWidth, int screenHeight)
-