Warning, file /include/root/TGLManip.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGLManip
0013 #define ROOT_TGLManip
0014
0015 #include "TVirtualGL.h"
0016 #include "TPoint.h"
0017 #include "GuiTypes.h"
0018 #include "TGLUtil.h"
0019
0020 class TGLPhysicalShape;
0021 class TGLVertex3;
0022 class TGLVector3;
0023 class TGLCamera;
0024 class TGLRect;
0025 class TGLBoundingBox;
0026
0027
0028 class TGLManip : public TVirtualGLManip
0029 {
0030 protected:
0031 TGLPhysicalShape *fShape;
0032 UInt_t fSelectedWidget;
0033 Bool_t fActive;
0034
0035
0036 TPoint fFirstMouse;
0037 TPoint fLastMouse;
0038
0039 TGLManip(const TGLManip&);
0040 TGLManip& operator=(const TGLManip&);
0041
0042 void CalcDrawScale(const TGLBoundingBox& box, const TGLCamera& camera,
0043 Double_t& base, TGLVector3 axis[3]) const;
0044
0045 const UChar_t* ColorFor(UInt_t widget) const;
0046
0047 public:
0048 TGLManip();
0049 TGLManip(TGLPhysicalShape* shape);
0050 ~TGLManip() override;
0051
0052 UInt_t GetSelectedWidget() const { return fSelectedWidget; }
0053 void SetSelectedWidget(UInt_t s) { fSelectedWidget = s; }
0054
0055 Bool_t GetActive() const { return fActive; }
0056 void SetActive(Bool_t a) { fActive = a; }
0057
0058 void Attach(TGLPhysicalShape* shape) { fShape = shape; }
0059 TGLPhysicalShape * GetAttached() const { return fShape; }
0060
0061 virtual void Draw(const TGLCamera& camera) const = 0;
0062
0063 Bool_t Select(const TGLCamera&, const TGLRect&, const TGLBoundingBox&) override { return kFALSE; }
0064
0065 virtual Bool_t HandleButton(const Event_t& event, const TGLCamera& camera);
0066 virtual Bool_t HandleMotion(const Event_t& event, const TGLCamera& camera);
0067
0068 ClassDefOverride(TGLManip, 0);
0069 };
0070
0071 #endif