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

Reply via email to