Commit 2a8cdaec authored by Edward Vigmond's avatar Edward Vigmond

DeadData for Auxilliary grids

parent 5412f4eb
......@@ -422,7 +422,7 @@ private:
*
* \throw 1 if any error in input
*/
AuxGrid::AuxGrid( const char *fn, AuxGrid *ag, float t0, float dt ):_dt(dt),_t0(t0)
AuxGrid::AuxGrid( const char *fn, TBmeshWin *tbmw, AuxGrid *ag, float t0, float dt ):_dt(dt),_t0(t0)
{
if( strstr( fn, ".pts_t" ) )
_indexer = new AuxGridIndexer(fn);
......@@ -490,6 +490,8 @@ AuxGrid::AuxGrid( const char *fn, AuxGrid *ag, float t0, float dt ):_dt(dt),_t0(
_rd_pts.ambient = 0.5;
_rd_pts.diffuse = 1.;
_rd_pts.specular = 1.;
_deadData = new DeadDataGUI( tbmw, &cs, VBO_Aux );
}
......@@ -633,6 +635,7 @@ AuxGrid::~AuxGrid()
if( _timeplot )
delete _timeplot;
_timeplot = NULL;
if( _deadData ){ delete _deadData; }
}
void AuxGrid :: optimize_cs( int tm )
......
......@@ -12,6 +12,9 @@
#include "Model.h"
#include "DrawingObjects.h"
#include "plottingwin.h"
#include "DeadDataGUI.h"
class TBmeshWin;
class AuxGridFetcher;
......@@ -44,7 +47,7 @@ class AuxGrid {
GLfloat _mat_prop[4] = { 0.7, 0.7, 80, 1. };
string _absfile;
public:
AuxGrid( const char *fn, AuxGrid *ag=NULL, float t0=0, float dt=1 );
AuxGrid( const char *fn, TBmeshWin *, AuxGrid *ag=NULL, float t0=0, float dt=1 );
~AuxGrid();
Colourscale cs;
......@@ -76,6 +79,7 @@ class AuxGrid {
_rd_pts.set_material(s,_mat_prop );_rd_lns.set_material(s,_mat_prop); }
GLfloat *get_mat() { return _mat_prop; }
string file(){ return _absfile; }
DeadDataGUI* _deadData = NULL;
};
#endif
......@@ -2,19 +2,22 @@
version 1.0400
header_name {.h}
code_name {.cxx}
decl {\#include "TBmeshWin.h"} {private local
decl {\#include "TBmeshWin.h"} {private global
}
decl {class TBmeshWin;} {public local
decl {class TBmeshWin;} {public global
}
decl {\#include "Colourscale.h"} {public global
}
class DeadDataGUI {open
} {
Function {DeadDataGUI( TBmeshWin *w)} {open
Function {DeadDataGUI( TBmeshWin *tb, Colourscale *c, unsigned int cond)} {open
} {
Fl_Window window {
label {Dead Data } open
xywh {1015 298 285 380} type Double hotspot visible
xywh {630 45 285 380} type Double hide hotspot
} {
Fl_Light_Button showDeadData {
label {Dead data}
......@@ -23,12 +26,12 @@ class DeadDataGUI {open
deadgrp->activate();
} else {
deadgrp->deactivate();
mwtb->cs->noDead();
cs->noDead();
}
mwtb->redraw(VBO_Colour);}
tbmw->redraw(reason);}
tooltip {Determine if data is valid or not} xywh {20 11 110 40}
}
Fl_Group deadgrp {open selected
Fl_Group deadgrp {open
xywh {13 12 260 357} deactivate
} {
Fl_Value_Input minValidVal {
......@@ -46,14 +49,14 @@ mwtb->redraw(VBO_Colour);}
if( minValid->value() )
min = minValidVal->value();
else
min = mwtb->cs->min();
min = cs->min();
if( maxValid->value() )
max = maxValidVal->value();
else
max = mwtb->cs->max();
max = cs->max();
mwtb->cs->calibrate( min, max );}
cs->calibrate( min, max );}
tooltip {recalibrate colour scale using valid max & min values} xywh {161 12 110 40} color 134
}
Fl_Box dead_color {
......@@ -100,7 +103,7 @@ if( maxValid->value() )
if( nan->value() )
dr += DEAD_NaN;
mwtb->cs->deadRange(minValidVal->value(),
cs->deadRange(minValidVal->value(),
maxValidVal->value(),
nan->value(),
static_cast<DeadRange>(dr) );
......@@ -110,9 +113,9 @@ col[0] = dead_color->r();
col[1] = dead_color->g();
col[2] = dead_color->b();
mwtb->cs->deadColour(col,deadopac->value());
cs->deadColour(col,deadopac->value());
mwtb->redraw(VBO_Colour);}
tbmw->redraw(reason);}
tooltip {apply colour and range changes} xywh {13 333 125 36} color 238
}
Fl_Light_Button maxValid {
......@@ -134,8 +137,14 @@ else
tooltip {close window} xywh {147 334 125 35} color 215
}
}
code {mwtb = w;} {}
code {tbmw = tb;
cs = c;
reason = cond;} {}
}
decl {TBmeshWin *tbmw;} {private local
}
decl {Colourscale *cs;} {private local
}
decl {TBmeshWin *mwtb;} {private local
decl {unsigned int reason;} {private local
}
}
......@@ -130,7 +130,7 @@ TBmeshWin ::TBmeshWin(int x, int y, int w, int h, const char *l )
dataopac = new DataOpacity( this );
cplane = new ClipPlane( this );
isosurfwin = new IsosurfControl(this);
deadData = new DeadDataGUI(this);
deadData = new DeadDataGUI(this,cs,VBO_Colour);
memset( hilight, 0, sizeof(int)*maxobject );
bgd( 1. );
......@@ -1448,9 +1448,9 @@ TBmeshWin::readAuxGrid( void *vp, const char* agfile )
try {
if( dataBuffer ) {
newAuxGrid = new AuxGrid( agfile, auxGrid, dataBuffer->t0(), dataBuffer->dt() );
newAuxGrid = new AuxGrid( agfile, this, auxGrid, dataBuffer->t0(), dataBuffer->dt() );
}else
newAuxGrid = new AuxGrid( agfile, auxGrid );
newAuxGrid = new AuxGrid( agfile, this, auxGrid );
} catch (...) {
return 1;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment