ContourPointRep.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _ContourPointRep_H_
15 #define _ContourPointRep_H_
16 
17 #include "LinePointRep.h"
18 
19 namespace hippodraw {
20 
21 class BinToColor;
22 
48 {
49 
50 private:
51 
54 
56  std::vector< Color > m_colorvec;
57 
61  std::vector < Line::Style > m_stylevec;
62 
65 
67  double m_maxValue;
68 
70  double m_minValue;
71 
73  double m_minPos;
74 
76  std::vector < double > m_values;
77 
81 
82 
83 public:
84 
87 
89  ContourPointRep ( float size );
90 
92  ContourPointRep( const ContourPointRep & point_rep );
93 
95  ~ContourPointRep();
96 
99  virtual RepBase * clone();
100 
101  virtual const BinToColor * getValueTransform ( ) const;
102  virtual void setValueTransform ( BinToColor * );
103  virtual void drawProjectedValues ( const DataSource * ntuple,
104  TransformBase * transform,
105  ViewBase * view );
106 
107  void drawContourTicks ( const TransformBase &,
108  ViewBase &,
109  const std::vector < double > & );
110 
112  bool getUsingUserValues () const;
113 
115  void setUsingUserValues ( bool flag );
116 
118  void setNumContours ( int i );
119 
121  int getNumContours () const;
122 
124  void setContourValues ( std::vector < double > & values,
125  ProjectorBase * proj );
126 
127 private:
128 
129 /*
130 Copyright (c) 1996-1997 Nicholas Yue
131 
132 This software is copyrighted by Nicholas Yue. This code is base on the work of
133 Paul D. Bourke CONREC.F routine
134 
135 The authors hereby grant permission to use, copy, and distribute this
136 software and its documentation for any purpose, provided that existing
137 copyright notices are retained in all copies and that this notice is included
138 verbatim in any distributions. Additionally, the authors grant permission to
139 modify this software and its documentation for any purpose, provided that
140 such modifications are not distributed without the explicit consent of the
141 authors and that existing copyright notices are retained in all copies. Some
142 of the algorithms implemented by this software are patented, observe all
143 applicable patent law.
144 
145 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
146 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
147 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
148 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
149 
150 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
151 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
152 PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
153 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
154 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
155 */
156 
157 
167  void createContours ( const DataSource * ntuple,
168  const TransformBase * transform );
169 
172  double getContour ( int i, const TransformBase * transform );
173 
176  double intersect ( int p1, int p2, double * h, double * xh );
177 
180  void setMinMax ( const DataSource * );
181 
184  void setContourVector ( const TransformBase * transform );
185 
188  void init ();
189 
190 
191 
192 private:
193 
196  virtual void drawValues ( const TransformBase &,
197  ViewBase & vb );
198 
202  virtual void drawValuesWithStyle ( const TransformBase &,
203  ViewBase & vb );
204 
205  static void rotate ( double & lat, double & lon,
206  double alpha, double beta, double gamma,
207  bool negative=true );
208 
209 };
210 
211 } // namespace hippodraw
212 
213 #endif // _ContourPointRep_H_

Generated for HippoDraw Class Library by doxygen