00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGLPlotFrame
00013 #define ROOT_TGLPlotFrame
00014
00015 #include <vector>
00016
00017 #ifndef ROOT_Rtypes
00018 #include "Rtypes.h"
00019 #endif
00020 #ifndef ROOT_TGLUtil
00021 #include "TGLUtil.h"
00022 #endif
00023
00024 class TColor;
00025
00026
00027
00028
00029
00030 class TGLPlotBox {
00031 private:
00032 const TColor *fFrameColor;
00033 const Bool_t fXOYSelectable;
00034 const Bool_t fXOZSelectable;
00035 const Bool_t fYOZSelectable;
00036
00037 Bool_t fSelectablePairs[4][2];
00038
00039 TGLVertex3 f3DBox[8];
00040 mutable TGLVertex3 f2DBox[8];
00041 mutable TGLVertex3 f2DBoxU[8];
00042 mutable Int_t fFrontPoint;
00043
00044
00045 Double_t fRangeXU;
00046 Double_t fRangeYU;
00047 Double_t fRangeZU;
00048
00049 public:
00050
00051 TGLPlotBox(Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable);
00052
00053
00054 virtual ~TGLPlotBox();
00055
00056 void DrawBox(Int_t selectedPart, Bool_t selectionPass,
00057 const std::vector<Double_t> &zLevels,
00058 Bool_t highColor)const;
00059
00060 void SetPlotBox(const Rgl::Range_t &xRange,
00061 const Rgl::Range_t &yRange,
00062 const Rgl::Range_t &zRange);
00063 void SetPlotBox(const Rgl::Range_t &xRange, Double_t rangeXU,
00064 const Rgl::Range_t &yRange, Double_t rangeYU,
00065 const Rgl::Range_t &zRange, Double_t rangeZU);
00066
00067 void SetFrameColor(const TColor *color);
00068
00069 Int_t FindFrontPoint()const;
00070 Int_t GetFrontPoint()const;
00071
00072 const TGLVertex3 *Get3DBox()const;
00073 const TGLVertex3 *Get2DBox()const;
00074
00075 static const Int_t fgFramePlanes[][4];
00076 static const Int_t fgBackPairs[][2];
00077 static const Double_t fgNormals[][3];
00078
00079 private:
00080 void DrawBackPlane(Int_t plane, Bool_t selectionPass,
00081 const std::vector<Double_t> &zLevels)const;
00082
00083 ClassDef(TGLPlotBox, 0)
00084 };
00085
00086 #endif