QGIS API Documentation  2.99.0-Master (ae4d26a)
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 
20 #include "qgis_analysis.h"
21 
22 #define SIP_NO_FILE
23 
29 class ANALYSIS_EXPORT HalfEdge
30 {
31  protected:
33  int mDual = -10;
35  int mNext = -10;
37  int mPoint = -10;
39  bool mBreak = false;
41  bool mForced = false;
42 
43  public:
45  HalfEdge();
46  HalfEdge( int dual, int next, int point, bool mbreak, bool forced );
47 
49  int getDual() const;
51  int getNext() const;
53  int getPoint() const;
55  bool getBreak() const;
57  bool getForced() const;
59  void setDual( int d );
61  void setNext( int n );
63  void setPoint( int p );
65  void setBreak( bool b );
67  void setForced( bool f );
68 };
69 
70 #ifndef SIP_RUN
71 
72 
74 {
75 
76 }
77 
78 inline HalfEdge::HalfEdge( int dual, int next, int point, bool mbreak, bool forced ): mDual( dual ), mNext( next ), mPoint( point ), mBreak( mbreak ), mForced( forced )
79 {
80 
81 }
82 
83 inline int HalfEdge::getDual() const
84 {
85  return mDual;
86 }
87 
88 inline int HalfEdge::getNext() const
89 {
90  return mNext;
91 }
92 
93 inline int HalfEdge::getPoint() const
94 {
95  return mPoint;
96 }
97 
98 inline bool HalfEdge::getBreak() const
99 {
100  return mBreak;
101 }
102 
103 inline bool HalfEdge::getForced() const
104 {
105  return mForced;
106 }
107 
108 inline void HalfEdge::setDual( int d )
109 {
110  mDual = d;
111 }
112 
113 inline void HalfEdge::setNext( int n )
114 {
115  mNext = n;
116 }
117 
118 inline void HalfEdge::setPoint( int p )
119 {
120  mPoint = p;
121 }
122 
123 inline void HalfEdge::setBreak( bool b )
124 {
125  mBreak = b;
126 }
127 
128 inline void HalfEdge::setForced( bool f )
129 {
130  mForced = f;
131 }
132 
133 #endif
134 
135 #endif
bool getBreak() const
Returns, whether the HalfEdge belongs to a break line or not.
Definition: HalfEdge.h:98
int getPoint() const
Returns the number of the point at which this HalfEdge points.
Definition: HalfEdge.h:93
int getNext() const
Returns the number of the next HalfEdge.
Definition: HalfEdge.h:88
HalfEdge()
Default constructor. Values for mDual, mNext, mPoint are set to -10 which means that they are undefin...
Definition: HalfEdge.h:73
int mPoint
Number of the point at which this HalfEdge points.
Definition: HalfEdge.h:37
int mDual
Number of the dual HalfEdge.
Definition: HalfEdge.h:33
bool getForced() const
Returns, whether the HalfEdge belongs to a constrained edge or not.
Definition: HalfEdge.h:103
bool mForced
True, if the HalfEdge belongs to a constrained edge, false otherwise.
Definition: HalfEdge.h:41
bool mBreak
True, if the HalfEdge belongs to a break line, false otherwise.
Definition: HalfEdge.h:39
void setBreak(bool b)
Sets the break flag.
Definition: HalfEdge.h:123
void setPoint(int p)
Sets the number of point at which this HalfEdge points.
Definition: HalfEdge.h:118
int getDual() const
Returns the number of the dual HalfEdge.
Definition: HalfEdge.h:83
int mNext
Number of the next HalfEdge.
Definition: HalfEdge.h:35
void setDual(int d)
Sets the number of the dual HalfEdge.
Definition: HalfEdge.h:108
void setForced(bool f)
Sets the forced flag.
Definition: HalfEdge.h:128
void setNext(int n)
Sets the number of the next HalfEdge.
Definition: HalfEdge.h:113