BRL-CAD
|
The "raytrace instance" structure contains definitions for librt which are specific to the particular model being processed. More...
Files | |
file | rt_instance.h |
Data Structures | |
struct | rt_i |
Macros | |
#define | RTI_NULL ((struct rt_i *)0) |
#define | RT_CHECK_RTI(_p) BU_CKMAG(_p, RTI_MAGIC, "struct rt_i") |
#define | RT_CK_RTI(_p) RT_CHECK_RTI(_p) |
#define | RT_VISIT_ALL_SOLTABS_START(_s, _rti) |
#define | RT_VISIT_ALL_SOLTABS_END } } |
Typedefs | |
typedef void(* | rti_clbk_t) (struct rt_i *rtip, struct db_tree_state *tsp, struct region *r) |
The "raytrace instance" structure contains definitions for librt which are specific to the particular model being processed.
Definition at line 137 of file rt_instance.h.
Definition at line 139 of file rt_instance.h.
#define RT_CK_RTI | ( | _p | ) | RT_CHECK_RTI(_p) |
Definition at line 140 of file rt_instance.h.
Macros to painlessly visit all the active solids. Serving suggestion:
RT_VISIT_ALL_SOLTABS_START(stp, rtip) { rt_pr_soltab(stp); } RT_VISIT_ALL_SOLTABS_END
Definition at line 149 of file rt_instance.h.
#define RT_VISIT_ALL_SOLTABS_END } } |
Definition at line 154 of file rt_instance.h.
typedef void(* rti_clbk_t) (struct rt_i *rtip, struct db_tree_state *tsp, struct region *r) |
Definition at line 48 of file rt_instance.h.
User-called function to add a tree hierarchy to the displayed set.
This function is not multiply re-entrant.
Returns - 0 Ordinarily -1 On major error
Note: -2 returns from rt_gettrees_and_attrs are filtered.
|
extern |
User-called function to add a set of tree hierarchies to the active set. Includes getting the indicated list of attributes and an optional user-supplied rti_gettrees_clbk callback function to collect additional information in rti_udata. (stashed in the rt_i structure).
This function may run in parallel, but is not multiply re-entrant itself, because db_walk_tree() isn't multiply re-entrant. Note that callback implementations should protect any data writes to a shared structure with the RT_SEM_RESULTS semaphore.
Semaphores used for critical sections in parallel mode: RT_SEM_TREE ====> protects rti_solidheads[] lists, d_uses(solids) RT_SEM_RESULTS => protects HeadRegion, mdl_min/max, d_uses(reg), nregions RT_SEM_WORKER ==> (db_walk_dispatcher, from db_walk_tree) RT_SEM_STATS ===> nsolids
INPUTS:
rtip - RT instance pointer
attrs - attribute value set
argc - number of trees to get
argv - array of char pointers to the names of the tree tops
ncpus - number of cpus to use
Returns - 0 Ordinarily -1 On major error
|
extern |
Find solid by leaf name.
Given the (leaf) name of a solid, find the first occurrence of it in the solid list. Used mostly to find the light source. Returns soltab pointer, or RT_SOLTAB_NULL.
int rt_plot_solid | ( | FILE * | fp, |
struct rt_i * | rtip, | ||
const struct soltab * | stp, | ||
struct resource * | resp | ||
) |
|
extern |
|
extern |
Go through all the solids in the model, given the model mins and maxes, and generate a cutting tree. A strategy better than incrementally cutting each solid is to build a box node which contains everything in the model, and optimize it.
This is the main entry point into space partitioning from rt_prep().
Free a whole cut tree below the indicated node. The strategy we use here is to free everything BELOW the given node, so as not to clobber rti_CutHead !