Class S2Projections.UvTransform

  • Enclosing class:
    S2Projections

    public abstract static class S2Projections.UvTransform
    extends 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.
    • 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.
    • 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.