TGeoScaledShape.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoScaledShape.h 21425 2007-12-17 15:59:27Z brun $
00002 // Author: Andrei Gheata   26/09/05
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_TGeoScaledShape
00013 #define ROOT_TGeoScaledShape
00014 
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018 
00019 ////////////////////////////////////////////////////////////////////////////
00020 //                                                                        //
00021 // TGeoScaledShape - A scaled shape. Has a pointer to a shape and to a    //
00022 //   TGeoScale.                                                           //
00023 //                                                                        //
00024 ////////////////////////////////////////////////////////////////////////////
00025 
00026 class TGeoScale;
00027 class TGeoShape;
00028 
00029 class TGeoScaledShape : public TGeoBBox
00030 {
00031 protected :
00032 // data members
00033    TGeoShape            *fShape;     // pointer to an existing shape
00034    TGeoScale            *fScale;     // pointer to a scale transformation
00035 // methods
00036 public:
00037    // constructors
00038    TGeoScaledShape();
00039    TGeoScaledShape(const char *name, TGeoShape *shape, TGeoScale *scale);
00040    TGeoScaledShape(TGeoShape *shape, TGeoScale *scale);
00041    // destructor
00042    virtual ~TGeoScaledShape();
00043    // methods
00044    virtual Double_t      Capacity() const;
00045    virtual void          ComputeBBox();
00046    virtual void          ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm);
00047    virtual Bool_t        Contains(Double_t *point) const;
00048    virtual Int_t         DistancetoPrimitive(Int_t px, Int_t py);
00049    virtual Double_t      DistFromInside(Double_t *point, Double_t *dir, Int_t iact=1, 
00050                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00051    virtual Double_t      DistFromOutside(Double_t *point, Double_t *dir, Int_t iact=1, 
00052                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00053    virtual TGeoVolume   *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, 
00054                                 Double_t start, Double_t step);
00055    virtual TGeoShape    *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
00056    virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
00057    virtual void          GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
00058    virtual Int_t         GetNmeshVertices() const {return fShape->GetNmeshVertices();}
00059    TGeoShape            *GetShape() const {return fShape;}
00060    TGeoScale            *GetScale() const {return fScale;}
00061    virtual void          InspectShape() const;
00062    virtual Bool_t        IsCylType() const {return fShape->IsCylType();}
00063    virtual Bool_t        IsReflected() const;
00064    virtual TBuffer3D    *MakeBuffer3D() const;
00065    static  TGeoShape    *MakeScaledShape(const char *name, TGeoShape *shape, TGeoScale *scale);
00066    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
00067    virtual void          SavePrimitive(ostream &out, Option_t *option = "");
00068    void                  SetScale(TGeoScale *scale) {fScale = scale;}
00069    virtual void          SetPoints(Double_t *points) const;
00070    virtual void          SetPoints(Float_t *points) const;
00071    virtual void          SetSegsAndPols(TBuffer3D &buffer) const;
00072 
00073    ClassDef(TGeoScaledShape, 1)         // a scaled shape
00074 };
00075 
00076 #endif

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