Logo ROOT   6.07/09
Reference Guide
TTablePadView3D.h
Go to the documentation of this file.
1 // @(#)root/table:$Id$
2 // Author: Valery Fine(fine@vxcern.cern.ch) 30/05/97
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 #ifndef ROOT_TTablePadView3D
13 #define ROOT_TTablePadView3D
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TTablePadView3D //
19 // //
20 // TTablePadView3D is a generic 3D viewer. //
21 // For a concrete viewer see TGLViewer. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #ifndef ROOT_TObject
26 #include "TObject.h"
27 #endif
28 
29 
30 
31 class TVirtualPad;
32 class TPolyMarker3D;
33 class TPolyLine3D;
34 class TPoints3DABC;
35 class TNode;
36 class TRotMatrix;
37 
39 protected:
40  TVirtualPad *fParent; // Pointer to the original TPad object
41 
42  Double_t fViewBoxMin[3]; // Minimum of clip box
43  Double_t fViewBoxMax[3]; // Maximum of clip box
44  Double_t fTranslate[3]; // The vector to move object into the center of the scene
45  Double_t fExtraTranslate[3]; // The vector to move object with a mouse
46  Double_t fAngles[3]; // Latitude, Longitude, Psi
47  Double_t fExtraAngles[3]; // Latitude, Longitude, Psi
48  Double_t fAnglFactor[3]; // Latitude, Longitude, Psi
49  Float_t fScale; // The scale factor to control the border of the clip box
50 
51  void Init(TVirtualPad *pad) {
52  fParent = pad;
53  for(UInt_t i=0; i<3; ++i) {
54  fViewBoxMin[i] = 0;
55  fViewBoxMax[i] = 0;
56  fTranslate[i] = 0;
57  fExtraTranslate[i] = 0;
58  fAngles[i] = 0;
59  fExtraAngles[i] = 0;
60  fAnglFactor[i] = 0;
61  }
62  fScale = 1;
63  }
64 public:
65  TTablePadView3D() { Init(0); } //default ctor
67  virtual ~TTablePadView3D();
68  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
69  TVirtualPad *GetPad() const { return fParent; }
70  virtual void Paint(Option_t *option="");
71  virtual void Size(Int_t width, Int_t height);
72  virtual void PaintBeginModel(Option_t *opt="");
73  virtual void PaintEnd(Option_t *opt="");
74  virtual void PaintScene(Option_t *opt="");
75  virtual void PaintPolyMarker(TPolyMarker3D *marker, Option_t *opt="");
76  virtual void PaintPolyLine(TPolyLine3D *line, Option_t *opt="");
77  virtual void PaintPoints3D(const TPoints3DABC *points,Option_t *opt="");
78  virtual void PushMatrix() { }
79  virtual void PopMatrix() { }
80  virtual void SetAttNode(TNode *node, Option_t *opt="");
81  virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="");
82  void SetPad(TVirtualPad *pad=0) { fParent = pad; }
83  virtual void UpdateNodeMatrix(TNode *node, Option_t *opt="");
84  virtual void UpdatePosition(Double_t x,Double_t y,Double_t z,TRotMatrix *matrix, Option_t *opt="");
85  virtual void UpdateView() { }
86 
87 // Getter's / Setter's methods for the data-members
88 
89  virtual void GetRange(Double_t min[3], Double_t max[3]) const;
90  virtual void SetRange(Double_t min[3], Double_t max[3]);
91 
92  virtual void GetShift(Double_t main_shift[3], Double_t extra_shift[3]) const;
93  virtual void SetShift(Double_t main_shift[3], Double_t extra_shift[3]);
94 
95  virtual void GetAngles(Double_t main_angles[3], Double_t extra_angles[3]) const;
96  virtual void SetAngles(Double_t main_angles[3], Double_t extra_angles[3]);
97 
98  virtual void GetAnglesFactors(Double_t factors[3]) const;
99  virtual void SetAnglesFactors(Double_t factors[3]);
100 
101  virtual Float_t GetScale(){return fScale;}
102  virtual void SetScale(Float_t scale);
103 
104 
105 // ClassDef(TTablePadView3D,0); //Generic 3D viewer
106 };
107 
121 
122 #endif
virtual void SetAnglesFactors(Double_t factors[3])
set view angles factors
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual void PaintScene(Option_t *opt="")
virtual void PaintPolyLine(TPolyLine3D *line, Option_t *opt="")
virtual void PaintPoints3D(const TPoints3DABC *points, Option_t *opt="")
TVirtualPad * GetPad() const
TLine * line
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
virtual void UpdatePosition(Double_t x, Double_t y, Double_t z, TRotMatrix *matrix, Option_t *opt="")
Abstract class to define Arrays of 3D points.
Definition: TPoints3DABC.h:27
virtual void PaintEnd(Option_t *opt="")
TNode description.
Definition: TNode.h:43
virtual Float_t GetScale()
virtual void SetRange(Double_t min[3], Double_t max[3])
set view range
TVirtualPad * fParent
int Int_t
Definition: RtypesCore.h:41
A 3-dimensional polyline.
Definition: TPolyLine3D.h:41
virtual void PaintPolyMarker(TPolyMarker3D *marker, Option_t *opt="")
Double_t fViewBoxMax[3]
Double_t fAnglFactor[3]
Double_t x[n]
Definition: legend1.C:17
virtual void GetRange(Double_t min[3], Double_t max[3]) const
get view range
virtual void SetAttNode(TNode *node, Option_t *opt="")
void Init(TVirtualPad *pad)
virtual void SetScale(Float_t scale)
set view scale
Double_t fExtraAngles[3]
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
virtual void Size(Int_t width, Int_t height)
short Color_t
Definition: RtypesCore.h:79
virtual ~TTablePadView3D()
Delete 3D viewer.
point * points
Definition: X3DBuffer.c:20
virtual void SetAngles(Double_t main_angles[3], Double_t extra_angles[3])
set view angles
virtual void Paint(Option_t *option="")
Manages a detector rotation matrix.
Definition: TRotMatrix.h:30
Double_t fViewBoxMin[3]
virtual void SetShift(Double_t main_shift[3], Double_t extra_shift[3])
set shift parameters
TTablePadView3D(TVirtualPad *pad)
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void GetAnglesFactors(Double_t factors[3]) const
get view angles factors
void SetPad(TVirtualPad *pad=0)
virtual void GetShift(Double_t main_shift[3], Double_t extra_shift[3]) const
get shift parameters
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
virtual void UpdateView()
virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="")
Double_t fTranslate[3]
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
virtual void GetAngles(Double_t main_angles[3], Double_t extra_angles[3]) const
get view angles
A 3D polymarker.
Definition: TPolyMarker3D.h:40
Double_t fExtraTranslate[3]
Double_t fAngles[3]
virtual void PopMatrix()
virtual void UpdateNodeMatrix(TNode *node, Option_t *opt="")
virtual void PushMatrix()
virtual void PaintBeginModel(Option_t *opt="")