46 #include <unordered_map>
47 #include <unordered_set>
82 std::unordered_map<unsigned long long, std::vector<unsigned long long>>
selected;
102 unsigned long long c_hash,
103 std::vector<unsigned long long> &path_hashes
107 unsigned long long c_hash,
108 std::vector<unsigned long long> &path_hashes
112 std::vector<std::vector<unsigned long long>> &out_paths,
113 unsigned long long c_hash,
114 std::vector<unsigned long long> &path_hashes
118 std::vector<std::vector<unsigned long long>> &out_paths
121 void clear_paths(std::vector<unsigned long long> &path_hashes,
unsigned long long c_hash);
135 void add_hpath(std::vector<unsigned long long> &path_hashes);
143 void erase_hpath(
int mode,
unsigned long long c_hash, std::vector<unsigned long long> &path_hashes,
bool cache_collapse =
true);
162 unsigned long long refresh(
struct bview *v,
int argc,
const char **argv);
167 unsigned long long redraw(
struct bv_obj_settings *vs, std::unordered_set<struct bview *> &views,
int no_autoview);
170 unsigned long long path_hash(std::vector<unsigned long long> &path,
size_t max_len);
175 void print_view_state(
struct bu_vls *o = NULL);
186 std::unordered_map<unsigned long long, std::unordered_map<int, struct bv_scene_obj *>> s_map;
187 std::unordered_map<unsigned long long, std::vector<unsigned long long>> s_keys;
193 void cache_collapsed();
198 std::unordered_set<unsigned long long> *invalid_objects,
199 std::unordered_set<unsigned long long> *changed_paths,
200 unsigned long long path_hash,
201 std::vector<unsigned long long> &cpath,
206 std::unordered_set<struct bv_scene_obj *> &objs,
207 unsigned long long chash,
212 std::vector<unsigned long long> &path_hashes,
213 std::unordered_set<struct bview *> &views,
214 unsigned long long *ret
218 std::unordered_set<struct bv_scene_obj *> &objs,
219 unsigned long long c_hash,
225 std::vector<unsigned long long> &path_hashes,
226 std::unordered_set<struct bview *> &views,
227 unsigned long long *ret
231 std::unordered_set<struct bv_scene_obj *> &objs,
235 std::vector<unsigned long long> &path_hashes,
236 std::unordered_set<struct bview *> &views,
240 int leaf_check(
unsigned long long chash, std::vector<unsigned long long> &path_hashes);
243 std::vector<std::vector<unsigned long long>> staged;
247 void depth_group_collapse(
248 std::vector<std::vector<unsigned long long>> &collapsed,
249 std::unordered_set<unsigned long long> &d_paths,
250 std::unordered_set<unsigned long long> &p_d_paths,
251 std::map<
size_t, std::unordered_set<unsigned long long>> &depth_groups
253 std::unordered_map<int, std::vector<std::vector<unsigned long long>>> mode_collapsed;
254 std::vector<std::vector<unsigned long long>> all_collapsed;
260 std::unordered_map<int, std::unordered_set<unsigned long long>> drawn_paths;
261 std::unordered_set<unsigned long long> all_drawn_paths;
265 std::unordered_map<int, std::unordered_set<unsigned long long>> partially_drawn_paths;
266 std::unordered_set<unsigned long long> all_partially_drawn_paths;
271 #define GED_DBISTATE_DB_CHANGE 0x01
272 #define GED_DBISTATE_VIEW_CHANGE 0x02
274 struct ged_draw_cache;
281 unsigned long long update();
283 std::vector<unsigned long long> tops(
bool show_cyclic);
287 bool path_is_subtraction(std::vector<unsigned long long> &
elements);
288 db_op_t bool_op(
unsigned long long,
unsigned long long);
290 bool get_matrix(
matp_t m,
unsigned long long p_key,
unsigned long long i_key);
296 bool valid_hash(
unsigned long long phash);
297 bool valid_hash_path(std::vector<unsigned long long> &phashes);
298 bool print_hash(
struct bu_vls *opath,
unsigned long long phash);
299 void print_path(
struct bu_vls *opath, std::vector<unsigned long long> &path,
size_t pmax = 0,
int verbsose = 0);
301 const char *pathstr(std::vector<unsigned long long> &path,
size_t pmax = 0);
302 const char *hashstr(
unsigned long long);
304 std::vector<unsigned long long> digest_path(
const char *path);
306 unsigned long long path_hash(std::vector<unsigned long long> &path,
size_t max_len);
312 std::vector<BSelectState *> get_selected_states(
const char *sname);
315 void put_selected_state(
const char *sname);
316 std::vector<std::string> list_selection_sets();
322 std::unordered_map<unsigned long long, std::unordered_set<unsigned long long>> p_c;
324 std::unordered_map<unsigned long long, std::vector<unsigned long long>> p_v;
328 struct directory *get_hdp(
unsigned long long);
329 std::unordered_map<unsigned long long, struct directory *> d_map;
335 std::unordered_map<unsigned long long, std::string> invalid_entry_map;
340 std::unordered_map<unsigned long long, unsigned long long> i_map;
341 std::unordered_map<unsigned long long, std::string> i_str;
346 std::unordered_map<unsigned long long, std::unordered_map<unsigned long long, std::vector<fastf_t>>> matrices;
349 std::unordered_map<unsigned long long, std::unordered_map<unsigned long long, size_t>> i_bool;
357 std::unordered_map<unsigned long long, std::vector<fastf_t>> bboxes;
364 std::unordered_map<unsigned long long, int> c_inherit;
365 std::unordered_map<unsigned long long, unsigned int> rgb;
366 std::unordered_map<unsigned long long, int> region_id;
370 std::unordered_set<struct directory *> added;
371 std::unordered_set<struct directory *> changed;
372 std::unordered_set<unsigned long long> changed_hashes;
373 std::unordered_set<unsigned long long> removed;
374 std::unordered_map<unsigned long long, std::string> old_names;
381 std::unordered_map<struct bview *, BViewState *> view_states;
386 std::unordered_map<std::string, BSelectState *> selected_sets;
389 struct ged *gedp = NULL;
392 bool need_update_nref =
true;
397 void print_dbi_state(
struct bu_vls *o = NULL,
bool report_view_states =
false);
401 std::unordered_set<unsigned long long> &cyclic,
402 unsigned long long c_hash,
403 std::vector<unsigned long long> &path_hashes
406 std::set<std::string> &leaves,
407 unsigned long long c_hash,
408 std::vector<unsigned long long> &path_hashes
411 void populate_maps(
struct directory *dp,
unsigned long long phash,
int reset);
412 unsigned long long update_dp(
struct directory *dp,
int reset);
413 unsigned int color_int(
struct bu_color *);
414 int int_color(
struct bu_color *
c,
unsigned int);
416 struct ged_draw_cache *dcache = NULL;
425 typedef struct _dbi_state {
428 typedef struct _bview_state {
431 typedef struct _bselect_state {
std::unordered_set< unsigned long long > grand_parents
std::unordered_set< unsigned long long > active_parents
bool select_hpath(std::vector< unsigned long long > &hpath)
bool deselect_hpath(std::vector< unsigned long long > &hpath)
bool is_selected(unsigned long long)
std::unordered_map< unsigned long long, std::vector< unsigned long long > > selected
bool is_active(unsigned long long)
unsigned long long state_hash()
std::unordered_set< unsigned long long > active_paths
std::unordered_set< unsigned long long > immediate_parents
bool is_active_parent(unsigned long long)
std::vector< std::string > list_selected_paths()
bool deselect_path(const char *path, bool update)
bool is_parent_obj(unsigned long long)
bool is_grand_parent_obj(unsigned long long)
bool select_path(const char *path, bool update)
bool is_immediate_parent_obj(unsigned long long)
void erase_path(int mode, int argc, const char **argv)
void erase_hpath(int mode, unsigned long long c_hash, std::vector< unsigned long long > &path_hashes, bool cache_collapse=true)
size_t count_drawn_paths(int mode, bool list_collapsed)
void add_hpath(std::vector< unsigned long long > &path_hashes)
int is_hdrawn(int mode, unsigned long long phash)
void add_path(const char *path)
std::vector< std::string > list_drawn_paths(int mode, bool list_collapsed)
Header file for the BRL-CAD common definitions.
fastf_t * matp_t
pointer to a 4x4 matrix
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point