library: libGeom #include "TGeoBoolNode.h"

# TGeoUnion

class description - source file - inheritance tree (.pdf)

## class TGeoUnion : public TGeoBoolNode

| Inheritance Chart:

`TObject`

<-

`TGeoBoolNode`

<-

`TGeoUnion`

        public:

                                             TGeoUnion()
                                             TGeoUnion(const char* expr1, const char* expr2)
                                             TGeoUnion(TGeoShape* left, TGeoShape* right, TGeoMatrix* lmat = 0, TGeoMatrix* rmat = 0)
                                             TGeoUnion(const TGeoUnion&)
                                     virtual ~TGeoUnion()
                              static TClass* Class()
                                virtual void ComputeBBox(Double_t& dx, Double_t& dy, Double_t& dz, Double_t* origin)
                                virtual void ComputeNormal(Double_t* point, Double_t* dir, Double_t* norm)
                              virtual Bool_t Contains(Double_t* point) const
                               virtual Int_t DistanceToPrimitive(Int_t px, Int_t py)
                            virtual Double_t DistFromInside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = 0, Double_t* safe = 0) const
                            virtual Double_t DistFromOutside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = 0, Double_t* safe = 0) const
          virtual TGeoBoolNode::EGeoBoolType GetBooleanOperator() const
                               virtual Int_t GetNpoints() const
                             virtual TClass* IsA() const
                                  TGeoUnion& operator=(const TGeoUnion&)
                                virtual void Paint(Option_t* option)
                            virtual Double_t Safety(Double_t* point, Bool_t in = kTRUE) const
                                virtual void SavePrimitive(ofstream& out, Option_t* option)
                                virtual void SetPoints(Double_t* points) const
                                virtual void SetPoints(Float_t* points) const
                                virtual void ShowMembers(TMemberInspector& insp, char* parent)
                                virtual void Sizeof3D() const
                                virtual void Streamer(TBuffer& b)
                                        void StreamerNVirtual(TBuffer& b)

### Data Members

## Class Description

void Paint(Option_t *option)

TGeoUnion()

     Default constructor

TGeoUnion(const char *expr1, const char *expr2) :TGeoBoolNode(expr1, expr2)

     Constructor

TGeoUnion(TGeoShape *left, TGeoShape *right, TGeoMatrix *lmat, TGeoMatrix *rmat) :TGeoBoolNode(left,right,lmat,rmat)

     Constructor providing pointers to components

~TGeoUnion()

     Destructor
     --- deletion of components handled by TGeoManager class.

void ComputeBBox(Double_t &dx, Double_t &dy, Double_t &dz, Double_t *origin)

     Compute bounding box corresponding to a union of two shapes.

Bool_t Contains(Double_t *point) const

     Find if a union of two shapes contains a given point

void ComputeNormal(Double_t *point, Double_t *dir, Double_t *norm)

Int_t DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/)

     Compute minimum distance to shape vertices

Double_t DistFromInside(Double_t *point, Double_t *dir, Int_t iact, Double_t step, Double_t *safe) const

     Compute distance from a given point to outside.
       printf("Point is : %g, %g, %g\n", point[0], point[1], point[2]);

Double_t DistFromOutside(Double_t *point, Double_t *dir, Int_t iact, Double_t step, Double_t *safe) const

     Compute distance from a given point to inside.

Int_t GetNpoints() const

     Returns number of vertices for the composite shape described by this union.

void SetPoints(Double_t * /*points*/) const

     Fill buffer with shape vertices.

Double_t Safety(Double_t *point, Bool_t) const

     Compute safety distance for a union node;

void SavePrimitive(ofstream &out, Option_t *option)

     Save a primitive as a C++ statement(s) on output stream "out".

void SetPoints(Float_t * /*points*/) const

     Fill buffer with shape vertices.

void Sizeof3D() const

     Register 3D size of this shape.

### Inline Functions

            TGeoBoolNode::EGeoBoolType GetBooleanOperator() const
                               TClass* Class()
                               TClass* IsA() const
                                  void ShowMembers(TMemberInspector& insp, char* parent)
                                  void Streamer(TBuffer& b)
                                  void StreamerNVirtual(TBuffer& b)
                             TGeoUnion TGeoUnion(const TGeoUnion&)
                            TGeoUnion& operator=(const TGeoUnion&)

Author: Andrei Gheata 30/05/02
Last update: :$Name: $:$Id: TGeoBoolNode.cxx,v 1.22 2005/05/25 14:25:16 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *