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
00033
00034
00035
00036
00037
00038 #ifndef Renderer_h
00039 #define Renderer_h
00040
00041 #include <OPS_Globals.h>
00042
00043 class Vector;
00044 class Matrix;
00045 class ColorMap;
00046
00047 class Renderer
00048 {
00049 public:
00050 Renderer(ColorMap &theMap);
00051 Renderer(const char *title, ColorMap &theMap);
00052 virtual ~Renderer();
00053
00054
00055 void setColorMap(ColorMap &theMap);
00056
00057
00058 virtual int clearImage(void) =0;
00059 virtual int saveImage(const char *imageName);
00060 int saveImage(const char *title, const char *imageName);
00061
00062
00063 virtual int startImage(void) =0;
00064 virtual int doneImage(void) =0;
00065
00066
00067 virtual int drawPoint(const Vector &, float V1, int width = 1) =0;
00068 virtual int drawPoint(const Vector &, const Vector &rgb1, int width = 1) =0;
00069
00070 virtual int drawLine(const Vector &, const Vector &,
00071 float V1, float V2, int width = 1, int style = 1) =0;
00072
00073 virtual int drawLine(const Vector &end1, const Vector &end2,
00074 const Vector &rgb1, const Vector &rgb2,
00075 int width = 1, int style = 1) =0;
00076
00077 virtual int drawPolygon(const Matrix &points, const Vector &values) =0;
00078 virtual int drawPolygon(const Matrix &points, const Matrix &rgbValues) =0;
00079
00080 virtual int drawVector(const Vector &position, const Vector &value, double factor);
00081
00082 virtual int drawText(const Vector &posGlobal, char *string, int length,
00083 char horizontalJustify = 'l', char verticalJustify = 'b') =0;
00084
00085
00086
00087
00088
00089
00090 virtual int setVRP(float x, float y, float z) =0;
00091 virtual int setVPN(float x, float y, float z) =0;
00092 virtual int setVUP(float x, float y, float z) =0;
00093
00094
00095 virtual int setViewWindow(float, float, float, float) =0;
00096
00097
00098 virtual int setPlaneDist(float, float) =0;
00099
00100
00101 virtual int setProjectionMode(const char *mode) =0;
00102 virtual int setFillMode(const char *mode) =0;
00103
00104 virtual int setPRP(float u, float v, float n) =0;
00105
00106
00107
00108 virtual int setPortWindow(float, float, float, float) =0;
00109
00110
00111
00112 protected:
00113 ColorMap *theMap;
00114
00115 private:
00116 static int numRenderers;
00117 static char **theTitles;
00118 static Renderer **theRenderers;
00119 };
00120
00121
00122 #endif
00123