Warning, file /include/root/TBuffer3D.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_TBuffer3D
0013 #define ROOT_TBuffer3D
0014
0015 #include "TObject.h"
0016
0017 class TBuffer3D : public TObject
0018 {
0019 private:
0020 const Int_t fType;
0021
0022 UInt_t fNbPnts;
0023 UInt_t fNbSegs;
0024 UInt_t fNbPols;
0025
0026 UInt_t fPntsCapacity;
0027 UInt_t fSegsCapacity;
0028 UInt_t fPolsCapacity;
0029
0030 UInt_t fSections;
0031
0032 void Init();
0033
0034
0035 TBuffer3D(const TBuffer3D &) = delete;
0036 TBuffer3D & operator=(const TBuffer3D &) = delete;
0037
0038
0039 static UInt_t fgCSLevel;
0040
0041 public:
0042
0043 enum EBoolOpCode {kCSUnion, kCSIntersection, kCSDifference, kCSNoOp};
0044
0045 static UInt_t GetCSLevel();
0046 static void IncCSLevel();
0047 static UInt_t DecCSLevel();
0048
0049 enum ESection { kNone = BIT(0),
0050 kCore = BIT(1),
0051 kBoundingBox = BIT(2),
0052 kShapeSpecific = BIT(3),
0053 kRawSizes = BIT(4),
0054 kRaw = BIT(5),
0055 kAll = kCore|kBoundingBox|kShapeSpecific|kRawSizes|kRaw
0056 };
0057
0058 TBuffer3D(Int_t type,
0059 UInt_t reqPnts = 0, UInt_t reqPntsCapacity = 0,
0060 UInt_t reqSegs = 0, UInt_t reqSegsCapacity = 0,
0061 UInt_t reqPols = 0, UInt_t reqPolsCapacity = 0);
0062 virtual ~TBuffer3D();
0063
0064
0065 void SetSectionsValid(UInt_t mask) { fSections |= mask & kAll; }
0066 void ClearSectionsValid();
0067 Bool_t SectionsValid(UInt_t mask) const { return (Bool_t) (GetSections(mask) == mask); }
0068 UInt_t GetSections(UInt_t mask) const { return (UInt_t) (fSections & mask); }
0069
0070
0071 void SetLocalMasterIdentity();
0072 void SetAABoundingBox(const Double_t origin[3],
0073 const Double_t halfLengths[3]);
0074
0075
0076 Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity,
0077 UInt_t reqSegs, UInt_t reqSegsCapacity,
0078 UInt_t reqPols, UInt_t reqPolsCapacity);
0079
0080 UInt_t NbPnts() const { return fNbPnts; }
0081 UInt_t NbSegs() const { return fNbSegs; }
0082 UInt_t NbPols() const { return fNbPols; }
0083
0084
0085 Int_t Type() const { return fType; }
0086
0087 TObject *fID;
0088 Int_t fColor;
0089 Short_t fTransparency;
0090 Bool_t fLocalFrame;
0091 Bool_t fReflection;
0092 Bool_t fScaled;
0093 Double_t fLocalMaster[16];
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108 Double_t fBBVertex[8][3];
0109
0110
0111
0112
0113 Double_t *fPnts;
0114 Int_t *fSegs;
0115 Int_t *fPols;
0116
0117
0118
0119 mutable UInt_t fPhysicalID;
0120
0121
0122 ClassDefOverride(TBuffer3D,0)
0123 };
0124
0125
0126
0127
0128
0129 class TBuffer3DSphere : public TBuffer3D
0130 {
0131 private:
0132
0133 TBuffer3DSphere(const TBuffer3DSphere &) = delete;
0134 TBuffer3DSphere & operator=(const TBuffer3DSphere &) = delete;
0135
0136 public:
0137 TBuffer3DSphere(UInt_t reqPnts = 0, UInt_t reqPntsCapacity = 0,
0138 UInt_t reqSegs = 0, UInt_t reqSegsCapacity = 0,
0139 UInt_t reqPols = 0, UInt_t reqPolsCapacity = 0);
0140
0141 Bool_t IsSolidUncut() const;
0142
0143
0144 Double_t fRadiusInner;
0145 Double_t fRadiusOuter;
0146 Double_t fThetaMin;
0147 Double_t fThetaMax;
0148 Double_t fPhiMin;
0149 Double_t fPhiMax;
0150 };
0151
0152
0153
0154
0155
0156 class TBuffer3DTube : public TBuffer3D
0157 {
0158 private:
0159
0160 TBuffer3DTube(const TBuffer3DTube &) = delete;
0161 TBuffer3DTube & operator=(const TBuffer3DTube &) = delete;
0162
0163 protected:
0164 TBuffer3DTube(Int_t type,
0165 UInt_t reqPnts = 0, UInt_t reqPntsCapacity = 0,
0166 UInt_t reqSegs = 0, UInt_t reqSegsCapacity = 0,
0167 UInt_t reqPols = 0, UInt_t reqPolsCapacity = 0);
0168
0169 public:
0170 TBuffer3DTube(UInt_t reqPnts = 0, UInt_t reqPntsCapacity = 0,
0171 UInt_t reqSegs = 0, UInt_t reqSegsCapacity = 0,
0172 UInt_t reqPols = 0, UInt_t reqPolsCapacity = 0);
0173
0174
0175 Double_t fRadiusInner;
0176 Double_t fRadiusOuter;
0177 Double_t fHalfLength;
0178 };
0179
0180
0181
0182
0183
0184 class TBuffer3DTubeSeg : public TBuffer3DTube
0185 {
0186 private:
0187
0188 TBuffer3DTubeSeg(const TBuffer3DTubeSeg &);
0189 TBuffer3DTubeSeg & operator=(const TBuffer3DTubeSeg &) = delete;
0190
0191 protected:
0192 TBuffer3DTubeSeg(Int_t type,
0193 UInt_t reqPnts = 0, UInt_t reqPntsCapacity = 0,
0194 UInt_t reqSegs = 0, UInt_t reqSegsCapacity = 0,
0195 UInt_t reqPols = 0, UInt_t reqPolsCapacity = 0);
0196
0197 public:
0198 TBuffer3DTubeSeg(UInt_t reqPnts = 0, UInt_t reqPntsCapacity = 0,
0199 UInt_t reqSegs = 0, UInt_t reqSegsCapacity = 0,
0200 UInt_t reqPols = 0, UInt_t reqPolsCapacity = 0);
0201
0202
0203 Double_t fPhiMin;
0204 Double_t fPhiMax;
0205 };
0206
0207
0208
0209
0210
0211 class TBuffer3DCutTube : public TBuffer3DTubeSeg
0212 {
0213 private:
0214
0215 TBuffer3DCutTube(const TBuffer3DTubeSeg &) = delete;
0216 TBuffer3DCutTube & operator=(const TBuffer3DTubeSeg &) = delete;
0217
0218 public:
0219 TBuffer3DCutTube(UInt_t reqPnts = 0, UInt_t reqPntsCapacity = 0,
0220 UInt_t reqSegs = 0, UInt_t reqSegsCapacity = 0,
0221 UInt_t reqPols = 0, UInt_t reqPolsCapacity = 0);
0222
0223
0224 Double_t fLowPlaneNorm[3];
0225 Double_t fHighPlaneNorm[3];
0226 };
0227
0228 #endif