1 #ifndef ALIFMDPOLYGON_H
2 #define ALIFMDPOLYGON_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
8 * See cxx source for full Copyright notice
11 # include <TVector2.h>
13 #ifndef ROOT_TObjArray
14 # include <TObjArray.h>
17 class AliFMDPolygon : public TObject
20 // Construct a alipolygon with N sides
22 virtual ~AliFMDPolygon();
25 void Clear(Option_t* option="");
28 bool AddVertex(TVector2* c);
29 bool AddVertex(double x, double y);
32 const TVector2& GetVertex(size_t i) const;
34 // Check if a point is inside the polygon
35 bool Contains(const TVector2* c) const;
36 bool Contains(double x, double y) const;
38 // Get the number of verticies
39 size_t GetNVerticies() const { return fVerticies.GetEntries(); }
40 // Get the coordinates
41 const TObjArray& GetVerticies() const { return fVerticies; }
43 void Draw(const char* option="PL", const char* name=0) const;
52 // List of coordinates
54 // Force convexity check
55 bool ConvexCheck() const;
56 // Check if a point is at the right-hand side of a segment
57 bool IsOnLeftHand(const TVector2* c, size_t i1, size_t i2) const;
59 ClassDef(AliFMDPolygon,1) // Polygon parameters
63 //____________________________________________________________________