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);
69 #else // !MSVC_2010_FIX
71 #endif // MSVC_2010_FIX
79 #endif // MSVC_2010_FIX
80 offset = ( idx+1 ) - (1<<depth);
88 #endif // BINARY_NODE_INCLUDED