TGeoPolygon Class Reference

#include <TGeoPolygon.h>

Inheritance diagram for TGeoPolygon:

TObject TObject List of all members.

Public Types

enum  
enum  

Public Member Functions

 TGeoPolygon ()
 TGeoPolygon (Int_t nvert)
virtual ~TGeoPolygon ()
Double_t Area () const
Bool_t Contains (Double_t *point) const
void FinishPolygon ()
Int_t GetNvert () const
Double_tGetX ()
Double_tGetY ()
Bool_t IsClockwise () const
Bool_t IsConvex () const
Bool_t IsFinished () const
Bool_t IsIllegalCheck () const
Double_t Safety (Double_t *point, Int_t &isegment) const
void SetConvex (Bool_t flag=kTRUE)
void SetXY (Double_t *x, Double_t *y)
void SetNextIndex (Int_t index=-1)
 TGeoPolygon ()
 TGeoPolygon (Int_t nvert)
virtual ~TGeoPolygon ()
Double_t Area () const
Bool_t Contains (Double_t *point) const
void FinishPolygon ()
Int_t GetNvert () const
Double_tGetX ()
Double_tGetY ()
Bool_t IsClockwise () const
Bool_t IsConvex () const
Bool_t IsFinished () const
Bool_t IsIllegalCheck () const
Double_t Safety (Double_t *point, Int_t &isegment) const
void SetConvex (Bool_t flag=kTRUE)
void SetXY (Double_t *x, Double_t *y)
void SetNextIndex (Int_t index=-1)

Protected Attributes

Int_t fNvert
Int_t fNconvex
Int_tfInd
Int_tfIndc
Double_tfX
Double_tfY
 pointer to list of current X coordinates of vertices
TObjArrayfDaughters
 pointer to list of current Y coordinates of vertices
Int_tfInd
Int_tfIndc
Double_tfX
Double_tfY
 pointer to list of current X coordinates of vertices
TObjArrayfDaughters
 pointer to list of current Y coordinates of vertices

Private Member Functions

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 ()
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 ()

Detailed Description

Definition at line 31 of file TGeoPolygon.h.


Member Enumeration Documentation

anonymous enum

Definition at line 34 of file TGeoPolygon.h.

anonymous enum

Definition at line 34 of file TGeoPolygon.h.


Constructor & Destructor Documentation

TGeoPolygon::TGeoPolygon (  ) 

Referenced by FinishPolygon().

TGeoPolygon::TGeoPolygon ( Int_t  nvert  ) 

Definition at line 67 of file TGeoPolygon.cxx.

References TObject::Fatal(), fDaughters, fInd, fIndc, fNconvex, fNvert, fX, fY, kFALSE, kGeoFinishPolygon, TObject::SetBit(), SetConvex(), and SetNextIndex().

TGeoPolygon::~TGeoPolygon (  )  [virtual]

Definition at line 87 of file TGeoPolygon.cxx.

References TObjArray::Delete(), fDaughters, fInd, and fIndc.

TGeoPolygon::TGeoPolygon (  ) 

TGeoPolygon::TGeoPolygon ( Int_t  nvert  ) 

virtual TGeoPolygon::~TGeoPolygon (  )  [virtual]


Member Function Documentation

void TGeoPolygon::ConvexCheck (  )  [private]

Definition at line 130 of file TGeoPolygon.cxx.

References fInd, fNvert, fX, fY, i, IsRightSided(), j, k, and SetConvex().

Referenced by FinishPolygon().

Bool_t TGeoPolygon::IsSegConvex ( Int_t  i1,
Int_t  i2 = -1 
) const [private]

Definition at line 212 of file TGeoPolygon.cxx.

References fInd, fNvert, fX, fY, i, IsRightSided(), kFALSE, and kTRUE.

Referenced by OutscribedConvex().

Bool_t TGeoPolygon::IsRightSided ( Double_t point,
Int_t  ind1,
Int_t  ind2 
) const [private]

Definition at line 201 of file TGeoPolygon.cxx.

References RootCsg::dot(), fX, fY, IsClockwise(), kFALSE, and kTRUE.

Referenced by Contains(), ConvexCheck(), and IsSegConvex().

void TGeoPolygon::OutscribedConvex (  )  [private]

Definition at line 256 of file TGeoPolygon.cxx.

References TObject::Fatal(), fIndc, fNconvex, fNvert, IsSegConvex(), kFALSE, and kTRUE.

Referenced by FinishPolygon().

Double_t TGeoPolygon::Area (  )  const

Definition at line 98 of file TGeoPolygon.cxx.

References TMath::Abs(), fInd, fNvert, fX, fY, i, and j.

Referenced by TGeoXtru::Capacity().

Bool_t TGeoPolygon::Contains ( Double_t point  )  const

Definition at line 113 of file TGeoPolygon.cxx.

References Contains(), fDaughters, fIndc, fNconvex, TObjArray::GetEntriesFast(), i, IsRightSided(), kFALSE, kTRUE, and TObjArray::UncheckedAt().

Referenced by Contains(), TGeoXtru::Contains(), TGeoXtru::DistFromInside(), TGeoXtru::DistFromOutside(), TGeoXtru::DistToPlane(), and TGeoXtru::SafetyToSector().

void TGeoPolygon::FinishPolygon (  ) 

Definition at line 150 of file TGeoPolygon.cxx.

References TObjArray::Add(), ConvexCheck(), fDaughters, fInd, fIndc, FinishPolygon(), fNconvex, fNvert, fX, fY, IsConvex(), kGeoFinishPolygon, nskip, OutscribedConvex(), TObject::SetBit(), SetNextIndex(), SetXY(), and TGeoPolygon().

Referenced by TGeoXtru::DefinePolygon(), and FinishPolygon().

Int_t TGeoPolygon::GetNvert (  )  const [inline]

Definition at line 63 of file TGeoPolygon.h.

References fNvert.

Double_t* TGeoPolygon::GetX (  )  [inline]

Definition at line 64 of file TGeoPolygon.h.

References fX.

Double_t* TGeoPolygon::GetY (  )  [inline]

Definition at line 65 of file TGeoPolygon.h.

References fY.

Bool_t TGeoPolygon::IsClockwise (  )  const [inline]

Definition at line 66 of file TGeoPolygon.h.

References kGeoACW, and TObject::TestBit().

Referenced by TGeoXtru::GetPlaneVertices(), IsRightSided(), and TGeoXtru::SetPoints().

Bool_t TGeoPolygon::IsConvex (  )  const [inline]

Definition at line 67 of file TGeoPolygon.h.

References kGeoConvex, and TObject::TestBit().

Referenced by TGeoXtru::DistFromInside(), TGeoXtru::DistFromOutside(), and FinishPolygon().

Bool_t TGeoPolygon::IsFinished (  )  const [inline]

Definition at line 68 of file TGeoPolygon.h.

References kGeoFinishPolygon, and TObject::TestBit().

Bool_t TGeoPolygon::IsIllegalCheck (  )  const

Definition at line 227 of file TGeoPolygon.cxx.

References TObject::Error(), fNvert, fX, fY, i, TGeoShape::IsSegCrossing(), j, kFALSE, kTRUE, x1, x2, x3, and x4.

Referenced by TGeoXtru::DefinePolygon().

Double_t TGeoPolygon::Safety ( Double_t point,
Int_t isegment 
) const

Definition at line 303 of file TGeoPolygon.cxx.

References fNvert, fX, fY, TGeoShape::IsSameWithinTolerance(), p1(), p2(), safe, TMath::Sqrt(), and u.

Referenced by TGeoXtru::SafetyToSector().

void TGeoPolygon::SetConvex ( Bool_t  flag = kTRUE  )  [inline]

Definition at line 71 of file TGeoPolygon.h.

References flag, kGeoConvex, and TObject::SetBit().

Referenced by ConvexCheck(), and TGeoPolygon().

void TGeoPolygon::SetXY ( Double_t x,
Double_t y 
)

Definition at line 383 of file TGeoPolygon.cxx.

References TObjArray::At(), fDaughters, fInd, fNvert, fX, fY, TObjArray::GetEntriesFast(), i, kFALSE, kGeoACW, kTRUE, TObject::SetBit(), and SetXY().

Referenced by TGeoXtru::DefinePolygon(), FinishPolygon(), and SetXY().

void TGeoPolygon::SetNextIndex ( Int_t  index = -1  ) 

Definition at line 359 of file TGeoPolygon.cxx.

References TObject::Error(), fInd, fNconvex, fNvert, fX, fY, i, kFALSE, kGeoACW, kTRUE, and TObject::SetBit().

Referenced by FinishPolygon(), and TGeoPolygon().

void TGeoPolygon::ConvexCheck (  )  [private]

Bool_t TGeoPolygon::IsSegConvex ( Int_t  i1,
Int_t  i2 = -1 
) const [private]

Bool_t TGeoPolygon::IsRightSided ( Double_t point,
Int_t  ind1,
Int_t  ind2 
) const [private]

void TGeoPolygon::OutscribedConvex (  )  [private]

Double_t TGeoPolygon::Area (  )  const

Bool_t TGeoPolygon::Contains ( Double_t point  )  const

void TGeoPolygon::FinishPolygon (  ) 

Int_t TGeoPolygon::GetNvert (  )  const [inline]

Definition at line 63 of file TGeoPolygon.h.

References fNvert.

Double_t* TGeoPolygon::GetX ( void   )  [inline]

Definition at line 64 of file TGeoPolygon.h.

References fX.

Double_t* TGeoPolygon::GetY (  )  [inline]

Definition at line 65 of file TGeoPolygon.h.

References fY.

Bool_t TGeoPolygon::IsClockwise (  )  const [inline]

Definition at line 66 of file TGeoPolygon.h.

References kGeoACW, and TObject::TestBit().

Bool_t TGeoPolygon::IsConvex (  )  const [inline]

Definition at line 67 of file TGeoPolygon.h.

References kGeoConvex, and TObject::TestBit().

Bool_t TGeoPolygon::IsFinished (  )  const [inline]

Definition at line 68 of file TGeoPolygon.h.

References kGeoFinishPolygon, and TObject::TestBit().

Bool_t TGeoPolygon::IsIllegalCheck (  )  const

Double_t TGeoPolygon::Safety ( Double_t point,
Int_t isegment 
) const

void TGeoPolygon::SetConvex ( Bool_t  flag = kTRUE  )  [inline]

Definition at line 71 of file TGeoPolygon.h.

References flag, kGeoConvex, and TObject::SetBit().

void TGeoPolygon::SetXY ( Double_t x,
Double_t y 
)

void TGeoPolygon::SetNextIndex ( Int_t  index = -1  ) 


Member Data Documentation

Int_t TGeoPolygon::fNvert [protected]

Definition at line 41 of file TGeoPolygon.h.

Referenced by Area(), ConvexCheck(), FinishPolygon(), GetNvert(), IsIllegalCheck(), IsSegConvex(), OutscribedConvex(), Safety(), SetNextIndex(), SetXY(), and TGeoPolygon().

Int_t TGeoPolygon::fNconvex [protected]

Definition at line 42 of file TGeoPolygon.h.

Referenced by Contains(), FinishPolygon(), OutscribedConvex(), SetNextIndex(), and TGeoPolygon().

Int_t* TGeoPolygon::fInd [protected]

Definition at line 43 of file TGeoPolygon.h.

Referenced by Area(), ConvexCheck(), FinishPolygon(), IsSegConvex(), SetNextIndex(), SetXY(), TGeoPolygon(), and ~TGeoPolygon().

Int_t* TGeoPolygon::fIndc [protected]

Definition at line 44 of file TGeoPolygon.h.

Referenced by Contains(), FinishPolygon(), OutscribedConvex(), TGeoPolygon(), and ~TGeoPolygon().

Double_t* TGeoPolygon::fX [protected]

Definition at line 45 of file TGeoPolygon.h.

Referenced by Area(), ConvexCheck(), FinishPolygon(), GetX(), IsIllegalCheck(), IsRightSided(), IsSegConvex(), Safety(), SetNextIndex(), SetXY(), and TGeoPolygon().

Double_t* TGeoPolygon::fY [protected]

pointer to list of current X coordinates of vertices

Definition at line 46 of file TGeoPolygon.h.

Referenced by Area(), ConvexCheck(), FinishPolygon(), GetY(), IsIllegalCheck(), IsRightSided(), IsSegConvex(), Safety(), SetNextIndex(), SetXY(), and TGeoPolygon().

TObjArray* TGeoPolygon::fDaughters [protected]

pointer to list of current Y coordinates of vertices

Definition at line 47 of file TGeoPolygon.h.

Referenced by Contains(), FinishPolygon(), SetXY(), TGeoPolygon(), and ~TGeoPolygon().

Int_t* TGeoPolygon::fInd [protected]

Definition at line 43 of file TGeoPolygon.h.

Int_t* TGeoPolygon::fIndc [protected]

Definition at line 44 of file TGeoPolygon.h.

Double_t* TGeoPolygon::fX [protected]

Definition at line 45 of file TGeoPolygon.h.

Double_t* TGeoPolygon::fY [protected]

pointer to list of current X coordinates of vertices

Definition at line 46 of file TGeoPolygon.h.

TObjArray* TGeoPolygon::fDaughters [protected]

pointer to list of current Y coordinates of vertices

Definition at line 47 of file TGeoPolygon.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:39:06 2011 for ROOT_528-00b_version by  doxygen 1.5.1