TSPHE.h

Go to the documentation of this file.
00001 // @(#)root/g3d:$Id: TSPHE.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Rene Brun   13/06/97
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TSPHE
00013 #define ROOT_TSPHE
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////////////
00017 //                                                                        //
00018 // TSPHE                                                                  //
00019 //                                                                        //
00020 // SPHE is Sphere. Not implemented yet.                                   //
00021 //                                                                        //
00022 ////////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TBRIK
00025 #include "TShape.h"
00026 #endif
00027 
00028 // const Int_t kDiv = 30;               //default number of z segments for semi-sphere
00029 
00030 class TSPHE : public TShape {
00031 private:
00032    // Internal cache
00033    mutable Double_t  *fSiTab;       //! Table of sin(fPhimin) .... sin(Phi)
00034    mutable Double_t  *fCoTab;       //! Table of cos(fPhimin) .... cos(Phi)
00035    mutable Double_t  *fCoThetaTab;  //! Table of sin(gThemin) .... cos(Theta)
00036    Int_t      fNdiv;        // number of divisions
00037    Int_t      fNz;          //! number of sections
00038    Float_t    fAspectRatio; // Relation between asumth and grid size (by default 1.0)
00039 
00040 protected:
00041    Float_t fRmin;    // minimum radius
00042    Float_t fRmax;    // maximum radius
00043    Float_t fThemin;  // minimum theta
00044    Float_t fThemax;  // maximum theta
00045    Float_t fPhimin;  // minimum phi
00046    Float_t fPhimax;  // maximum phi
00047    Float_t faX;      // Coeff along Ox
00048    Float_t faY;      // Coeff along Oy
00049    Float_t faZ;      // Coeff along Oz
00050         
00051    virtual void    MakeTableOfCoSin() const;  // Create the table of the fSiTab; fCoTab
00052    virtual void    SetPoints(Double_t *points) const;
00053 
00054 public:
00055    TSPHE();
00056    TSPHE(const char *name, const char *title, const char *material, Float_t rmin, Float_t rmax, Float_t themin,
00057          Float_t themax, Float_t phimin, Float_t phimax);
00058    TSPHE(const char *name, const char *title, const char *material, Float_t rmax);
00059    virtual ~TSPHE();
00060    virtual Int_t   DistancetoPrimitive(Int_t px, Int_t py);
00061    virtual const TBuffer3D &GetBuffer3D(Int_t reqSections) const;
00062    virtual Float_t GetRmin() const {return fRmin;}
00063    virtual Float_t GetRmax() const {return fRmax;}
00064    virtual Float_t GetThemin() const {return fThemin;}
00065    virtual Float_t GetThemax() const {return fThemax;}
00066    virtual Float_t GetPhimin() const {return fPhimin;}
00067    virtual Float_t GetPhimax() const {return fPhimax;}
00068    virtual Float_t GetAspectRatio() const { return fAspectRatio;}
00069    virtual Int_t   GetNumberOfDivisions () const {return fNdiv;}
00070    virtual void    SetAspectRatio(Float_t factor=1.0){ fAspectRatio = factor; MakeTableOfCoSin();}
00071    virtual void    SetEllipse(const Float_t *factors);
00072    virtual void    SetNumberOfDivisions (Int_t p);
00073    virtual void    Sizeof3D() const;
00074 
00075    ClassDef(TSPHE,3)  //SPHE shape
00076 };
00077 
00078 #endif

Generated on Tue Jul 5 14:16:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1