Class CameraUtils


  • public class CameraUtils
    extends java.lang.Object
    Contains camera utilities/
    • Constructor Summary

      Constructors 
      Constructor Description
      CameraUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean getLonLat​(Planet p, 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​(Planet p, 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 planet p is hit by the screen position x and y.
      static boolean projectLonLat​(Planet p, ICamera camera, double lon, double lat, com.badlogic.gdx.math.Vector3 point, com.badlogic.gdx.math.Vector3 pos, Vector3d in, Vector3d out, com.badlogic.gdx.math.Matrix4 localTransform, com.badlogic.gdx.math.Vector2 xy)  
      • Methods inherited from class java.lang.Object

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

      • CameraUtils

        public CameraUtils()
    • Method Detail

      • intersectScreenSphere

        public static boolean intersectScreenSphere​(Planet p,
                                                    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 planet p is hit by the screen position x and y.
        Parameters:
        p - The planet
        Returns:
        Whether an intersection has occurred
      • projectLonLat

        public static boolean projectLonLat​(Planet p,
                                            ICamera camera,
                                            double lon,
                                            double lat,
                                            com.badlogic.gdx.math.Vector3 point,
                                            com.badlogic.gdx.math.Vector3 pos,
                                            Vector3d in,
                                            Vector3d out,
                                            com.badlogic.gdx.math.Matrix4 localTransform,
                                            com.badlogic.gdx.math.Vector2 xy)
      • getLonLat

        public static boolean getLonLat​(Planet p,
                                        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)