#ifndef ROOT_TTUBE
#define ROOT_TTUBE
#ifndef ROOT_TShape
#include "TShape.h"
#endif
const Int_t kDivNum = 20;
class TTUBE : public TShape {
protected:
Float_t fRmin;
Float_t fRmax;
Float_t fDz;
Int_t fNdiv;
Float_t fAspectRatio;
mutable Double_t *fSiTab;
mutable Double_t *fCoTab;
TTUBE(const TTUBE&);
TTUBE& operator=(const TTUBE&);
virtual void MakeTableOfCoSin() const;
virtual void SetPoints(Double_t *points) const;
virtual void SetSegsAndPols(TBuffer3D & buffer) const;
public:
TTUBE();
TTUBE(const char *name, const char *title, const char *material, Float_t rmin, Float_t rmax, Float_t dz, Float_t aspect=1);
TTUBE(const char *name, const char *title, const char *material, Float_t rmax, Float_t dz);
virtual ~TTUBE();
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual const TBuffer3D &GetBuffer3D(Int_t reqSections) const;
virtual Float_t GetRmin() const {return fRmin;}
virtual Float_t GetRmax() const {return fRmax;}
virtual Float_t GetDz() const {return fDz;}
virtual Int_t GetNdiv() const {return fNdiv;}
virtual Float_t GetAspectRatio() const {return fAspectRatio;}
virtual Int_t GetNumberOfDivisions () const {if (fNdiv) return fNdiv; else return kDivNum;}
virtual void SetNumberOfDivisions (Int_t ndiv);
virtual void SetAspectRatio(Float_t factor=1){fAspectRatio = factor;}
virtual void Sizeof3D() const;
ClassDef(TTUBE,3)
};
#endif