Hi Thanks for the suggestions. I had looked at the db_walk_tree example but it appeared to me that it required an object name in order to walk that objects tree. What I was looking for was code that would show the overall tree hierarchy without knowing any of the internal objects names. I was able to display all the object names after a rt_dirbuild function by looping through the directory structs via rti_dbip, however, I currently cannot see the tree relationships. I would prefer to use code available via the librt, if possible. I just finished compiling the 7.16.10 version of Brl-Cad (had been using 7.14 precompiled windows binaries). The Windows Visual Studio build seems to have quite a few issues. I also needed to throw a "struct resource rt_uniresource;" line in my application code to get it to link with librt. Thanks Steve ________________________________
From: Daniel Roßberg [mailto:[email protected]] Sent: Wed 12/1/2010 7:49 AM To: Developer discussions Subject: Re: [brlcad-devel] How to get object name strings after rt_dirbuild Steve, There are at least 3 possibilities (which have some parts in common): 1) Do it like mged's tree command. Look at src/libged/tree.c for the source code. 2) Use db_walk_tree(). See http://brlcad.org/wiki/Example_db_walk_tree for an example on how to use this function and use the methods from 1) to get the objects' names. 3) Use the C++ interface. There is a short introduction at http://brlcad.org/wiki/BRL-CAD%27s_core_C%2B%2B_interface with a "Tree walker" example at the end which should do what you are looking for. This for some hints to start with it. Feel free to ask further questions if you get stuck. Regards Daniel 2010/11/30 Watkins, Steven M CIV NSWCDD, G24 <[email protected]>: > Hi > > I need to get a list of the object name strings from a rt_i structure after a > .g file has been loaded via rt_dirbuild. This is needed so that a user can > select the desired object prior to a rt_gettree function call. Our program > is only calling the raytrace library at the current time. > > We are currently using 3rd party programs to determine object names from .g > files and would like to have this capability in code. I have not had much > luck in searching for this so far. > > Thanks > > Steve ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
