Logo ROOT   6.16/01
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
29class TVirtualPad;
30class TPolyMarker3D;
31class TPolyLine3D;
32class TPoints3DABC;
33class TNode;
34class TRotMatrix;
35
37protected:
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 }
62public:
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
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
double Double_t
Definition: RtypesCore.h:55
short Color_t
Definition: RtypesCore.h:79
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
point * points
Definition: X3DBuffer.c:22
TNode description.
Definition: TNode.h:33
Abstract class to define Arrays of 3D points.
Definition: TPoints3DABC.h:25
A 3-dimensional polyline.
Definition: TPolyLine3D.h:32
A 3D polymarker.
Definition: TPolyMarker3D.h:33
Manages a detector rotation matrix.
Definition: TRotMatrix.h:28
virtual void PaintPolyMarker(TPolyMarker3D *marker, Option_t *opt="")
virtual void GetAnglesFactors(Double_t factors[3]) const
get view angles factors
virtual void SetScale(Float_t scale)
set view scale
void Init(TVirtualPad *pad)
virtual void SetAttNode(TNode *node, Option_t *opt="")
virtual void PaintPolyLine(TPolyLine3D *line, Option_t *opt="")
Double_t fViewBoxMin[3]
TTablePadView3D(TVirtualPad *pad)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Double_t fAngles[3]
virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="")
virtual void PaintPoints3D(const TPoints3DABC *points, Option_t *opt="")
virtual void PaintScene(Option_t *opt="")
TVirtualPad * GetPad() const
virtual void SetShift(Double_t main_shift[3], Double_t extra_shift[3])
set shift parameters
Double_t fTranslate[3]
virtual void SetRange(Double_t min[3], Double_t max[3])
set view range
Double_t fAnglFactor[3]
virtual ~TTablePadView3D()
Delete 3D viewer.
virtual void Paint(Option_t *option="")
Double_t fExtraTranslate[3]
virtual void UpdateView()
TVirtualPad * fParent
virtual void SetAngles(Double_t main_angles[3], Double_t extra_angles[3])
set view angles
virtual void PushMatrix()
virtual void PopMatrix()
virtual void GetAngles(Double_t main_angles[3], Double_t extra_angles[3]) const
get view angles
virtual void GetRange(Double_t min[3], Double_t max[3]) const
get view range
virtual void SetAnglesFactors(Double_t factors[3])
set view angles factors
Double_t fExtraAngles[3]
virtual void GetShift(Double_t main_shift[3], Double_t extra_shift[3]) const
get shift parameters
virtual void PaintBeginModel(Option_t *opt="")
virtual Float_t GetScale()
virtual void PaintEnd(Option_t *opt="")
Double_t fViewBoxMax[3]
virtual void UpdateNodeMatrix(TNode *node, Option_t *opt="")
void SetPad(TVirtualPad *pad=0)
virtual void UpdatePosition(Double_t x, Double_t y, Double_t z, TRotMatrix *matrix, Option_t *opt="")
virtual void Size(Int_t width, Int_t height)
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:50
TLine * line
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17