TTablePadView3D.h

Go to the documentation of this file.
00001 // @(#)root/table:$Id: TTablePadView3D.h 34911 2010-08-20 18:34:34Z pcanal $
00002 // Author: Valery Fine(fine@vxcern.cern.ch)   30/05/97
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TTablePadView3D
00013 #define ROOT_TTablePadView3D
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TTablePadView3D                                                      //
00019 //                                                                      //
00020 // TTablePadView3D is a generic 3D viewer.                              //
00021 // For a concrete viewer see TGLViewer.                                 //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TObject
00026 #include "TObject.h"
00027 #endif
00028 
00029 
00030 
00031 class TVirtualPad;
00032 class TPolyMarker3D;
00033 class TPolyLine3D;
00034 class TPoints3DABC;
00035 class TNode;
00036 class TRotMatrix;
00037 
00038 class TTablePadView3D {
00039 protected:
00040    TVirtualPad  *fParent;            // Pointer to the original TPad object
00041 
00042    Double_t      fViewBoxMin[3];     // Minimum of clip box
00043    Double_t      fViewBoxMax[3];     // Maximum of clip box
00044    Double_t      fTranslate[3];      // The vector to move object into the center of the scene
00045    Double_t      fExtraTranslate[3]; // The vector to move object with a mouse
00046    Double_t      fAngles[3];         // Latitude, Longitude, Psi
00047    Double_t      fExtraAngles[3];    // Latitude, Longitude, Psi
00048    Double_t      fAnglFactor[3];     // Latitude, Longitude, Psi
00049    Float_t       fScale;             // The scale factor to control the border of the clip box
00050 
00051    void Init(TVirtualPad *pad) {
00052       fParent = pad;
00053       for(UInt_t i=0; i<3; ++i) {
00054          fViewBoxMin[i] = 0;
00055          fViewBoxMax[i] = 0;
00056          fTranslate[i] = 0;
00057          fExtraTranslate[i] = 0;
00058          fAngles[i] = 0;
00059          fExtraAngles[i] = 0;
00060          fAnglFactor[i] = 0;
00061       }
00062       fScale = 1;
00063    }
00064 public:
00065    TTablePadView3D() { Init(0); }  //default ctor
00066    TTablePadView3D(TVirtualPad *pad) { Init(pad); }
00067    virtual ~TTablePadView3D();
00068    virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00069    TVirtualPad *GetPad() const { return fParent; }
00070    virtual void Paint(Option_t *option="");
00071    virtual void Size(Int_t width, Int_t height);
00072    virtual void PaintBeginModel(Option_t *opt="");
00073    virtual void PaintEnd(Option_t *opt="");
00074    virtual void PaintScene(Option_t *opt="");
00075    virtual void PaintPolyMarker(TPolyMarker3D *marker, Option_t *opt="");
00076    virtual void PaintPolyLine(TPolyLine3D *line, Option_t *opt="");
00077    virtual void PaintPoints3D(const TPoints3DABC *points,Option_t *opt="");
00078    virtual void PushMatrix() { }
00079    virtual void PopMatrix() { }
00080    virtual void SetAttNode(TNode *node, Option_t *opt="");
00081    virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="");
00082            void SetPad(TVirtualPad *pad=0) { fParent = pad; }
00083    virtual void UpdateNodeMatrix(TNode *node, Option_t *opt="");
00084    virtual void UpdatePosition(Double_t x,Double_t y,Double_t z,TRotMatrix *matrix, Option_t *opt="");
00085    virtual void UpdateView() { }
00086 
00087 //  Getter's / Setter's methods for the data-members
00088 
00089    virtual void  GetRange(Double_t min[3], Double_t max[3]) const;
00090    virtual void  SetRange(Double_t min[3], Double_t max[3]);
00091 
00092    virtual void  GetShift(Double_t main_shift[3], Double_t extra_shift[3]) const;
00093    virtual void  SetShift(Double_t main_shift[3], Double_t extra_shift[3]);
00094 
00095    virtual void  GetAngles(Double_t main_angles[3], Double_t extra_angles[3]) const;
00096    virtual void  SetAngles(Double_t main_angles[3], Double_t extra_angles[3]);
00097 
00098    virtual void  GetAnglesFactors(Double_t factors[3]) const;
00099    virtual void  SetAnglesFactors(Double_t factors[3]);
00100 
00101    virtual Float_t GetScale(){return  fScale;}
00102    virtual void    SetScale(Float_t scale);
00103 
00104 
00105 //   ClassDef(TTablePadView3D,0);   //Generic 3D viewer
00106 };
00107 
00108 inline void TTablePadView3D::ExecuteEvent(Int_t, Int_t, Int_t) { }
00109 inline void TTablePadView3D::Paint(Option_t *) { }
00110 inline void TTablePadView3D::Size(Int_t, Int_t) { }
00111 inline void TTablePadView3D::PaintBeginModel(Option_t *) { }
00112 inline void TTablePadView3D::PaintEnd(Option_t *) { }
00113 inline void TTablePadView3D::PaintScene(Option_t *) { }
00114 inline void TTablePadView3D::PaintPolyMarker(TPolyMarker3D *, Option_t *) { }
00115 inline void TTablePadView3D::PaintPolyLine(TPolyLine3D *, Option_t *) { }
00116 inline void TTablePadView3D::PaintPoints3D(const TPoints3DABC *,Option_t *){ }
00117 inline void TTablePadView3D::SetAttNode(TNode *, Option_t *) { }
00118 inline void TTablePadView3D::SetLineAttr(Color_t ,Int_t ,Option_t *) { }
00119 inline void TTablePadView3D::UpdateNodeMatrix(TNode *, Option_t *) { }
00120 inline void TTablePadView3D::UpdatePosition(Double_t ,Double_t ,Double_t ,TRotMatrix *, Option_t *){ }
00121 
00122 #endif

Generated on Tue Jul 5 14:28:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1