OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
baseCells.h File Reference

Base cell related lookup tables and access functions. More...

+ Include dependency graph for baseCells.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BaseCellData
 information on a single base cell More...
 

Macros

#define MAX_FACE_COORD   2
 

Functions

EXTENSION_INLINE int _isBaseCellPentagon (int baseCell)
 Return whether or not the indicated base cell is a pentagon. More...
 
EXTENSION_INLINE int _faceIjkToBaseCell (const FaceIJK(h))
 Return whether the indicated base cell is a pentagon where all neighbors are oriented towards it. More...
 
EXTENSION_INLINE int _faceIjkToBaseCellCCWrot60 (const FaceIJK(h))
 Find base cell given FaceIJK. More...
 
EXTENSION_INLINE bool _baseCellIsCwOffset (int baseCell, int testFace)
 Find the FaceIJK given a base cell. More...
 

Detailed Description

Base cell related lookup tables and access functions.

Definition in file baseCells.h.

Macro Definition Documentation

#define MAX_FACE_COORD   2

Maximum input for any component to face-to-base-cell lookup functions

Definition at line 45 of file baseCells.h.

Referenced by _faceIjkToH3().

Function Documentation

EXTENSION_INLINE bool _baseCellIsCwOffset ( int  baseCell,
int  testFace 
)

Find the FaceIJK given a base cell.

Given a base cell and the face it appears on, return the number of 60' ccw rotations for that base cell's coordinate system.

Returns
The number of rotations, or INVALID_ROTATIONS if the base cell is not found on the given faceReturn whether or not the tested face is a cw offset face.

Definition at line 887 of file baseCells.hpp.

References baseCellData, and BaseCellData::cwOffsetPent.

Referenced by _faceIjkToH3().

887  {
888  return baseCellData[baseCell].cwOffsetPent[0] == testFace ||
889  baseCellData[baseCell].cwOffsetPent[1] == testFace;
890 }
int cwOffsetPent[2]
Definition: baseCells.h:33
DEVICE const BaseCellData baseCellData[NUM_BASE_CELLS]
Resolution 0 base cell data table.
Definition: baseCells.hpp:697

+ Here is the caller graph for this function:

EXTENSION_INLINE int _faceIjkToBaseCell ( const   FaceIJKh)

Return whether the indicated base cell is a pentagon where all neighbors are oriented towards it.

Find base cell given FaceIJK.

Given the face number and a resolution 0 ijk+ coordinate in that face's face-centered ijk coordinate system, return the base cell located at that coordinate.

Valid ijk+ lookup coordinates are from (0, 0, 0) to (2, 2, 2).

Definition at line 842 of file baseCells.hpp.

References BaseCellRotation::baseCell, FACE_INDEX, faceIjkBaseCells, I_INDEX, J_INDEX, and K_INDEX.

Referenced by _faceIjkToH3().

842  {
844 }
#define J_INDEX
Definition: coordijk.h:43
#define I_INDEX
Definition: coordijk.h:42
int baseCell
base cell number
Definition: baseCells.hpp:28
#define FACE_INDEX
Definition: faceijk.h:35
#define K_INDEX
Definition: coordijk.h:44
static DEVICE const BaseCellRotation faceIjkBaseCells[NUM_ICOSA_FACES][3][3][3]
Neighboring base cell ID in each IJK direction.
Definition: baseCells.hpp:308

+ Here is the caller graph for this function:

EXTENSION_INLINE int _faceIjkToBaseCellCCWrot60 ( const   FaceIJKh)

Find base cell given FaceIJK.

Given the face number and a resolution 0 ijk+ coordinate in that face's face-centered ijk coordinate system, return the number of 60' ccw rotations to rotate into the coordinate system of the base cell at that coordinates.

Valid ijk+ lookup coordinates are from (0, 0, 0) to (2, 2, 2).

Definition at line 854 of file baseCells.hpp.

References BaseCellRotation::ccwRot60, FACE_INDEX, faceIjkBaseCells, I_INDEX, J_INDEX, and K_INDEX.

Referenced by _faceIjkToH3().

854  {
856 }
#define J_INDEX
Definition: coordijk.h:43
#define I_INDEX
Definition: coordijk.h:42
#define FACE_INDEX
Definition: faceijk.h:35
#define K_INDEX
Definition: coordijk.h:44
static DEVICE const BaseCellRotation faceIjkBaseCells[NUM_ICOSA_FACES][3][3][3]
Neighboring base cell ID in each IJK direction.
Definition: baseCells.hpp:308

+ Here is the caller graph for this function:

EXTENSION_INLINE int _isBaseCellPentagon ( int  baseCell)

Return whether or not the indicated base cell is a pentagon.

Invalid number of rotations

Definition at line 824 of file baseCells.hpp.

References baseCellData, and BaseCellData::isPentagon.

Referenced by _faceIjkToH3(), _h3ToFaceIjk(), and _h3ToFaceIjkWithInitializedFijk().

824  {
825  return baseCellData[baseCell].isPentagon;
826 }
DEVICE const BaseCellData baseCellData[NUM_BASE_CELLS]
Resolution 0 base cell data table.
Definition: baseCells.hpp:697
int isPentagon
is this base cell a pentagon?
Definition: baseCells.h:32

+ Here is the caller graph for this function: