Logo ROOT   6.14/05
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 #include "TObject.h"
26 
27 
28 
29 class TVirtualPad;
30 class TPolyMarker3D;
31 class TPolyLine3D;
32 class TPoints3DABC;
33 class TNode;
34 class TRotMatrix;
35 
37 protected:
38  TVirtualPad *fParent; // Pointer to the original TPad object
39 
40  Double_t fViewBoxMin[3]; // Minimum of clip box
41  Double_t fViewBoxMax[3]; // Maximum of clip box
42  Double_t fTranslate[3]; // The vector to move object into the center of the scene
43  Double_t fExtraTranslate[3]; // The vector to move object with a mouse
44  Double_t fAngles[3]; // Latitude, Longitude, Psi
45  Double_t fExtraAngles[3]; // Latitude, Longitude, Psi
46  Double_t fAnglFactor[3]; // Latitude, Longitude, Psi
47  Float_t fScale; // The scale factor to control the border of the clip box
48 
49  void Init(TVirtualPad *pad) {
50  fParent = pad;
51  for(UInt_t i=0; i<3; ++i) {
52  fViewBoxMin[i] = 0;
53  fViewBoxMax[i] = 0;
54  fTranslate[i] = 0;
55  fExtraTranslate[i] = 0;
56  fAngles[i] = 0;
57  fExtraAngles[i] = 0;
58  fAnglFactor[i] = 0;
59  }
60  fScale = 1;
61  }
62 public:
63  TTablePadView3D() { Init(0); } //default ctor
65  virtual ~TTablePadView3D();
66  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
67  TVirtualPad *GetPad() const { return fParent; }
68  virtual void Paint(Option_t *option="");
69  virtual void Size(Int_t width, Int_t height);
70  virtual void PaintBeginModel(Option_t *opt="");
71  virtual void PaintEnd(Option_t *opt="");
72  virtual void PaintScene(Option_t *opt="");
73  virtual void PaintPolyMarker(TPolyMarker3D *marker, Option_t *opt="");
74  virtual void PaintPolyLine(TPolyLine3D *line, Option_t *opt="");
75  virtual void PaintPoints3D(const TPoints3DABC *points,Option_t *opt="");
76  virtual void PushMatrix() { }
77  virtual void PopMatrix() { }
78  virtual void SetAttNode(TNode *node, Option_t *opt="");
79  virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="");
80  void SetPad(TVirtualPad *pad=0) { fParent = pad; }
81  virtual void UpdateNodeMatrix(TNode *node, Option_t *opt="");
82  virtual void UpdatePosition(Double_t x,Double_t y,Double_t z,TRotMatrix *matrix, Option_t *opt="");
83  virtual void UpdateView() { }
84 
85 // Getter's / Setter's methods for the data-members
86 
87  virtual void GetRange(Double_t min[3], Double_t max[3]) const;
88  virtual void SetRange(Double_t min[3], Double_t max[3]);
89 
90  virtual void GetShift(Double_t main_shift[3], Double_t extra_shift[3]) const;
91  virtual void SetShift(Double_t main_shift[3], Double_t extra_shift[3]);
92 
93  virtual void GetAngles(Double_t main_angles[3], Double_t extra_angles[3]) const;
94  virtual void SetAngles(Double_t main_angles[3], Double_t extra_angles[3]);
95 
96  virtual void GetAnglesFactors(Double_t factors[3]) const;
97  virtual void SetAnglesFactors(Double_t factors[3]);
98 
99  virtual Float_t GetScale(){return fScale;}
100  virtual void SetScale(Float_t scale);
101 
102 
103 // ClassDef(TTablePadView3D,0); //Generic 3D viewer
104 };
105 
119 
120 #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="")
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="")
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
Abstract class to define Arrays of 3D points.
Definition: TPoints3DABC.h:25
virtual void PaintEnd(Option_t *opt="")
virtual void GetShift(Double_t main_shift[3], Double_t extra_shift[3]) const
get shift parameters
TNode description.
Definition: TNode.h:33
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:31
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 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:49
virtual void GetAngles(Double_t main_angles[3], Double_t extra_angles[3]) const
get view angles
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:28
virtual void GetRange(Double_t min[3], Double_t max[3]) const
get view range
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)
TVirtualPad * GetPad() const
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
A 3D polymarker.
Definition: TPolyMarker3D.h:32
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="")