tree_common.h
Go to the documentation of this file.
00001 #ifndef MEGATREE_TREE_COMMON_H
00002 #define MEGATREE_TREE_COMMON_H
00003 
00004 #include <vector>
00005 #include <boost/cstdint.hpp>
00006 
00007 namespace megatree{
00008 
00009 static const int X_BIT = 2;
00010 static const int Y_BIT = 1;
00011 static const int Z_BIT = 0;
00012 
00013 typedef uint32_t ShortId;
00014 typedef uint64_t Count;
00015 typedef uint8_t Color;
00016 typedef uint16_t Point;
00017 typedef std::vector<uint8_t> ByteVec;
00018 
00019 //the size of each node in bytes
00020 const static int POINT_SIZE = 3*sizeof(Point);
00021 const static int COLOR_SIZE = 3*sizeof(Color);
00022 const static int COUNT_SIZE = sizeof(Count);
00023 const static int CHILDREN_SIZE = sizeof(uint8_t);
00024 const static int SHORT_ID_SIZE = sizeof(ShortId);
00025 const static int NODE_SIZE = POINT_SIZE + COLOR_SIZE + COUNT_SIZE + CHILDREN_SIZE + SHORT_ID_SIZE;
00026 }
00027 
00028 
00029 #endif


megatree_core
Author(s): Stuart Glaser
autogenerated on Thu Nov 28 2013 11:30:23