29 #ifndef BINARY_NODE_INCLUDED
30 #define BINARY_NODE_INCLUDED
32 #define MSVC_2010_FIX 1
42 static inline int CenterCount(
int depth ) {
return 1<<depth; }
43 static inline int CornerCount(
int depth ) {
return (1<<depth)+1; }
46 static inline int Index(
int depth ,
int offSet ) {
return (1<<depth)+offSet-1; }
47 static inline int CenterIndex(
int depth ,
int offSet ) {
return (1<<depth)+offSet-1; }
48 static inline int CornerIndex(
int depth ,
int offSet ) {
return (1<<depth)+offSet+depth; }
50 static inline int CornerIndex(
int maxDepth ,
int depth ,
int offSet ,
int forwardCorner ){
return (offSet+forwardCorner)<<(maxDepth-depth); }
55 width=
Real (1.0/(1<<depth) );
56 center=
Real((0.5+offset)*width);
80 offset = ( idx+1 ) - (1<<depth);
static void CenterAndWidth(int idx, Real ¢er, Real &width)
static Real Width(int depth)
static void CenterAndWidth(int depth, int offset, Real ¢er, Real &width)
static int Index(int depth, int offSet)
static int CumulativeCenterCount(int maxDepth)
static int CumulativeCornerCount(int maxDepth)
static int CornerIndex(int depth, int offSet)
static int CornerIndex(int maxDepth, int depth, int offSet, int forwardCorner)
static int CenterIndex(int depth, int offSet)
static int CornerCount(int depth)
static int CenterCount(int depth)
static Real CornerIndexPosition(int index, int maxDepth)
static void DepthAndOffset(int idx, int &depth, int &offset)