AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONPolygon Class Reference

A planar polygon. More...

#include <AliMUONPolygon.h>

Inheritance diagram for AliMUONPolygon:

Public Member Functions

 AliMUONPolygon (Int_t nvertices=5)
 
 AliMUONPolygon (Double_t xpos, Double_t ypos, Double_t halfsizex, Double_t halfsizey)
 
 AliMUONPolygon (const AliMUONPolygon &rhs)
 
AliMUONPolygonoperator= (const AliMUONPolygon &rhs)
 
virtual ~AliMUONPolygon ()
 
virtual TObject * Clone (const char *="") const
 Create a full copy of this object. More...
 
Bool_t Contains (Double_t x, Double_t y) const
 
Double_t SignedArea () const
 
Bool_t IsCounterClockwiseOriented () const
 Whether this polygon is oriented counter clockwise. More...
 
void ReverseOrientation ()
 
void SetVertex (Int_t i, Double_t x, Double_t y)
 
Double_t X (Int_t i) const
 Return the x-coordinate of the i-th vertex. More...
 
Double_t Y (Int_t i) const
 Return the y-coordinate of the i-th vertex. More...
 
Int_t NumberOfVertices () const
 Get the number of vertices of this polygon. More...
 
void Print (Option_t *opt="") const
 
void Close ()
 

Private Attributes

Int_t fN
 Number of vertices. More...
 
Double_t * fX
 Vertices x coordinates. More...
 
Double_t * fY
 Vertices y coordinates. More...
 

Detailed Description

A planar polygon.

A simple planar polygon, with a given orientation

Author
Laurent Aphecetche, Subatech

Definition at line 19 of file AliMUONPolygon.h.

Constructor & Destructor Documentation

AliMUONPolygon::AliMUONPolygon ( Int_t  nvertices = 5)

Ctor with a predefined number of vertices.

Definition at line 37 of file AliMUONPolygon.cxx.

Referenced by Clone().

AliMUONPolygon::AliMUONPolygon ( Double_t  xpos,
Double_t  ypos,
Double_t  halfsizex,
Double_t  halfsizey 
)

Ctor. Polygon will be a rectangle.

Definition at line 47 of file AliMUONPolygon.cxx.

AliMUONPolygon::AliMUONPolygon ( const AliMUONPolygon rhs)

Copy constructor.

Definition at line 79 of file AliMUONPolygon.cxx.

AliMUONPolygon::~AliMUONPolygon ( )
virtual

dtor

Definition at line 71 of file AliMUONPolygon.cxx.

Member Function Documentation

virtual TObject* AliMUONPolygon::Clone ( const char *  = "") const
inlinevirtual

Create a full copy of this object.

Definition at line 29 of file AliMUONPolygon.h.

Referenced by AliMUONContour::Copy().

void AliMUONPolygon::Close ( )

Make that last point = first point

Definition at line 149 of file AliMUONPolygon.cxx.

Referenced by AliMUONPolygon().

Bool_t AliMUONPolygon::Contains ( Double_t  x,
Double_t  y 
) const

Whether the polygon contains point (x,y)

Definition at line 137 of file AliMUONPolygon.cxx.

Referenced by AliMUONContour::IsInside().

Bool_t AliMUONPolygon::IsCounterClockwiseOriented ( ) const
inline

Whether this polygon is oriented counter clockwise.

Definition at line 36 of file AliMUONPolygon.h.

Referenced by AliMUONContour::AssertOrientation(), and AliMUONContourMaker::CreateContour().

Int_t AliMUONPolygon::NumberOfVertices ( ) const
inline
AliMUONPolygon & AliMUONPolygon::operator= ( const AliMUONPolygon rhs)

Assignment operator

Definition at line 104 of file AliMUONPolygon.cxx.

void AliMUONPolygon::Print ( Option_t *  opt = "") const

Printout

Definition at line 157 of file AliMUONPolygon.cxx.

Referenced by AliMUONContour::Print().

void AliMUONPolygon::ReverseOrientation ( )

Reverse the orientation of this polygon

Definition at line 187 of file AliMUONPolygon.cxx.

Referenced by AliMUONContour::AssertOrientation().

void AliMUONPolygon::SetVertex ( Int_t  i,
Double_t  x,
Double_t  y 
)

Set one vertex

Definition at line 208 of file AliMUONPolygon.cxx.

Referenced by AliMUONPolygon(), Close(), AliMUONContour::Offset(), and AliMUONContour::Transform().

Double_t AliMUONPolygon::SignedArea ( ) const

Compute the signed area of this polygon Algorithm from F. Feito, J.C. Torres and A. Urena, Comput. & Graphics, Vol. 19, pp. 595-600, 1995

Definition at line 169 of file AliMUONPolygon.cxx.

Referenced by IsCounterClockwiseOriented(), and Print().

Double_t AliMUONPolygon::X ( Int_t  i) const
inline
Double_t AliMUONPolygon::Y ( Int_t  i) const
inline

Member Data Documentation

Int_t AliMUONPolygon::fN
private

Number of vertices.

Definition at line 56 of file AliMUONPolygon.h.

Referenced by AliMUONPolygon(), Close(), Contains(), NumberOfVertices(), operator=(), ReverseOrientation(), and SetVertex().

Double_t* AliMUONPolygon::fX
private

Vertices x coordinates.

Definition at line 59 of file AliMUONPolygon.h.

Referenced by AliMUONPolygon(), Contains(), operator=(), ReverseOrientation(), SetVertex(), X(), and ~AliMUONPolygon().

Double_t* AliMUONPolygon::fY
private

Vertices y coordinates.

Definition at line 62 of file AliMUONPolygon.h.

Referenced by AliMUONPolygon(), Contains(), operator=(), ReverseOrientation(), SetVertex(), Y(), and ~AliMUONPolygon().


The documentation for this class was generated from the following files: