Class S2Projections.UvTransform

  • Enclosing class:
    S2Projections

    public abstract static class S2Projections.UvTransform
    extends java.lang.Object
    A transform from 3D cartesian coordinates to the 2D coordinates of a face. For (x, y, z) coordinates within the face, the resulting UV coordinates should each lie in the inclusive range [-1,1], with the center of the face along that axis at 0.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private UvTransform()
      Internal implementations only.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract double xyzToU​(double x, double y, double z)
      Returns the 'u' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.
      double xyzToU​(S2Point p)
      Returns the 'u' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.
      abstract double xyzToV​(double x, double y, double z)
      Returns the 'v' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.
      double xyzToV​(S2Point p)
      Returns the 'v' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.
      • Methods inherited from class java.lang.Object

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

      • UvTransform

        private UvTransform()
        Internal implementations only.
    • Method Detail

      • xyzToU

        public abstract double xyzToU​(double x,
                                      double y,
                                      double z)
        Returns the 'u' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.
      • xyzToU

        public final double xyzToU​(S2Point p)
        Returns the 'u' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.
      • xyzToV

        public abstract double xyzToV​(double x,
                                      double y,
                                      double z)
        Returns the 'v' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.
      • xyzToV

        public final double xyzToV​(S2Point p)
        Returns the 'v' coordinate of the [u, v] point projected onto a cube face from the given [x, y, z] position.