Functions | Variables

morton.cpp File Reference

Morton codes manipulation. More...

#include "morton.h"

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 key)
 convert a morton key to a key using integer dilation
Key addition_locate_code (const Key &N, const Key &DN)
Key substraction_locate_code (const Key &N, const Key &DN)
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
void print_binary (const Key k)
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

real R_INV = nan(0)
Level L_INV = (Level)-1
Point P_INV (R_INV, R_INV, R_INV)
Cube C_INV (P_INV, L_INV)
Key KEY_INV = 0

Detailed Description

Morton codes manipulation.

Author:
Thomas Lewiner <tomlew@puc-rio.br>
Rener Pereira de Castro <rener@mat.puc-rio.br>
Matmidia Lab, Math Dept, PUC-Rio
Date:
10/01/2010

Morton codes manipulation

 All Classes Files Functions Variables Typedefs Enumerations Defines