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