Revision: 76696
http://sourceforge.net/p/brlcad/code/76696
Author: starseeker
Date: 2020-08-10 20:06:30 +0000 (Mon, 10 Aug 2020)
Log Message:
-----------
Cheating in one place in MGED, but otherwise make the details of ged_drawable
private
Modified Paths:
--------------
brlcad/branches/bioh/include/ged/defines.h
brlcad/branches/bioh/src/libged/ged_private.h
brlcad/branches/bioh/src/libged/ged_util.c
brlcad/branches/bioh/src/libged/qray/qray.c
brlcad/branches/bioh/src/libged/qray.c
brlcad/branches/bioh/src/libged/set_uplotOutputMode/set_uplotOutputMode.c
brlcad/branches/bioh/src/libged/who/who.c
brlcad/branches/bioh/src/libtclcad/view/draw.c
brlcad/branches/bioh/src/mged/attach.c
brlcad/branches/bioh/src/mged/buttons.c
brlcad/branches/bioh/src/mged/chgtree.c
brlcad/branches/bioh/src/mged/chgview.c
brlcad/branches/bioh/src/mged/cmd.c
brlcad/branches/bioh/src/mged/dodraw.c
brlcad/branches/bioh/src/mged/dozoom.c
brlcad/branches/bioh/src/mged/edpipe.c
brlcad/branches/bioh/src/mged/edsol.c
brlcad/branches/bioh/src/mged/mater.c
brlcad/branches/bioh/src/mged/mged.c
brlcad/branches/bioh/src/mged/mged.h
brlcad/branches/bioh/src/mged/overlay.c
brlcad/branches/bioh/src/mged/plot.c
brlcad/branches/bioh/src/mged/rtif.c
brlcad/branches/bioh/src/mged/set.c
brlcad/branches/bioh/src/mged/share.c
brlcad/branches/bioh/src/mged/usepen.c
Modified: brlcad/branches/bioh/include/ged/defines.h
===================================================================
--- brlcad/branches/bioh/include/ged/defines.h 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/include/ged/defines.h 2020-08-10 20:06:30 UTC (rev
76696)
@@ -154,34 +154,9 @@
#define VD_CURVE_NULL ((struct vd_curve *)NULL)
/* FIXME: should be private */
-struct ged_drawable {
- struct bu_list *gd_headDisplay; /**< @brief head of
display list */
- struct bu_list *gd_headVDraw; /**< @brief head of
vdraw list */
- struct vd_curve *gd_currVHead; /**< @brief current
vdraw head */
+struct ged_drawable;
+GED_EXPORT struct bu_list *ged_drawable_head_dl(struct ged *gedp);
- char **gd_rt_cmd; /* DEPRECATED - will be
removed, do not use */
- int gd_rt_cmd_len; /* DEPRECATED - will be
removed, do not use */
-
- void (*gd_rtCmdNotify)(int aborted); /**< @brief
function called when rt command completes */
-
- int gd_uplotOutputMode; /**< @brief
output mode for unix plots */
-
- /* qray state */
- struct bu_vls gd_qray_basename; /**< @brief basename
of query ray vlist */
- struct bu_vls gd_qray_script; /**< @brief query ray
script */
- char gd_qray_effects; /**< @brief t for
text, g for graphics or b for both */
- int gd_qray_cmd_echo; /**< @brief 0
- don't echo command, 1 - echo command */
- struct ged_qray_fmt *gd_qray_fmts;
- struct ged_qray_color gd_qray_odd_color;
- struct ged_qray_color gd_qray_even_color;
- struct ged_qray_color gd_qray_void_color;
- struct ged_qray_color gd_qray_overlap_color;
- int gd_shaded_mode; /**< @brief 1
- draw bots shaded by default */
-};
-
-
-
-
struct ged_cmd;
/* struct details are private - use accessor functions to manipulate */
@@ -274,6 +249,7 @@
void *ged_io_data; /**< brief caller supplied data */
// Other callbacks...
+ void (*ged_rtCmdNotify)(int aborted); /**< @brief
function called when rt command completes */
// Tcl command strings - these are libtclcad level callbacks that execute
user supplied Tcl commands if set:
// gdv_callback, gdv_edit_motion_delta_callback, go_more_args_callback,
go_rt_end_callback
//
Modified: brlcad/branches/bioh/src/libged/ged_private.h
===================================================================
--- brlcad/branches/bioh/src/libged/ged_private.h 2020-08-10 17:18:58 UTC
(rev 76695)
+++ brlcad/branches/bioh/src/libged/ged_private.h 2020-08-10 20:06:30 UTC
(rev 76696)
@@ -645,6 +645,32 @@
_ged_facetize_log_default(struct _ged_facetize_opts *o);
+struct ged_drawable {
+ struct bu_list *gd_headDisplay; /**< @brief head of
display list */
+ struct bu_list *gd_headVDraw; /**< @brief head of
vdraw list */
+ struct vd_curve *gd_currVHead; /**< @brief current
vdraw head */
+
+ char **gd_rt_cmd; /* DEPRECATED - will be
removed, do not use */
+ int gd_rt_cmd_len; /* DEPRECATED - will be
removed, do not use */
+
+ void (*gd_rtCmdNotify)(int aborted); /**< @brief
function called when rt command completes */
+
+ int gd_uplotOutputMode; /**< @brief output
mode for unix plots */
+
+ /* qray state */
+ struct bu_vls gd_qray_basename; /**< @brief basename
of query ray vlist */
+ struct bu_vls gd_qray_script; /**< @brief query ray
script */
+ char gd_qray_effects; /**< @brief t for
text, g for graphics or b for both */
+ int gd_qray_cmd_echo; /**< @brief 0 - don't
echo command, 1 - echo command */
+ struct ged_qray_fmt *gd_qray_fmts;
+ struct ged_qray_color gd_qray_odd_color;
+ struct ged_qray_color gd_qray_even_color;
+ struct ged_qray_color gd_qray_void_color;
+ struct ged_qray_color gd_qray_overlap_color;
+ int gd_shaded_mode; /**< @brief 1 - draw
bots shaded by default */
+};
+
+
GED_EXPORT extern int ged_snap_lines(point_t *out_pt, struct ged *gedp,
point_t *p);
GED_EXPORT extern int ged_view_snap(struct ged *gedp, int argc, const char
*argv[]);
GED_EXPORT extern int ged_view_data_lines(struct ged *gedp, int argc, const
char *argv[]);
Modified: brlcad/branches/bioh/src/libged/ged_util.c
===================================================================
--- brlcad/branches/bioh/src/libged/ged_util.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/libged/ged_util.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -2032,8 +2032,14 @@
return GED_OK;
}
+struct bu_list *
+ged_drawable_head_dl(struct ged *gedp)
+{
+ if (!gedp || !gedp->ged_gdp)
+ return NULL;
+ return gedp->ged_gdp->gd_headDisplay;
+}
-
/*
* Local Variables:
* mode: C
Modified: brlcad/branches/bioh/src/libged/qray/qray.c
===================================================================
--- brlcad/branches/bioh/src/libged/qray/qray.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/libged/qray/qray.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -26,6 +26,7 @@
#include "vmath.h"
#include "ged.h"
+#include "../ged_private.h"
#include "../qray.h"
Modified: brlcad/branches/bioh/src/libged/qray.c
===================================================================
--- brlcad/branches/bioh/src/libged/qray.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/libged/qray.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -32,6 +32,7 @@
#include "vmath.h"
#include "ged.h"
+#include "./ged_private.h"
#include "./qray.h"
Modified:
brlcad/branches/bioh/src/libged/set_uplotOutputMode/set_uplotOutputMode.c
===================================================================
--- brlcad/branches/bioh/src/libged/set_uplotOutputMode/set_uplotOutputMode.c
2020-08-10 17:18:58 UTC (rev 76695)
+++ brlcad/branches/bioh/src/libged/set_uplotOutputMode/set_uplotOutputMode.c
2020-08-10 20:06:30 UTC (rev 76696)
@@ -25,8 +25,9 @@
#include "common.h"
#include <string.h>
+#include "bn/plot3.h"
#include "ged.h"
-#include "bn/plot3.h"
+#include "../ged_private.h"
/*
* Set/get the unix plot output mode
Modified: brlcad/branches/bioh/src/libged/who/who.c
===================================================================
--- brlcad/branches/bioh/src/libged/who/who.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/libged/who/who.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -24,8 +24,8 @@
*/
#include "ged.h"
+#include "../ged_private.h"
-
/*
* List the objects currently prepped for drawing
*
Modified: brlcad/branches/bioh/src/libtclcad/view/draw.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/view/draw.c 2020-08-10 17:18:58 UTC
(rev 76695)
+++ brlcad/branches/bioh/src/libtclcad/view/draw.c 2020-08-10 20:06:30 UTC
(rev 76696)
@@ -124,7 +124,7 @@
int line_style = -1;
struct dm *dmp = (struct dm *)gdvp->dmp;
struct tclcad_view_data *tvd = (struct tclcad_view_data *)gdvp->u_data;
- struct bu_list *hdlp = tvd->gedp->ged_gdp->gd_headDisplay;
+ struct bu_list *hdlp = ged_drawable_head_dl(tvd->gedp);
if (dm_get_transparency(dmp)) {
/* First, draw opaque stuff */
@@ -349,8 +349,9 @@
if (argc != 2)
return GED_ERROR;
- gdlp = BU_LIST_NEXT(display_list, gedp->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, gedp->ged_gdp->gd_headDisplay)) {
+ struct bu_list *hdlp = ged_drawable_head_dl(gedp);
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
gdlp->dl_wflag = 0;
gdlp = BU_LIST_PNEXT(display_list, gdlp);
}
@@ -357,8 +358,8 @@
if (db_string_to_path(&subpath, gedp->ged_wdbp->dbip, argv[1]) == 0) {
for (i = 0; i < subpath.fp_len; ++i) {
- gdlp = BU_LIST_NEXT(display_list, gedp->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, gedp->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
register struct solid *curr_sp;
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
@@ -403,7 +404,7 @@
* second to last list items play leap frog
* with the end of list.
*/
- last_gdlp = BU_LIST_PREV(display_list,
gedp->ged_gdp->gd_headDisplay);
+ last_gdlp = BU_LIST_PREV(display_list, hdlp);
BU_LIST_DEQUEUE(&last_gdlp->l);
BU_LIST_INSERT(&next_gdlp->l, &last_gdlp->l);
last_gdlp->dl_wflag = 1;
Modified: brlcad/branches/bioh/src/mged/attach.c
===================================================================
--- brlcad/branches/bioh/src/mged/attach.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/attach.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -380,6 +380,7 @@
int opt_argc;
char **opt_argv;
struct dm_list *o_dm_list;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (!wp_name) {
return TCL_ERROR;
@@ -456,7 +457,7 @@
share_dlist(curr_dm_list);
if (dm_get_displaylist(DMP) && mged_variables->mv_dlist &&
!dlist_state->dl_active) {
- createDLists(GEDP->ged_gdp->gd_headDisplay);
+ createDLists(hdlp);
dlist_state->dl_active = 1;
}
Modified: brlcad/branches/bioh/src/mged/buttons.c
===================================================================
--- brlcad/branches/bioh/src/mged/buttons.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/buttons.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -511,10 +511,11 @@
struct display_list *gdlp;
struct display_list *next_gdlp;
int is_empty = 1;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
/* Common part of illumination */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
if (BU_LIST_NON_EMPTY(&gdlp->dl_headSolid)) {
@@ -705,6 +706,7 @@
be_accept()
{
struct dm_list *dmlp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (STATE == ST_S_EDIT) {
/* Accept a solid edit */
@@ -715,7 +717,7 @@
mmenu_set_all(MENU_L1, MENU_NULL);
mmenu_set_all(MENU_L2, MENU_NULL);
- dl_set_iflag(GEDP->ged_gdp->gd_headDisplay, DOWN);
+ dl_set_iflag(hdlp, DOWN);
illum_gdlp = GED_DISPLAY_LIST_NULL;
illump = SOLID_NULL;
@@ -759,6 +761,7 @@
be_reject()
{
struct dm_list *dmlp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
update_views = 1;
@@ -799,7 +802,7 @@
illump = SOLID_NULL; /* None selected */
/* Clear illumination flags */
- dl_set_iflag(GEDP->ged_gdp->gd_headDisplay, DOWN);
+ dl_set_iflag(hdlp, DOWN);
mged_color_soltab();
(void)chg_state(STATE, ST_VIEW, "Edit Reject");
Modified: brlcad/branches/bioh/src/mged/chgtree.c
===================================================================
--- brlcad/branches/bioh/src/mged/chgtree.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/chgtree.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -139,11 +139,12 @@
struct solid *sp;
int count = 0;
struct solid *ret = (struct solid *)NULL;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
RT_CK_FULL_PATH(pathp);
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
@@ -191,6 +192,7 @@
const char *new_argv[4];
char number[32];
int is_empty = 1;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
CHECK_DBI_NULL;
@@ -208,8 +210,8 @@
}
/* Common part of illumination */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
if (BU_LIST_NON_EMPTY(&gdlp->dl_headSolid)) {
Modified: brlcad/branches/bioh/src/mged/chgview.c
===================================================================
--- brlcad/branches/bioh/src/mged/chgview.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/chgview.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -263,9 +263,11 @@
CHECK_DBI_NULL;
/* Common part of illumination */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
if (BU_LIST_NON_EMPTY(&gdlp->dl_headSolid)) {
@@ -457,9 +459,9 @@
GEDP->ged_gvp = view_state->vs_gvp;
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
if (BU_LIST_NON_EMPTY(&gdlp->dl_headSolid)) {
@@ -867,6 +869,7 @@
char **orig_nargv;
struct bu_vls vlsargv = BU_VLS_INIT_ZERO;
struct bu_vls vls = BU_VLS_INIT_ZERO;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
CHECK_DBI_NULL;
@@ -977,9 +980,9 @@
goto bail_out;
}
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
@@ -1100,6 +1103,7 @@
struct display_list *gdlp;
struct display_list *next_gdlp;
int is_empty = 1;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
CHECK_DBI_NULL;
CHECK_READ_ONLY;
@@ -1119,9 +1123,9 @@
}
/* Common part of illumination */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
if (BU_LIST_NON_EMPTY(&gdlp->dl_headSolid)) {
Modified: brlcad/branches/bioh/src/mged/cmd.c
===================================================================
--- brlcad/branches/bioh/src/mged/cmd.c 2020-08-10 17:18:58 UTC (rev 76695)
+++ brlcad/branches/bioh/src/mged/cmd.c 2020-08-10 20:06:30 UTC (rev 76696)
@@ -58,6 +58,7 @@
#include "./mged_dm.h"
#include "./sedit.h"
+#include "../libged/ged_private.h" /*for gd_rt_cmd */
extern void update_grids(fastf_t sf); /* in grid.c */
extern void set_localunit_TclVar(void); /* in chgmodel.c */
Modified: brlcad/branches/bioh/src/mged/dodraw.c
===================================================================
--- brlcad/branches/bioh/src/mged/dodraw.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/dodraw.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -109,6 +109,7 @@
{
struct display_list *gdlp;
struct solid *sp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (!existing_sp) {
/* Handling a new solid */
@@ -163,7 +164,7 @@
bu_semaphore_acquire(RT_SEM_MODEL);
/* Grab the last display list */
- gdlp = BU_LIST_PREV(display_list, GEDP->ged_gdp->gd_headDisplay);
+ gdlp = BU_LIST_PREV(display_list, hdlp);
BU_LIST_APPEND(gdlp->dl_headSolid.back, &sp->l);
bu_semaphore_release(RT_SEM_MODEL);
Modified: brlcad/branches/bioh/src/mged/dozoom.c
===================================================================
--- brlcad/branches/bioh/src/mged/dozoom.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/dozoom.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -56,6 +56,7 @@
short r = -1;
short g = -1;
short b = -1;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
/*
* The vectorThreshold stuff in libdm may turn the
@@ -144,7 +145,7 @@
if (dm_get_transparency(DMP)) {
/* First, draw opaque stuff */
- ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 1.0,
inv_viewsize,
+ ndrawn = dm_draw_display_list(DMP, hdlp, 1.0, inv_viewsize,
r, g, b, mged_variables->mv_linewidth,
mged_variables->mv_dlist, 0,
geometry_default_color, 1,
mged_variables->mv_dlist);
@@ -158,7 +159,7 @@
/* Second, draw transparent stuff */
- ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 0.0,
inv_viewsize,
+ ndrawn = dm_draw_display_list(DMP, hdlp, 0.0, inv_viewsize,
r, g, b, mged_variables->mv_linewidth,
mged_variables->mv_dlist, 0,
geometry_default_color, 0,
mged_variables->mv_dlist);
@@ -167,7 +168,7 @@
} else {
- ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 1.0,
inv_viewsize,
+ ndrawn = dm_draw_display_list(DMP, hdlp, 1.0, inv_viewsize,
r, g, b, mged_variables->mv_linewidth,
mged_variables->mv_dlist, 0,
geometry_default_color, 1,
mged_variables->mv_dlist);
@@ -209,7 +210,7 @@
color_scheme->cs_geo_hl[2], 1, 1.0);
- ndrawn = dm_draw_display_list(DMP, GEDP->ged_gdp->gd_headDisplay, 1.0,
inv_viewsize,
+ ndrawn = dm_draw_display_list(DMP, hdlp, 1.0, inv_viewsize,
r, g, b, mged_variables->mv_linewidth, mged_variables->mv_dlist, 1,
geometry_default_color, 0, mged_variables->mv_dlist);
Modified: brlcad/branches/bioh/src/mged/edpipe.c
===================================================================
--- brlcad/branches/bioh/src/mged/edpipe.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/edpipe.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -23,7 +23,7 @@
*
* pipe_split_pnt - split a pipe segment at a given point
*
- * find_pipe_pnt_nearest_pnt - find which segment of a pipe is nearest
+ * mged_find_pipe_pnt_nearest_pnt - find which segment of a pipe is nearest
* the ray from "pt" in the viewing direction (for segment selection
* in MGED)
*/
@@ -279,7 +279,7 @@
struct wdb_pipe_pnt *
-find_pipe_pnt_nearest_pnt(const struct bu_list *pipe_hd, const point_t pt)
+mged_find_pipe_pnt_nearest_pnt(const struct bu_list *pipe_hd, const point_t pt)
{
struct wdb_pipe_pnt *ps;
struct wdb_pipe_pnt *nearest=(struct wdb_pipe_pnt *)NULL;
Modified: brlcad/branches/bioh/src/mged/edsol.c
===================================================================
--- brlcad/branches/bioh/src/mged/edsol.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/edsol.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -44,7 +44,7 @@
#include "./mged_dm.h"
-extern struct wdb_pipe_pnt *find_pipe_pnt_nearest_pnt(const struct bu_list *,
const point_t);
+extern struct wdb_pipe_pnt *mged_find_pipe_pnt_nearest_pnt(const struct
bu_list *, const point_t);
extern void pipe_split_pnt(struct bu_list *, struct wdb_pipe_pnt *, point_t);
extern struct wdb_pipe_pnt *pipe_del_pnt(struct wdb_pipe_pnt *);
extern struct wdb_pipe_pnt *pipe_add_pnt(struct rt_pipe_internal *, struct
wdb_pipe_pnt *, const point_t);
@@ -2664,6 +2664,7 @@
mat_t mat;
struct solid *sp;
struct directory *illdp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (!illump) {
return;
@@ -2671,8 +2672,8 @@
illdp = LAST_SOLID(illump);
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
@@ -5796,7 +5797,7 @@
} else if (!es_mvalid && !inpara)
break;
- es_pipe_pnt =
find_pipe_pnt_nearest_pnt(&pipeip->pipe_segs_head, new_pt);
+ es_pipe_pnt =
mged_find_pipe_pnt_nearest_pnt(&pipeip->pipe_segs_head, new_pt);
if (!es_pipe_pnt) {
Tcl_AppendResult(INTERP, "No PIPE segment selected\n",
(char *)NULL);
mged_print_result(TCL_ERROR);
@@ -7474,6 +7475,7 @@
struct display_list *gdlp;
struct display_list *next_gdlp;
struct solid *sp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
/* matrices used to accept editing done from a depth
* >= 2 from the top of the illuminated path
*/
@@ -7520,8 +7522,8 @@
modelchanges[15] = 1000000000; /* => small ratio */
/* Now, recompute new chunks of displaylist */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
@@ -7545,6 +7547,7 @@
struct display_list *gdlp;
struct display_list *next_gdlp;
struct solid *sp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (DBIP == DBI_NULL)
return;
@@ -7552,8 +7555,8 @@
if (DBIP->dbi_read_only) {
oedit_reject();
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
@@ -7772,6 +7775,7 @@
void
sedit_reject(void)
{
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (not_state(ST_S_EDIT, "Solid edit reject") || !illump) {
return;
}
@@ -7801,8 +7805,8 @@
struct display_list *next_gdlp;
struct solid *sp;
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
Modified: brlcad/branches/bioh/src/mged/mater.c
===================================================================
--- brlcad/branches/bioh/src/mged/mater.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/mater.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -49,7 +49,8 @@
void
mged_color_soltab(void)
{
- dl_color_soltab(GEDP->ged_gdp->gd_headDisplay);
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
+ dl_color_soltab(hdlp);
update_views = 1; /* re-write control list with new colors */
}
Modified: brlcad/branches/bioh/src/mged/mged.c
===================================================================
--- brlcad/branches/bioh/src/mged/mged.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/mged.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -1435,7 +1435,7 @@
if (DBIP != DBI_NULL) {
setview(0.0, 0.0, 0.0);
- GEDP->ged_gdp->gd_rtCmdNotify = mged_notify;
+ GEDP->ged_rtCmdNotify = mged_notify;
}
/* --- Now safe to process commands. --- */
Modified: brlcad/branches/bioh/src/mged/mged.h
===================================================================
--- brlcad/branches/bioh/src/mged/mged.h 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/mged.h 2020-08-10 20:06:30 UTC (rev
76696)
@@ -643,7 +643,7 @@
void pipe_seg_scale_id(struct wdb_pipe_pnt *, fastf_t);
void pipe_seg_scale_radius(struct wdb_pipe_pnt *, fastf_t);
void pipe_scale_radius(struct rt_db_internal *, fastf_t);
-struct wdb_pipe_pnt *find_pipe_pnt_nearest_pnt(const struct bu_list *, const
point_t);
+struct wdb_pipe_pnt *mged_find_pipe_pnt_nearest_pnt(const struct bu_list *,
const point_t);
struct wdb_pipe_pnt *pipe_add_pnt(struct rt_pipe_internal *, struct
wdb_pipe_pnt *, const point_t);
void pipe_ins_pnt(struct rt_pipe_internal *, struct wdb_pipe_pnt *, const
point_t);
struct wdb_pipe_pnt *pipe_del_pnt(struct wdb_pipe_pnt *);
Modified: brlcad/branches/bioh/src/mged/overlay.c
===================================================================
--- brlcad/branches/bioh/src/mged/overlay.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/overlay.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -73,6 +73,7 @@
struct directory *dp;
mat_t mat;
fastf_t scale;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
CHECK_DBI_NULL;
@@ -95,8 +96,8 @@
if ((dp = db_lookup(DBIP, argv[i], LOOKUP_NOISY)) == RT_DIR_NULL)
continue;
/* Find uses of this solid in the solid table */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(s, &gdlp->dl_headSolid) {
@@ -186,6 +187,7 @@
struct model* m;
const char* name;
struct bu_list f_list;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
BU_LIST_INIT( &f_list );
@@ -235,8 +237,8 @@
continue;
/* Find uses of this solid in the solid table */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(s, &gdlp->dl_headSolid) {
if (db_full_path_search(&s->s_fullpath, dp)) {
Modified: brlcad/branches/bioh/src/mged/plot.c
===================================================================
--- brlcad/branches/bioh/src/mged/plot.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/plot.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -53,6 +53,7 @@
char result[RT_MAXLINE] = {0};
char tol_str[32] = {0};
int is_empty = 1;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
#ifndef _WIN32
struct display_list *gdlp;
@@ -86,8 +87,8 @@
if (not_state(ST_VIEW, "Presented Area Calculation") == TCL_ERROR)
return TCL_ERROR;
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
if (BU_LIST_NON_EMPTY(&gdlp->dl_headSolid)) {
@@ -103,8 +104,8 @@
return TCL_ERROR;
}
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
@@ -194,8 +195,8 @@
* Write out rotated but unclipped, untranslated,
* and unscaled vectors
*/
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
Modified: brlcad/branches/bioh/src/mged/rtif.c
===================================================================
--- brlcad/branches/bioh/src/mged/rtif.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/rtif.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -182,6 +182,7 @@
/* static due to setjmp */
static int mode = 0;
static struct solid *sp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
CHECK_DBI_NULL;
@@ -214,8 +215,8 @@
break;
}
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
Modified: brlcad/branches/bioh/src/mged/set.c
===================================================================
--- brlcad/branches/bioh/src/mged/set.c 2020-08-10 17:18:58 UTC (rev 76695)
+++ brlcad/branches/bioh/src/mged/set.c 2020-08-10 20:06:30 UTC (rev 76696)
@@ -374,6 +374,7 @@
struct dm_list *dlp1;
struct dm_list *dlp2;
struct dm_list *save_dlp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
/* save current display manager */
save_dlp = curr_dm_list;
@@ -390,7 +391,7 @@
if (dm_get_displaylist(dlp1->dml_dmp) &&
dlp1->dml_dlist_state->dl_active == 0) {
set_curr_dm(dlp1);
- createDLists(GEDP->ged_gdp->gd_headDisplay);
+ createDLists(hdlp);
dlp1->dml_dlist_state->dl_active = 1;
dlp1->dml_dirty = 1;
}
@@ -424,8 +425,8 @@
dlp1->dml_dlist_state->dl_active = 0;
- gdlp = BU_LIST_NEXT(display_list,
GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp,
GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
(void)dm_make_current(dlp1->dml_dmp);
Modified: brlcad/branches/bioh/src/mged/share.c
===================================================================
--- brlcad/branches/bioh/src/mged/share.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/share.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -98,6 +98,7 @@
struct dm_list *dlp1 = (struct dm_list *)NULL;
struct dm_list *dlp2 = (struct dm_list *)NULL;
struct bu_vls vls = BU_VLS_INIT_ZERO;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (argc != 4) {
bu_vls_printf(&vls, "helpdevel share");
@@ -185,7 +186,7 @@
save_dlp = curr_dm_list;
set_curr_dm(dlp1);
- createDLists(GEDP->ged_gdp->gd_headDisplay);
+ createDLists(hdlp);
/* restore */
set_curr_dm(save_dlp);
Modified: brlcad/branches/bioh/src/mged/usepen.c
===================================================================
--- brlcad/branches/bioh/src/mged/usepen.c 2020-08-10 17:18:58 UTC (rev
76695)
+++ brlcad/branches/bioh/src/mged/usepen.c 2020-08-10 20:06:30 UTC (rev
76696)
@@ -53,6 +53,7 @@
struct display_list *next_gdlp;
int count;
struct solid *sp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
/*
* Divide the mouse into 'curr_dm_list->dml_ndrawn' VERTICAL
@@ -61,8 +62,8 @@
*/
count = ((fastf_t)y + GED_MAX) * curr_dm_list->dml_ndrawn / GED_RANGE;
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
@@ -94,6 +95,7 @@
{
struct display_list *gdlp;
struct solid *sp;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
if (argc < 1 || 2 < argc) {
struct bu_vls vls = BU_VLS_INIT_ZERO;
@@ -130,8 +132,8 @@
if (argc == 1 || *argv[1] == 'f') {
if (BU_LIST_NEXT_IS_HEAD(sp, &gdlp->dl_headSolid)) {
/* Advance the gdlp (i.e. display list) */
- if (BU_LIST_NEXT_IS_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay))
- gdlp = BU_LIST_NEXT(display_list,
GEDP->ged_gdp->gd_headDisplay);
+ if (BU_LIST_NEXT_IS_HEAD(gdlp, hdlp))
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
else
gdlp = BU_LIST_PNEXT(display_list, gdlp);
@@ -142,8 +144,8 @@
} else if (*argv[1] == 'b') {
if (BU_LIST_PREV_IS_HEAD(sp, &gdlp->dl_headSolid)) {
/* Advance the gdlp (i.e. display list) */
- if (BU_LIST_PREV_IS_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay))
- gdlp = BU_LIST_PREV(display_list,
GEDP->ged_gdp->gd_headDisplay);
+ if (BU_LIST_PREV_IS_HEAD(gdlp, hdlp))
+ gdlp = BU_LIST_PREV(display_list, hdlp);
else
gdlp = BU_LIST_PLAST(display_list, gdlp);
@@ -223,6 +225,7 @@
size_t j;
int illum_only = 0;
struct bu_vls vls = BU_VLS_INIT_ZERO;
+ struct bu_list *hdlp = ged_drawable_head_dl(GEDP);
CHECK_DBI_NULL;
@@ -275,8 +278,8 @@
}
got:
/* Include all solids with same tree top */
- gdlp = BU_LIST_NEXT(display_list, GEDP->ged_gdp->gd_headDisplay);
- while (BU_LIST_NOT_HEAD(gdlp, GEDP->ged_gdp->gd_headDisplay)) {
+ gdlp = BU_LIST_NEXT(display_list, hdlp);
+ while (BU_LIST_NOT_HEAD(gdlp, hdlp)) {
next_gdlp = BU_LIST_PNEXT(display_list, gdlp);
FOR_ALL_SOLIDS(sp, &gdlp->dl_headSolid) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits