TGeoCompositeShape.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoCompositeShape.h 32690 2010-03-21 08:47:56Z brun $
00002 // Author: Andrei Gheata   31/01/02
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_TGeoCompositeShape
00013 #define ROOT_TGeoCompositeShape
00014 
00015 #ifndef ROOT_TGeoBBox
00016 #include "TGeoBBox.h"
00017 #endif
00018     
00019 ////////////////////////////////////////////////////////////////////////////
00020 //                                                                        //
00021 // TGeoCompositeShape - composite shape class. A composite shape contains //
00022 //   a list of primitive shapes, the list of coresponding transformations //
00023 //   and a boolean finder handling boolean operations among components.   //
00024 //                                                                        //
00025 ////////////////////////////////////////////////////////////////////////////
00026 
00027 class TGeoBoolNode;
00028 
00029 class TGeoCompositeShape : public TGeoBBox
00030 {
00031 private :
00032 // data members
00033    TGeoBoolNode         *fNode;             // top boolean node
00034 
00035 protected:
00036    TGeoCompositeShape(const TGeoCompositeShape& gcs)
00037      : TGeoBBox(gcs), fNode(gcs.fNode) { }
00038    TGeoCompositeShape& operator=(const TGeoCompositeShape& gcs)
00039      {if(this!=&gcs) {TGeoBBox::operator=(gcs); fNode=gcs.fNode;} return *this;}
00040 
00041 public:
00042    // constructors
00043    TGeoCompositeShape();
00044    TGeoCompositeShape(const char *name, const char *expression);
00045    TGeoCompositeShape(const char *expression);
00046    TGeoCompositeShape(const char *name, TGeoBoolNode *node);
00047    // destructor
00048    virtual ~TGeoCompositeShape();
00049    // methods
00050    virtual Double_t      Capacity() const;
00051    virtual void          ComputeBBox();
00052    virtual void          ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm);
00053    virtual Bool_t        Contains(Double_t *point) const;
00054    virtual Int_t         DistancetoPrimitive(Int_t px, Int_t py);
00055    virtual Double_t      DistFromInside(Double_t *point, Double_t *dir, Int_t iact=1, 
00056                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00057    virtual Double_t      DistFromOutside(Double_t *point, Double_t *dir, Int_t iact=1, 
00058                                    Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
00059    virtual TGeoVolume   *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, 
00060                                 Double_t start, Double_t step);
00061    TGeoBoolNode         *GetBoolNode() const {return fNode;}
00062    virtual void          GetBoundingCylinder(Double_t * /*param*/) const {;}
00063    virtual TGeoShape    *GetMakeRuntimeShape(TGeoShape * /*mother*/, TGeoMatrix * /*mat*/) const {return 0;}
00064    virtual void          GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
00065    virtual Int_t         GetNmeshVertices() const;
00066    virtual Bool_t        GetPointsOnSegments(Int_t /*npoints*/, Double_t * /*array*/) const {return kFALSE;}
00067    virtual void          InspectShape() const;
00068    virtual Bool_t        IsComposite() const {return kTRUE;}
00069    virtual Bool_t        IsCylType() const {return kFALSE;}
00070    void                  MakeNode(const char *expression);
00071    virtual Bool_t        PaintComposite(Option_t *option = "") const;
00072    void                  RegisterYourself();
00073    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
00074    virtual void          SavePrimitive(ostream &out, Option_t *option = "");
00075    virtual void          SetDimensions(Double_t * /*param*/) {;}
00076    virtual void          SetPoints(Double_t *points) const;
00077    virtual void          SetPoints(Float_t *points) const;
00078    virtual void          Sizeof3D() const;
00079 
00080    ClassDef(TGeoCompositeShape, 1)         // boolean composite shape
00081 };
00082 
00083 
00084 
00085 #endif
00086 

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