QGIS API Documentation  2.17.0-Master (eef6f05)
HalfEdge.h
Go to the documentation of this file.
1 /***************************************************************************
2  HalfEdge.h - description
3  -------------------
4  copyright : (C) 2004 by Marco Hugentobler
5  email : [email protected]
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef HALFEDGE_H
18 #define HALFEDGE_H
19 
23 class ANALYSIS_EXPORT HalfEdge
24 {
25  protected:
27  int mDual;
29  int mNext;
31  int mPoint;
33  bool mBreak;
35  bool mForced;
36 
37  public:
39  HalfEdge();
40  HalfEdge( int dual, int next, int point, bool mbreak, bool forced );
41  ~HalfEdge();
43  int getDual() const;
45  int getNext() const;
47  int getPoint() const;
49  bool getBreak() const;
51  bool getForced() const;
53  void setDual( int d );
55  void setNext( int n );
57  void setPoint( int p );
59  void setBreak( bool b );
61  void setForced( bool f );
62 };
63 
64 inline HalfEdge::HalfEdge(): mDual( -10 ), mNext( -10 ), mPoint( -10 ), mBreak( false ), mForced( false )
65 {
66 
67 }
68 
69 inline HalfEdge::HalfEdge( int dual, int next, int point, bool mbreak, bool forced ): mDual( dual ), mNext( next ), mPoint( point ), mBreak( mbreak ), mForced( forced )
70 {
71 
72 }
73 
75 {
76 
77 }
78 
79 inline int HalfEdge::getDual() const
80 {
81  return mDual;
82 }
83 
84 inline int HalfEdge::getNext() const
85 {
86  return mNext;
87 }
88 
89 inline int HalfEdge::getPoint() const
90 {
91  return mPoint;
92 }
93 
94 inline bool HalfEdge::getBreak() const
95 {
96  return mBreak;
97 }
98 
99 inline bool HalfEdge::getForced() const
100 {
101  return mForced;
102 }
103 
104 inline void HalfEdge::setDual( int d )
105 {
106  mDual = d;
107 }
108 
109 inline void HalfEdge::setNext( int n )
110 {
111  mNext = n;
112 }
113 
114 inline void HalfEdge::setPoint( int p )
115 {
116  mPoint = p;
117 }
118 
119 inline void HalfEdge::setBreak( bool b )
120 {
121  mBreak = b;
122 }
123 
124 inline void HalfEdge::setForced( bool f )
125 {
126  mForced = f;
127 }
128 
129 #endif
bool getBreak() const
Returns, whether the HalfEdge belongs to a break line or not.
Definition: HalfEdge.h:94
int getPoint() const
Returns the number of the point at which this HalfEdge points.
Definition: HalfEdge.h:89
int getNext() const
Returns the number of the next HalfEdge.
Definition: HalfEdge.h:84
HalfEdge()
Default constructor.
Definition: HalfEdge.h:64
int mPoint
Number of the point at which this HalfEdge points.
Definition: HalfEdge.h:31
int mDual
Number of the dual HalfEdge.
Definition: HalfEdge.h:27
bool getForced() const
Returns, whether the HalfEdge belongs to a constrained edge or not.
Definition: HalfEdge.h:99
bool mForced
True, if the HalfEdge belongs to a constrained edge, false otherwise.
Definition: HalfEdge.h:35
bool mBreak
True, if the HalfEdge belongs to a break line, false otherwise.
Definition: HalfEdge.h:33
void setBreak(bool b)
Sets the break flag.
Definition: HalfEdge.h:119
void setPoint(int p)
Sets the number of point at which this HalfEdge points.
Definition: HalfEdge.h:114
int getDual() const
Returns the number of the dual HalfEdge.
Definition: HalfEdge.h:79
int mNext
Number of the next HalfEdge.
Definition: HalfEdge.h:29
~HalfEdge()
Definition: HalfEdge.h:74
void setDual(int d)
Sets the number of the dual HalfEdge.
Definition: HalfEdge.h:104
void setForced(bool f)
Sets the forced flag.
Definition: HalfEdge.h:124
void setNext(int n)
Sets the number of the next HalfEdge.
Definition: HalfEdge.h:109