Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

vecgph.cpp

Go to the documentation of this file.
00001 #include "vecbse.h"
00002 //
00003 //******************************************************************************
00004 //                    VECGPH.CPP
00005 //******************************************************************************
00006 //
00007 //        BINDINGS TO THE UC GRAHPICS CLASSES
00008 //
00009 //********************************************************************************
00010 //
00011 //            Chris Anderson  (C) UCLA
00012 //
00013 //            Tue Sep 26 14:40:00 1995
00014 //
00015 //********************************************************************************
00016 //
00017 
00018 //
00019 // Graphics Bindings
00020 //
00021 void  CAMvectorBase::plot() const
00022 {
00023 //
00024 //  Need Conversion Check
00025 //
00026         long M;
00027 
00028         CAMvectorBase A;
00029         double* AdataPtr;
00030 
00031         if(Structure.isSubset() == 1)
00032         {
00033         A.initializeMinDuplicate(*this);
00034         AdataPtr    = (double*)A.getDataPointer();
00035         M = A.getIndexCount();
00036         }
00037         else
00038         {
00039         AdataPtr  = (double*)getDataPointer();
00040         M = getIndexCount();
00041         }
00042 
00043         CAMgraphics::plot(AdataPtr,M);
00044 }
00045 
00046 void  CAMvectorBase::plot(int p_arg) const
00047 {
00048         char point_type_save = CAMgraphics::getPointType();
00049         int  plot_style_save = CAMgraphics::getPlotStyle();
00050     if(p_arg < 32) 
00051         { CAMgraphics::setPlotStyle(p_arg);}
00052     else
00053         { CAMgraphics::setPointType(char(p_arg));
00054           CAMgraphics::setPlotStyle(CAMgraphics::POINTS);
00055         }
00056 
00057         this->plot();
00058 
00059         CAMgraphics::setPointType(point_type_save);
00060         CAMgraphics::setPlotStyle(plot_style_save);
00061 }
00062 void  CAMvectorBase::plot(int p_style, int p_arg) const
00063 {
00064         char point_type_save = CAMgraphics::getPointType();
00065         int  plot_style_save = CAMgraphics::getPlotStyle();
00066         CAMgraphics::setPointType(char(p_arg));
00067         CAMgraphics::setPlotStyle(p_style);
00068 
00069         this->plot();
00070 
00071         CAMgraphics::setPointType(point_type_save);
00072         CAMgraphics::setPlotStyle(plot_style_save);
00073 }
00074 
00075 
00076 void  CAMvectorBase::plot(const CAMvectorBase& Ordinates) const
00077 {
00078 //
00079 //  Need Conversion Check
00080 //
00081         long M;
00082 
00083         CAMvectorBase A;
00084         double* AdataPtr;
00085 
00086         CAMvectorBase O;
00087         double* OdataPtr;
00088         long    Ocount;
00089 
00090         if(Structure.isSubset() == 1)
00091         {
00092         A.initializeMinDuplicate(*this);
00093         AdataPtr    = (double*)A.getDataPointer();
00094         M = A.getIndexCount();
00095         }
00096         else
00097         {
00098         AdataPtr  = (double*)getDataPointer();
00099         M = getIndexCount();
00100         }
00101 
00102         if(Ordinates.Structure.isSubset() == 1)
00103         {
00104         O.initializeMinDuplicate(Ordinates);
00105         OdataPtr    = (double*)O.getDataPointer();
00106         Ocount      = O.getIndexCount();
00107         }
00108         else
00109         {
00110         OdataPtr    = (double*)Ordinates.getDataPointer();
00111         Ocount      = Ordinates.getIndexCount();
00112         }
00113 
00114         if(M != Ocount)
00115         {CAMvectorBase::ordinateError(Ordinates.Structure);}
00116 
00117         CAMgraphics::plot(OdataPtr,AdataPtr,M);
00118 }
00119 void  CAMvectorBase::plot(const CAMvectorBase& Ordinates, int p_arg) const
00120 {
00121         char point_type_save = CAMgraphics::getPointType();
00122         int  plot_style_save = CAMgraphics::getPlotStyle();
00123     if(p_arg < 32) 
00124         { CAMgraphics::setPlotStyle(p_arg);}
00125     else
00126         { CAMgraphics::setPointType(char(p_arg));
00127           CAMgraphics::setPlotStyle(CAMgraphics::POINTS);
00128         }
00129 
00130         this->plot(Ordinates);
00131 
00132         CAMgraphics::setPointType(point_type_save);
00133         CAMgraphics::setPlotStyle(plot_style_save);
00134 }
00135 
00136 void  CAMvectorBase::plot(const CAMvectorBase& Ordinates, int p_arg, int p_style) const
00137 {
00138         char point_type_save = CAMgraphics::getPointType();
00139         int  plot_style_save = CAMgraphics::getPlotStyle();
00140         CAMgraphics::setPointType(char(p_arg));
00141         CAMgraphics::setPlotStyle(p_style);
00142 
00143         this->plot(Ordinates);
00144 
00145         CAMgraphics::setPointType(point_type_save);
00146         CAMgraphics::setPlotStyle(plot_style_save);
00147 }
00148 
00149 void CAMvectorBase::ordinateError(const CAMstructureBase & A) 
00150 {
00151         long i;
00152     cerr << endl;
00153         cerr << "    Ordinates in Plot Command Incorrectly Specified " << endl << endl;
00154         cerr << " Error in Number of Ordinates or Ordinate Array Dimension  " << endl;
00155         cerr << " Ordinates Size :      ";
00156         cerr << A[1].getIndexCount();
00157         for(i = 2; i <= A.dataDimension; i++)
00158         cerr <<  " x " << A[i].getIndexCount() ;
00159         cerr << endl << endl;
00160         CAMmvaExit();
00161 }
00162 void CAMvectorBase::plotDimensionError(const CAMstructureBase& A)
00163 {
00164         long i;
00165     cerr << endl;
00166         cerr << "Error :  Object Dimensions not Compatable with Plot Operation " << endl << endl;
00167         cerr << "    Operand Dimensions :   ";
00168         cerr << A[1].getIndexCount();
00169         for(i = 2; i <= A.dataDimension; i++)
00170         cerr <<  " x " << A[i].getIndexCount() ;
00171         cerr << endl << endl;
00172         CAMmvaExit();
00173 }
00174 //
00175 //********************************************************************************
00176 //                     CPP File End 
00177 //********************************************************************************
00178 //

Generated on Wed Sep 5 12:54:27 2007 for DSACSS Operational Code by  doxygen 1.3.9.1