OmniSciDB
a5dc49c757
|
#include "QueryEngine/ExtensionFunctions/h3lib/include/coordijk.h"
#include "QueryEngine/ExtensionFunctions/h3lib/include/constants.h"
Go to the source code of this file.
EXTENSION_NOINLINE bool _downAp7 | ( | CoordIJK(ijk) | ) |
Find the normalized ijk coordinates of the hex centered on the indicated hex at the next finer aperture 7 counter-clockwise resolution. Works in place.
ijk | The ijk coordinates. |
Definition at line 325 of file coordijk.hpp.
References _ijkAdd(), _ijkNormalize(), _ijkScale(), CoordIJK, I_INDEX, J_INDEX, and K_INDEX.
Referenced by _faceIjkToH3(), and _h3ToFaceIjkWithInitializedFijk().
EXTENSION_NOINLINE bool _downAp7r | ( | CoordIJK(ijk) | ) |
Find the normalized ijk coordinates of the hex centered on the indicated hex at the next finer aperture 7 clockwise resolution. Works in place.
ijk | The ijk coordinates. |
Definition at line 348 of file coordijk.hpp.
References _ijkAdd(), _ijkNormalize(), _ijkScale(), CoordIJK, I_INDEX, J_INDEX, and K_INDEX.
Referenced by _faceIjkToH3(), _h3ToFaceIjk(), and _h3ToFaceIjkWithInitializedFijk().
EXTENSION_NOINLINE bool _hex2dToCoordIJK | ( | const | Vec2dv, |
CoordIJK(h) | |||
) |
Determine the containing hex in ijk+ coordinates for a 2D cartesian coordinate vector (from DGGRID).
v | The 2D cartesian coordinate vector. |
h | The ijk+ coordinates of the containing hex. |
Definition at line 54 of file coordijk.hpp.
References _ijkNormalize(), I_INDEX, J_INDEX, K_INDEX, M_SIN60, X_INDEX, and Y_INDEX.
Referenced by _geoToFaceIjk().
EXTENSION_INLINE bool _ijkAdd | ( | const | CoordIJKh1, |
const | CoordIJKh2, | ||
CoordIJK(sum) | |||
) |
Add two ijk coordinates.
h1 | The first set of ijk coordinates. |
h2 | The second set of ijk coordinates. |
sum | The sum of the two sets of ijk coordinates. |
Definition at line 184 of file coordijk.hpp.
References I_INDEX, J_INDEX, and K_INDEX.
Referenced by _adjustOverageClassII(), _downAp7(), _downAp7r(), _ijkRotate60ccw(), _ijkRotate60cw(), and _neighbor().
EXTENSION_INLINE int _ijkMatches | ( | const | CoordIJKc1, |
const | CoordIJKc2 | ||
) |
Returns whether or not two ijk coordinates contain exactly the same component values.
c1 | The first set of ijk coordinates. |
c2 | The second set of ijk coordinates. |
Definition at line 172 of file coordijk.hpp.
References I_INDEX, J_INDEX, and K_INDEX.
Referenced by _unitIjkToDigit().
EXTENSION_NOINLINE bool _ijkNormalize | ( | CoordIJK(c) | ) |
Normalizes ijk coordinates by setting the components to the smallest possible values. Works in place.
c | The ijk coordinates to normalize. |
Definition at line 224 of file coordijk.hpp.
References I_INDEX, J_INDEX, and K_INDEX.
Referenced by _adjustOverageClassII(), _downAp7(), _downAp7r(), _faceIjkToH3(), _hex2dToCoordIJK(), _ijkRotate60ccw(), _ijkRotate60cw(), _neighbor(), _unitIjkToDigit(), _upAp7(), and _upAp7r().
EXTENSION_NOINLINE bool _ijkRotate60ccw | ( | CoordIJK(ijk) | ) |
Rotates ijk coordinates 60 degrees counter-clockwise. Works in place.
ijk | The ijk coordinates. |
Definition at line 385 of file coordijk.hpp.
References _ijkAdd(), _ijkNormalize(), _ijkScale(), CoordIJK, I_INDEX, J_INDEX, and K_INDEX.
Referenced by _adjustOverageClassII().
EXTENSION_NOINLINE bool _ijkRotate60cw | ( | CoordIJK(ijk) | ) |
Rotates ijk coordinates 60 degrees clockwise. Works in place.
ijk | The ijk coordinates. |
Definition at line 407 of file coordijk.hpp.
References _ijkAdd(), _ijkNormalize(), _ijkScale(), CoordIJK, I_INDEX, J_INDEX, and K_INDEX.
Referenced by _adjustOverageClassII().
EXTENSION_INLINE bool _ijkScale | ( | CoordIJK(c) | , |
int | factor | ||
) |
Uniformly scale ijk coordinates by a scalar. Works in place.
c | The ijk coordinates to scale. |
factor | The scaling factor. |
Definition at line 211 of file coordijk.hpp.
References I_INDEX, J_INDEX, and K_INDEX.
Referenced by _adjustOverageClassII(), _downAp7(), _downAp7r(), _ijkRotate60ccw(), and _ijkRotate60cw().
EXTENSION_INLINE bool _ijkSub | ( | const | CoordIJKh1, |
const | CoordIJKh2, | ||
CoordIJK(diff) | |||
) |
Subtract two ijk coordinates.
h1 | The first set of ijk coordinates. |
h2 | The second set of ijk coordinates. |
diff | The difference of the two sets of ijk coordinates (h1 - h2). |
Definition at line 198 of file coordijk.hpp.
References I_INDEX, J_INDEX, and K_INDEX.
Referenced by _adjustOverageClassII(), and _faceIjkToH3().
EXTENSION_INLINE bool _ijkToHex2d | ( | const | CoordIJKh, |
Vec2d(v) | |||
) |
Find the center point in 2D cartesian coordinates of a hex.
h | The ijk coordinates of the hex. |
v | The 2D cartesian coordinates of the hex center point. |
Definition at line 155 of file coordijk.hpp.
References I_INDEX, J_INDEX, K_INDEX, M_SQRT3_2, X_INDEX, and Y_INDEX.
Referenced by _faceIjkToGeo().
EXTENSION_NOINLINE bool _neighbor | ( | CoordIJK(ijk) | , |
int | digit | ||
) |
Find the normalized ijk coordinates of the hex in the specified digit direction from the specified ijk coordinates. Works in place.
ijk | The ijk coordinates. |
digit | The digit direction from the original ijk coordinates. |
Definition at line 372 of file coordijk.hpp.
References _ijkAdd(), _ijkNormalize(), CENTER_DIGIT, and NUM_DIGITS.
Referenced by _h3ToFaceIjkWithInitializedFijk().
EXTENSION_NOINLINE int _rotate60ccw | ( | int | digit | ) |
Rotates indexing digit 60 degrees counter-clockwise. Returns result.
digit | Indexing digit (between 1 and 6 inclusive) |
Definition at line 429 of file coordijk.hpp.
References I_AXES_DIGIT, IJ_AXES_DIGIT, IK_AXES_DIGIT, J_AXES_DIGIT, JK_AXES_DIGIT, and K_AXES_DIGIT.
Referenced by _h3Rotate60ccw(), and _h3RotatePent60ccw().
EXTENSION_NOINLINE int _rotate60cw | ( | int | digit | ) |
Rotates indexing digit 60 degrees clockwise. Returns result.
digit | Indexing digit (between 1 and 6 inclusive) |
Definition at line 453 of file coordijk.hpp.
References I_AXES_DIGIT, IJ_AXES_DIGIT, IK_AXES_DIGIT, J_AXES_DIGIT, JK_AXES_DIGIT, and K_AXES_DIGIT.
Referenced by _h3Rotate60cw(), and _h3RotatePent60cw().
EXTENSION_INLINE bool _setIJK | ( | CoordIJK(ijk) | , |
int | i, | ||
int | j, | ||
int | k | ||
) |
Sets an IJK coordinate to the specified component values.
ijk | The IJK coordinate to set. |
i | The desired i component value. |
j | The desired j component value. |
k | The desired k component value. |
Definition at line 40 of file coordijk.hpp.
References I_INDEX, J_INDEX, and K_INDEX.
Referenced by _adjustOverageClassII().
EXTENSION_NOINLINE int _unitIjkToDigit | ( | const | CoordIJKijk | ) |
Determines the H3 digit corresponding to a unit vector in ijk coordinates.
ijk | The ijk coordinates; must be a unit vector. |
Definition at line 266 of file coordijk.hpp.
References _ijkMatches(), _ijkNormalize(), CENTER_DIGIT, CoordIJK, CoordIJK_clone, INVALID_DIGIT, and NUM_DIGITS.
Referenced by _faceIjkToH3().
EXTENSION_NOINLINE bool _upAp7 | ( | CoordIJK(ijk) | ) |
Find the normalized ijk coordinates of the indexing parent of a cell in a counter-clockwise aperture 7 grid. Works in place.
ijk | The ijk coordinates. |
Definition at line 287 of file coordijk.hpp.
References _ijkNormalize(), I_INDEX, J_INDEX, and K_INDEX.
Referenced by _faceIjkToH3().
EXTENSION_NOINLINE bool _upAp7r | ( | CoordIJK(ijk) | ) |
Find the normalized ijk coordinates of the indexing parent of a cell in a clockwise aperture 7 grid. Works in place.
ijk | The ijk coordinates. |
Definition at line 306 of file coordijk.hpp.
References _ijkNormalize(), I_INDEX, J_INDEX, and K_INDEX.
Referenced by _faceIjkToH3(), and _h3ToFaceIjk().