00001 // 00002 //########################################################################### 00003 // ucdriverex.h 00004 //########################################################################### 00005 // 00006 // HEADER FILE FOR CLASS UCdriverEx 00007 // 00008 //########################################################################### 00009 // 00010 // Initial Version : Byron Ellis 00011 // Additions and Modifications : Chris Anderson 00012 // 00013 // (C) UCLA 1999-2009 00014 //########################################################################### 00015 // 00016 00017 #ifndef _UCDRIVEREX_ 00018 #define _UCDRIVEREX_ 00019 00020 #include "ucdriver.h" 00021 00022 /** 00023 This class is an extension of the UCdriver class and provides additional 00024 three dimensional plotting capablities. 00025 <p> 00026 The input coordinates to the graphics routines are assumed to be 00027 in the "normalized" drawing range [0,1]x[0,1] in two dimensions 00028 and [0,1]x[0,1]x[0,1] in three dimensions. 00029 <p> 00030 00031 <i>Source</i>: 00032 <A HREF="../ucdriverex.h">ucdriverex.h</A><p> 00033 00034 @author Byron Ellis with modifications by Chris Anderson (C) UCLA 2000-09 00035 @see UCdriver 00036 */ 00037 class UCdriverEx : public UCdriver 00038 { 00039 public: 00040 00041 00042 /** Draw a line between two points with a given pattern and color in two dimensions 00043 00044 @param x1 the x location of an end point 00045 @param y1 the y location of an end point 00046 @param x2 the x location of the other end point 00047 @param y2 the y location of the other end point 00048 @param dash_pattern a predefined dash pattern 00049 @param user_pattern the user defined pattern used when dash pattern is set to USER_DASH 00050 @param width the width of the line 00051 @param color the predefined color or USER_RGB 00052 @param RGB an array of 3 doubles [0,255] that define an RGB color 00053 */ 00054 virtual void lineEx(double x1,double y1,double x2,double y2, 00055 int dash_pattern,unsigned user_pattern,double width, int color,double *RGB)=0; 00056 /** Draw a line between two points with a given pattern and color in three dimensions 00057 00058 @param x1 the x location of an end point 00059 @param y1 the y location of an end point 00060 @param z1 the z location of an end point 00061 @param x2 the x location of the other end point 00062 @param y2 the y location of the other end point 00063 @parma z2 the z location of the other end point 00064 @param dash_pattern a predefined dash pattern 00065 @param user_pattern the user defined pattern used when dash pattern is set to USER_DASH 00066 @param width the width of the line 00067 @param color the predefined color or USER_RGB 00068 @param RGB an array of 3 doubles [0,255] that define an RGB color 00069 */ 00070 virtual void lineEx( 00071 double x1,double y1,double z1, 00072 double x2,double y2,double z2, 00073 int dash_pattern,unsigned int user_pattern, 00074 double width, 00075 int color,double *RGB)=0; 00076 /** Draw a line between a set of points in two dimensions 00077 00078 @param X an array of x locations 00079 @param Y an array of y locations 00080 @param npoints the number of elements in the X and Y arrays 00081 @param dash_pattern a predefined dash pattern 00082 @param user_pattern the user defined pattern used when dash pattern is set to USER_DASH 00083 @param width the width of the line 00084 @param color the predefined color or USER_RGB 00085 @param RGB an array of 3 doubles [0,255] that define an RGB color 00086 */ 00087 virtual void linesEx( 00088 double *X,double *Y,long npoints, 00089 int dash_pattern,unsigned user_pattern,double width, 00090 int color,double *RGB)=0; 00091 /** Draw a line between a set of points in three dimensions 00092 00093 @param X an array of x locations 00094 @param Y an array of y locations 00095 @param Z an array of z locations 00096 @param npoints the number of elements in the X,Y and Z arrays 00097 @param dash_pattern a predefined dash pattern 00098 @param user_pattern the user defined pattern used when dash pattern is set to USER_DASH 00099 @param width the width of the line 00100 @param color the predefined color or USER_RGB 00101 @param RGB an array of 3 doubles [0,255] that define an RGB color 00102 */ 00103 virtual void linesEx( 00104 double* X,double* Y,double* Z,long npoints, 00105 int dash_pattern,unsigned int user_pattern, 00106 double width,int color,double* RGB)=0; 00107 00108 /** Places text 00109 00110 @param x the x coordinate of the text 00111 @param y the y coordinate of the text 00112 @param z the z coordinate of the text 00113 @param nx the nx normal to the text plane 00114 @param ny the ny normal to the text plane 00115 @param nz the nz normal to the text plane 00116 @param s the string to output 00117 @param font the font to use when printing the string (platform specific) 00118 @param size the size in points 00119 @param rotation the number of degrees to rotate the text 00120 @param horiz_just The horizontal alignment of the string about the 00121 reference point. 00122 @param vert_just The vertical alignment of the string about the 00123 reference point. 00124 @param color the predefined color or USER_RGB 00125 @param RGB an array of 3 doubles [0,255] that define an RGB color 00126 */ 00127 virtual void textEx( 00128 double x,double y, double z, double nx, double ny, double nz, 00129 const char* s,const char* font, double size,double rotation, double horiz_just, 00130 double vert_just, 00131 int color,double *RGB)=0; 00132 00133 /** Draw a point at a set of coordinates. 00134 00135 @param x the x coordinate of the point 00136 @param y the y coordinate of the point 00137 @param chr the 'point' to draw 00138 @param font the font used to draw the point 00139 @param color the predefined color or USER_RGB 00140 @param RGB an array of 3 doubles [0,255] that define an RGB color 00141 */ 00142 virtual void pointEx(double x,double y,char chr,const char* font,double size, 00143 int color,double* RGB)=0; 00144 00145 /** Draw a point at a set of coordinates. Since this is an explicitly 3D point the 00146 point character is interpreted to mean some three dimensional symbol 00147 that is specific to the driver being used. 00148 00149 @param x the x coordinate of the point 00150 @param y the y coordinate of the point 00151 @param z the z coordinate of the point 00152 @param chr the 'point' to draw 00153 @param font the font used to draw the point 00154 @param color the predefined color or USER_RGB 00155 @param RGB an array of 3 doubles [0,255] that define an RGB color 00156 */ 00157 virtual void pointEx(double x,double y,double z,char chr,const char* font,double size, 00158 int color,double* RGB)=0; 00159 00160 /** Sets the alpha value of any command executed in the current driver instance. This is 00161 to avoid collision with the original UCdriver calls while still allowing for transparency 00162 in your graphics 00163 00164 @param alpha the new alpha value (between 0.0 and 1.0) 00165 @return the old alpha value 00166 */ 00167 virtual double alphaEx(double alpha)=0; 00168 }; 00169 00170 #endif 00171 00172