OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
baseCells.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016-2018 Uber Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
20 #ifndef BASECELLS_H
21 #define BASECELLS_H
22 
24 // #include "coordijk.h"
26 
30 typedef struct {
31  FaceIJK(homeFijk);
32  int isPentagon;
33  int cwOffsetPent[2];
34 } BaseCellData;
36 
37 // #define INVALID_BASE_CELL 127
38 // extern const int baseCellNeighbors[NUM_BASE_CELLS][7];
39 // extern const int baseCellNeighbor60CCWRots[NUM_BASE_CELLS][7];
40 
41 // // resolution 0 base cell data lookup-table (global)
42 // extern const BaseCellData baseCellData[NUM_BASE_CELLS];
43 
45 #define MAX_FACE_COORD 2
46 
47 // /** Invalid number of rotations */
48 // #define INVALID_ROTATIONS -1
49 
50 // Internal functions
51 EXTENSION_INLINE int _isBaseCellPentagon(int baseCell);
52 // bool _isBaseCellPolarPentagon(int baseCell);
55 // int _baseCellToCCWrot60(int baseCell, int face);
56 // void _baseCellToFaceIjk(int baseCell, FaceIJK* h);
57 EXTENSION_INLINE bool _baseCellIsCwOffset(int baseCell, int testFace);
58 // int _getBaseCellNeighbor(int baseCell, Direction dir);
59 // Direction _getBaseCellDirection(int originBaseCell, int destinationBaseCell);
60 
62 
63 #endif
#define FaceIJK(variable_name)
Definition: faceijk.h:36
Constants used by more than one source code file.
information on a single base cell
Definition: baseCells.h:30
int isPentagon
is this base cell a pentagon?
Definition: baseCells.h:32
#define EXTENSION_INLINE
Definition: heavydbTypes.h:57
EXTENSION_INLINE int _isBaseCellPentagon(int baseCell)
Return whether or not the indicated base cell is a pentagon.
Definition: baseCells.hpp:824
EXTENSION_INLINE bool _baseCellIsCwOffset(int baseCell, int testFace)
Find the FaceIJK given a base cell.
Definition: baseCells.hpp:887
EXTENSION_INLINE int _faceIjkToBaseCellCCWrot60(const FaceIJK(h))
Find base cell given FaceIJK.
Definition: baseCells.hpp:854
FaceIJK functions including conversion to/from lat/lon.
EXTENSION_INLINE int _faceIjkToBaseCell(const FaceIJK(h))
Return whether the indicated base cell is a pentagon where all neighbors are oriented towards it...
Definition: baseCells.hpp:842