[Plib-devel] searching scenegraphs
Brought to you by:
sjbaker
From: Bram S. <br...@sa...> - 2005-03-27 12:51:11
|
Hi there, I believe that plib's search functionality is currently limited to searching a direct child in a branch, by ssgEntity pointer. There does not seem to be a recursive search function, neither a search on different criteria. (I checked docs, and ssg includes, but could not find this). I would like to be able to search by name, in a hierarchy. What would be the proper thing to do? - Do this in application space, and let plib be as is? - Do this in plib, as a non-member func in ssg, e.g. ssgEntity *ssgFind(const char *name, ssgEntity *tree); - Do this in plib, as a member func of ssgBranch, e.g: ssgEntity *ssgBranch::Find(const char *name); - Do this in a more generic way, so that: * different criteria can be used, other than name-base. * multiple hits can be returned. - Model it after SGI's OpenGL|Performer pfLookupNode, which is: pfNode* pfLookupNode(const char *name, pfType* type); I'll be happy to add the proper functionality, if there is consensus about this on this mailing list. (Personally, I like performer's method). Bram |