![]() |
VR-Forces 4.10 Class Documentation
|
Public Member Functions | |
| virtual | ~Query () |
| Virtual destructor. More... | |
| virtual bool | matches (const Subcell &cell)=0 |
| Search will ignore cells which return false. More... | |
| virtual bool | shouldCreateSubcell (const Subcell &cell)=0 |
| Determine if an empty subcell should be created. More... | |
| virtual boost::shared_ptr < DtNTree > | createSubcell (DtNTree &tree, Subcell &cell) |
| Factory function for creating subcells. More... | |
| virtual void | visit (DtNTree &tree) |
| Entry point for search. More... | |
Protected Member Functions | |
| Subcell & | getSubcell (DtNTree &tree, unsigned int i) |
| Interface for subclasses to get at subcell objects. More... | |
Query interface.
Queries are templates of a general search on the tree. Users implement various parts of it in order to view/mutate/add/delete subcells. The main algorithm of the search goes like this:
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Search will ignore cells which return false.
For a given tree, matches will be called on ALL the subcells before any other functions are called. This allows the query to see the entire set of subcells before making any decisions about creating new cells, recursing, etc.
Referenced by makVrv::DtNTree< T, Dimensions, Mutex, SubcellTraits, BoundsType >::visit().
|
pure virtual |
Determine if an empty subcell should be created.
This function will be called when the query is has decided it will recurse into a subcell which does not exist.
Referenced by makVrv::DtNTree< T, Dimensions, Mutex, SubcellTraits, BoundsType >::Subcell::getPtr().
|
inlinevirtual |
Factory function for creating subcells.
Reimplement this function to have this query create your own subclass.
References makVrv::DtNTree< T, Dimensions, Mutex, SubcellTraits, BoundsType >::createSubcell().
Referenced by makVrv::DtNTree< T, Dimensions, Mutex, SubcellTraits, BoundsType >::Subcell::getPtr().
|
inlinevirtual |
Entry point for search.
References makVrv::DtNTree< T, Dimensions, Mutex, SubcellTraits, BoundsType >::visit().
Referenced by makVrv::DtNTree< T, Dimensions, Mutex, SubcellTraits, BoundsType >::visit().
|
inlineprotected |
Interface for subclasses to get at subcell objects.
References makVrv::DtNTree< T, Dimensions, Mutex, SubcellTraits, BoundsType >::mySubcells.