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 } } |
Functions | |
struct rt_i * | rt_new_rti (struct db_i *dbip) |
void | rt_free_rti (struct rt_i *rtip) |
void | rt_prep (struct rt_i *rtip) |
void | rt_prep_parallel (struct rt_i *rtip, int ncpu) |
int | rt_gettree (struct rt_i *rtip, const char *node) |
int | rt_gettrees (struct rt_i *rtip, int argc, const char **argv, int ncpus) |
int | rt_gettrees_and_attrs (struct rt_i *rtip, const char **attrs, int argc, const char **argv, int ncpus) |
DEPRECATED int | rt_load_attrs (struct rt_i *rtip, char **attrs) |
void | rt_pr_partitions (const struct rt_i *rtip, const struct partition *phead, const char *title) |
struct soltab * | rt_find_solid (const struct rt_i *rtip, const char *name) |
Find solid by leaf name. More... | |
void | rt_init_resource (struct resource *resp, int cpu_num, struct rt_i *rtip) |
void | rt_clean_resource_basic (struct rt_i *rtip, struct resource *resp) |
void | rt_clean_resource (struct rt_i *rtip, struct resource *resp) |
void | rt_clean_resource_complete (struct rt_i *rtip, struct resource *resp) |
int | rt_plot_solid (FILE *fp, struct rt_i *rtip, const struct soltab *stp, struct resource *resp) |
void | rt_clean (struct rt_i *rtip) |
int | rt_del_regtree (struct rt_i *rtip, struct region *delregp, struct resource *resp) |
void | rt_ck (struct rt_i *rtip) |
void | rt_pr_tree_val (const union tree *tp, const struct partition *partp, int pr_name, int lvl) |
void | rt_pr_partition (const struct rt_i *rtip, const struct partition *pp) |
void | rt_pr_partition_vls (struct bu_vls *v, const struct rt_i *rtip, const struct partition *pp) |
void | rt_cut_it (struct rt_i *rtip, int ncpu) |
void | rt_fr_cut (struct rt_i *rtip, union cutter *cutp) |
void | rt_regionfix (struct rt_i *rtip) |
The "raytrace instance" structure contains definitions for librt which are specific to the particular model being processed.
#define RTI_NULL ((struct rt_i *)0) |
Definition at line 132 of file rt_instance.h.
Definition at line 134 of file rt_instance.h.
#define RT_CK_RTI | ( | _p | ) | RT_CHECK_RTI(_p) |
Definition at line 135 of file rt_instance.h.
#define RT_VISIT_ALL_SOLTABS_START | ( | _s, | |
_rti | |||
) |
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 144 of file rt_instance.h.
#define RT_VISIT_ALL_SOLTABS_END } } |
Definition at line 149 of file rt_instance.h.
void rt_free_rti | ( | struct rt_i * | rtip | ) |
void rt_prep | ( | struct rt_i * | rtip | ) |
void rt_prep_parallel | ( | struct rt_i * | rtip, |
int | ncpu | ||
) |
int rt_gettree | ( | struct rt_i * | rtip, |
const char * | node | ||
) |
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.
int rt_gettrees | ( | struct rt_i * | rtip, |
int | argc, | ||
const char ** | argv, | ||
int | ncpus | ||
) |
int rt_gettrees_and_attrs | ( | struct rt_i * | rtip, |
const char ** | attrs, | ||
int | argc, | ||
const char ** | argv, | ||
int | ncpus | ||
) |
User-called function to add a set of tree hierarchies to the active set. Includes getting the indicated list of attributes and a bu_hash_tbl for use with the ORCA man regions. (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.
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
DEPRECATED int rt_load_attrs | ( | struct rt_i * | rtip, |
char ** | attrs | ||
) |
void rt_pr_partitions | ( | const struct rt_i * | rtip, |
const struct partition * | phead, | ||
const char * | title | ||
) |
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 | ||
) |
void rt_clean | ( | struct rt_i * | rtip | ) |
void rt_ck | ( | struct rt_i * | rtip | ) |
void rt_pr_partition_vls | ( | struct bu_vls * | v, |
const struct rt_i * | rtip, | ||
const struct partition * | pp | ||
) |
void rt_cut_it | ( | struct rt_i * | rtip, |
int | ncpu | ||
) |
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 !