Warning, file /include/root/TEveShape.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_TEveShape
0013 #define ROOT_TEveShape
0014
0015 #include "TEveElement.h"
0016 #include "TEveVector.h"
0017
0018 #include "TAtt3D.h"
0019 #include "TAttBBox.h"
0020 #include "TColor.h"
0021 #include <vector>
0022
0023 class TEveShape : public TEveElementList,
0024 public TAtt3D,
0025 public TAttBBox
0026 {
0027 friend class TEveShapeEditor;
0028
0029 private:
0030 TEveShape(const TEveShape&) = delete;
0031 TEveShape& operator=(const TEveShape&) = delete;
0032
0033 public:
0034 typedef std::vector<TEveVector2> vVector2_t;
0035 typedef std::vector<TEveVector2>::iterator vVector2_i;
0036
0037 protected:
0038 Color_t fFillColor;
0039 Color_t fLineColor;
0040 Float_t fLineWidth;
0041
0042 Bool_t fDrawFrame;
0043 Bool_t fHighlightFrame;
0044 Bool_t fMiniFrame;
0045
0046 public:
0047 TEveShape(const char* n="TEveShape", const char* t="");
0048 ~TEveShape() override;
0049
0050
0051 void SetMainColor(Color_t color) override;
0052
0053 virtual Color_t GetFillColor() const { return fFillColor; }
0054 virtual Color_t GetLineColor() const { return fLineColor; }
0055 virtual Float_t GetLineWidth() const { return fLineWidth;}
0056 virtual Bool_t GetDrawFrame() const { return fDrawFrame; }
0057 virtual Bool_t GetHighlightFrame() const { return fHighlightFrame; }
0058 virtual Bool_t GetMiniFrame() const { return fMiniFrame; }
0059
0060 virtual void SetFillColor(Color_t c) { fFillColor = c; }
0061 virtual void SetLineColor(Color_t c) { fLineColor = c; }
0062 virtual void SetLineWidth(Float_t lw) { fLineWidth = lw;}
0063 virtual void SetDrawFrame(Bool_t f) { fDrawFrame = f; }
0064 virtual void SetHighlightFrame(Bool_t f) { fHighlightFrame = f; }
0065 virtual void SetMiniFrame(Bool_t r) { fMiniFrame = r; }
0066
0067
0068
0069 void CopyVizParams(const TEveElement* el) override;
0070 void WriteVizParams(std::ostream& out, const TString& var) override;
0071
0072
0073
0074
0075 void Paint(Option_t* option="") override;
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085 static Int_t FindConvexHull(const vVector2_t& pin, vVector2_t& pout, TEveElement* caller=nullptr);
0086
0087 static Bool_t IsBoxOrientationConsistentEv(const TEveVector box[8]);
0088 static Bool_t IsBoxOrientationConsistentFv(const Float_t box[8][3]);
0089
0090 static void CheckAndFixBoxOrientationEv(TEveVector box[8]);
0091 static void CheckAndFixBoxOrientationFv(Float_t box[8][3]);
0092
0093 ClassDefOverride(TEveShape, 0);
0094 };
0095
0096 #endif