Skip to content
Merged
10 changes: 6 additions & 4 deletions Manuals/SMV_User_Guide/SMV_User_Guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6096,11 +6096,9 @@ \chapter{Keyboard Shortcuts}
\item only translate the scene left and right when the mouse is moved left and right (ignore up and down mouse movement)
\end{itemize}

\kitem{f}Activates the {\tt ALT}\ key when moving the scene with the mouse.
Pressing and releasing the {\tt f}\ key then moving the mouse causes the scene to go in and out until the
mouse button is released.
\kitem{f}Decrease distance by 25 percent at which fire opacity is one half. This increases fire opaqueness.

\kitem{F}Toggle algorithm for hiding blockage overlaps.
\kitem{F, ALT f}Increase distance by 25 percent at which fire opacity is one half. This decreases fire opaqueness.

\kitem{g}Toggle the grid visibility. When the grid display option
is active, the x, y and z keys may be used to show or hide the
Expand Down Expand Up @@ -6130,6 +6128,10 @@ \chapter{Keyboard Shortcuts}

\kitem{ALT k}Toggle device selection.

\kitem{l}Increase the mass extinction coefficient by 25 percent. This increases smoke opaqueness.

\kitem{L, ALT l}Decrease the mass extinction coefficient by 25 percent. This decreases smoke opaqueness.

\kitem{m}Switch between meshes in multiple mesh cases.

\kitem{M}Toggle command line scene clipping. When turned on, the
Expand Down
41 changes: 41 additions & 0 deletions Source/smokeview/callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,28 @@ void Keyboard(unsigned char key, int flag){
break;
}
break;
#ifdef pp_OPACITY_SHORTCUTS
case 'f':
case 'F':
if(global_scase.smoke3dcoll.nsmoke3dinfo<=0){
printf("***warning: 3D smoke files not present, fire opacity setting not changed\n");
break;
}
if(use_opacity_depth == 0){
use_opacity_depth = 1;
GLUISmoke3dCB(USE_OPACITY_DEPTH);
GLUIUpdateUseOpacityDepth();
}
if(key2 == 'F' || keystate == GLUT_ACTIVE_ALT){
fire_halfdepth *= 1.25;
}
else{
fire_halfdepth /= 1.25;
}
GLUISmoke3dCB(UPDATE_SMOKEFIRE_COLORS);
printf("50%% opacity at depth: %f (m)\n", fire_halfdepth);
break;
#else
case 'f':
alt_ctrl_key_state = KEY_ALT;
break;
Expand All @@ -1894,6 +1916,7 @@ void Keyboard(unsigned char key, int flag){
GLUIUpdateShowHideButtons();
glutPostRedisplay();
break;
#endif
case 'g':
switch(keystate){
case GLUT_ACTIVE_ALT:
Expand Down Expand Up @@ -2091,12 +2114,30 @@ void Keyboard(unsigned char key, int flag){
if(visTimebar==1)PRINTF("Time bar visible\n");
}
break;
#ifdef pp_OPACITY_SHORTCUTS
case 'l':
case 'L':
if(global_scase.smoke3dcoll.nsmoke3dinfo<=0){
printf("***warning: 3D smoke files are present, smoke opacity setting not changed\n");
break;
}
if(key2 == 'L' || keystate == GLUT_ACTIVE_ALT){
glui_mass_extinct *= 1.25;
}
else{
glui_mass_extinct /= 1.25;
}
GLUISmoke3dCB(SMOKE_EXTINCT);
printf("Mass extinction : %f (m2/kg)\n", glui_mass_extinct);
break;
#else
case 'l':
case 'L':
#ifdef pp_MEMDEBUG
printf("memory blocks: %i total size: %i\n", COUNTMEMORYBLOCKS(0), (int)GETTOTALMEMORY);
#endif
break;
#endif
case 'm':
switch(keystate){
case GLUT_ACTIVE_ALT:
Expand Down
10 changes: 9 additions & 1 deletion Source/smokeview/glui_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ extern "C" void GLUICreateVolTourList(void){
}
}

#ifdef pp_OPACITY_SHORTCUTS
/* ------------------ GLUIUpdateUseOpacityDepth ------------------------ */

extern "C" void GLUIUpdateUseOpacityDepth(void){
CHECKBOX_use_opacity_depth->set_int_val(use_opacity_depth);
}
#endif

/* ------------------ UpdateCombineMeshes ------------------------ */

void UpdateCombineMeshes(void){
Expand Down Expand Up @@ -610,7 +618,7 @@ extern "C" void GLUI3dSmokeSetup(int main_window){
SPINNER_emission_factor = glui_3dsmoke->add_spinner_to_panel(PANEL_fire_opacity, "opacity multiplier:", GLUI_SPINNER_FLOAT, &emission_factor, USE_FIRE_ALPHA, GLUISmoke3dCB);
glui_3dsmoke->add_checkbox_to_panel(PANEL_fire_opacity, "off axis planes", &smoke_offaxis);
glui_3dsmoke->add_checkbox_to_panel(PANEL_fire_opacity, "adjust opacities", &smoke_adjust);
SPINNER_smoke3d_fire_halfdepth->set_float_limits(0.01, 100.0);
SPINNER_smoke3d_fire_halfdepth->set_float_limits(0.001, 1000.0);
CHECKBOX_force_alpha_opaque = glui_3dsmoke->add_checkbox_to_panel(PANEL_fire_opacity, "force opaque", &force_alpha_opaque, FORCE_ALPHA_OPAQUE, GLUISmoke3dCB);
GLUISmoke3dCB(USE_OPACITY_DEPTH);

Expand Down
3 changes: 3 additions & 0 deletions Source/smokeview/glui_smoke.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ EXTERNCPP void GLUIUpdateFireAlpha(void);
EXTERNCPP void GLUIUpdateSmoke3dFlags(void);
EXTERNCPP void GLUICreateVolTourList(void);
EXTERNCPP void GLUIDeleteVolTourList(void);
#ifdef pp_OPACITY_SHORTCUTS
EXTERNCPP void GLUIUpdateUseOpacityDepth(void);
#endif

#endif

2 changes: 2 additions & 0 deletions Source/smokeview/menus.c
Original file line number Diff line number Diff line change
Expand Up @@ -11814,8 +11814,10 @@ static int menu_count=0;
glutAddMenuEntry(" 0: reset animation to the initial time", MENU_DUMMY);
glutAddMenuEntry(" 1-9: number of frames to skip", MENU_DUMMY);
glutAddMenuEntry(" a/ALT a: increase/decrease flow vector length by 1.5", MENU_DUMMY);
glutAddMenuEntry(" f/ALT f: increase/decrease 50% fire opacity depth by 1.25", MENU_DUMMY);
glutAddMenuEntry(" H: toggle slice and vector slice visibility", MENU_DUMMY);
glutAddMenuEntry(" I: toggle visibility of slices in blockages", MENU_DUMMY);
glutAddMenuEntry(" l/ALT l: increase/decrease mass extinction coef by 1.25", MENU_DUMMY);
glutAddMenuEntry(" N: force bound update when loading files (assume fds is running)", MENU_DUMMY);
glutAddMenuEntry(" p,P: increment particle variable displayed", MENU_DUMMY);
glutAddMenuEntry(" s,S: increase/decrease interval between adjacent vectors", MENU_DUMMY);
Expand Down
3 changes: 2 additions & 1 deletion Source/smokeview/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

//#define pp_SHOW_UPDATE // show what is being updated in the UpdateShowScene routine
//#define pp_TERRAIN_HIDE // hide terrain when hiding internal blockages
//#define pp_OPACITY_DEBUG // output hrrpuv opacity in center of each mesh
//#define pp_OPACITY_DEBUG // output hrrpuv opacity in center of each mesh
#define pp_OPACITY_SHORTCUTS // add shortcuts for increasing/decreasing opacity depth

//*** options: windows

Expand Down
2 changes: 1 addition & 1 deletion Source/smokeview/renderimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ int MergeRenderScreenBuffers(int nfactor, GLubyte **screenbuffers){
}
}

char infobuffer[100];
char infobuffer[512];
int ninfobuffer;
int skip=3, channel=2;
char fds_label[256], smv_label[256];
Expand Down