Files Classes Functions Hierarchy
#include <bsptreeD2.h>
Public Member Functions | |
| bsptreeD2find (bsptreeD2< PT, PD, INDX > &bsp_) | |
| Pass the bsp tree reference. | |
| void | find (INDX &i, PT const &pt) |
| Find the index i that the point pt is in. | |
Public Attributes | |
| bsptreeD2< PT, PD, INDX > & | bsp |
| The bsp tree. | |
| vector< treeindexedD2node < INDX > * > | path |
| List of nodes defining the current path from the last find. | |
Definition at line 153 of file bsptreeD2.h.
| bsptreeD2find< PT, PD, INDX >::bsptreeD2find | ( | bsptreeD2< PT, PD, INDX > & | bsp_ | ) | [inline] |
| void bsptreeD2find< PT, PD, INDX >::find | ( | INDX & | i, | |
| PT const & | pt | |||
| ) | [inline] |
Find the index i that the point pt is in.
Definition at line 258 of file bsptreeD2.h.
References treeindexedD2< INDX >::current, treeindexedD2< INDX >::moveleft(), treeindexedD2< INDX >::moveright(), and treeindexedD2< INDX >::reset().
Referenced by bsptreeD2< PT, PD, INDX >::serializeInverse().
00262 { 00263 treeindexedD2<INDX> & tree(bsp.tree); 00264 vector< halfspaceD2<PT,PD> > & vi(bsp.vi); 00265 00266 tree.reset(); 00267 00268 assert(tree.current!=0); 00269 00270 while (tree.current->isleaf() == false) 00271 { 00272 assert(tree.current->index < vi.size()); 00273 00274 path.push_back(tree.current); 00275 if (vi[tree.current->index].isInside(pt)) 00276 tree.moveleft(); 00277 else 00278 tree.moveright(); 00279 00280 assert(tree.current!=0); 00281 } 00282 00283 path.push_back(tree.current); 00284 i = tree.current->index; 00285 }
| bsptreeD2<PT,PD,INDX>& bsptreeD2find< PT, PD, INDX >::bsp |
| vector< treeindexedD2node<INDX> * > bsptreeD2find< PT, PD, INDX >::path |
List of nodes defining the current path from the last find.
Definition at line 162 of file bsptreeD2.h.
Referenced by bsptreeD2< PT, PD, INDX >::serializeInverse().
1.5.8