Logo ROOT  
Reference Guide
TView.h
Go to the documentation of this file.
1 // @(#)root/gpad:$Id$
2 // Author: Rene Brun, Nenad Buncic, Evgueni Tcherniaev, Olivier Couet 18/08/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TView
14 #define ROOT_TView
15 
16 
17 #include "TObject.h"
18 
19 #include "TAttLine.h"
20 
21 class TList;
22 class TSeqCollection;
23 class TVirtualPad;
24 
25 class TView : public TObject, public TAttLine {
26 
27 public:
28 
29  TView() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300
30  virtual ~TView() = default;
31 
32  virtual void DefinePerspectiveView() = 0;
33  virtual void AxisVertex(Double_t ang, Double_t *av, Int_t &ix1, Int_t &ix2, Int_t &iy1, Int_t &iy2, Int_t &iz1, Int_t &iz2) = 0;
34  virtual void DefineViewDirection(const Double_t *s, const Double_t *c,
35  Double_t cosphi, Double_t sinphi,
36  Double_t costhe, Double_t sinthe,
37  Double_t cospsi, Double_t sinpsi,
38  Double_t *tnorm, Double_t *tback) = 0;
39  virtual void DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax) = 0;
40  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) = 0;
41  virtual void ExecuteRotateView(Int_t event, Int_t px, Int_t py) = 0;
42  virtual void FindScope(Double_t *scale, Double_t *center, Int_t &irep) = 0;
43  virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio) = 0;
44  virtual Double_t GetDview() const = 0;
45  virtual Double_t GetDproj() const = 0;
46  virtual Double_t GetExtent() const = 0;
47  virtual Bool_t GetAutoRange() = 0;
48  virtual Double_t GetLatitude() = 0;
49  virtual Double_t GetLongitude() = 0;
50  virtual Double_t GetPsi() = 0;
51  virtual void GetRange (Float_t *min, Float_t *max) = 0;
52  virtual void GetRange (Double_t *min, Double_t *max) = 0;
53  virtual Double_t *GetRmax() = 0;
54  virtual Double_t *GetRmin() = 0;
55  virtual TSeqCollection *GetOutline() = 0;
56  virtual Double_t *GetTback() = 0;
57  virtual Double_t *GetTN() = 0;
58  virtual Double_t *GetTnorm() = 0;
59  virtual Int_t GetSystem() = 0;
60  virtual void GetWindow(Double_t &u0, Double_t &v0, Double_t &du, Double_t &dv) const = 0;
61  virtual Double_t GetWindowWidth() const = 0;
62  virtual Double_t GetWindowHeight() const = 0;
63  virtual void FindNormal(Double_t x, Double_t y, Double_t z, Double_t &zn) = 0;
64  virtual void FindPhiSectors(Int_t iopt, Int_t &kphi, Double_t *aphi, Int_t &iphi1, Int_t &iphi2) = 0;
65  virtual void FindThetaSectors(Int_t iopt, Double_t phi, Int_t &kth, Double_t *ath, Int_t &ith1, Int_t &ith2) = 0;
66  virtual Bool_t IsClippedNDC(Double_t *p) const = 0;
67  virtual Bool_t IsPerspective() const = 0;
68  virtual Bool_t IsViewChanged() const = 0;
69  virtual void NDCtoWC(const Float_t *pn, Float_t *pw) = 0;
70  virtual void NDCtoWC(const Double_t *pn, Double_t *pw) = 0;
71  virtual void NormalWCtoNDC(const Float_t *pw, Float_t *pn) = 0;
72  virtual void NormalWCtoNDC(const Double_t *pw, Double_t *pn) = 0;
73  virtual void PadRange(Int_t rback) = 0;
74  virtual void ResizePad() = 0;
75  virtual void SetAutoRange(Bool_t autorange=kTRUE) = 0;
76  virtual void SetAxisNDC(const Double_t *x1, const Double_t *x2, const Double_t *y1, const Double_t *y2, const Double_t *z1, const Double_t *z2) = 0;
77  virtual void SetDefaultWindow() = 0;
78  virtual void SetDview(Double_t dview) = 0;
79  virtual void SetDproj(Double_t dproj) = 0;
80  virtual void SetLatitude(Double_t latitude) = 0;
81  virtual void SetLongitude(Double_t longitude) = 0;
82  virtual void SetPsi(Double_t psi) = 0;
83  virtual void SetOutlineToCube() = 0;
84  virtual void SetParallel() = 0;
85  virtual void SetPerspective() = 0;
86  virtual void SetRange(const Double_t *min, const Double_t *max) = 0;
87  virtual void SetRange(Double_t x0, Double_t y0, Double_t z0, Double_t x1, Double_t y1, Double_t z1, Int_t flag=0) = 0;
88  virtual void SetSystem(Int_t system) = 0;
89  virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep) = 0;
90  virtual void SetViewChanged(Bool_t flag=kTRUE) = 0;
91  virtual void SetWindow(Double_t u0, Double_t v0, Double_t du, Double_t dv) = 0;
92  virtual void WCtoNDC(const Float_t *pw, Float_t *pn) = 0;
93  virtual void WCtoNDC(const Double_t *pw, Double_t *pn) = 0;
94 
95 //--
96  virtual void MoveFocus(Double_t *center, Double_t dx, Double_t dy, Double_t dz, Int_t nsteps=10,
97  Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0) = 0;
98  virtual void MoveViewCommand(Char_t chCode, Int_t count=1) = 0;
99  virtual void MoveWindow(Char_t option) = 0;
100 
101  virtual void AdjustScales(TVirtualPad *pad=0) = 0;
102  virtual void Centered3DImages(TVirtualPad *pad=0) = 0;
103  virtual void Centered() = 0;
104  virtual void FrontView(TVirtualPad *pad=0) = 0;
105  virtual void Front() = 0;
106 
107  virtual void ZoomIn() = 0;
108  virtual void ZoomOut() = 0;
109  virtual void ZoomView(TVirtualPad *pad=0, Double_t zoomFactor = 1.25 ) = 0;
110  virtual void UnzoomView(TVirtualPad *pad=0,Double_t unZoomFactor = 1.25) = 0;
111 
112  virtual void RotateView(Double_t phi, Double_t theta, TVirtualPad *pad=0) = 0;
113  virtual void SideView(TVirtualPad *pad=0) = 0;
114  virtual void Side() = 0;
115  virtual void TopView(TVirtualPad *pad=0) = 0;
116  virtual void Top() = 0;
117 
118  virtual void ToggleRulers(TVirtualPad *pad=0) = 0;
119  virtual void ShowAxis() = 0;
120  virtual void ToggleZoom(TVirtualPad *pad=0) = 0;
121  virtual void ZoomMove() = 0;
122  virtual void Zoom() = 0;
123  virtual void UnZoom() = 0;
124 
125  static TView *CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0);
126 
127  ClassDef(TView,3); //3-D View abstract interface for 3-D views
128 };
129 
130 #endif
131 
c
#define c(i)
Definition: RSha256.hxx:101
TView::SetPsi
virtual void SetPsi(Double_t psi)=0
TView::SetRange
virtual void SetRange(const Double_t *min, const Double_t *max)=0
TView::TopView
virtual void TopView(TVirtualPad *pad=0)=0
TView::IsPerspective
virtual Bool_t IsPerspective() const =0
TView::ZoomIn
virtual void ZoomIn()=0
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
v0
@ v0
Definition: rootcling_impl.cxx:3636
TView::Top
virtual void Top()=0
TView::MoveViewCommand
virtual void MoveViewCommand(Char_t chCode, Int_t count=1)=0
TView::DrawOutlineCube
virtual void DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax)=0
TView::SetRange
virtual void SetRange(Double_t x0, Double_t y0, Double_t z0, Double_t x1, Double_t y1, Double_t z1, Int_t flag=0)=0
TView::SetAutoRange
virtual void SetAutoRange(Bool_t autorange=kTRUE)=0
TView::SetWindow
virtual void SetWindow(Double_t u0, Double_t v0, Double_t du, Double_t dv)=0
TView::ZoomMove
virtual void ZoomMove()=0
TView::DefinePerspectiveView
virtual void DefinePerspectiveView()=0
TView::SetSystem
virtual void SetSystem(Int_t system)=0
TView::SetDview
virtual void SetDview(Double_t dview)=0
TView::WCtoNDC
virtual void WCtoNDC(const Double_t *pw, Double_t *pn)=0
Float_t
float Float_t
Definition: RtypesCore.h:57
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TView::NDCtoWC
virtual void NDCtoWC(const Double_t *pn, Double_t *pw)=0
TView::UnzoomView
virtual void UnzoomView(TVirtualPad *pad=0, Double_t unZoomFactor=1.25)=0
TView::GetDview
virtual Double_t GetDview() const =0
x
Double_t x[n]
Definition: legend1.C:17
TView::GetPsi
virtual Double_t GetPsi()=0
TView::SetDefaultWindow
virtual void SetDefaultWindow()=0
TView::Centered3DImages
virtual void Centered3DImages(TVirtualPad *pad=0)=0
TView::SetParallel
virtual void SetParallel()=0
TView::GetLatitude
virtual Double_t GetLatitude()=0
TView::NDCtoWC
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)=0
TView::SetPerspective
virtual void SetPerspective()=0
TView::TView
TView()
Definition: TView.h:29
TView::SideView
virtual void SideView(TVirtualPad *pad=0)=0
bool
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
TView::GetDproj
virtual Double_t GetDproj() const =0
TAttLine.h
TView::ZoomView
virtual void ZoomView(TVirtualPad *pad=0, Double_t zoomFactor=1.25)=0
TView::GetRange
virtual void GetRange(Double_t *min, Double_t *max)=0
TView::GetTback
virtual Double_t * GetTback()=0
TView::GetOutline
virtual TSeqCollection * GetOutline()=0
TView::AxisVertex
virtual void AxisVertex(Double_t ang, Double_t *av, Int_t &ix1, Int_t &ix2, Int_t &iy1, Int_t &iy2, Int_t &iz1, Int_t &iz2)=0
TAttLine
Line Attributes class.
Definition: TAttLine.h:18
TView
See TView3D.
Definition: TView.h:25
TView::ExecuteRotateView
virtual void ExecuteRotateView(Int_t event, Int_t px, Int_t py)=0
TView::SetLatitude
virtual void SetLatitude(Double_t latitude)=0
TView::SetView
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)=0
TView::GetAutoRange
virtual Bool_t GetAutoRange()=0
TView::ZoomOut
virtual void ZoomOut()=0
TView::GetTnorm
virtual Double_t * GetTnorm()=0
TView::GetWindowHeight
virtual Double_t GetWindowHeight() const =0
TView::IsClippedNDC
virtual Bool_t IsClippedNDC(Double_t *p) const =0
TView::IsViewChanged
virtual Bool_t IsViewChanged() const =0
TView::GetRmin
virtual Double_t * GetRmin()=0
TView::GetLongitude
virtual Double_t GetLongitude()=0
y
Double_t y[n]
Definition: legend1.C:17
TView::CreateView
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
Definition: TView.cxx:27
TView::FindThetaSectors
virtual void FindThetaSectors(Int_t iopt, Double_t phi, Int_t &kth, Double_t *ath, Int_t &ith1, Int_t &ith2)=0
TView::ShowAxis
virtual void ShowAxis()=0
TView::FindScope
virtual void FindScope(Double_t *scale, Double_t *center, Int_t &irep)=0
TView::SetOutlineToCube
virtual void SetOutlineToCube()=0
TView::FindPhiSectors
virtual void FindPhiSectors(Int_t iopt, Int_t &kphi, Double_t *aphi, Int_t &iphi1, Int_t &iphi2)=0
TView::Zoom
virtual void Zoom()=0
TView::GetDistancetoAxis
virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio)=0
TView::MoveWindow
virtual void MoveWindow(Char_t option)=0
TSeqCollection
Sequenceable collection abstract base class.
Definition: TSeqCollection.h:28
TView::GetRange
virtual void GetRange(Float_t *min, Float_t *max)=0
TView::AdjustScales
virtual void AdjustScales(TVirtualPad *pad=0)=0
TView::Side
virtual void Side()=0
TView::SetViewChanged
virtual void SetViewChanged(Bool_t flag=kTRUE)=0
TView::Front
virtual void Front()=0
TView::ResizePad
virtual void ResizePad()=0
Double_t
double Double_t
Definition: RtypesCore.h:59
TVirtualPad
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
TView::GetWindowWidth
virtual Double_t GetWindowWidth() const =0
TView::SetDproj
virtual void SetDproj(Double_t dproj)=0
TView::GetWindow
virtual void GetWindow(Double_t &u0, Double_t &v0, Double_t &du, Double_t &dv) const =0
TObject.h
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TView::FindNormal
virtual void FindNormal(Double_t x, Double_t y, Double_t z, Double_t &zn)=0
TView::GetTN
virtual Double_t * GetTN()=0
TView::~TView
virtual ~TView()=default
TView::RotateView
virtual void RotateView(Double_t phi, Double_t theta, TVirtualPad *pad=0)=0
TView::NormalWCtoNDC
virtual void NormalWCtoNDC(const Double_t *pw, Double_t *pn)=0
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TView::MoveFocus
virtual void MoveFocus(Double_t *center, Double_t dx, Double_t dy, Double_t dz, Int_t nsteps=10, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0)=0
TView::UnZoom
virtual void UnZoom()=0
TView::ToggleZoom
virtual void ToggleZoom(TVirtualPad *pad=0)=0
TView::ExecuteEvent
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)=0
Execute action corresponding to an event at (px,py).
TView::Centered
virtual void Centered()=0
TView::DefineViewDirection
virtual void DefineViewDirection(const Double_t *s, const Double_t *c, Double_t cosphi, Double_t sinphi, Double_t costhe, Double_t sinthe, Double_t cospsi, Double_t sinpsi, Double_t *tnorm, Double_t *tback)=0
TView::SetAxisNDC
virtual void SetAxisNDC(const Double_t *x1, const Double_t *x2, const Double_t *y1, const Double_t *y2, const Double_t *z1, const Double_t *z2)=0
TView::FrontView
virtual void FrontView(TVirtualPad *pad=0)=0
Char_t
char Char_t
Definition: RtypesCore.h:33
TView::WCtoNDC
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
TView::SetLongitude
virtual void SetLongitude(Double_t longitude)=0
TView::NormalWCtoNDC
virtual void NormalWCtoNDC(const Float_t *pw, Float_t *pn)=0
TView::GetRmax
virtual Double_t * GetRmax()=0
TList
A doubly linked list.
Definition: TList.h:44
TView::ToggleRulers
virtual void ToggleRulers(TVirtualPad *pad=0)=0
TView::GetSystem
virtual Int_t GetSystem()=0
TView::GetExtent
virtual Double_t GetExtent() const =0
int
TView::PadRange
virtual void PadRange(Int_t rback)=0