On Aug 16, 2013, at 2:14 PM, Check Nyah wrote:
> I suggest starting by taking the db_walk_tree() example [1] and getting it to
> work with a different tree walker (like db_preorder_traverse() or another)
> where you can make your callback print the combination names.
>
> looked at db_preorder_traverse() looks interesting, but don't see any
> reference in code after using using grep of the definition of struct
> db_traverse, could you please give me any pointer to that?
It's in the same header:
sushi:brlcad.trunk morrison$ grep db_traverse include/*
include/raytrace.h:struct db_traverse
include/raytrace.h:#define RT_CK_DB_TRAVERSE(_p) BU_CKMAG(_p,
RT_DB_TRAVERSE_MAGIC, "db_traverse")
include/raytrace.h: struct db_traverse *dtp);
It's a simple structure with a field for a database instance (dbip), a function
callback when you walk down a hierarchy and encounter combs, a callback for the
leaves (primitives), and a callback when you walk back up the hierarchy for
each combination. The client_data field is a generic void* that you can use to
store any data or state that you need (like the matrix or a struct containing
your matrix).
Cheers!
Sean
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel