Commit 17f6d9dc authored by Gio De Francesco's avatar Gio De Francesco
Browse files

Merging build-fixes branch to trunk. Fixes problems and simplifies build...

Merging build-fixes branch to trunk. Fixes problems and simplifies build system. Reviewed by: Dr. Vigmond
parent f95d789c
This diff is collapsed.
// generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef ClipPlane_h
#define ClipPlane_h
#include <FL/Fl.H>
#include "TBmeshWin.h"
#include <math.h>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Value_Input.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Value_Slider.H>
#include <FL/Fl_Choice.H>
class ClipPlane {
public:
ClipPlane( TBmeshWin *tb );
Fl_Double_Window *window;
Fl_Group *Clip0;
Fl_Value_Input *xdir0;
private:
void cb_xdir0_i(Fl_Value_Input*, void*);
static void cb_xdir0(Fl_Value_Input*, void*);
public:
Fl_Value_Input *ydir0;
private:
void cb_ydir0_i(Fl_Value_Input*, void*);
static void cb_ydir0(Fl_Value_Input*, void*);
public:
Fl_Value_Input *zdir0;
private:
void cb_zdir0_i(Fl_Value_Input*, void*);
static void cb_zdir0(Fl_Value_Input*, void*);
public:
Fl_Button *unit0;
private:
void cb_unit0_i(Fl_Button*, void*);
static void cb_unit0(Fl_Button*, void*);
void cb_Flip_i(Fl_Button*, void*);
static void cb_Flip(Fl_Button*, void*);
public:
Fl_Value_Slider *intercept0;
private:
void cb_intercept0_i(Fl_Value_Slider*, void*);
static void cb_intercept0(Fl_Value_Slider*, void*);
public:
Fl_Choice *dispas0;
static Fl_Menu_Item menu_dispas0[];
private:
void cb_Off_i(Fl_Menu_*, void*);
static void cb_Off(Fl_Menu_*, void*);
void cb_On_i(Fl_Menu_*, void*);
static void cb_On(Fl_Menu_*, void*);
void cb_Whole_i(Fl_Menu_*, void*);
static void cb_Whole(Fl_Menu_*, void*);
void cb_Intersection_i(Fl_Menu_*, void*);
static void cb_Intersection(Fl_Menu_*, void*);
void cb_Datified_i(Fl_Menu_*, void*);
static void cb_Datified(Fl_Menu_*, void*);
public:
Fl_Group *Clip1;
Fl_Value_Input *xdir1;
private:
void cb_xdir1_i(Fl_Value_Input*, void*);
static void cb_xdir1(Fl_Value_Input*, void*);
public:
Fl_Value_Input *ydir1;
private:
void cb_ydir1_i(Fl_Value_Input*, void*);
static void cb_ydir1(Fl_Value_Input*, void*);
public:
Fl_Value_Input *zdir1;
private:
void cb_zdir1_i(Fl_Value_Input*, void*);
static void cb_zdir1(Fl_Value_Input*, void*);
public:
Fl_Button *unit1;
private:
void cb_unit1_i(Fl_Button*, void*);
static void cb_unit1(Fl_Button*, void*);
void cb_Flip1_i(Fl_Button*, void*);
static void cb_Flip1(Fl_Button*, void*);
public:
Fl_Value_Slider *intercept1;
private:
void cb_intercept1_i(Fl_Value_Slider*, void*);
static void cb_intercept1(Fl_Value_Slider*, void*);
public:
Fl_Choice *dispas1;
static Fl_Menu_Item menu_dispas1[];
private:
void cb_Off1_i(Fl_Menu_*, void*);
static void cb_Off1(Fl_Menu_*, void*);
void cb_On1_i(Fl_Menu_*, void*);
static void cb_On1(Fl_Menu_*, void*);
void cb_Whole1_i(Fl_Menu_*, void*);
static void cb_Whole1(Fl_Menu_*, void*);
void cb_Intersection1_i(Fl_Menu_*, void*);
static void cb_Intersection1(Fl_Menu_*, void*);
void cb_Datified1_i(Fl_Menu_*, void*);
static void cb_Datified1(Fl_Menu_*, void*);
public:
Fl_Group *Clip2;
Fl_Value_Input *xdir2;
private:
void cb_xdir2_i(Fl_Value_Input*, void*);
static void cb_xdir2(Fl_Value_Input*, void*);
public:
Fl_Value_Input *ydir2;
private:
void cb_ydir2_i(Fl_Value_Input*, void*);
static void cb_ydir2(Fl_Value_Input*, void*);
public:
Fl_Value_Input *zdir2;
private:
void cb_zdir2_i(Fl_Value_Input*, void*);
static void cb_zdir2(Fl_Value_Input*, void*);
public:
Fl_Button *unit2;
private:
void cb_unit2_i(Fl_Button*, void*);
static void cb_unit2(Fl_Button*, void*);
void cb_Flip2_i(Fl_Button*, void*);
static void cb_Flip2(Fl_Button*, void*);
public:
Fl_Value_Slider *intercept2;
private:
void cb_intercept2_i(Fl_Value_Slider*, void*);
static void cb_intercept2(Fl_Value_Slider*, void*);
public:
Fl_Choice *dispas2;
static Fl_Menu_Item menu_dispas2[];
private:
void cb_Off2_i(Fl_Menu_*, void*);
static void cb_Off2(Fl_Menu_*, void*);
void cb_On2_i(Fl_Menu_*, void*);
static void cb_On2(Fl_Menu_*, void*);
void cb_Whole2_i(Fl_Menu_*, void*);
static void cb_Whole2(Fl_Menu_*, void*);
void cb_Intersection2_i(Fl_Menu_*, void*);
static void cb_Intersection2(Fl_Menu_*, void*);
void cb_Datified2_i(Fl_Menu_*, void*);
static void cb_Datified2(Fl_Menu_*, void*);
public:
Fl_Group *Clip3;
Fl_Value_Input *xdir3;
private:
void cb_xdir3_i(Fl_Value_Input*, void*);
static void cb_xdir3(Fl_Value_Input*, void*);
public:
Fl_Value_Input *ydir3;
private:
void cb_ydir3_i(Fl_Value_Input*, void*);
static void cb_ydir3(Fl_Value_Input*, void*);
public:
Fl_Value_Input *zdir3;
private:
void cb_zdir3_i(Fl_Value_Input*, void*);
static void cb_zdir3(Fl_Value_Input*, void*);
public:
Fl_Button *unit3;
private:
void cb_unit3_i(Fl_Button*, void*);
static void cb_unit3(Fl_Button*, void*);
void cb_Flip3_i(Fl_Button*, void*);
static void cb_Flip3(Fl_Button*, void*);
public:
Fl_Value_Slider *intercept3;
private:
void cb_intercept3_i(Fl_Value_Slider*, void*);
static void cb_intercept3(Fl_Value_Slider*, void*);
public:
Fl_Choice *dispas3;
static Fl_Menu_Item menu_dispas3[];
private:
void cb_Off3_i(Fl_Menu_*, void*);
static void cb_Off3(Fl_Menu_*, void*);
void cb_On3_i(Fl_Menu_*, void*);
static void cb_On3(Fl_Menu_*, void*);
void cb_Whole3_i(Fl_Menu_*, void*);
static void cb_Whole3(Fl_Menu_*, void*);
void cb_Intersection3_i(Fl_Menu_*, void*);
static void cb_Intersection3(Fl_Menu_*, void*);
void cb_Datified3_i(Fl_Menu_*, void*);
static void cb_Datified3(Fl_Menu_*, void*);
public:
Fl_Group *Clip4;
Fl_Value_Input *xdir4;
private:
void cb_xdir4_i(Fl_Value_Input*, void*);
static void cb_xdir4(Fl_Value_Input*, void*);
public:
Fl_Value_Input *ydir4;
private:
void cb_ydir4_i(Fl_Value_Input*, void*);
static void cb_ydir4(Fl_Value_Input*, void*);
public:
Fl_Value_Input *zdir4;
private:
void cb_zdir4_i(Fl_Value_Input*, void*);
static void cb_zdir4(Fl_Value_Input*, void*);
public:
Fl_Button *unit4;
private:
void cb_unit4_i(Fl_Button*, void*);
static void cb_unit4(Fl_Button*, void*);
void cb_Flip4_i(Fl_Button*, void*);
static void cb_Flip4(Fl_Button*, void*);
public:
Fl_Value_Slider *intercept4;
private:
void cb_intercept4_i(Fl_Value_Slider*, void*);
static void cb_intercept4(Fl_Value_Slider*, void*);
public:
Fl_Choice *dispas4;
static Fl_Menu_Item menu_dispas4[];
private:
void cb_Off4_i(Fl_Menu_*, void*);
static void cb_Off4(Fl_Menu_*, void*);
void cb_On4_i(Fl_Menu_*, void*);
static void cb_On4(Fl_Menu_*, void*);
void cb_Whole4_i(Fl_Menu_*, void*);
static void cb_Whole4(Fl_Menu_*, void*);
void cb_Intersection4_i(Fl_Menu_*, void*);
static void cb_Intersection4(Fl_Menu_*, void*);
void cb_Datified4_i(Fl_Menu_*, void*);
static void cb_Datified4(Fl_Menu_*, void*);
public:
Fl_Group *Clip5;
Fl_Value_Input *xdir5;
private:
void cb_xdir5_i(Fl_Value_Input*, void*);
static void cb_xdir5(Fl_Value_Input*, void*);
public:
Fl_Value_Input *ydir5;
private:
void cb_ydir5_i(Fl_Value_Input*, void*);
static void cb_ydir5(Fl_Value_Input*, void*);
public:
Fl_Value_Input *zdir5;
private:
void cb_zdir5_i(Fl_Value_Input*, void*);
static void cb_zdir5(Fl_Value_Input*, void*);
public:
Fl_Button *unit5;
private:
void cb_unit5_i(Fl_Button*, void*);
static void cb_unit5(Fl_Button*, void*);
void cb_Flip5_i(Fl_Button*, void*);
static void cb_Flip5(Fl_Button*, void*);
public:
Fl_Value_Slider *intercept5;
private:
void cb_intercept5_i(Fl_Value_Slider*, void*);
static void cb_intercept5(Fl_Value_Slider*, void*);
public:
Fl_Choice *dispas5;
static Fl_Menu_Item menu_dispas5[];
private:
void cb_Off5_i(Fl_Menu_*, void*);
static void cb_Off5(Fl_Menu_*, void*);
void cb_On5_i(Fl_Menu_*, void*);
static void cb_On5(Fl_Menu_*, void*);
void cb_Whole5_i(Fl_Menu_*, void*);
static void cb_Whole5(Fl_Menu_*, void*);
void cb_Intersection5_i(Fl_Menu_*, void*);
static void cb_Intersection5(Fl_Menu_*, void*);
void cb_Datified5_i(Fl_Menu_*, void*);
static void cb_Datified5(Fl_Menu_*, void*);
GLdouble x[6][4];
bool intercept[6];
float dim;
TBmeshWin* tbmw;
public:
bool on(int cp);
GLdouble* plane(int cp);
private:
void normcb( int cp);
public:
void set_dim( float d);
void unitize(Fl_Value_Input* x, Fl_Value_Input* y,Fl_Value_Input* z);
bool visible(int cp);
private:
void flip(int cp);
void drawIntercept( int cp, bool b );
public:
bool drawIntercept( int cp );
bool datafied( int cp );
void save(ostream& ofs);
void read(istream& ifs);
};
#endif
// generated by Fast Light User Interface Designer (fluid) version 1.0300
#include "DataOpacity.h"
#include "TBmeshWin.h"
dataOpac::dataOpac() {
_on = false;
omin = 0;
omax = 1.;
dmin = 0;
dmax = 0;
ofactor = 0;
}
float dataOpac::alpha( float data ) {
if( data <= dmin )
return omin;
if( data >= dmax )
return omax;
return omin+(data-dmin*ofactor);
}
bool dataOpac::on() {
return _on;
}
void DataOpacity::cb_minopacval_i(Fl_Value_Slider* o, void*) {
Object_t a=get_ot(objtype->value());
dop[a].omin = o->value();
dop[a].ofactor = (dop[a].omax-dop[a].omin)/(dop[a].dmax-dop[a].dmin);
mwtb->redraw();
}
void DataOpacity::cb_minopacval(Fl_Value_Slider* o, void* v) {
((DataOpacity*)(o->parent()->user_data()))->cb_minopacval_i(o,v);
}
void DataOpacity::cb_maxopacval_i(Fl_Value_Slider* o, void*) {
Object_t a=get_ot(objtype->value());
dop[a].omax = o->value();
dop[a].ofactor = (dop[a].omax-dop[a].omin)/(dop[a].dmax-dop[a].dmin);
mwtb->redraw();
}
void DataOpacity::cb_maxopacval(Fl_Value_Slider* o, void* v) {
((DataOpacity*)(o->parent()->user_data()))->cb_maxopacval_i(o,v);
}
void DataOpacity::cb_onbut_i(Fl_Light_Button* o, void*) {
Object_t a=get_ot(objtype->value());
dop[a]._on = o->value();
dop[a].ofactor = (dop[a].omax-dop[a].omin)/(dop[a].dmax-dop[a].dmin);
mwtb->redraw();
}
void DataOpacity::cb_onbut(Fl_Light_Button* o, void* v) {
((DataOpacity*)(o->parent()->user_data()))->cb_onbut_i(o,v);
}
void DataOpacity::cb_mindatval_i(Fl_Value_Input* o, void*) {
Object_t a=get_ot(objtype->value());
dop[a].dmin = o->value();
dop[a].ofactor = (dop[a].omax-dop[a].omin)/(dop[a].dmax-dop[a].dmin);
mwtb->redraw();
}
void DataOpacity::cb_mindatval(Fl_Value_Input* o, void* v) {
((DataOpacity*)(o->parent()->user_data()))->cb_mindatval_i(o,v);
}
void DataOpacity::cb_maxdatval_i(Fl_Value_Input* o, void*) {
Object_t a=get_ot(objtype->value());
dop[a].dmax = o->value();
dop[a].ofactor = (dop[a].omax-dop[a].omin)/(dop[a].dmax-dop[a].dmin);
mwtb->redraw();
}
void DataOpacity::cb_maxdatval(Fl_Value_Input* o, void* v) {
((DataOpacity*)(o->parent()->user_data()))->cb_maxdatval_i(o,v);
}
void DataOpacity::cb_objtype_i(Fl_Choice*, void*) {
Object_t a=get_ot(objtype->value());
minopacval->value(dop[a].omin);
maxopacval->value(dop[a].omax);
mindatval->value(dop[a].dmin);
maxdatval->value(dop[a].dmax);onbut->value(dop[a]._on);
}
void DataOpacity::cb_objtype(Fl_Choice* o, void* v) {
((DataOpacity*)(o->parent()->user_data()))->cb_objtype_i(o,v);
}
Fl_Menu_Item DataOpacity::menu_objtype[] = {
{"Vertex", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"Surface", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"Triangle", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"Cable", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
DataOpacity::DataOpacity( TBmeshWin *tbmw ) {
{ window = new Fl_Double_Window(380, 150, "Data Opacity Controls");
window->user_data((void*)(this));
{ minopacval = new Fl_Value_Slider(125, 55, 120, 30, "Minimum Opacity");
minopacval->type(3);
minopacval->value(0.5);
minopacval->callback((Fl_Callback*)cb_minopacval);
minopacval->align(FL_ALIGN_LEFT);
} // Fl_Value_Slider* minopacval
{ maxopacval = new Fl_Value_Slider(125, 100, 120, 30, "Maximum Opacity");
maxopacval->type(3);
maxopacval->value(1);
maxopacval->callback((Fl_Callback*)cb_maxopacval);
maxopacval->align(FL_ALIGN_LEFT);
} // Fl_Value_Slider* maxopacval
{ onbut = new Fl_Light_Button(225, 10, 120, 30, "Data Opacity ");
onbut->labelsize(16);
onbut->callback((Fl_Callback*)cb_onbut);
} // Fl_Light_Button* onbut
{ mindatval = new Fl_Value_Input(295, 55, 80, 30, "below:");
mindatval->tooltip("data below this value gets minimum opacity");
mindatval->callback((Fl_Callback*)cb_mindatval);
} // Fl_Value_Input* mindatval
{ maxdatval = new Fl_Value_Input(295, 100, 80, 30, "above:");
maxdatval->tooltip("data above this value gets maximum opacity");
maxdatval->callback((Fl_Callback*)cb_maxdatval);
} // Fl_Value_Input* maxdatval
{ objtype = new Fl_Choice(75, 10, 120, 30, "Object:");
objtype->tooltip("apply to which object type");
objtype->down_box(FL_BORDER_BOX);
objtype->callback((Fl_Callback*)cb_objtype);
objtype->menu(menu_objtype);
} // Fl_Choice* objtype
window->end();
} // Fl_Double_Window* window
mwtb = tbmw;
}
Object_t DataOpacity::get_ot( int a ) {
if( a==0 )
return Vertex;
else if( a==1 )
return Surface;
else if( a==2 )
return SurfEle;
else if( a==3 )
return Cable;
}
void DataOpacity::save(ofstream& ofs) {
for( int i=0; i<NUM_OBJ; i++ ) {
ofs << dop[i];
}
}
void DataOpacity::read(ifstream &ifs) {
for( int i=0; i<NUM_OBJ; i++ ) {
ifs >> dop[i];
dop[i].ofactor = (dop[i].omax-dop[i].omin)/(dop[i].dmax-dop[i].dmin);
}
minopacval->value(dop[Vertex].omin);
maxopacval->value(dop[Vertex].omax);
mindatval->value(dop[Vertex].dmin);
maxdatval->value(dop[Vertex].dmax);
onbut->value(dop[Vertex]._on);
}
ostream& operator<<(ostream&ofs,dataOpac&dop) {
ofs<<dop.dmin<<" "<<dop.dmax<<" "<<dop.omin<<" "<<dop.omax<<" "<<dop._on<<endl;
return ofs;
}
istream& operator>>(istream&ifs,dataOpac&dop) {
ifs>>dop.dmin>>dop.dmax>>dop.omin>>dop.omax>>dop._on;
return ifs;
}
// generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef DataOpacity_h
#define DataOpacity_h
#include <FL/Fl.H>
#include<iostream>
#include "objects.h"
using namespace std;
#define NUM_OBJ 7
class TBmeshWin;
class dataOpac {
public:
dataOpac();
float ofactor;
float dmin;
float dmax;
float omin;
float omax;
bool _on;
float alpha( float data );
bool on();
};
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Value_Slider.H>
#include <FL/Fl_Light_Button.H>
#include <FL/Fl_Value_Input.H>
#include <FL/Fl_Choice.H>
class DataOpacity {
public:
DataOpacity( TBmeshWin *tbmw );
Fl_Double_Window *window;
Fl_Value_Slider *minopacval;
private:
void cb_minopacval_i(Fl_Value_Slider*, void*);
static void cb_minopacval(Fl_Value_Slider*, void*);
public:
Fl_Value_Slider *maxopacval;
private:
void cb_maxopacval_i(Fl_Value_Slider*, void*);
static void cb_maxopacval(Fl_Value_Slider*, void*);
public:
Fl_Light_Button *onbut;
private:
void cb_onbut_i(Fl_Light_Button*, void*);
static void cb_onbut(Fl_Light_Button*, void*);
public:
Fl_Value_Input *mindatval;
private:
void cb_mindatval_i(Fl_Value_Input*, void*);
static void cb_mindatval(Fl_Value_Input*, void*);
public:
Fl_Value_Input *maxdatval;
private:
void cb_maxdatval_i(Fl_Value_Input*, void*);
static void cb_maxdatval(Fl_Value_Input*, void*);
public:
Fl_Choice *objtype;
private:
void cb_objtype_i(Fl_Choice*, void*);
static void cb_objtype(Fl_Choice*, void*);
static Fl_Menu_Item menu_objtype[];
TBmeshWin *mwtb;
public:
dataOpac dop[NUM_OBJ];
Object_t get_ot( int a );
void save(ofstream& ofs);
void read(ifstream &ifs);
};
ostream& operator<<(ostream&ofs,dataOpac&dop);
istream& operator>>(istream&ifs,dataOpac&dop);
#endif
// generated by Fast Light User Interface Designer (fluid) version 1.0300
#include "HiLiteWinInfo.h"
#include "TBmeshWin.h"
void HiLiteInfoWin::cb_window_i(Fl_Double_Window*, void*) {
this->window->hide();
}
void HiLiteInfoWin::cb_window(Fl_Double_Window* o, void* v) {
((HiLiteInfoWin*)(o->user_data()))->cb_window_i(o,v);
}
void HiLiteInfoWin::cb_hilighttext_i(Fl_Browser* o, void*) {
mw->select_hi(o->value());
}
void HiLiteInfoWin::cb_hilighttext(Fl_Browser* o, void* v) {
((HiLiteInfoWin*)(o->parent()->user_data()))->cb_hilighttext_i(o,v);
}
void HiLiteInfoWin::cb_Close_i(Fl_Button*, void*) {
window->hide();
}
void HiLiteInfoWin::cb_Close(Fl_Button* o, void* v) {
((HiLiteInfoWin*)(o->parent()->user_data()))->cb_Close_i(o,v);
}
HiLiteInfoWin::HiLiteInfoWin(TBmeshWin *a) {
mw = a;
{ window = new Fl_Double_Window(265, 665, "Highlighted information");
window->callback((Fl_Callback*)cb_window, (void*)(this));
{ hilighttext = new Fl_Browser(0, 0, 265, 645);
hilighttext->type(1);
hilighttext->callback((Fl_Callback*)cb_hilighttext);
Fl_Group::current()->resizable(hilighttext);
} // Fl_Browser* hilighttext
{ Fl_Button* o = new Fl_Button(0, 645, 265, 20, "Close");
o->callback((Fl_Callback*)cb_Close);
} // Fl_Button* o
window->end();
} // Fl_Double_Window* window
}
void HiLiteInfoWin::clear() {
hilighttext->clear();
}
void HiLiteInfoWin::add(const char *s, void *d) {
hilighttext->add( s, d );
}
const char * HiLiteInfoWin::text(int n) {
return hilighttext->text(n);
}
void HiLiteInfoWin::topline( int a ) {
hilighttext->topline( a );
}
int HiLiteInfoWin::topline( void ) {
return hilighttext->topline();
}