BRL-CAD
display_list.c File Reference
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include "plot3.h"
#include "solid.h"
#include "./ged_private.h"
Include dependency graph for display_list.c:

Go to the source code of this file.

Data Structures

struct  coord
 
struct  stroke
 

Macros

#define MAX_VERTS   10000
 

Functions

fastf_t brep_est_avg_curve_len (struct rt_brep_internal *bi)
 
struct display_listdl_addToDisplay (struct bu_list *hdlp, struct db_i *dbip, const char *name)
 
void headsolid_split (struct bu_list *hdlp, struct db_i *dbip, struct solid *sp, int newlen)
 
int headsolid_splitGDL (struct bu_list *hdlp, struct db_i *dbip, struct display_list *gdlp, struct db_full_path *path)
 
int dl_bounding_sph (struct bu_list *hdlp, vect_t *min, vect_t *max, int pflag)
 
void dl_erasePathFromDisplay (struct bu_list *hdlp, struct db_i *dbip, void(*callback)(unsigned int, int), const char *path, int allow_split, struct solid *freesolid)
 
HIDDEN void eraseAllSubpathsFromSolidList (struct display_list *gdlp, struct db_full_path *subpath, void(*callback)(unsigned int, int), const int skip_first, struct solid *freesolid)
 
void _dl_eraseAllNamesFromDisplay (struct bu_list *hdlp, struct db_i *dbip, void(*callback)(unsigned int, int), const char *name, const int skip_first, struct solid *freesolid)
 
int _dl_eraseFirstSubpath (struct bu_list *hdlp, struct db_i *dbip, void(*callback)(unsigned int, int), struct display_list *gdlp, struct db_full_path *subpath, const int skip_first, struct solid *freesolid)
 
void _dl_eraseAllPathsFromDisplay (struct bu_list *hdlp, struct db_i *dbip, void(*callback)(unsigned int, int), const char *path, const int skip_first, struct solid *freesolid)
 
void _dl_freeDisplayListItem (struct db_i *dbip, void(*callback)(unsigned int, int), struct display_list *gdlp, struct solid *freesolid)
 
void dl_color_soltab (struct bu_list *hdlp)
 
void dl_add_path (struct display_list *gdlp, int dashflag, int transparency, int dmode, int hiddenLine, struct bu_list *vhead, const struct db_full_path *pathp, struct db_tree_state *tsp, unsigned char *wireframe_color_override, void(*callback)(struct display_list *), struct solid *freesolid)
 
int redraw_solid (struct solid *sp, struct db_i *dbip, struct db_tree_state *tsp, struct bview *gvp)
 
int dl_redraw (struct display_list *gdlp, struct db_i *dbip, struct db_tree_state *tsp, struct bview *gvp, void(*callback)(struct display_list *))
 
union treeappend_solid_to_display_list (struct db_tree_state *tsp, const struct db_full_path *pathp, struct rt_db_internal *ip, void *client_data)
 
int invent_solid (struct bu_list *hdlp, struct db_i *dbip, void(*callback_create)(struct display_list *), void(*callback_free)(unsigned int, int), char *name, struct bu_list *vhead, long int rgb, int copy, fastf_t transparency, int dmode, struct solid *freesolid, int csoltab)
 
int dl_set_illum (struct display_list *gdlp, const char *obj, int illum)
 
void dl_set_iflag (struct bu_list *hdlp, int iflag)
 
void dl_set_flag (struct bu_list *hdlp, int flag)
 
void dl_set_wflag (struct bu_list *hdlp, int wflag)
 
void dl_zap (struct bu_list *hdlp, struct db_i *dbip, void(*callback)(unsigned int, int), struct solid *freesolid)
 
int dl_how (struct bu_list *hdlp, struct bu_vls *vls, struct directory **dpp, int both)
 
void dl_plot (struct bu_list *hdlp, FILE *fp, mat_t model2view, int floating, mat_t center, fastf_t scale, int Three_D, int Z_clip)
 
void dl_png (struct bu_list *hdlp, mat_t model2view, fastf_t perspective, vect_t eye_pos, size_t size, size_t half_size, unsigned char **image)
 
void dl_polybinout (struct bu_list *hdlp, struct polygon_header *ph, FILE *fp)
 
void dl_ps (struct bu_list *hdlp, FILE *fp, int border, char *font, char *title, char *creator, int linewidth, fastf_t scale, int xoffset, int yoffset, mat_t model2view, fastf_t perspective, vect_t eye_pos, float red, float green, float blue)
 
void dl_print_schain (struct bu_list *hdlp, struct db_i *dbip, int lvl, int vlcmds, struct bu_vls *vls)
 
void dl_bitwise_and_fullpath (struct bu_list *hdlp, int flag_val)
 
void dl_write_animate (struct bu_list *hdlp, FILE *fp)
 
int dl_select (struct bu_list *hdlp, mat_t model2view, struct bu_vls *vls, double vx, double vy, double vwidth, double vheight, int rflag)
 
int dl_select_partial (struct bu_list *hdlp, mat_t model2view, struct bu_vls *vls, double vx, double vy, double vwidth, double vheight, int rflag)
 
void dl_set_transparency (struct bu_list *hdlp, struct directory **dpp, double transparency, void(*callback)(struct display_list *))
 
void dl_botdump (struct bu_list *hdlp, struct db_i *dbip, FILE *fp, int fd, char *file_ext, int output_type, int *red, int *green, int *blue, fastf_t *alpha)
 

Detailed Description

Collect display list manipulation logic here as it is refactored.

Definition in file display_list.c.

Macro Definition Documentation

#define MAX_VERTS   10000

Referenced by dl_polybinout().

Function Documentation

fastf_t brep_est_avg_curve_len ( struct rt_brep_internal *  bi)

Definition at line 62 of file draw_calc.cpp.

struct display_list* dl_addToDisplay ( struct bu_list hdlp,
struct db_i dbip,
const char *  name 
)
void headsolid_split ( struct bu_list hdlp,
struct db_i dbip,
struct solid *  sp,
int  newlen 
)

Definition at line 104 of file display_list.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_INSERT, db_path_to_string(), dl_addToDisplay(), and display_list::dl_headSolid.

Referenced by headsolid_splitGDL().

Here is the call graph for this function:

int headsolid_splitGDL ( struct bu_list hdlp,
struct db_i dbip,
struct display_list gdlp,
struct db_full_path path 
)

Definition at line 125 of file display_list.c.

References BU_LIST_IS_EMPTY, BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, BU_LIST_WHILE, db_full_path_match_top(), display_list::dl_headSolid, db_full_path::fp_len, headsolid_split(), and headsolid_splitGDL().

Referenced by _dl_eraseFirstSubpath(), dl_erasePathFromDisplay(), and headsolid_splitGDL().

Here is the call graph for this function:

int dl_bounding_sph ( struct bu_list hdlp,
vect_t *  min,
vect_t *  max,
int  pflag 
)
void dl_erasePathFromDisplay ( struct bu_list hdlp,
struct db_i dbip,
void(*)(unsigned int, int)  callback,
const char *  path,
int  allow_split,
struct solid *  freesolid 
)
HIDDEN void eraseAllSubpathsFromSolidList ( struct display_list gdlp,
struct db_full_path subpath,
void(*)(unsigned int, int)  callback,
const int  skip_first,
struct solid *  freesolid 
)

Definition at line 301 of file display_list.c.

References BU_LIST_DEQUEUE, BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, db_full_path_subset(), display_list::dl_headSolid, and GED_FREE_VLIST_CALLBACK_PTR_NULL.

Referenced by _dl_eraseAllNamesFromDisplay().

Here is the call graph for this function:

void _dl_eraseAllNamesFromDisplay ( struct bu_list hdlp,
struct db_i dbip,
void(*)(unsigned int, int)  callback,
const char *  name,
const int  skip_first,
struct solid *  freesolid 
)

Definition at line 332 of file display_list.c.

References _dl_freeDisplayListItem(), BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, BU_STR_EQUAL, bu_vls_addr(), db_free_full_path(), db_string_to_path(), display_list::dl_path, eraseAllSubpathsFromSolidList(), strdup(), and strtok().

Referenced by ged_kill(), ged_killrefs(), and killtree_callback().

Here is the call graph for this function:

int _dl_eraseFirstSubpath ( struct bu_list hdlp,
struct db_i dbip,
void(*)(unsigned int, int)  callback,
struct display_list gdlp,
struct db_full_path subpath,
const int  skip_first,
struct solid *  freesolid 
)

Definition at line 386 of file display_list.c.

References BU_LIST_DEQUEUE, BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, bu_vls_free(), db_dup_full_path(), db_free_full_path(), db_full_path_init(), db_full_path_subset(), display_list::dl_headSolid, display_list::dl_path, GED_FREE_VLIST_CALLBACK_PTR_NULL, headsolid_splitGDL(), and display_list::l.

Referenced by _dl_eraseAllPathsFromDisplay().

Here is the call graph for this function:

void _dl_eraseAllPathsFromDisplay ( struct bu_list hdlp,
struct db_i dbip,
void(*)(unsigned int, int)  callback,
const char *  path,
const int  skip_first,
struct solid *  freesolid 
)

Definition at line 437 of file display_list.c.

References _dl_eraseFirstSubpath(), _dl_freeDisplayListItem(), BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, bu_vls_addr(), db_free_full_path(), db_full_path_subset(), db_string_to_path(), display_list::dl_path, and display_list::dl_wflag.

Referenced by ged_erase(), and ged_remove().

Here is the call graph for this function:

void _dl_freeDisplayListItem ( struct db_i dbip,
void(*)(unsigned int, int)  callback,
struct display_list gdlp,
struct solid *  freesolid 
)

Definition at line 488 of file display_list.c.

References BU_LIST_DEQUEUE, BU_LIST_FIRST, BU_LIST_WHILE, bu_vls_free(), db_dirdelete(), display_list::dl_headSolid, display_list::dl_path, GED_FREE_VLIST_CALLBACK_PTR_NULL, display_list::l, RT_CK_DIR, and RT_DIR_PHONY_ADDR.

Referenced by _dl_eraseAllNamesFromDisplay(), and _dl_eraseAllPathsFromDisplay().

Here is the call graph for this function:

void dl_color_soltab ( struct bu_list hdlp)
void dl_add_path ( struct display_list gdlp,
int  dashflag,
int  transparency,
int  dmode,
int  hiddenLine,
struct bu_list vhead,
const struct db_full_path pathp,
struct db_tree_state tsp,
unsigned char *  wireframe_color_override,
void(*)(struct display_list *)  callback,
struct solid *  freesolid 
)

Definition at line 670 of file display_list.c.

References bu_list::back, BU_LIST_APPEND, bu_semaphore_acquire(), bu_semaphore_release(), db_dup_full_path(), display_list::dl_headSolid, DOWN, GED_CREATE_VLIST_CALLBACK_PTR_NULL, RT_SEM_MODEL, and db_tree_state::ts_regionid.

Referenced by _ged_drawH_part2().

Here is the call graph for this function:

int redraw_solid ( struct solid *  sp,
struct db_i dbip,
struct db_tree_state tsp,
struct bview gvp 
)

Definition at line 919 of file display_list.c.

References _GED_WIREFRAME, BU_LIST_NON_EMPTY, and RT_FREE_VLIST.

Referenced by dl_redraw().

int dl_redraw ( struct display_list gdlp,
struct db_i dbip,
struct db_tree_state tsp,
struct bview gvp,
void(*)(struct display_list *)  callback 
)

Definition at line 933 of file display_list.c.

References BU_LIST_FOR, display_list::dl_headSolid, GED_CREATE_VLIST_CALLBACK_PTR_NULL, and redraw_solid().

Referenced by _ged_drawtrees(), and ged_redraw().

Here is the call graph for this function:

int invent_solid ( struct bu_list hdlp,
struct db_i dbip,
void(*)(struct display_list *)  callback_create,
void(*)(unsigned int, int)  callback_free,
char *  name,
struct bu_list vhead,
long int  rgb,
int  copy,
fastf_t  transparency,
int  dmode,
struct solid *  freesolid,
int  csoltab 
)

Definition at line 1103 of file display_list.c.

References bu_list::back, BU_LIST_APPEND, BU_LIST_INIT, bu_log(), db_add_node_to_full_path(), db_diradd(), db_lookup(), DBI_NULL, dl_addToDisplay(), dl_erasePathFromDisplay(), display_list::dl_headSolid, DOWN, GED_CREATE_VLIST_CALLBACK_PTR_NULL, LOOKUP_QUIET, OSL::Strings::rgb, RT_DIR_NULL, RT_DIR_PHONY_ADDR, and RT_DIR_SOLID.

Referenced by _ged_cvt_vlblock_to_solids().

Here is the call graph for this function:

int dl_set_illum ( struct display_list gdlp,
const char *  obj,
int  illum 
)

Definition at line 1178 of file display_list.c.

References BU_STR_EQUAL, DB_FULL_PATH_GET, display_list::dl_headSolid, DOWN, and UP.

Referenced by ged_illum().

void dl_set_iflag ( struct bu_list hdlp,
int  iflag 
)
void dl_set_flag ( struct bu_list hdlp,
int  flag 
)
void dl_set_wflag ( struct bu_list hdlp,
int  wflag 
)

Definition at line 1239 of file display_list.c.

References BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, and display_list::dl_headSolid.

Referenced by ged_nirt().

void dl_zap ( struct bu_list hdlp,
struct db_i dbip,
void(*)(unsigned int, int)  callback,
struct solid *  freesolid 
)

Definition at line 1258 of file display_list.c.

References BU_LIST_DEQUEUE, BU_LIST_FIRST, BU_LIST_LAST, BU_LIST_NON_EMPTY, BU_LIST_WHILE, bu_log(), bu_vls_free(), db_dirdelete(), display_list::dl_headSolid, display_list::dl_path, GED_FREE_VLIST_CALLBACK_PTR_NULL, display_list::l, RT_CK_DIR, and RT_DIR_PHONY_ADDR.

Referenced by ged_zap().

Here is the call graph for this function:

int dl_how ( struct bu_list hdlp,
struct bu_vls vls,
struct directory **  dpp,
int  both 
)

Definition at line 1290 of file display_list.c.

References _GED_HIDDEN_LINE, BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, bu_vls_printf(), display_list::dl_headSolid, and RT_DIR_NULL.

Referenced by ged_how().

Here is the call graph for this function:

void dl_plot ( struct bu_list hdlp,
FILE *  fp,
mat_t  model2view,
int  floating,
mat_t  center,
fastf_t  scale,
int  Three_D,
int  Z_clip 
)
void dl_png ( struct bu_list hdlp,
mat_t  model2view,
fastf_t  perspective,
vect_t  eye_pos,
size_t  size,
size_t  half_size,
unsigned char **  image 
)

Definition at line 1710 of file display_list.c.

References bn_mat_mul(), BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, deering_persp_mat(), display_list::dl_headSolid, persp_mat(), VSET, Z, and ZERO.

Here is the call graph for this function:

void dl_ps ( struct bu_list hdlp,
FILE *  fp,
int  border,
char *  font,
char *  title,
char *  creator,
int  linewidth,
fastf_t  scale,
int  xoffset,
int  yoffset,
mat_t  model2view,
fastf_t  perspective,
vect_t  eye_pos,
float  red,
float  green,
float  blue 
)

Definition at line 2116 of file display_list.c.

Referenced by ged_ps().

void dl_print_schain ( struct bu_list hdlp,
struct db_i dbip,
int  lvl,
int  vlcmds,
struct bu_vls vls 
)

Definition at line 2128 of file display_list.c.

References BN_CK_VLIST, BU_LIST_FOR, BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, bu_vls_printf(), bn_vlist::cmd, db_path_to_vls(), db_i::dbi_base2local, DBI_NULL, display_list::dl_headSolid, bn_vlist::nused, bn_vlist::pt, rt_ck_vlist(), rt_vlist_get_cmd_description(), UP, V3ARGS, X, Y, and Z.

Referenced by ged_report().

Here is the call graph for this function:

void dl_bitwise_and_fullpath ( struct bu_list hdlp,
int  flag_val 
)
void dl_write_animate ( struct bu_list hdlp,
FILE *  fp 
)

Definition at line 2280 of file display_list.c.

References animate::an_forw, BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_PNEXT, DB_FULL_PATH_GET, db_write_anim(), display_list::dl_headSolid, and RT_DIR_USED.

Referenced by _ged_rt_write().

Here is the call graph for this function:

int dl_select ( struct bu_list hdlp,
mat_t  model2view,
struct bu_vls vls,
double  vx,
double  vy,
double  vwidth,
double  vheight,
int  rflag 
)
int dl_select_partial ( struct bu_list hdlp,
mat_t  model2view,
struct bu_vls vls,
double  vx,
double  vy,
double  vwidth,
double  vheight,
int  rflag 
)
void dl_set_transparency ( struct bu_list hdlp,
struct directory **  dpp,
double  transparency,
void(*)(struct display_list *)  callback 
)
void dl_botdump ( struct bu_list hdlp,
struct db_i dbip,
FILE *  fp,
int  fd,
char *  file_ext,
int  output_type,
int *  red,
int *  green,
int *  blue,
fastf_t alpha 
)

Definition at line 2576 of file display_list.c.

References _ged_bot_dump(), BU_LIST_FOR, bu_log(), directory::d_namep, db_i::dbi_filename, display_list::dl_headSolid, ID_BOT, rt_db_internal::idb_ptr, OTYPE_OBJ, rt_db_free_internal(), rt_db_get_internal(), and rt_uniresource.

Referenced by ged_dbot_dump().

Here is the call graph for this function: