BRL-CAD
db_tree.c File Reference
#include "common.h"
#include <math.h>
#include <string.h>
#include <ctype.h>
#include "bio.h"
#include "bu/parallel.h"
#include "vmath.h"
#include "bn.h"
#include "nmg.h"
#include "raytrace.h"
#include "./librt_private.h"
Include dependency graph for db_tree.c:

Go to the source code of this file.

Data Structures

struct  db_walk_parallel_state
 

Macros

#define DB_WALK_PARALLEL_STATE_MAGIC   0x64777073 /* dwps */
 
#define DB_CK_WPS(_p)   BU_CKMAG(_p, DB_WALK_PARALLEL_STATE_MAGIC, "db_walk_parallel_state")
 

Functions

void db_dup_db_tree_state (struct db_tree_state *otsp, const struct db_tree_state *itsp)
 
void db_free_db_tree_state (struct db_tree_state *tsp)
 
void db_init_db_tree_state (struct db_tree_state *tsp, struct db_i *dbip, struct resource *resp)
 
struct combined_tree_statedb_new_combined_tree_state (const struct db_tree_state *tsp, const struct db_full_path *pathp)
 
struct combined_tree_statedb_dup_combined_tree_state (const struct combined_tree_state *old_ctsp)
 
void db_free_combined_tree_state (struct combined_tree_state *ctsp)
 
void db_pr_tree_state (const struct db_tree_state *tsp)
 
void db_pr_combined_tree_state (const struct combined_tree_state *ctsp)
 
int db_apply_state_from_comb (struct db_tree_state *tsp, const struct db_full_path *pathp, const struct rt_comb_internal *comb)
 
int db_apply_state_from_memb (struct db_tree_state *tsp, struct db_full_path *pathp, const union tree *tp)
 
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 treedb_find_named_leaf (union tree *tp, const char *cp)
 
union treedb_find_named_leafs_parent (int *side, union tree *tp, const char *cp)
 
void db_tree_del_lhs (union tree *tp, struct resource *resp)
 
void db_tree_del_rhs (union tree *tp, struct resource *resp)
 
int db_tree_del_dbleaf (union tree **tp, const char *cp, struct resource *resp, int nflag)
 
void db_tree_mul_dbleaf (union tree *tp, const mat_t mat)
 
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)
 
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 depth)
 
int db_follow_path_for_state (struct db_tree_state *tsp, struct db_full_path *total_path, const char *orig_str, int noisy)
 
HIDDEN void _db_recurse_subtree (union tree *tp, struct db_tree_state *msp, struct db_full_path *pathp, struct combined_tree_state **region_start_statepp, void *client_data)
 
union treedb_recurse (struct db_tree_state *tsp, struct db_full_path *pathp, struct combined_tree_state **region_start_statepp, void *client_data)
 
union treedb_dup_subtree (const union tree *tp, struct resource *resp)
 
void db_ck_tree (const union tree *tp)
 
void db_free_tree (union tree *tp, struct resource *resp)
 
void db_left_hvy_node (union tree *tp)
 
void db_non_union_push (union tree *tp, struct resource *resp)
 
int db_count_tree_nodes (const union tree *tp, int count)
 
int db_is_tree_all_unions (const union tree *tp)
 
int db_count_subtree_regions (const union tree *tp)
 
int db_tally_subtree_regions (union tree *tp, union tree **reg_trees, int cur, int lim, struct resource *resp)
 
HIDDEN union tree_db_gettree_region_end (struct db_tree_state *tsp, const struct db_full_path *pathp, union tree *curtree, void *client_data)
 
HIDDEN union tree_db_gettree_leaf (struct db_tree_state *tsp, const struct db_full_path *pathp, struct rt_db_internal *ip, void *client_data)
 
HIDDEN void _db_walk_subtree (union tree *tp, struct combined_tree_state **region_start_statepp, union tree *(*leaf_func)(struct db_tree_state *, const struct db_full_path *, struct rt_db_internal *, void *), void *client_data, struct resource *resp)
 
HIDDEN void _db_walk_dispatcher (int cpu, void *arg)
 
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 *), union tree *(*reg_end_func)(struct db_tree_state *, const struct db_full_path *, union tree *, void *), union tree *(*leaf_func)(struct db_tree_state *, const struct db_full_path *, struct rt_db_internal *, void *), void *client_data)
 
void db_apply_anims (struct db_full_path *pathp, struct directory *dp, mat_t stack, mat_t arc, struct mater_info *materp)
 
int db_region_mat (mat_t m, struct db_i *dbip, const char *name, struct resource *resp)
 
int rt_shader_mat (mat_t model_to_shader, const struct rt_i *rtip, const struct region *rp, point_t p_min, point_t p_max, struct resource *resp)
 
HIDDEN int tree_list_needspace (struct bu_vls *vls)
 
HIDDEN void tree_list_sublist_begin (struct bu_vls *vls)
 
HIDDEN void tree_list_sublist_end (struct bu_vls *vls)
 
HIDDEN void tree_list_append (struct bu_vls *vls, const char *str)
 
int db_tree_list (struct bu_vls *vls, const union tree *tp)
 
union treedb_tree_parse (struct bu_vls *vls, const char *str, struct resource *resp)
 

Detailed Description

Includes parallel tree walker routine. Also includes routines to return a matrix given a name or path.

Definition in file db_tree.c.