TGeoShapeAssembly.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoShapeAssembly.h 36632 2010-11-12 15:57:07Z agheata $
00002 // Author: Andrei Gheata   02/06/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_TGeoShapeAssembly
00013 #define ROOT_TGeoShapeAssembly
00014 
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018 
00019 ////////////////////////////////////////////////////////////////////////////
00020 //                                                                        //
00021 // TGeoShapeAssembly - The shape encapsulating an assembly (union) of     //
00022 //         volumes. Automatically created by TGeoVolumeAssembly class     //
00023 //                                                                        //
00024 ////////////////////////////////////////////////////////////////////////////
00025 
00026 class TGeoVolumeAssembly;
00027 
00028 class TGeoShapeAssembly : public TGeoBBox
00029 {
00030 protected :
00031 // data members
00032    Int_t                 fCurrent;  //! node number for current node
00033    Int_t                 fNext;     //! node number for next crossed node
00034    TGeoVolumeAssembly   *fVolume;   // assembly volume
00035    Bool_t                fBBoxOK;   // has bounding box been calculated
00036 
00037 // methods
00038 public:
00039    // constructors
00040    TGeoShapeAssembly();
00041    TGeoShapeAssembly(TGeoVolumeAssembly *vol);
00042    // destructor
00043    virtual ~TGeoShapeAssembly();
00044    // methods
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 void          GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
00057    virtual Int_t         GetNmeshVertices() const {return 0;}
00058    virtual void          InspectShape() const;
00059    virtual Bool_t        IsAssembly() const {return kTRUE;}
00060    virtual Bool_t        IsCylType() const {return kFALSE;}
00061    void                  NeedsBBoxRecompute() {fBBoxOK = kFALSE;}
00062    void                  RecomputeBoxLast();
00063    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
00064    virtual void          SavePrimitive(ostream &out, Option_t *option = "");
00065    virtual void          SetPoints(Double_t *points) const;
00066    virtual void          SetPoints(Float_t *points) const;
00067    virtual void          SetSegsAndPols(TBuffer3D &buff) const;
00068 
00069    ClassDef(TGeoShapeAssembly, 2)         // assembly shape
00070 };
00071 
00072 #endif

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