Skip to content

Commit

Permalink
smokeview source: move mesh/patch dialog widgets to the display dialo…
Browse files Browse the repository at this point in the history
…g box
gforney committed Jan 22, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b7428db commit c97e656
Showing 2 changed files with 36 additions and 33 deletions.
43 changes: 36 additions & 7 deletions Source/smokeview/glui_display.cpp
Original file line number Diff line number Diff line change
@@ -149,6 +149,7 @@ GLUI_Rollout *ROLLOUT_user_tick=NULL;
GLUI_Rollout *ROLLOUT_general=NULL;
GLUI_Rollout *ROLLOUT_north = NULL;
GLUI_Rollout *ROLLOUT_light2 = NULL;
GLUI_Rollout *ROLLOUT_vismesh = NULL;

GLUI_Panel *PANEL_blockage_drawing = NULL;
GLUI_Panel *PANEL_boundingbox = NULL;
@@ -181,6 +182,8 @@ GLUI_Panel *PANEL_linewidth = NULL;
GLUI_Panel *PANEL_offset = NULL;
GLUI_Panel *PANEL_surfs = NULL;
GLUI_Panel *PANEL_texture_display = NULL;
GLUI_Panel *PANEL_mesh_vis = NULL;
GLUI_Panel *PANEL_patch_vis = NULL;

GLUI_RadioGroup *RADIO_show_geom_boundingbox = NULL;
GLUI_RadioGroup *RADIO_timebar_overlap = NULL;
@@ -281,16 +284,17 @@ GLUI_Button *BUTTON_label_4=NULL;
#define UPDATEPLOT 10


#define GENERAL_ROLLOUT 0
#define COLORING_ROLLOUT 1
#define FONTS_ROLLOUT 2
#define TICKS_ROLLOUT 3
#define LABELS_ROLLOUT 4
#define LIGHT_ROLLOUT 5
#define GENERAL_ROLLOUT 0
#define COLORING_ROLLOUT 1
#define FONTS_ROLLOUT 2
#define TICKS_ROLLOUT 3
#define LABELS_ROLLOUT 4
#define LIGHT_ROLLOUT 5
#define MESHPATCH_ROLLOUT 6

#define UPDATEMENU 1

procdata displayprocinfo[6];
procdata displayprocinfo[7];
int ndisplayprocinfo = 0;

/* ------------------ GLUIUpdateVisAxisLabels ------------------------ */
@@ -950,6 +954,31 @@ extern "C" void GLUIDisplaySetup(int main_window){
CHECKBOX_texture_showall = glui_labels->add_checkbox_to_panel(PANEL_texture_display, _("show all"), &texture_showall, TEXTURE_SHOWALL, GLUITextureCB);
CHECKBOX_texture_hideall = glui_labels->add_checkbox_to_panel(PANEL_texture_display, _("hide all"), &texture_hideall, TEXTURE_HIDEALL, GLUITextureCB);


ROLLOUT_vismesh = glui_labels->add_rollout("Mesh/Patches",false,MESHPATCH_ROLLOUT,DisplayRolloutCB);
PANEL_mesh_vis = glui_labels->add_panel_to_panel(ROLLOUT_vismesh, "Show blockages(in mesh)");
int nn=MIN(global_scase.meshescoll.nmeshes,16);
for(i = 0; i < nn; i++){
meshdata *meshi;
char label[340];

meshi = global_scase.meshescoll.meshinfo + i;
sprintf(label, "%i", i + 1);
if(i==nn/2)glui_labels->add_column_to_panel(PANEL_mesh_vis, false);
glui_labels->add_checkbox_to_panel(PANEL_mesh_vis, label, &meshi->blockvis);
}

PANEL_patch_vis = glui_labels->add_panel_to_panel(ROLLOUT_vismesh, "Show patches(in mesh)");
for(i = 0; i < nn; i++){
meshdata *meshi;
char label[340];

meshi = global_scase.meshescoll.meshinfo + i;
sprintf(label, "%i", i + 1);
if(i==nn/2)glui_labels->add_column_to_panel(PANEL_patch_vis, false);
glui_labels->add_checkbox_to_panel(PANEL_patch_vis, label, &meshi->patchvis);
}

ROLLOUT_light2 = glui_labels->add_rollout("Light",false,LIGHT_ROLLOUT,DisplayRolloutCB);
INSERT_ROLLOUT(ROLLOUT_light2, glui_labels);
ADDPROCINFO(displayprocinfo, ndisplayprocinfo, ROLLOUT_light2, LIGHT_ROLLOUT, glui_labels);
26 changes: 0 additions & 26 deletions Source/smokeview/glui_geometry.cpp
Original file line number Diff line number Diff line change
@@ -193,8 +193,6 @@ GLUI_Panel *PANEL_properties_triangle = NULL;
GLUI_Panel *PANEL_properties_vertex = NULL;
GLUI_Panel *PANEL_properties2 = NULL;
GLUI_Panel *PANEL_obj_stretch2=NULL,*PANEL_obj_stretch3=NULL, *PANEL_obj_stretch4=NULL;
GLUI_Panel *PANEL_mesh_vis = NULL;
GLUI_Panel *PANEL_patch_vis = NULL;
GLUI_Panel *PANEL_geomedgecheck=NULL;
GLUI_Panel *PANEL_group1=NULL;
GLUI_Panel *PANEL_geom_offset=NULL;
@@ -848,30 +846,6 @@ extern "C" void GLUIGeometrySetup(int main_window){
STATIC_label = glui_geometry->add_statictext_to_panel(PANEL_obj_stretch4, "&OBST label:");
STATIC_id_label = glui_geometry->add_statictext_to_panel(PANEL_obj_stretch4, "&OBST ID:");


PANEL_mesh_vis = glui_geometry->add_panel_to_panel(ROLLOUT_structured, "Show blockages(in mesh)");
int nn=MIN(global_scase.meshescoll.nmeshes,16);
for(i = 0; i < nn; i++){
meshdata *meshi;
char label[340];

meshi = global_scase.meshescoll.meshinfo + i;
sprintf(label, "%i", i + 1);
if(i==nn/2)glui_geometry->add_column_to_panel(PANEL_mesh_vis, false);
glui_geometry->add_checkbox_to_panel(PANEL_mesh_vis, label, &meshi->blockvis);
}

PANEL_patch_vis = glui_geometry->add_panel_to_panel(ROLLOUT_structured, "Show patches(in mesh)");
for(i = 0; i < nn; i++){
meshdata *meshi;
char label[340];

meshi = global_scase.meshescoll.meshinfo + i;
sprintf(label, "%i", i + 1);
if(i==nn/2)glui_geometry->add_column_to_panel(PANEL_patch_vis, false);
glui_geometry->add_checkbox_to_panel(PANEL_patch_vis, label, &meshi->patchvis);
}

PANEL_obj_stretch2 = glui_geometry->add_panel_to_panel(ROLLOUT_structured, "Coordinates");

if(blocklocation==BLOCKlocation_grid){

0 comments on commit c97e656

Please sign in to comment.