BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisLib/include/BesVisLib/BesPolygon2D.h
Go to the documentation of this file.
1//
2// BesPolygon2D.h
3//
4// $Author: longpx $
5// 2005/7/16
6// Modified from zevis 2D shape
7
8#ifndef BESPOLYGON2D_H
9#define BESPOLYGON2D_H
10
11#ifndef ROOT_TNamed
12# include <TNamed.h>
13#endif
14#ifndef ROOT_TAttLine
15# include <TAttLine.h>
16#endif
17#ifndef ROOT_TAttFill
18# include <TAttFill.h>
19#endif
20
21class TPad;
22class TString;
23class TView;
24class TGeometry;
25class TPaveText;
26
27class BesPolygon2D : public TNamed, public TAttLine, public TAttFill {
28
29 static int num;
30
31protected:
32 Double_t* f_xx;
33 Double_t* f_yy;
34 Int_t fN; // No. of points
35 Double_t* fP; // [3*fN] Points in world coordinates
36 Double_t* fPBackUp; // [3*fN] for fP BackUp when rotate;
37 Double_t fCenter[3];
38 Bool_t fRotatable;
39
40 TPaveText* fInfoBox; //! info box
41
42public:
44 BesPolygon2D( const char* name, const char* title, Int_t N, Double_t* P );
45 virtual ~BesPolygon2D();
46
47 virtual void Draw( Option_t* option = "" );
48 virtual void Paint( Option_t* option = "" );
49 virtual char* GetObjectInfo( Int_t px, Int_t py ) const;
50
51 virtual void SetZRSign( Int_t sign );
52 virtual void Resize( Double_t ScaleFactor );
53 virtual Int_t DistancetoPrimitive( Int_t px, Int_t py );
54 virtual void ExecuteEvent( Int_t event, Int_t px, Int_t py );
55 virtual void SetInfoBox(); //*MENU*
56 virtual void GetCenter( Double_t* Center ) const;
57 virtual void RotatePhi( Double_t phi );
58 virtual void Restore();
59 virtual void SetSize( Double_t size );
60 // Long Peixun's update: Stretch polygon along (sx, sy, sz)
61 virtual void Stretch( Double_t sx, Double_t sy, Double_t sz, Double_t factor );
62
63 inline Bool_t IsRotatable() { return fRotatable; }
64 inline void SetRotatable( Bool_t input ) { fRotatable = input; }
65 inline void SetName( const char* name ) { TNamed::SetName( name ); }
66 inline void SetTitle( const char* name ) { TNamed::SetTitle( name ); }
67 inline void Delete( Option_t* option ) { TObject::Delete( option ); }
68 inline void DrawClass() { TObject::DrawClass(); }
69 inline void DrawClone( Option_t* option ) { TObject::DrawClone( option ); }
70 inline void SetDrawOption( Option_t* option ) { TObject::SetDrawOption( option ); }
71 inline void SetPoints( Double_t* P ) {
72 for ( Int_t i = 0; i < fN * 3; i++ ) fP[i] = P[i];
73 }
74
75 ClassDef( BesPolygon2D, 2 ) // Polygon in 2D
76};
77
78#endif
double P(RecMdcKalTrack *trk)
legend Draw()
titledef title[20]
virtual void SetZRSign(Int_t sign)
virtual void SetSize(Double_t size)
virtual void Paint(Option_t *option="")
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void SetInfoBox()
virtual void Stretch(Double_t sx, Double_t sy, Double_t sz, Double_t factor)
virtual void Resize(Double_t ScaleFactor)
virtual void Restore()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
BesPolygon2D()
info box
virtual ~BesPolygon2D()
virtual void GetCenter(Double_t *Center) const
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual void RotatePhi(Double_t phi)