94#define RT_DBTS_INIT_ZERO { RT_DBTS_MAGIC, NULL, 0, 0, 0, 0, 0, RT_MATER_INFO_INIT_ZERO, MAT_INIT_ZERO, 0, BU_AVS_INIT_ZERO, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
96#define RT_DBTS_INIT_IDN { RT_DBTS_MAGIC, NULL, 0, 0, 0, 0, 100, RT_MATER_INFO_INIT_IDN, MAT_INIT_IDN, 0, BU_AVS_INIT_ZERO, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
98#define TS_SOFAR_MINUS 1
99#define TS_SOFAR_INTER 2
100#define TS_SOFAR_REGION 4
102#define RT_CK_DBTS(_p) BU_CKMAG(_p, RT_DBTS_MAGIC, "db_tree_state")
134#define RT_DB_TRAVERSE_INIT(_p) {(_p)->magic = RT_DB_TRAVERSE_MAGIC; \
135 (_p)->dbip = ((void *)0); (_p)->comb_enter_func = ((void *)0); \
136 (_p)->comb_exit_func = ((void *)0); (_p)->leaf_func = ((void *)0); \
137 (_p)->resp = ((void *)0); (_p)->client_data = ((void *)0);}
138#define RT_CK_DB_TRAVERSE(_p) BU_CKMAG(_p, RT_DB_TRAVERSE_MAGIC, "db_traverse")
145#define RT_CK_CTS(_p) BU_CKMAG(_p, RT_CTS_MAGIC, "combined_tree_state")
183#define tr_op tr_a.tu_op
184#define tr_regionp tr_a.tu_regionp
186#define TREE_NULL ((union tree *)0)
187#define RT_CK_TREE(_p) BU_CKMAG(_p, RT_TREE_MAGIC, "union tree")
194#define RT_TREE_INIT(_p) { \
195 (_p)->magic = RT_TREE_MAGIC; \
196 (_p)->tr_b.tb_op = 0; \
197 (_p)->tr_b.tb_regionp = NULL; \
198 (_p)->tr_b.tb_left = NULL; \
199 (_p)->tr_b.tb_right = NULL; \
208#define RT_GET_TREE(_tp, _res) { \
209 BU_GET((_tp), union tree); \
210 RT_TREE_INIT((_tp)); \
219#define RT_FREE_TREE(_tp, _res) { \
220 BU_PUT((_tp), union tree); \
233#define TREE_LIST_NULL ((struct tree_list *)0)
240#define UOP_INTERSECT 2
241#define UOP_SUBTRACT 3
269RT_EXPORT
extern void rt_pr_bit_tree(
const struct bit_tree *btp,
273RT_EXPORT
extern void rt_bit_tree(
struct bit_tree *btp,
274 const union tree *tp,
282 const union tree *tp);
401 union tree *comb_tree,
403 void *,
void *,
void *,
void *),
449 const char *orig_str,
int noisy);
497 union tree **reg_trees,
614 void (*comb_func)(
struct db_i *,
617 void (*leaf_func)(
struct db_i *,
685 const union tree *tp,
692 const union tree *tp,
765 const union tree *tp);
779 const union tree *tp);
Header file for the BRL-CAD common definitions.
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
fastf_t * matp_t
pointer to a 4x4 matrix
Global registry of recognized magic numbers.
Main header file for the BRL-CAD Non-Manifold Geometry Library, LIBNMG.
struct db_full_path cts_p
struct db_tree_state cts_s
void(* comb_exit_func)(struct db_i *, struct directory *, void *)
void(* leaf_func)(struct db_i *, struct directory *, void *)
void(* comb_enter_func)(struct db_i *, struct directory *, void *)
int ts_los
equivalent LOS estimate
struct mater_info ts_mater
material properties
const struct bg_tess_tol * ts_ttol
Tessellation tolerance.
int ts_is_fastgen
REGION_NON_FASTGEN/_PLATE/_VOLUME.
struct resource * ts_resp
Per-CPU data.
struct rt_i * ts_rtip
Helper for rt_gettrees()
int ts_regionid
GIFT compat region ID code.
struct bu_attribute_value_set ts_attrs
attribute/value structure
const struct bn_tol * ts_tol
Math tolerance.
struct model ** ts_m
ptr to ptr to NMG "model"
int(* ts_region_start_func)(struct db_tree_state *tsp, const struct db_full_path *pathp, const struct rt_comb_internal *comb, void *client_data)
callback during DAG downward traversal called on region nodes
int ts_aircode
GIFT compat air code.
mat_t ts_mat
transform matrix
int ts_stop_at_regions
else stop at solids
int ts_gmater
GIFT compat material code.
struct region * tc_pad
unused
struct combined_tree_state * tc_ctsp
int tl_op
leaf, OP_DB_LEAF
char * tl_name
Name of this leaf (bu_strdup'ed)
matp_t tl_mat
xform matp, NULL ==> identity
struct region * tu_regionp
ptr to containing region
const char * td_name
If non-null, dynamic string describing heritage of this region.
struct nmgregion * td_r
ptr to NMG region
int td_op
leaf, OP_NMG_TESS
struct region * tb_regionp
ptr to containing region
void db_tree_del_lhs(union tree *tp, struct resource *resp)
union tree * db_find_named_leaf(union tree *tp, const char *cp)
int db_follow_path_for_state(struct db_tree_state *tsp, struct db_full_path *pathp, const char *orig_str, int noisy)
int db_walk_tree(struct db_i *dbip, int argc, const char **argv, int ncpu, const struct db_tree_state *init_state, int(*reg_start_func)(struct db_tree_state *, const struct db_full_path *, const struct rt_comb_internal *, void *client_data), union tree *(*reg_end_func)(struct db_tree_state *, const struct db_full_path *, union tree *, void *client_data), union tree *(*leaf_func)(struct db_tree_state *, const struct db_full_path *, struct rt_db_internal *, void *client_data), void *client_data)
void db_pr_tree_state(const struct db_tree_state *tsp)
int db_apply_state_from_memb(struct db_tree_state *tsp, struct db_full_path *pathp, const union tree *tp)
struct combined_tree_state * db_dup_combined_tree_state(const struct combined_tree_state *old)
int db_follow_path(struct db_tree_state *tsp, struct db_full_path *total_path, const struct db_full_path *new_path, int noisy, long pdepth)
void rt_pr_tree_val(const union tree *tp, const struct partition *partp, int pr_name, int lvl)
int db_tally_subtree_regions(union tree *tp, union tree **reg_trees, int cur, int lim, struct resource *resp)
void db_pr_combined_tree_state(const struct combined_tree_state *ctsp)
int db_apply_state_from_one_member(struct db_tree_state *tsp, struct db_full_path *pathp, const char *cp, int sofar, const union tree *tp)
union tree * db_mkbool_tree(struct rt_tree_array *rt_tree_array, size_t howfar, struct resource *resp)
void db_free_combined_tree_state(struct combined_tree_state *ctsp)
union tree * db_dup_subtree(const union tree *tp, struct resource *resp)
int db_ck_v4gift_tree(const union tree *tp)
struct combined_tree_state * db_new_combined_tree_state(const struct db_tree_state *tsp, const struct db_full_path *pathp)
struct rt_tree_array * db_flatten_tree(struct rt_tree_array *rt_tree_array, union tree *tp, int op, int avail, struct resource *resp)
union tree * db_recurse(struct db_tree_state *tsp, struct db_full_path *pathp, struct combined_tree_state **region_start_statepp, void *client_data)
void db_non_union_push(union tree *tp, struct resource *resp)
int db_is_tree_all_unions(const union tree *tp)
void db_tree_flatten_describe(struct bu_vls *vls, const union tree *tp, int indented, int lvl, double mm2local, struct resource *resp)
void db_init_db_tree_state(struct db_tree_state *tsp, struct db_i *dbip, struct resource *resp)
void db_ck_tree(const union tree *tp)
void rt_pr_tree_vls(struct bu_vls *vls, const union tree *tp)
void db_tree_del_rhs(union tree *tp, struct resource *resp)
int rt_tree_elim_nops(union tree *, struct resource *resp)
void db_functree(struct db_i *dbip, struct directory *dp, void(*comb_func)(struct db_i *, struct directory *, void *), void(*leaf_func)(struct db_i *, struct directory *, void *), struct resource *resp, void *client_data)
void rt_optim_tree(union tree *tp, struct resource *resp)
void db_free_db_tree_state(struct db_tree_state *tsp)
char * rt_pr_tree_str(const union tree *tree)
void db_left_hvy_node(union tree *tp)
int db_tree_del_dbleaf(union tree **tp, const char *cp, struct resource *resp, int nflag)
void db_dup_db_tree_state(struct db_tree_state *otsp, const struct db_tree_state *itsp)
union tree * db_tree_parse(struct bu_vls *vls, const char *str, struct resource *resp)
int db_count_tree_nodes(const union tree *tp, int count)
const struct db_tree_state rt_initial_tree_state
int db_apply_state_from_comb(struct db_tree_state *tsp, const struct db_full_path *pathp, const struct rt_comb_internal *comb)
void db_tree_mul_dbleaf(union tree *tp, const mat_t mat)
int rt_bound_tree(const union tree *tp, vect_t tree_min, vect_t tree_max)
union tree * db_find_named_leafs_parent(int *side, union tree *tp, const char *cp)
size_t db_tree_nleaves(const union tree *tp)
void rt_pr_tree(const union tree *tp, int lvl)
union tree * db_mkgift_tree(struct rt_tree_array *trees, size_t subtreecount, struct resource *resp)
int db_tree_list(struct bu_vls *vls, const union tree *tp)
int db_ck_left_heavy_tree(const union tree *tp, int no_unions)
void db_tree_funcleaf(struct db_i *dbip, struct rt_comb_internal *comb, union tree *comb_tree, void(*leaf_func)(struct db_i *, struct rt_comb_internal *, union tree *, void *, void *, void *, void *), void *user_ptr1, void *user_ptr2, void *user_ptr3, void *user_ptr4)
void db_free_tree(union tree *tp, struct resource *resp)
int db_count_subtree_regions(const union tree *tp)
void db_tree_describe(struct bu_vls *vls, const union tree *tp, int indented, int lvl, double mm2local)
struct tree::tree_cts tr_c
struct tree::tree_node tr_b
uint32_t magic
First word: magic number.
struct tree::tree_leaf tr_a
struct tree::tree_nmgregion tr_d
struct tree::tree_db_leaf tr_l
fundamental vector, matrix, quaternion math macros