Class CameraUtils

java.lang.Object
gaiasky.util.camera.CameraUtils

public class CameraUtils extends Object
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    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)
     
    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.
    static com.badlogic.gdx.math.Vector3
    unproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight, int screenHeight)
     
    static com.badlogic.gdx.math.Vector3
    unproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, int screenWidth, int screenHeight)
     

    Methods inherited from class java.lang.Object Link icon

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

    • CameraUtils Link icon

      public CameraUtils()
  • Method Details Link icon

    • intersectScreenSphere Link icon

      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 Link icon

      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 Link icon

      public static com.badlogic.gdx.math.Vector3 unproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight, int screenHeight)
    • unproject Link icon

      public static com.badlogic.gdx.math.Vector3 unproject(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.math.Vector3 screenCoords, int screenWidth, int screenHeight)