Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Source/shared/readsmvfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,7 @@ void InitMesh(meshdata *meshi){
memset(meshi->currentsurf, 0, sizeof(isosurface));
NewMemory((void **)&meshi->currentsurf2, sizeof(isosurface));
memset(meshi->currentsurf2, 0, sizeof(isosurface));
NewMemory((void **)&meshi->box_clipinfo, sizeof(clipdata));
memset(meshi->box_clipinfo, 0, sizeof(clipdata));
meshi->box_clipinfo = NULL;
NewMemory((void **)&meshi->gsliceinfo, sizeof(meshplanedata));
memset(meshi->gsliceinfo, 0, sizeof(meshplanedata));
NewMemory((void **)&meshi->volrenderinfo, sizeof(volrenderdata));
Expand Down Expand Up @@ -7574,6 +7573,10 @@ int ReadSMV_Parse(smv_case *scase, bufferstreamdata *stream){
meshi->xyz_bar0[ZZZ]=scase->zbar0;
meshi->xyz_bar[ZZZ] =scase->zbar;
meshi->zcen_smv =(scase->zbar+scase->zbar0)/2.0;
if(meshi->box_clipinfo == NULL){
NewMemory(( void ** )&meshi->box_clipinfo, sizeof(clipdata));
memset(meshi->box_clipinfo, 0, sizeof(clipdata));
}
InitBoxClipInfo(meshi->box_clipinfo,scase->xbar0,scase->xbar,scase->ybar0,scase->ybar,scase->zbar0,scase->zbar);
if(scase->ntrnx==0){
int nn;
Expand Down
8 changes: 6 additions & 2 deletions Source/smokeview/glui_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1375,8 +1375,12 @@ extern "C" void GLUISmoke3dCB(int var){
case SMOKE_EXTINCT:
global_scase.update_smoke_alphas = 1;
glui_mass_extinct = MAX(glui_mass_extinct, 0.0);
SPINNER_mass_extinct->set_float_val(glui_mass_extinct);
SPINNER_mass_extinct2->set_float_val(glui_mass_extinct);
if(SPINNER_mass_extinct != NULL){
SPINNER_mass_extinct->set_float_val(glui_mass_extinct);
}
if(SPINNER_mass_extinct2 != NULL){
SPINNER_mass_extinct2->set_float_val(glui_mass_extinct);
}
break;
#ifdef pp_GPU
case SMOKE_RTHICK:
Expand Down
18 changes: 18 additions & 0 deletions Source/smokeview/readsmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,24 @@ void UpdateMeshCoords(void){

if(current_mesh == NULL)current_mesh = global_scase.meshescoll.meshinfo;
if(global_scase.setPDIM==0&&current_mesh!=NULL){
float *xplt_smv, *yplt_smv, *zplt_smv;

xplt_smv = current_mesh->xplt_smv;
if(xplt_smv == NULL){
NewMemory(( void ** )&xplt_smv, sizeof(float) * (current_mesh->ibar + 1));
current_mesh->xplt_smv = xplt_smv;
}
yplt_smv = current_mesh->yplt_smv;
if(yplt_smv == NULL){
NewMemory(( void ** )&yplt_smv, sizeof(float) * (current_mesh->jbar + 1));
current_mesh->yplt_smv = yplt_smv;
}
zplt_smv = current_mesh->zplt_smv;
if(zplt_smv == NULL){
NewMemory(( void ** )&zplt_smv, sizeof(float) * (current_mesh->kbar + 1));
current_mesh->zplt_smv = zplt_smv;
}

for(nn=0;nn<=current_mesh->ibar;nn++){
current_mesh->xplt_smv[nn]=global_scase.xbar0+(float)nn*(global_scase.xbar-global_scase.xbar0)/(float)current_mesh->ibar;
}
Expand Down
2 changes: 2 additions & 0 deletions Source/smokeview/smokeviewvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,8 @@ SVEXTERN char script_filename[1024];
SVEXTERN int SVDECL(highlight_block,-1), SVDECL(highlight_mesh,0), SVDECL(outline_mode,SCENE_OUTLINE_SCENE);
SVEXTERN int SVDECL(updategetobstlabels,1);

SVEXTERN int SVDECL(update_set_clipplanes, 1);

SVEXTERN int smoke_alpha;
SVEXTERN int SVDECL(showall_textures,0);
SVEXTERN int SVDECL(enable_texture_lighting,0);
Expand Down
18 changes: 18 additions & 0 deletions Source/smokeview/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,24 @@ void UpdateShowScene(void){
IdleCB();
update_idle = 0;
}
if(update_set_clipplanes == 1){
int i;

update_set_clipplanes = 0;
for(i=0;i<global_scase.meshescoll.nmeshes;i++){
meshdata *meshi;

meshi = global_scase.meshescoll.meshinfo + i;
if(meshi->box_clipinfo == NULL){
NewMemory(( void ** )&meshi->box_clipinfo, sizeof(clipdata));
memset(meshi->box_clipinfo, 0, sizeof(clipdata));
InitBoxClipInfo(meshi->box_clipinfo,
global_scase.xbar0, global_scase.xbar,
global_scase.ybar0, global_scase.ybar,
global_scase.zbar0, global_scase.zbar);
}
}
}
if(update_setmainwindow == 1){
SetMainWindow();
update_setmainwindow = 0;
Expand Down
Loading