《focus on 3d terrain》书中的四叉树的renderNode函数的一些疑问
在这本《focus on 3d terrain》书中的四叉树的renderNode函数有一段:
其中全局变量:
char g_cQTFanCode[] = { 10, 8, 8, 12, 8, 0, 12, 14, 8, 12, 0, 14, 12, 14, 14, 0 };
char g_cQTFanStart[]= { 3, 3, 0, 3, 1, 0, 0, 3, 2, 2, 0, 2, 1, 1, 0, 0 };
//(thanks to Chris Cookson for this idea)
iStart= g_cQTFanStart[iFanCode];
iFanLength= 0;
//calculate the fan length by computing the index of the first non-zero bit in g_cQTFanCode
while( !( ( ( long )g_cQTFanCode[iFanCode] )&( 1<<iFanLength ) ) && iFanLength<8 ) iFanLength++;
//..........................