ROOT logo
// @(#)root/gpad:$Id: TView.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun, Nenad Buncic, Evgueni Tcherniaev, Olivier Couet   18/08/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/


#ifndef ROOT_TView
#define ROOT_TView


/////////////////////////////////////////////////////////////////////////
//                                                                     //
// TView  abstract interface for 3-D views                             //
//                                                                     //
/////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TObject
#include "TObject.h"
#endif

#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif

class TList;
class TSeqCollection;
class TVirtualPad;

class TView : public TObject, public TAttLine {

public:

   TView() {}
   TView(const TView &);
   virtual ~TView() {}

   virtual void          DefinePerspectiveView() = 0;
   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;
   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;
   virtual void          DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax) = 0;
   virtual void          ExecuteEvent(Int_t event, Int_t px, Int_t py) = 0;
   virtual void          ExecuteRotateView(Int_t event, Int_t px, Int_t py) = 0;
   virtual void          FindScope(Double_t *scale, Double_t *center, Int_t &irep) = 0;
   virtual Int_t         GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio) = 0;
   virtual Double_t      GetDview() const = 0;
   virtual Double_t      GetDproj() const = 0;
   virtual Double_t      GetExtent() const = 0;
   virtual Bool_t        GetAutoRange() = 0;
   virtual Double_t      GetLatitude() = 0;
   virtual Double_t      GetLongitude() = 0;
   virtual Double_t      GetPsi() = 0;
   virtual void          GetRange (Float_t *min, Float_t *max) = 0;
   virtual void          GetRange (Double_t *min, Double_t *max) = 0;
   virtual Double_t     *GetRmax() = 0;
   virtual Double_t     *GetRmin() = 0;
   virtual TSeqCollection *GetOutline() = 0;
   virtual Double_t     *GetTback() = 0;
   virtual Double_t     *GetTN() = 0;
   virtual Double_t     *GetTnorm() = 0;
   virtual Int_t         GetSystem() = 0;
   virtual void          GetWindow(Double_t &u0, Double_t &v0, Double_t &du, Double_t &dv) const = 0;
   virtual Double_t      GetWindowWidth() const = 0;
   virtual Double_t      GetWindowHeight() const = 0;
   virtual void          FindNormal(Double_t x, Double_t  y, Double_t z, Double_t &zn) = 0;
   virtual void          FindPhiSectors(Int_t iopt, Int_t &kphi, Double_t *aphi, Int_t &iphi1, Int_t &iphi2) = 0;
   virtual void          FindThetaSectors(Int_t iopt, Double_t phi, Int_t &kth, Double_t *ath, Int_t &ith1, Int_t &ith2) = 0;
   virtual Bool_t        IsClippedNDC(Double_t *p) const = 0;
   virtual Bool_t        IsPerspective() const = 0;
   virtual Bool_t        IsViewChanged() const = 0;
   virtual void          NDCtoWC(const Float_t *pn, Float_t *pw) = 0;
   virtual void          NDCtoWC(const Double_t *pn, Double_t *pw) = 0;
   virtual void          NormalWCtoNDC(const Float_t *pw, Float_t *pn) = 0;
   virtual void          NormalWCtoNDC(const Double_t *pw, Double_t *pn) = 0;
   virtual void          PadRange(Int_t rback) = 0;
   virtual void          ResizePad() = 0;
   virtual void          SetAutoRange(Bool_t autorange=kTRUE) = 0;
   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;
   virtual void          SetDefaultWindow() = 0;
   virtual void          SetDview(Double_t dview) = 0;
   virtual void          SetDproj(Double_t dproj) = 0;
   virtual void          SetLatitude(Double_t latitude) = 0;
   virtual void          SetLongitude(Double_t longitude) = 0;
   virtual void          SetPsi(Double_t psi) = 0;
   virtual void          SetOutlineToCube() = 0;
   virtual void          SetParallel() = 0;
   virtual void          SetPerspective() = 0;
   virtual void          SetRange(const Double_t *min, const Double_t *max) = 0;
   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;
   virtual void          SetSystem(Int_t system) = 0;
   virtual void          SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep) = 0;
   virtual void          SetViewChanged(Bool_t flag=kTRUE) = 0;
   virtual void          SetWindow(Double_t u0, Double_t v0, Double_t du, Double_t dv) = 0;
   virtual void          WCtoNDC(const Float_t *pw, Float_t *pn) = 0;
   virtual void          WCtoNDC(const Double_t *pw, Double_t *pn) = 0;

//--
   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;
   virtual void          MoveViewCommand(Char_t chCode, Int_t count=1) = 0;
   virtual void          MoveWindow(Char_t option) = 0;

   virtual void          AdjustScales(TVirtualPad *pad=0) = 0;
   virtual void          Centered3DImages(TVirtualPad *pad=0) = 0;
   virtual void          Centered() = 0;
   virtual void          FrontView(TVirtualPad *pad=0) = 0;
   virtual void          Front() = 0;

   virtual void          ZoomIn() = 0;
   virtual void          ZoomOut() = 0;
   virtual void          ZoomView(TVirtualPad *pad=0, Double_t zoomFactor = 1.25 ) = 0;
   virtual void          UnzoomView(TVirtualPad *pad=0,Double_t unZoomFactor = 1.25) = 0;

   virtual void          RotateView(Double_t phi, Double_t theta, TVirtualPad *pad=0) = 0;
   virtual void          SideView(TVirtualPad *pad=0) = 0;
   virtual void          Side() = 0;
   virtual void          TopView(TVirtualPad *pad=0) = 0;
   virtual void          Top() = 0;

   virtual void          ToggleRulers(TVirtualPad *pad=0) = 0;
   virtual void          ShowAxis() = 0;
   virtual void          ToggleZoom(TVirtualPad *pad=0) = 0;
   virtual void          ZoomMove() = 0;
   virtual void          Zoom() = 0;
   virtual void          UnZoom() = 0;

   static TView         *CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0);
   
   ClassDef(TView,3);  //3-D View abstract interface for 3-D views
};

#endif

 TView.h:1
 TView.h:2
 TView.h:3
 TView.h:4
 TView.h:5
 TView.h:6
 TView.h:7
 TView.h:8
 TView.h:9
 TView.h:10
 TView.h:11
 TView.h:12
 TView.h:13
 TView.h:14
 TView.h:15
 TView.h:16
 TView.h:17
 TView.h:18
 TView.h:19
 TView.h:20
 TView.h:21
 TView.h:22
 TView.h:23
 TView.h:24
 TView.h:25
 TView.h:26
 TView.h:27
 TView.h:28
 TView.h:29
 TView.h:30
 TView.h:31
 TView.h:32
 TView.h:33
 TView.h:34
 TView.h:35
 TView.h:36
 TView.h:37
 TView.h:38
 TView.h:39
 TView.h:40
 TView.h:41
 TView.h:42
 TView.h:43
 TView.h:44
 TView.h:45
 TView.h:46
 TView.h:47
 TView.h:48
 TView.h:49
 TView.h:50
 TView.h:51
 TView.h:52
 TView.h:53
 TView.h:54
 TView.h:55
 TView.h:56
 TView.h:57
 TView.h:58
 TView.h:59
 TView.h:60
 TView.h:61
 TView.h:62
 TView.h:63
 TView.h:64
 TView.h:65
 TView.h:66
 TView.h:67
 TView.h:68
 TView.h:69
 TView.h:70
 TView.h:71
 TView.h:72
 TView.h:73
 TView.h:74
 TView.h:75
 TView.h:76
 TView.h:77
 TView.h:78
 TView.h:79
 TView.h:80
 TView.h:81
 TView.h:82
 TView.h:83
 TView.h:84
 TView.h:85
 TView.h:86
 TView.h:87
 TView.h:88
 TView.h:89
 TView.h:90
 TView.h:91
 TView.h:92
 TView.h:93
 TView.h:94
 TView.h:95
 TView.h:96
 TView.h:97
 TView.h:98
 TView.h:99
 TView.h:100
 TView.h:101
 TView.h:102
 TView.h:103
 TView.h:104
 TView.h:105
 TView.h:106
 TView.h:107
 TView.h:108
 TView.h:109
 TView.h:110
 TView.h:111
 TView.h:112
 TView.h:113
 TView.h:114
 TView.h:115
 TView.h:116
 TView.h:117
 TView.h:118
 TView.h:119
 TView.h:120
 TView.h:121
 TView.h:122
 TView.h:123
 TView.h:124
 TView.h:125
 TView.h:126
 TView.h:127
 TView.h:128
 TView.h:129
 TView.h:130
 TView.h:131
 TView.h:132
 TView.h:133
 TView.h:134
 TView.h:135
 TView.h:136
 TView.h:137
 TView.h:138
 TView.h:139
 TView.h:140
 TView.h:141
 TView.h:142
 TView.h:143