>If I have a 'struct rt_comb_internal' pointer (say, combp):
>
> 1. How do I confirm it's a region?
>
>      I believe I test combp->region_flag for truth.  If it is true,
>does that guarantee any regions below it are not acting as regions?

That is the field to check, but it does not guarantee that there are not other 
regions.  As Lee mentioned, any combination node in the hierarchy can be marked 
as a region.  Some are really bad practice, some are perfectly fine.  
Technically, though, they can be anywhere.  It's up to the application to check 
for good behavior (e.g., that there is only one positive region down all paths 
through the directed acyclic graph).

> 2. If it's possible, how do I manipulate combp to get to its region pointer?

Presuming you mean get a "struct region"?  Those are stored in a ray trace 
instance (rtip) so you'll have to have some portion of the model loaded and 
prepared for ray-tracing (even if you don't shoot a ray).  With the rtip and 
the name of the region, you can call rt_getregion(rtip, name) to get a struct 
region for that region.  There are a variety of other ways as well, just 
depends what you're trying to do and what you already have.

Cheers!
Sean

p.s. For future reference, coding questions like this should really be sent to 
brlcad-devel instead of brlcad-users. 



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BRL-CAD Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-users

Reply via email to