File indexing completed on 2025-01-18 10:11:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEveArrow
0013 #define ROOT_TEveArrow
0014
0015 #include "TEveElement.h"
0016 #include "TEveVector.h"
0017 #include "TNamed.h"
0018 #include "TAtt3D.h"
0019 #include "TAttBBox.h"
0020
0021 class TEveArrow : public TEveElement,
0022 public TNamed,
0023 public TAtt3D,
0024 public TAttBBox
0025 {
0026 friend class TEveArrowGL;
0027 friend class TEveArrowEditor;
0028
0029 private:
0030 TEveArrow(const TEveArrow&);
0031 TEveArrow& operator=(const TEveArrow&);
0032
0033 protected:
0034 Color_t fColor;
0035
0036 Float_t fTubeR;
0037 Float_t fConeR;
0038 Float_t fConeL;
0039
0040 TEveVector fOrigin;
0041 TEveVector fVector;
0042
0043 Int_t fDrawQuality;
0044
0045 public:
0046 TEveArrow(Float_t xVec=0, Float_t yVec=0, Float_t zVec=1,
0047 Float_t xOrg=0, Float_t yOrg=0, Float_t zOrg=0);
0048 ~TEveArrow() override {}
0049
0050 TObject* GetObject(const TEveException& ) const override
0051 { const TObject* obj = this; return const_cast<TObject*>(obj); }
0052
0053 void StampGeom() { ResetBBox(); AddStamp(kCBTransBBox | kCBObjProps); }
0054
0055 Float_t GetTubeR() const { return fTubeR; }
0056 Float_t GetConeR() const { return fConeR; }
0057 Float_t GetConeL() const { return fConeL; }
0058
0059 void SetTubeR(Float_t x) { fTubeR = x; StampGeom(); }
0060 void SetConeR(Float_t x) { fConeR = x; StampGeom(); }
0061 void SetConeL(Float_t x) { fConeL = x; StampGeom(); }
0062
0063 TEveVector GetOrigin() { return fOrigin; }
0064 TEveVector& RefOrigin() { return fOrigin; }
0065 TEveVector GetVector() { return fVector; }
0066 TEveVector& RefVector() { return fVector; }
0067
0068 void SetOrigin(const TEveVector& o) { fOrigin = o; StampGeom(); }
0069 void SetOrigin(Float_t x, Float_t y, Float_t z) { fOrigin.Set(x, y, z); StampGeom(); }
0070 void SetVector(const TEveVector& v) { fVector = v; StampGeom(); }
0071 void SetVector(Float_t x, Float_t y, Float_t z) { fVector.Set(x, y, z); StampGeom(); }
0072
0073 Int_t GetDrawQuality() const { return fDrawQuality; }
0074 void SetDrawQuality(Int_t q) { fDrawQuality = q; }
0075
0076 void ComputeBBox() override;
0077 void Paint(Option_t* option="") override;
0078
0079 ClassDefOverride(TEveArrow, 0);
0080 };
0081
0082 #endif