File indexing completed on 2025-01-18 10:10:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_REveBox
0013 #define ROOT_REveBox
0014
0015 #include "ROOT/REveShape.hxx"
0016
0017 namespace ROOT {
0018 namespace Experimental {
0019
0020
0021
0022
0023
0024 class REveBox : public REveShape,
0025 public REveProjectable
0026 {
0027 private:
0028 REveBox(const REveBox&) = delete;
0029 REveBox& operator=(const REveBox&) = delete;
0030
0031 protected:
0032 Float_t fVertices[8][3];
0033
0034 public:
0035 REveBox(const char* n="REveBox", const char* t="");
0036 ~REveBox() override;
0037
0038 void SetVertex(Int_t i, Float_t x, Float_t y, Float_t z);
0039 void SetVertex(Int_t i, const Float_t* v);
0040 void SetVertices(const Float_t* vs);
0041
0042 const Float_t* GetVertex(Int_t i) const { return fVertices[i]; }
0043
0044
0045 void ComputeBBox() override;
0046
0047 Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
0048 void BuildRenderData() override;
0049
0050 TClass* ProjectedClass(const REveProjection* p) const override;
0051 };
0052
0053
0054
0055
0056
0057
0058 class REveBoxProjected : public REveShape,
0059 public REveProjected
0060 {
0061 private:
0062 REveBoxProjected(const REveBoxProjected&) = delete;
0063 REveBoxProjected& operator=(const REveBoxProjected&) = delete;
0064
0065 protected:
0066 vVector2_t fPoints;
0067 Int_t fBreakIdx;
0068 vVector2_t fDebugPoints;
0069
0070 Bool_t fDebugCornerPoints;
0071
0072 void SetDepthLocal(Float_t d) override;
0073
0074 public:
0075 REveBoxProjected(const char* n="REveBoxProjected", const char* t="");
0076 ~REveBoxProjected() override;
0077
0078 void BuildRenderData() override;
0079 Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
0080
0081
0082 void ComputeBBox() override;
0083
0084 Bool_t GetDebugCornerPoints();
0085 void SetDebugCornerPoints(Bool_t d);
0086
0087
0088 void SetProjection(REveProjectionManager* mng, REveProjectable* model) override;
0089 void UpdateProjection() override;
0090
0091 REveElement* GetProjectedAsElement() override { return this; }
0092 };
0093
0094 }
0095 }
0096 #endif