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

LinePointRep.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _LinePointRep_H_
00015 #define _LinePointRep_H_
00016 
00017 #include "PointRepBase.h"
00018 
00019 #include "graphics/LineStyle.h"
00020 
00021 #include <vector>
00022 
00023 class HippoRectangle;
00024 class Point;
00025 
00034 class MDL_HIPPOPLOT_API LinePointRep : public PointRepBase
00035 {
00036 
00037 private:
00038 
00039    // The drawing rectangle boundaries.
00040    double m_xmin, m_xmax, m_ymin, m_ymax;
00041 
00042    const HippoRectangle * m_user_rect;
00043 
00044    bool outside_box(std::vector<double>::const_iterator ix,
00045                     std::vector<double>::const_iterator iy) const;
00046 
00047    bool straddles_x_boundary(std::vector<double>::const_iterator ix,
00048                              std::vector<double>::const_iterator iy,
00049                              Point & pt1, Point & pt2, 
00050                              double & distance) const;
00051 
00052    bool straddles_y_boundary(std::vector<double>::const_iterator ix,
00053                              std::vector<double>::const_iterator iy,
00054                              Point & pt1, Point & pt2, 
00055                              double & distance) const;
00056 
00057    bool cornerCase(std::vector<double>::const_iterator ix,
00058                    std::vector<double>::const_iterator iy,
00059                    std::vector<double> & x, std::vector<double> & y) const;
00060 
00061    double interpolate(double x, std::vector<double>::const_iterator ix,
00062                       std::vector<double>::const_iterator iy) const;
00063 
00064    double separation(const Point & pt1, const Point & pt2) const;
00065 
00066    void findEndPoints(std::vector<double>::const_iterator ix,
00067                       std::vector<double>::const_iterator iy,
00068                       Point & pt1, Point & pt2) const;
00069  
00070    void addEndPoints(std::vector<double>::const_iterator ix,
00071                      std::vector<double>::const_iterator iy,
00072                      std::vector<double> & x, std::vector<double> & y) const;
00073 
00074 protected:
00075 
00082   std::vector< double > m_x;
00083 
00090   std::vector< double > m_y;
00091 
00094   hippodraw::Line::Style m_line_style;
00095 
00096 public:
00098   LinePointRep();
00099 
00101   LinePointRep ( float size );
00102 
00104   LinePointRep( const LinePointRep & point_rep );
00105 
00107   virtual ~LinePointRep();
00108 
00111   virtual RepBase * clone();
00112 
00115   virtual void setStyle ( unsigned int style );
00116 
00119   virtual unsigned int getStyle ( ) const;
00120 
00121   virtual void drawProjectedValues ( const DataSource * ntuple,
00122                                      TransformBase * transform,
00123                                      ViewBase * view );
00124 
00125 };
00126 
00127 #endif // _LinePointRep_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3