ROOT logo
// @(#)root/table:$Id: TTablePadView3D.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Valery Fine(fine@vxcern.cern.ch)   30/05/97

/*************************************************************************
 * 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_TTablePadView3D
#define ROOT_TTablePadView3D


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TTablePadView3D                                                      //
//                                                                      //
// TTablePadView3D is a generic 3D viewer.                              //
// For a concrete viewer see TGLViewer.                                 //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

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



class TVirtualPad;
class TPolyMarker3D;
class TPolyLine3D;
class TPoints3DABC;
class TNode;
class TRotMatrix;

class TTablePadView3D {
protected:
   TVirtualPad  *fParent;            // Pointer to the original TPad object

   Double_t      fViewBoxMin[3];     // Minimum of clip box
   Double_t      fViewBoxMax[3];     // Maximum of clip box
   Double_t      fTranslate[3];      // The vector to move object into the center of the scene
   Double_t      fExtraTranslate[3]; // The vector to move object with a mouse
   Double_t      fAngles[3];         // Latitude, Longitude, Psi
   Double_t      fExtraAngles[3];    // Latitude, Longitude, Psi
   Double_t      fAnglFactor[3];     // Latitude, Longitude, Psi
   Float_t       fScale;             // The scale factor to control the border of the clip box

public:
   TTablePadView3D() { fParent = 0;}  //default ctor
   TTablePadView3D(TVirtualPad *pad) { SetPad(pad); }
   virtual ~TTablePadView3D();
   virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
   TVirtualPad *GetPad() const { return fParent; }
   virtual void Paint(Option_t *option="");
   virtual void Size(Int_t width, Int_t height);
   virtual void PaintBeginModel(Option_t *opt="");
   virtual void PaintEnd(Option_t *opt="");
   virtual void PaintScene(Option_t *opt="");
   virtual void PaintPolyMarker(TPolyMarker3D *marker, Option_t *opt="");
   virtual void PaintPolyLine(TPolyLine3D *line, Option_t *opt="");
   virtual void PaintPoints3D(const TPoints3DABC *points,Option_t *opt="");
   virtual void PushMatrix() { }
   virtual void PopMatrix() { }
   virtual void SetAttNode(TNode *node, Option_t *opt="");
   virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="");
           void SetPad(TVirtualPad *pad=0) { fParent = pad; }
   virtual void UpdateNodeMatrix(TNode *node, Option_t *opt="");
   virtual void UpdatePosition(Double_t x,Double_t y,Double_t z,TRotMatrix *matrix, Option_t *opt="");
   virtual void UpdateView() { }

//  Getter's / Setter's methods for the data-members

   virtual void  GetRange(Double_t min[3], Double_t max[3]) const;
   virtual void  SetRange(Double_t min[3], Double_t max[3]);

   virtual void  GetShift(Double_t main_shift[3], Double_t extra_shift[3]) const;
   virtual void  SetShift(Double_t main_shift[3], Double_t extra_shift[3]);

   virtual void  GetAngles(Double_t main_angles[3], Double_t extra_angles[3]) const;
   virtual void  SetAngles(Double_t main_angles[3], Double_t extra_angles[3]);

   virtual void  GetAnglesFactors(Double_t factors[3]) const;
   virtual void  SetAnglesFactors(Double_t factors[3]);

   virtual Float_t GetScale(){return  fScale;}
   virtual void    SetScale(Float_t scale);


//   ClassDef(TTablePadView3D,0);   //Generic 3D viewer
};

inline void TTablePadView3D::ExecuteEvent(Int_t, Int_t, Int_t) { }
inline void TTablePadView3D::Paint(Option_t *) { }
inline void TTablePadView3D::Size(Int_t, Int_t) { }
inline void TTablePadView3D::PaintBeginModel(Option_t *) { }
inline void TTablePadView3D::PaintEnd(Option_t *) { }
inline void TTablePadView3D::PaintScene(Option_t *) { }
inline void TTablePadView3D::PaintPolyMarker(TPolyMarker3D *, Option_t *) { }
inline void TTablePadView3D::PaintPolyLine(TPolyLine3D *, Option_t *) { }
inline void TTablePadView3D::PaintPoints3D(const TPoints3DABC *,Option_t *){ }
inline void TTablePadView3D::SetAttNode(TNode *, Option_t *) { }
inline void TTablePadView3D::SetLineAttr(Color_t ,Int_t ,Option_t *) { }
inline void TTablePadView3D::UpdateNodeMatrix(TNode *, Option_t *) { }
inline void TTablePadView3D::UpdatePosition(Double_t ,Double_t ,Double_t ,TRotMatrix *, Option_t *){ }

#endif
 TTablePadView3D.h:1
 TTablePadView3D.h:2
 TTablePadView3D.h:3
 TTablePadView3D.h:4
 TTablePadView3D.h:5
 TTablePadView3D.h:6
 TTablePadView3D.h:7
 TTablePadView3D.h:8
 TTablePadView3D.h:9
 TTablePadView3D.h:10
 TTablePadView3D.h:11
 TTablePadView3D.h:12
 TTablePadView3D.h:13
 TTablePadView3D.h:14
 TTablePadView3D.h:15
 TTablePadView3D.h:16
 TTablePadView3D.h:17
 TTablePadView3D.h:18
 TTablePadView3D.h:19
 TTablePadView3D.h:20
 TTablePadView3D.h:21
 TTablePadView3D.h:22
 TTablePadView3D.h:23
 TTablePadView3D.h:24
 TTablePadView3D.h:25
 TTablePadView3D.h:26
 TTablePadView3D.h:27
 TTablePadView3D.h:28
 TTablePadView3D.h:29
 TTablePadView3D.h:30
 TTablePadView3D.h:31
 TTablePadView3D.h:32
 TTablePadView3D.h:33
 TTablePadView3D.h:34
 TTablePadView3D.h:35
 TTablePadView3D.h:36
 TTablePadView3D.h:37
 TTablePadView3D.h:38
 TTablePadView3D.h:39
 TTablePadView3D.h:40
 TTablePadView3D.h:41
 TTablePadView3D.h:42
 TTablePadView3D.h:43
 TTablePadView3D.h:44
 TTablePadView3D.h:45
 TTablePadView3D.h:46
 TTablePadView3D.h:47
 TTablePadView3D.h:48
 TTablePadView3D.h:49
 TTablePadView3D.h:50
 TTablePadView3D.h:51
 TTablePadView3D.h:52
 TTablePadView3D.h:53
 TTablePadView3D.h:54
 TTablePadView3D.h:55
 TTablePadView3D.h:56
 TTablePadView3D.h:57
 TTablePadView3D.h:58
 TTablePadView3D.h:59
 TTablePadView3D.h:60
 TTablePadView3D.h:61
 TTablePadView3D.h:62
 TTablePadView3D.h:63
 TTablePadView3D.h:64
 TTablePadView3D.h:65
 TTablePadView3D.h:66
 TTablePadView3D.h:67
 TTablePadView3D.h:68
 TTablePadView3D.h:69
 TTablePadView3D.h:70
 TTablePadView3D.h:71
 TTablePadView3D.h:72
 TTablePadView3D.h:73
 TTablePadView3D.h:74
 TTablePadView3D.h:75
 TTablePadView3D.h:76
 TTablePadView3D.h:77
 TTablePadView3D.h:78
 TTablePadView3D.h:79
 TTablePadView3D.h:80
 TTablePadView3D.h:81
 TTablePadView3D.h:82
 TTablePadView3D.h:83
 TTablePadView3D.h:84
 TTablePadView3D.h:85
 TTablePadView3D.h:86
 TTablePadView3D.h:87
 TTablePadView3D.h:88
 TTablePadView3D.h:89
 TTablePadView3D.h:90
 TTablePadView3D.h:91
 TTablePadView3D.h:92
 TTablePadView3D.h:93
 TTablePadView3D.h:94
 TTablePadView3D.h:95
 TTablePadView3D.h:96
 TTablePadView3D.h:97
 TTablePadView3D.h:98
 TTablePadView3D.h:99
 TTablePadView3D.h:100
 TTablePadView3D.h:101
 TTablePadView3D.h:102
 TTablePadView3D.h:103
 TTablePadView3D.h:104
 TTablePadView3D.h:105
 TTablePadView3D.h:106
 TTablePadView3D.h:107
 TTablePadView3D.h:108
 TTablePadView3D.h:109