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 <Vector.h>
00042 #include <Matrix.h>
00043 #include <ColorMap.h>
00044
00066 class Renderer
00067 {
00068 public:
00073 Renderer(ColorMap &theMap);
00074
00078 virtual ~Renderer();
00079
00080
00082 void setColorMap(ColorMap &theMap);
00083
00085 virtual int clearImage(void) =0;
00086
00088 virtual int startImage(void) =0;
00093 virtual int doneImage(void) =0;
00094
00095
00097 virtual int drawPoint(const Vector &, float V1, int width = 1) =0;
00099 virtual int drawPoint(const Vector &, const Vector &rgb1, int width = 1) =0;
00100
00101
00103 virtual int drawLine(const Vector &, const Vector &,
00104 float V1, float V2, int width = 1, int style = 1) =0;
00105
00107 virtual int drawLine(const Vector &end1, const Vector &end2,
00108 const Vector &rgb1, const Vector &rgb2,
00109 int width = 1, int style = 1) =0;
00110
00112 virtual int drawPolygon(const Matrix &points, const Vector &values) =0;
00114 virtual int drawPolygon(const Matrix &points, const Matrix &rgbValues) =0;
00115
00117 virtual int drawVector(const Vector &position, const Vector &value, double factor);
00118
00120 virtual int drawText(const Vector &posGlobal, char *string, int length,
00121 char horizontalJustify = 'l', char verticalJustify = 'b') =0;
00122
00123
00124
00125
00126
00128 virtual int setVRP(float x, float y, float z) =0;
00129 virtual int setVPN(float x, float y, float z) =0;
00130 virtual int setVUP(float x, float y, float z) =0;
00131
00133 virtual int setViewWindow(float, float, float, float) =0;
00135
00136 virtual int setPlaneDist(float, float) =0;
00138
00139 virtual int setProjectionMode(char *mode) =0;
00140 virtual int setFillMode(char *mode) =0;
00141
00142 virtual int setPRP(float u, float v, float n) =0;
00143
00144
00146 virtual int setPortWindow(float, float, float, float) =0;
00148
00149
00150 protected:
00151 ColorMap *theMap;
00152
00153 private:
00154 };
00155
00156
00157 #endif
00158