ROOT logo
// $Id: THealPainter.h,v 1.5 2009/04/18 05:52:35 oxon Exp $
// Author: Akira Okumura 2008/07/07

/*****************************************************************************
   Copyright (C) 2008-, Akira Okumura
   All rights reserved.
******************************************************************************/

#ifndef T_HEAL_PAINTER
#define T_HEAL_PAINTER

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// THealPainter                                                         //
//                                                                      //
// helper class to draw HEALPixs                                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TString.h"
#include "TVirtualHealPainter.h"

class TAxis;
class TCutG;
class THealPix;
const Int_t kMaxCuts2 = 16;

class THealPainter : public TVirtualHealPainter {

protected:
   THealPix*      fHeal;              //pointer to HEALPix to paint
   TAxis*         fXaxis;             //pointer to X axis
   TAxis*         fYaxis;             //pointer to Y axis
   TAxis*         fZaxis;             //pointer to Z axis
   TList*         fFunctions;         //pointer to histogram list of functions
   Double_t*      fXbuf;              //X buffer coordinates
   Double_t*      fYbuf;              //Y buffer coordinates
   Int_t          fNcuts;             //Number of graphical cuts
   Int_t          fCutsOpt[kMaxCuts2];//sign of each cut
   TCutG*         fCuts[kMaxCuts2];    //Pointers to graphical cuts

   virtual Bool_t Vertices(Int_t bin, Int_t& n, Double_t* x, Double_t* y,
			   Double_t* xdiv, Double_t* ydiv,
			   Bool_t* used, Bool_t& divided,
			   Double_t xmin, Double_t xmax,
			   Double_t ymin, Double_t ymax);

public:
   enum {
     kThetaPhi,  // X:[180, 0] Y:[0, 360]
     kGalactic,  // X:[-90, 90] Y:[180, -180]
     kCelestial, // X:[-90, 90] Y:[360, 0]
     kLatLong    // X:[-90, 90] Y:[-180, 180]
   };

   enum {
     kEquirect,// Equirectangular projection
     kAitoff,  // Aitoff projection
     kHammer,  // Hammer projection
     kLambert, // Lambert azimuthal equal-area projection
     kPolar    // Polar projection.
   };

   THealPainter();
   virtual ~THealPainter();
   virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);
   virtual void   DrawPanel();
   virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py);
   virtual TList* GetContourList(Double_t contour) const;
   virtual Bool_t IsInside(Int_t x, Int_t y);
   virtual Bool_t IsInside(Double_t x, Double_t y);
   virtual Int_t  MakeChopt(Option_t* option);
   virtual Int_t  MakeCuts(char* cutsopt);
   virtual void   Paint(Option_t* option = "");
   virtual void   PaintAxis(Bool_t drawGridOnly = kFALSE);
   virtual void   PaintColorLevels(Option_t* option);
   virtual void   PaintBoxes(Option_t* option);
   virtual void   PaintContour(Option_t* option);
   virtual void   PaintFrame();
   virtual void   PaintFunction(Option_t* option);
   virtual void   PaintLego(Option_t* option);
   virtual void   PaintPalette();
   virtual void   PaintScatterPlot(Option_t* option);
   virtual void   PaintStat(Int_t dostat, TF1* fit);
   virtual void   PaintSurface(Option_t* option);
   virtual void   PaintTable(Option_t* option);
   virtual void   PaintTitle();
   virtual void   PaintTriangles(Option_t *option);
   virtual void   ProcessMessage(const char* mess, const TObject* obj);
   virtual void   RecalculateRange();
   virtual void   SetHealPix(THealPix *hp);
   virtual Int_t  TableInit();

   ClassDef(THealPainter, 0)  //Helper class to draw HEALPix
};

#endif // T_HEAL_PAINTER
 THealPainter.h:1
 THealPainter.h:2
 THealPainter.h:3
 THealPainter.h:4
 THealPainter.h:5
 THealPainter.h:6
 THealPainter.h:7
 THealPainter.h:8
 THealPainter.h:9
 THealPainter.h:10
 THealPainter.h:11
 THealPainter.h:12
 THealPainter.h:13
 THealPainter.h:14
 THealPainter.h:15
 THealPainter.h:16
 THealPainter.h:17
 THealPainter.h:18
 THealPainter.h:19
 THealPainter.h:20
 THealPainter.h:21
 THealPainter.h:22
 THealPainter.h:23
 THealPainter.h:24
 THealPainter.h:25
 THealPainter.h:26
 THealPainter.h:27
 THealPainter.h:28
 THealPainter.h:29
 THealPainter.h:30
 THealPainter.h:31
 THealPainter.h:32
 THealPainter.h:33
 THealPainter.h:34
 THealPainter.h:35
 THealPainter.h:36
 THealPainter.h:37
 THealPainter.h:38
 THealPainter.h:39
 THealPainter.h:40
 THealPainter.h:41
 THealPainter.h:42
 THealPainter.h:43
 THealPainter.h:44
 THealPainter.h:45
 THealPainter.h:46
 THealPainter.h:47
 THealPainter.h:48
 THealPainter.h:49
 THealPainter.h:50
 THealPainter.h:51
 THealPainter.h:52
 THealPainter.h:53
 THealPainter.h:54
 THealPainter.h:55
 THealPainter.h:56
 THealPainter.h:57
 THealPainter.h:58
 THealPainter.h:59
 THealPainter.h:60
 THealPainter.h:61
 THealPainter.h:62
 THealPainter.h:63
 THealPainter.h:64
 THealPainter.h:65
 THealPainter.h:66
 THealPainter.h:67
 THealPainter.h:68
 THealPainter.h:69
 THealPainter.h:70
 THealPainter.h:71
 THealPainter.h:72
 THealPainter.h:73
 THealPainter.h:74
 THealPainter.h:75
 THealPainter.h:76
 THealPainter.h:77
 THealPainter.h:78
 THealPainter.h:79
 THealPainter.h:80
 THealPainter.h:81
 THealPainter.h:82
 THealPainter.h:83
 THealPainter.h:84
 THealPainter.h:85
 THealPainter.h:86
 THealPainter.h:87
 THealPainter.h:88
 THealPainter.h:89
 THealPainter.h:90
 THealPainter.h:91
 THealPainter.h:92
 THealPainter.h:93
 THealPainter.h:94
 THealPainter.h:95
 THealPainter.h:96
 THealPainter.h:97