Warning, file /include/root/TView3D.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_TView3D
0014 #define ROOT_TView3D
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TView.h"
0025
0026 class TSeqCollection;
0027 class TVirtualPad;
0028
0029 class TView3D : public TView {
0030
0031 protected:
0032 Double_t fLatitude;
0033 Double_t fLongitude;
0034 Double_t fPsi;
0035 Double_t fDview;
0036 Double_t fDproj;
0037 Double_t fUpix;
0038 Double_t fVpix;
0039 Double_t fTN[16];
0040 Double_t fTB[16];
0041 Double_t fRmax[3];
0042 Double_t fRmin[3];
0043 Double_t fUVcoord[4];
0044 Double_t fTnorm[16];
0045 Double_t fTback[16];
0046 Double_t fX1[3];
0047 Double_t fX2[3];
0048 Double_t fY1[3];
0049 Double_t fY2[3];
0050 Double_t fZ1[3];
0051 Double_t fZ2[3];
0052 Int_t fSystem;
0053 TSeqCollection *fOutline;
0054 Bool_t fDefaultOutline;
0055 Bool_t fAutoRange;
0056 Bool_t fChanged;
0057
0058 TView3D(const TView3D&);
0059 TView3D& operator=(const TView3D&);
0060
0061 void ResetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep);
0062
0063
0064 public:
0065
0066 enum {
0067 kPerspective = BIT(6)
0068 };
0069
0070 TView3D();
0071 TView3D(Int_t system, const Double_t *rmin, const Double_t *rmax);
0072 ~TView3D() override;
0073
0074 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) override;
0075 void DefinePerspectiveView() override;
0076 void DefineViewDirection(const Double_t *s, const Double_t *c,
0077 Double_t cosphi, Double_t sinphi,
0078 Double_t costhe, Double_t sinthe,
0079 Double_t cospsi, Double_t sinpsi,
0080 Double_t *tnorm, Double_t *tback) override;
0081 void DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax) override;
0082 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0083 void ExecuteRotateView(Int_t event, Int_t px, Int_t py) override;
0084 void FindScope(Double_t *scale, Double_t *center, Int_t &irep) override;
0085 Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio) override;
0086 Double_t GetDview() const override {return fDview;}
0087 Double_t GetDproj() const override {return fDproj;}
0088 Double_t GetExtent() const override;
0089 Bool_t GetAutoRange() override {return fAutoRange;}
0090 Double_t GetLatitude() override {return fLatitude;}
0091 Double_t GetLongitude() override {return fLongitude;}
0092 Double_t GetPsi() override {return fPsi;}
0093 void GetRange (Float_t *min, Float_t *max) override;
0094 void GetRange (Double_t *min, Double_t *max) override;
0095 Double_t *GetRmax() override {return fRmax;}
0096 Double_t *GetRmin() override {return fRmin;}
0097 TSeqCollection *GetOutline() override {return fOutline; }
0098 Double_t *GetTback() override {return fTback;}
0099 Double_t *GetTN() override {return fTN;}
0100 Double_t *GetTnorm() override {return fTnorm;}
0101 Int_t GetSystem() override {return fSystem;}
0102 void GetWindow(Double_t &u0, Double_t &v0, Double_t &du, Double_t &dv) const override;
0103 Double_t GetWindowWidth() const override {return 0.5*(fUVcoord[1]-fUVcoord[0]);}
0104 Double_t GetWindowHeight() const override {return 0.5*(fUVcoord[3]-fUVcoord[2]);}
0105 void FindNormal(Double_t x, Double_t y, Double_t z, Double_t &zn) override;
0106 void FindPhiSectors(Int_t iopt, Int_t &kphi, Double_t *aphi, Int_t &iphi1, Int_t &iphi2) override;
0107 void FindThetaSectors(Int_t iopt, Double_t phi, Int_t &kth, Double_t *ath, Int_t &ith1, Int_t &ith2) override;
0108 Bool_t IsClippedNDC(Double_t *p) const override;
0109 Bool_t IsPerspective() const override {return TestBit(kPerspective);}
0110 Bool_t IsViewChanged() const override {return fChanged;}
0111 void NDCtoWC(const Float_t *pn, Float_t *pw) override;
0112 void NDCtoWC(const Double_t *pn, Double_t *pw) override;
0113 void NormalWCtoNDC(const Float_t *pw, Float_t *pn) override;
0114 void NormalWCtoNDC(const Double_t *pw, Double_t *pn) override;
0115 void PadRange(Int_t rback) override;
0116 void ResizePad() override;
0117 void SetAutoRange(Bool_t autorange=kTRUE) override {fAutoRange=autorange;}
0118 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) override;
0119 void SetDefaultWindow() override;
0120 void SetDview(Double_t dview) override {fDview=dview;}
0121 void SetDproj(Double_t dproj) override {fDproj=dproj;}
0122 void SetLatitude(Double_t latitude) override {fLatitude = latitude;}
0123 void SetLongitude(Double_t longitude) override {fLongitude = longitude;}
0124 void SetPsi(Double_t psi) override {fPsi = psi;}
0125 void SetOutlineToCube() override;
0126 void SetParallel() override;
0127 void SetPerspective() override;
0128 void SetRange(const Double_t *min, const Double_t *max) override;
0129 void SetRange(Double_t x0, Double_t y0, Double_t z0, Double_t x1, Double_t y1, Double_t z1, Int_t flag=0) override;
0130 void SetSystem(Int_t system) override {fSystem = system;}
0131 void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep) override;
0132 void SetViewChanged(Bool_t flag=kTRUE) override {fChanged = flag;}
0133 void SetWindow(Double_t u0, Double_t v0, Double_t du, Double_t dv) override;
0134 void WCtoNDC(const Float_t *pw, Float_t *pn) override;
0135 void WCtoNDC(const Double_t *pw, Double_t *pn) override;
0136
0137
0138 void MoveFocus(Double_t *center, Double_t dx, Double_t dy, Double_t dz, Int_t nsteps=10,
0139 Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0) override;
0140 void MoveViewCommand(Char_t chCode, Int_t count=1) override;
0141 void MoveWindow(Char_t option) override;
0142
0143 void AdjustScales(TVirtualPad *pad = nullptr) override;
0144 void Centered3DImages(TVirtualPad *pad = nullptr) override;
0145 void Centered() override;
0146 void FrontView(TVirtualPad *pad = nullptr) override;
0147 void Front() override;
0148
0149 void ZoomIn() override;
0150 void ZoomOut() override;
0151 void ZoomView(TVirtualPad *pad = nullptr, Double_t zoomFactor = 1.25 ) override;
0152 void UnzoomView(TVirtualPad *pad = nullptr,Double_t unZoomFactor = 1.25) override;
0153
0154 void RotateView(Double_t phi, Double_t theta, TVirtualPad *pad = nullptr) override;
0155 void SideView(TVirtualPad *pad = nullptr) override;
0156 void Side() override;
0157 void TopView(TVirtualPad *pad = nullptr) override;
0158 void Top() override;
0159
0160 void ToggleRulers(TVirtualPad *pad = nullptr) override;
0161 void ShowAxis() override;
0162 void ToggleZoom(TVirtualPad *pad = nullptr) override;
0163 void ZoomMove() override;
0164 void Zoom() override;
0165 void UnZoom() override;
0166
0167 static void AdjustPad(TVirtualPad *pad = nullptr);
0168
0169 ClassDefOverride(TView3D,3);
0170 };
0171
0172 #endif
0173