00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _XGEO_H
00010 #define _XGEO_H
00011
00012 #include "mdparallel.h"
00013
00014 #define MAXGEOOBJ 1000
00015 class XGeo : public Organizer
00016 {
00017 public:
00018 double geo_box[3][4];
00019 double geo_line[7*MAXGEOOBJ+5];
00020 double geo_plane[7*MAXGEOOBJ+5];
00021 int geo_xpoint[3*MAXGEOOBJ+3];
00022 int geo_xline[3*MAXGEOOBJ+3];
00023 double geo_vector[8*MAXGEOOBJ+3];
00024
00025 class YWindow *win;
00026 int win_width, win_height;
00027
00028 double pointradius;
00029 char geo_box_color[30], geo_line_color[30], geo_plane_color[30];
00030 char geo_vector_color[30];
00031 char geo_xpoint_color[30], geo_xline_color[30], backgroundcolor[30];
00032 unsigned colors[10];
00033
00034 private:
00035 double L;
00036 Matrix33 _H, _RV;
00037
00038
00039 public:
00040 XGeo():win_width(500),win_height(300),pointradius(0.1),L(1){};
00041 virtual ~XGeo(){};
00042
00043 virtual void initvars();
00044 virtual void initparser();
00045 virtual int exec(char *name);
00046 #ifdef _TCL
00047 virtual int Tcl_AppInit(Tcl_Interp *interp);
00048 #endif
00049
00050 int openwindow(int w,int h,const char *n);
00051 void closewindow();
00052 virtual void openwin();
00053
00054 virtual void plot();
00055 void wintogglepause();
00056 void alloccolors();
00057 void rotate();
00058 void saverot();
00059
00060 private:
00061 void drawBox();
00062 void drawLines();
00063 void drawPlanes();
00064 void drawXpoints();
00065 void drawXlines();
00066 void drawVectors();
00067
00068 bool getlineendpoints(Vector3 &, Vector3 &, Vector3 &, Vector3 &);
00069 bool getxline(Vector3 &, Vector3 &, Vector3 &,
00070 Vector3 &, Vector3 &, Vector3 &);
00071 bool getxpoint(Vector3 &, Vector3 &, Vector3 &,
00072 Vector3 &, Vector3 &);
00073 };
00074
00075 #endif // _XGEO_H
00076