ContourPointRep.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _ContourPointRep_H_
00015 #define _ContourPointRep_H_
00016 
00017 #include "LinePointRep.h"
00018 
00019 namespace hippodraw {
00020 
00021 class BinToColor;
00022 
00047   class MDL_HIPPOPLOT_API ContourPointRep : public LinePointRep
00048 {
00049 
00050 private:
00051   
00053   BinToColor * m_bin_to_color;
00054   
00056   std::vector< Color > m_colorvec;
00057 
00061   std::vector < Line::Style > m_stylevec;
00062 
00064   int m_numContours;
00065 
00067   double m_maxValue;
00068   
00070   double m_minValue;
00071 
00073   double m_minPos;
00074 
00076   std::vector < double > m_values;
00077 
00080   bool m_usingUserValues;
00081 
00082 
00083 public:
00084 
00086   ContourPointRep();
00087   
00089   ContourPointRep ( float size );
00090   
00092   ContourPointRep( const ContourPointRep & point_rep );
00093 
00095   ~ContourPointRep();
00096 
00099   virtual RepBase * clone();
00100 
00101   virtual const BinToColor * getValueTransform ( ) const;
00102   virtual void setValueTransform ( BinToColor * );
00103   virtual void drawProjectedValues ( const DataSource * ntuple,
00104                                      TransformBase * transform,
00105                                      ViewBase * view );
00106 
00107   void drawContourTicks ( const TransformBase &, 
00108                           ViewBase &,
00109                           const std::vector < double > & );
00110 
00112   bool getUsingUserValues () const;
00113 
00115   void setUsingUserValues ( bool flag );
00116 
00118   void setNumContours ( int i );
00119 
00121   int getNumContours () const;
00122 
00124   void setContourValues ( std::vector < double > & values,
00125                           ProjectorBase * proj );
00126 
00127 private:
00128 
00129 /*
00130 Copyright (c) 1996-1997 Nicholas Yue
00131 
00132 This software is copyrighted by Nicholas Yue. This code is base on the work of
00133 Paul D. Bourke CONREC.F routine
00134 
00135 The authors hereby grant permission to use, copy, and distribute this
00136 software and its documentation for any purpose, provided that existing
00137 copyright notices are retained in all copies and that this notice is included
00138 verbatim in any distributions. Additionally, the authors grant permission to
00139 modify this software and its documentation for any purpose, provided that
00140 such modifications are not distributed without the explicit consent of the
00141 authors and that existing copyright notices are retained in all copies. Some
00142 of the algorithms implemented by this software are patented, observe all
00143 applicable patent law.
00144 
00145 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
00146 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
00147 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
00148 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00149 
00150 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
00151 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
00152 PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN
00153 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
00154 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
00155 */
00156 
00157 
00167   void createContours (  const DataSource * ntuple,
00168                          const TransformBase * transform );
00169   
00172   double getContour ( int i, const TransformBase * transform );
00173 
00176   double intersect ( int p1, int p2, double * h, double * xh );
00177   
00180   void setMinMax ( const DataSource * );
00181 
00184   void setContourVector ( const TransformBase * transform );
00185 
00188   void init ();  
00189     
00190 
00191 
00192 private:
00193 
00196   virtual void drawValues ( const TransformBase &, 
00197                             ViewBase & vb );
00198 
00202   virtual void drawValuesWithStyle ( const TransformBase &,
00203                                      ViewBase & vb );
00204 
00205   static void rotate ( double & lat, double & lon,
00206                        double alpha, double beta, double gamma, 
00207                        bool negative=true );
00208 
00209 };
00210 
00211 } // namespace hippodraw
00212 
00213 #endif // _ContourPointRep_H_

Generated for HippoDraw Class Library by doxygen