Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BFLEdge.h

Go to the documentation of this file.
00001 #ifndef BFLEDGE_H
00002 #define BFLEDGE_H
00003 
00004 class BFLEdge: public TObject {
00005 
00006 public:
00007   BFLEdge(Int_t Edge):fEdgeID(Edge) { /*cout << "EDGE CREATED" << endl;*/ }
00008   BFLEdge(Int_t Edge, Int_t RightPolygon, Int_t LeftPolygon,
00009        Int_t StartVtx, Int_t EndVtx, Int_t CwPred, Int_t CcwPred,
00010        Int_t CwSucc, Int_t CcwSucc):
00011          fEdgeID(Edge), fRightPolygon(RightPolygon), 
00012          fLeftPolygon(LeftPolygon),fStartVtx(StartVtx), fEndVtx(EndVtx), 
00013          fCwPredecessor(CwPred), fCcwPredecessor(CcwPred),
00014          fCwSuccessor(CwSucc), fCcwSuccessor(CcwSucc) { /*cout << endl;*/ }   
00015   virtual ~BFLEdge() { /*cout << " EDGE DELETED" <<  endl;*/ }
00016    
00017   virtual Int_t GetEdgeID(void) const {return fEdgeID;}
00018   virtual Int_t GetRightPolyg(void) const {return fRightPolygon;}
00019   virtual Int_t GetLeftPolyg(void) const {return fLeftPolygon;}
00020   virtual Int_t GetStartVtx(void) const {return fStartVtx;}
00021   virtual Int_t GetEndVtx(void) const {return fEndVtx;}
00022   virtual Int_t GetCwPredecessor(void) const {return fCwPredecessor;}
00023   virtual Int_t GetCcwPredecessor(void) const {return fCcwPredecessor;}
00024   virtual Int_t GetCwSuccessor(void) const {return fCwSuccessor;}
00025   virtual Int_t GetCcwSuccessor(void) const {return fCcwSuccessor;}
00026 
00027   virtual void SetEdge(Int_t edge) {fEdgeID = edge;}
00028   virtual void SetRightPolyg(Int_t rpolyg) {fRightPolygon = rpolyg;}
00029   virtual void SetLeftPolyg(Int_t lpolyg) {fLeftPolygon = lpolyg;}
00030   virtual void SetStartVtx(Int_t svtx) {fStartVtx = svtx;}
00031   virtual void SetEndVtx(Int_t evtx) {fEndVtx = evtx;}
00032   virtual void SetCwPredecessor(Int_t cwp) {fCwPredecessor = cwp;}
00033   virtual void SetCcwPredecessor(Int_t ccwp) {fCcwPredecessor = ccwp;}
00034   virtual void SetCwSuccessor(Int_t cws) {fCwSuccessor = cws;}
00035   virtual void SetCcwSuccessor(Int_t ccws) {fCcwSuccessor = ccws;}
00036 
00037   void  Print(Option_t * /* option */ ="") const { 
00038     cout << endl;  
00039     cout << "\n@@@ Edge ID = " << fEdgeID;
00040     cout << "\nRight Polygon................." << fRightPolygon;
00041     cout << "\nLeft Polygon.................." << fLeftPolygon;
00042     cout << "\nStart Vertex.................." << fStartVtx;
00043     cout << "\nEnd Vertex...................." << fEndVtx;
00044     cout << "\nClockwise Predecessor........." << fCwPredecessor;
00045     cout << "\nCounterclockwise Predecessor.." << fCcwPredecessor;
00046     cout << "\nClockwise Successor..........." << fCwSuccessor;
00047     cout << "\nCounterclockwise Successor...." << fCcwSuccessor;
00048     cout << std::flush;
00049   }
00050 
00051    Bool_t IsEqual(const TObject *obj) const { 
00052      return fEdgeID == ((BFLEdge *)obj)->GetEdgeID(); 
00053    }
00054    Bool_t IsSortable() const { return kTRUE; }
00055    Int_t Compare(const TObject *obj) const {
00056      if ( fEdgeID == ((BFLEdge *)obj)->GetEdgeID() )
00057         return 0;
00058      else if (fEdgeID < ((BFLEdge *)obj)->GetEdgeID() )
00059         return -1;
00060      else
00061         return 1; 
00062    }
00063 
00064 private:
00065   Int_t fEdgeID;
00066   Int_t fRightPolygon;
00067   Int_t fLeftPolygon;
00068   Int_t fStartVtx;
00069   Int_t fEndVtx;
00070   Int_t fCwPredecessor;
00071   Int_t fCcwPredecessor;
00072   Int_t fCwSuccessor;
00073   Int_t fCcwSuccessor;
00074 
00075 
00076   ClassDef(BFLEdge,0)   // Voronoi Edge class
00077 };
00078 
00079 #endif

Generated on Mon Feb 15 11:06:25 2010 for loon by  doxygen 1.3.9.1