s2.s2coords

Undocumented in source.

Members

Functions

FaceSiTitoXYZ
S2Point FaceSiTitoXYZ(int face, uint si, uint ti)
Undocumented in source. Be warned that the author may not have intended to support it.
FaceUVtoXYZ
S2Point FaceUVtoXYZ(int face, double u, double v)
Undocumented in source. Be warned that the author may not have intended to support it.
FaceUVtoXYZ
S2Point FaceUVtoXYZ(int face, R2Point uv)
Undocumented in source. Be warned that the author may not have intended to support it.
FaceXYZtoUV
bool FaceXYZtoUV(int face, S2Point p, double pu, double pv)
Undocumented in source. Be warned that the author may not have intended to support it.
FaceXYZtoUV
bool FaceXYZtoUV(int face, S2Point p, R2Point puv)
Undocumented in source. Be warned that the author may not have intended to support it.
FaceXYZtoUVW
S2Point FaceXYZtoUVW(int face, S2Point p)
Undocumented in source. Be warned that the author may not have intended to support it.
GetFace
int GetFace(S2Point p)

Return the face containing the given direction vector. (For points on the boundary between faces, the result is arbitrary but repeatable.)

GetNorm
S2Point GetNorm(int face)
Undocumented in source. Be warned that the author may not have intended to support it.
GetUAxis
S2Point GetUAxis(int face)
Undocumented in source. Be warned that the author may not have intended to support it.
GetUNorm
S2Point GetUNorm(int face, double u)
Undocumented in source. Be warned that the author may not have intended to support it.
GetUVWAxis
S2Point GetUVWAxis(int face, int axis)
Undocumented in source. Be warned that the author may not have intended to support it.
GetUVWFace
int GetUVWFace(int face, int axis, int direction)
Undocumented in source.
GetVAxis
S2Point GetVAxis(int face)
Undocumented in source. Be warned that the author may not have intended to support it.
GetVNorm
S2Point GetVNorm(int face, double v)
Undocumented in source. Be warned that the author may not have intended to support it.
IJtoSTMin
double IJtoSTMin(int i)
Undocumented in source.
STtoIJ
int STtoIJ(double s)
Undocumented in source. Be warned that the author may not have intended to support it.
STtoSiTi
uint STtoSiTi(double s)
Undocumented in source. Be warned that the author may not have intended to support it.
STtoUV
double STtoUV(double s)

/////////////// Implementation details follow ////////////////////

STtoUV
double STtoUV(double s)
Undocumented in source. Be warned that the author may not have intended to support it.
STtoUV
double STtoUV(double s)
Undocumented in source. Be warned that the author may not have intended to support it.
SiTitoST
double SiTitoST(uint si)
Undocumented in source.
UVtoST
double UVtoST(double u)

/////////////// Implementation details follow ////////////////////

UVtoST
double UVtoST(double u)
Undocumented in source. Be warned that the author may not have intended to support it.
UVtoST
double UVtoST(double u)
Undocumented in source. Be warned that the author may not have intended to support it.
ValidFaceXYZtoUV
void ValidFaceXYZtoUV(int face, S2Point p, double pu, double pv)
Undocumented in source.
ValidFaceXYZtoUV
void ValidFaceXYZtoUV(int face, S2Point p, R2Point puv)
Undocumented in source. Be warned that the author may not have intended to support it.
XYZtoFaceSiTi
int XYZtoFaceSiTi(S2Point p, int face, uint si, uint ti)

Convert a direction vector (not necessarily unit length) to (face, si, ti) coordinates and, if p is exactly equal to the center of a cell, return the level of this cell (-1 otherwise).

XYZtoFaceUV
int XYZtoFaceUV(S2Point p, double pu, double pv)

Convert a direction vector (not necessarily unit length) to (face, u, v) coordinates.

XYZtoFaceUV
int XYZtoFaceUV(S2Point p, R2Point puv)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

FACE_UVW_AXES
double[3][3][6] FACE_UVW_AXES;

The U,V,W axes for each face.

FACE_UVW_FACES
int[2][3][6] FACE_UVW_FACES;

The precomputed neighbors of each face (see GetUVWFace).

IJ_TO_POS
int[4][4] IJ_TO_POS;

Given a cell orientation and the (i,j)-index of a subcell (0=(0,0), 1=(0,1), 2=(1,0), 3=(1,1)), return the order in which this subcell is visited by the Hilbert curve (a position in the range [0..3]).

INVERT_MASK
int INVERT_MASK;
Undocumented in source.
LIMIT_IJ
int LIMIT_IJ;
Undocumented in source.
MAX_CELL_LEVEL
int MAX_CELL_LEVEL;
Undocumented in source.
MAX_SI_TI
uint MAX_SI_TI;
Undocumented in source.
POS_TO_IJ
int[4][4] POS_TO_IJ;

Return the (i,j) index of the subcell at the given position 'pos' in the Hilbert curve traversal order with the given orientation. This is the inverse of the previous table:

POS_TO_ORIENTATION
int[4] POS_TO_ORIENTATION;

Return a modifier indicating how the orientation of the child subcell with the given traversal position [0..3] is related to the orientation of the parent cell. The modifier should be XOR-ed with the parent orientation to obtain the curve orientation in the child.

SWAP_MASK
int SWAP_MASK;

Together these flags define a cell orientation. If 'kSwapMask' is true, then canonical traversal order is flipped around the diagonal (i.e. i and j are swapped with each other). If 'kInvertMask' is true, then the traversal order is rotated by 180 degrees (i.e. the bits of i and j are inverted, or equivalently, the axis directions are reversed).

Meta