- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi! My questionis about how to extract leaf information from theIpprKDTreeNode class. I try to do it in the manner that for example PBRT does, but the results are odd and incorrect. I get some negative values which I, honestly, fail to decipher.
I appreciate any help!
void dumpIPPtree( IpprKDTreeNode *pRoot, IpprKDTreeNode *pNode ) {
printf( "FLAG & 0x3 %d FLAG & ~0x3 = %u\n", pNode->flag_k_ofs & 0x3, pNode->flag_k_ofs & ~0x3 );
if( pNode->flag_k_ofs < 0 || (pNode->flag_k_ofs & 0x3)==3 ) {
printf( "COUNT = %u\n", pNode->tree_data.items ); return;
}
printf( "SPLIT = %f\n", pNode->tree_data.split );
dumpIPPtree( pRoot, (IpprKDTreeNode*)((Ipp8u*)pNode + (pNode->flag_k_ofs & ~0x3) + 0) );
dumpIPPtree( pRoot, (IpprKDTreeNode*)((Ipp8u*)pNode + (pNode->flag_k_ofs & ~0x3)) + 1 );
}
コピーされたリンク
