00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _HEIGHTWIN_H_
00033 #define _HEIGHTWIN_H_
00034
00035 #include <fx.h>
00036 #include <fx3d.h>
00037 #include <GL/gl.h>
00038 #include <GL/glu.h>
00039 #include "Vector.h"
00040 #include "GraphFont.h"
00041
00042
00043
00044
00045
00046
00047 class HeightWinDialog : public FXDialogBox
00048 {
00049 FXDECLARE(HeightWinDialog)
00050 protected:
00051 FXGLVisual *GLVisual;
00052 FXGLCanvas *GLCanvas;
00053
00054 private:
00055 HeightWinDialog(){}
00056
00057
00058 struct canvassets
00059 {
00060 float fov;
00061 float vp[2];
00062 CVector eye;
00063 CVector look;
00064 CVector up;
00065 } canvasSettings;
00066
00067 FXCursor *crosshair;
00068
00069 CGraphFont *fnt;
00070
00071 GLUquadricObj* sphereQuadric;
00072
00073
00074 struct
00075 {
00076 bool state;
00077 int x;
00078 int y;
00079 } mouseData[3];
00080
00081 public:
00082 long onGLExpose(FXObject*, FXSelector, void*);
00083 long onGLConfigure(FXObject*, FXSelector, void*);
00084 long onGLSelect(FXObject*, FXSelector, void*);
00085 long onGLMouseMotion(FXObject*, FXSelector, void*);
00086 long onGLMouseDown(FXObject*, FXSelector, void*);
00087 long onGLMouseUp(FXObject*, FXSelector, void*);
00088 long onGLMouseWheel(FXObject*, FXSelector, void*);
00089
00090 enum { ID_CANVAS = FXMainWindow::ID_LAST };
00091
00092
00093 bool drawlabels;
00094 bool perspective;
00095 int box;
00096 bool plate;
00097 unsigned char boxcolour[3];
00098 unsigned char platecolour[3];
00099 float diffusecolour[4];
00100 float specularcolour[4];
00101 float lightpos[4];
00102 float shininess;
00103 bool motiontype;
00104 int drawmode;
00105 bool switchdir;
00106 bool zbackgrid;
00107
00108
00109 struct grid
00110 {
00111 FXColor colour;
00112 float start;
00113 float delta;
00114 bool on;
00115 } xmaj, xmin, ymaj, ymin, zmaj, zmin;
00116
00117 FXString labels[5];
00118 FXString axes[6];
00119 int txtpos[4];
00120
00121
00122 struct datapoint
00123 {
00124 unsigned char colour[3];
00125 float position[3];
00126 float normal[3];
00127 } *hmdata;
00128 unsigned int xdatapts;
00129 unsigned int ydatapts;
00130 unsigned int xdatadisplay;
00131
00132 void onGLRefresh();
00133 unsigned char* getImage(int &width, int &height);
00134
00135 HeightWinDialog(FXApp *app, FXWindow *win, CGraphFont *ft);
00136 virtual ~HeightWinDialog();
00137 };
00138
00139 #endif