Warning, file /include/root/TXTRU.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
0013
0014
0015
0016
0017 #ifndef ROOT_TXTRU
0018 #define ROOT_TXTRU
0019
0020 #include "TShape.h"
0021
0022 class TXTRU : public TShape {
0023 public:
0024 TXTRU();
0025 TXTRU(const char *name, const char *title, const char *material,
0026 Int_t nyx, Int_t nz);
0027 TXTRU(const TXTRU &xtru);
0028 ~TXTRU() override;
0029 TXTRU& operator=(const TXTRU& rhs);
0030
0031 void Copy(TObject &xtru) const override;
0032 virtual void DefineSection(Int_t secNum, Float_t z, Float_t scale=1.,
0033 Float_t x0=0., Float_t y0=0.);
0034 virtual void DefineVertex(Int_t pointNum, Float_t x, Float_t y);
0035 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0036 const TBuffer3D &GetBuffer3D(Int_t) const override;
0037 virtual Int_t GetNxy() const { return fNxy; }
0038 virtual Int_t GetNz() const { return fNz; }
0039 virtual Float_t GetOutlinePointX(Int_t pointNum) const;
0040 virtual Float_t GetOutlinePointY(Int_t pointNum) const;
0041 virtual Float_t GetSectionX0(Int_t secNum) const;
0042 virtual Float_t GetSectionY0(Int_t secNum) const;
0043 virtual Float_t GetSectionScale(Int_t secNum) const;
0044 virtual Float_t GetSectionZ(Int_t secNum) const;
0045 virtual Float_t *GetXvtx() const {return fXvtx; }
0046 virtual Float_t *GetYvtx() const {return fYvtx; }
0047 virtual Float_t *GetZ() const {return fZ; }
0048 virtual Float_t *GetScale() const {return fScale; }
0049 virtual Float_t *GetX0() const {return fX0; }
0050 virtual Float_t *GetY0() const {return fY0; }
0051 void Print(Option_t *option="") const override;
0052 void Sizeof3D() const override;
0053 void SplitConcavePolygon(Bool_t split = kTRUE);
0054 virtual void TruncateNxy(Int_t npts);
0055 virtual void TruncateNz(Int_t npts);
0056
0057 protected:
0058 void CheckOrdering();
0059 void SetPoints(Double_t *points) const override;
0060
0061 Int_t fNxy{0};
0062 Int_t fNxyAlloc{0};
0063 Int_t fNz{0};
0064 Int_t fNzAlloc{0};
0065 Float_t *fXvtx{nullptr};
0066 Float_t *fYvtx{nullptr};
0067 Float_t *fZ{nullptr};
0068 Float_t *fScale{nullptr};
0069 Float_t *fX0{nullptr};
0070 Float_t *fY0{nullptr};
0071
0072 enum EXYChecked {kUncheckedXY, kMalformedXY,
0073 kConvexCCW, kConvexCW,
0074 kConcaveCCW, kConcaveCW};
0075 enum EZChecked {kUncheckedZ, kMalformedZ,
0076 kConvexIncZ, kConvexDecZ,
0077 kConcaveIncZ, kConcaveDecZ};
0078
0079 EXYChecked fPolygonShape{kUncheckedXY};
0080 EZChecked fZOrdering{kUncheckedZ};
0081
0082
0083
0084
0085 Bool_t fSplitConcave{kFALSE};
0086
0087 private:
0088 void DumpPoints(int npoints, float *pointbuff) const;
0089 void DumpSegments(int nsegments, int *segbuff) const;
0090 void DumpPolygons(int npolygons, int *polybuff, int buffsize) const;
0091
0092 ClassDefOverride(TXTRU,1)
0093 };
0094
0095 #endif