#ifndef ROOT_TGeoPolygon
#define ROOT_TGeoPolygon
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif
class TGeoPolygon : public TObject
{
public:
enum {
kGeoConvex = BIT(9),
kGeoFinishPolygon = BIT(10),
kGeoACW = BIT(11)
};
protected :
Int_t fNvert;
Int_t fNconvex;
Int_t *fInd;
Int_t *fIndc;
Double_t *fX;
Double_t *fY;
TObjArray *fDaughters;
private:
void ConvexCheck();
Bool_t IsSegConvex(Int_t i1, Int_t i2=-1) const;
Bool_t IsRightSided(Double_t *point, Int_t ind1, Int_t ind2) const;
void OutscribedConvex();
public:
TGeoPolygon();
TGeoPolygon(Int_t nvert);
virtual ~TGeoPolygon();
Double_t Area() const;
Bool_t Contains(Double_t *point) const;
void FinishPolygon();
Int_t GetNvert() const {return fNvert;}
Double_t *GetX() {return fX;}
Double_t *GetY() {return fY;}
Bool_t IsClockwise() const {return !TObject::TestBit(kGeoACW);}
Bool_t IsConvex() const {return TObject::TestBit(kGeoConvex);}
Bool_t IsFinished() const {return TObject::TestBit(kGeoFinishPolygon);}
Double_t Safety(Double_t *point, Int_t &isegment) const;
void SetConvex(Bool_t flag=kTRUE) {TObject::SetBit(kGeoConvex,flag);}
void SetXY(Double_t *x, Double_t *y);
void SetNextIndex(Int_t index=-1);
ClassDef(TGeoPolygon, 2)
};
#endif
Last change: Wed Jun 25 08:45:22 2008
Last generated: 2008-06-25 08:45
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.