Morton codes manipulation. More...
#include <stdint.h>
#include <stack>
#include "cube.h"
Go to the source code of this file.
Typedefs | |
typedef uint64_t | Key |
Functions | |
Level | key_level (Key k) |
octree depth level associated to a morton key ( = (bit length - 1) / 3 ) | |
bool | key_contains (Key k_big, Key k_small) |
containment text implemented directly onf the key | |
Key | cube2key (const Cube &c) |
convert an octree cube to a morton key using integer contraction | |
const Cube | key2cube (Key k) |
convert a morton key to a key using integer dilation | |
bool | neighbor_keys (Key k, Key *neighbors) |
generate a list of 27 neighbor keys of same level, with their direction, indexed by 9*(dx+1) + 3*(dy+1) + (dz+1) | |
char | subneighbor_keys (Key k, char dir, std::stack< Key > &subneighbors) |
generate a list of the subneighbor keys from a neighbor direction, and return the number of subneighbors | |
Level | vertices_keys (Key k, Key *verts) |
generate a list of 8 vertices keys from a cell key | |
bool | dual_vertices_keys (Key k, Level lv, Key *dual_verts) |
generate a list of 8 dual vertices keys from a vertex key and the deepest neighbor level | |
Variables | |
Key | KEY_INV |
const uint | MAX_LEVEL = (sizeof(Key)*8-1)/3 |
Morton codes manipulation.
Morton codes manipulation