![]() |
AliRoot Core
edcc906 (edcc906)
|
A planar polygon. More...
#include <AliMUONPolygon.h>
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) | |
AliMUONPolygon & | operator= (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... | |
A planar polygon.
A simple planar polygon, with a given orientation
Definition at line 19 of file AliMUONPolygon.h.
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.
|
virtual |
dtor
Definition at line 71 of file AliMUONPolygon.cxx.
|
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(), and NumberOfVertices().
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 Clone(), and AliMUONContour::IsInside().
|
inline |
Whether this polygon is oriented counter clockwise.
Definition at line 36 of file AliMUONPolygon.h.
Referenced by AliMUONContour::AssertOrientation(), and AliMUONContourMaker::CreateContour().
|
inline |
Get the number of vertices of this polygon.
Definition at line 49 of file AliMUONPolygon.h.
Referenced by AliMUONContour::Add(), AliMUONContour::AliMUONContour(), AliMUONContourMaker::GetVerticalEdges(), AliMUONContour::Offset(), AliMUONContourPainter::Paint(), AliMUONContourMakerTest::Plot(), Print(), SignedArea(), and AliMUONContour::Transform().
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 NumberOfVertices(), and AliMUONContour::Print().
void AliMUONPolygon::ReverseOrientation | ( | ) |
Reverse the orientation of this polygon
Definition at line 187 of file AliMUONPolygon.cxx.
Referenced by AliMUONContour::AssertOrientation(), and IsCounterClockwiseOriented().
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(), IsCounterClockwiseOriented(), 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 Clone(), IsCounterClockwiseOriented(), and Print().
|
inline |
Return the x-coordinate of the i-th vertex.
Definition at line 43 of file AliMUONPolygon.h.
Referenced by AliMUONContour::Add(), Close(), AliMUONContourMaker::GetVerticalEdges(), AliMUONContour::Offset(), AliMUONContourMakerTest::Plot(), Print(), ReverseOrientation(), SignedArea(), and AliMUONContour::Transform().
|
inline |
Return the y-coordinate of the i-th vertex.
Definition at line 46 of file AliMUONPolygon.h.
Referenced by AliMUONContour::Add(), Close(), AliMUONContourMaker::GetVerticalEdges(), AliMUONContour::Offset(), AliMUONContourMakerTest::Plot(), Print(), ReverseOrientation(), SignedArea(), and AliMUONContour::Transform().
|
private |
Number of vertices.
Definition at line 56 of file AliMUONPolygon.h.
Referenced by AliMUONPolygon(), Close(), Contains(), NumberOfVertices(), operator=(), ReverseOrientation(), and SetVertex().
|
private |
Vertices x coordinates.
Definition at line 59 of file AliMUONPolygon.h.
Referenced by AliMUONPolygon(), Contains(), operator=(), ReverseOrientation(), SetVertex(), X(), and ~AliMUONPolygon().
|
private |
Vertices y coordinates.
Definition at line 62 of file AliMUONPolygon.h.
Referenced by AliMUONPolygon(), Contains(), operator=(), ReverseOrientation(), SetVertex(), Y(), and ~AliMUONPolygon().