QGIS API Documentation  2.99.0-Master (01468d0)
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 
28 class ANALYSIS_EXPORT HalfEdge
29 {
30  protected:
32  int mDual;
34  int mNext;
36  int mPoint;
38  bool mBreak;
40  bool mForced;
41 
42  public:
44  HalfEdge();
45  HalfEdge( int dual, int next, int point, bool mbreak, bool forced );
46 
48  int getDual() const;
50  int getNext() const;
52  int getPoint() const;
54  bool getBreak() const;
56  bool getForced() const;
58  void setDual( int d );
60  void setNext( int n );
62  void setPoint( int p );
64  void setBreak( bool b );
66  void setForced( bool f );
67 };
68 
69 #ifndef SIP_RUN
70 
71 
72 inline HalfEdge::HalfEdge(): mDual( -10 ), mNext( -10 ), mPoint( -10 ), mBreak( false ), mForced( false )
73 {
74 
75 }
76 
77 inline HalfEdge::HalfEdge( int dual, int next, int point, bool mbreak, bool forced ): mDual( dual ), mNext( next ), mPoint( point ), mBreak( mbreak ), mForced( forced )
78 {
79 
80 }
81 
82 inline int HalfEdge::getDual() const
83 {
84  return mDual;
85 }
86 
87 inline int HalfEdge::getNext() const
88 {
89  return mNext;
90 }
91 
92 inline int HalfEdge::getPoint() const
93 {
94  return mPoint;
95 }
96 
97 inline bool HalfEdge::getBreak() const
98 {
99  return mBreak;
100 }
101 
102 inline bool HalfEdge::getForced() const
103 {
104  return mForced;
105 }
106 
107 inline void HalfEdge::setDual( int d )
108 {
109  mDual = d;
110 }
111 
112 inline void HalfEdge::setNext( int n )
113 {
114  mNext = n;
115 }
116 
117 inline void HalfEdge::setPoint( int p )
118 {
119  mPoint = p;
120 }
121 
122 inline void HalfEdge::setBreak( bool b )
123 {
124  mBreak = b;
125 }
126 
127 inline void HalfEdge::setForced( bool f )
128 {
129  mForced = f;
130 }
131 
132 #endif
133 
134 #endif
bool getBreak() const
Returns, whether the HalfEdge belongs to a break line or not.
Definition: HalfEdge.h:97
int getPoint() const
Returns the number of the point at which this HalfEdge points.
Definition: HalfEdge.h:92
int getNext() const
Returns the number of the next HalfEdge.
Definition: HalfEdge.h:87
HalfEdge()
Default constructor. Values for mDual, mNext, mPoint are set to -10 which means that they are undefin...
Definition: HalfEdge.h:72
int mPoint
Number of the point at which this HalfEdge points.
Definition: HalfEdge.h:36
int mDual
Number of the dual HalfEdge.
Definition: HalfEdge.h:32
bool getForced() const
Returns, whether the HalfEdge belongs to a constrained edge or not.
Definition: HalfEdge.h:102
bool mForced
True, if the HalfEdge belongs to a constrained edge, false otherwise.
Definition: HalfEdge.h:40
bool mBreak
True, if the HalfEdge belongs to a break line, false otherwise.
Definition: HalfEdge.h:38
void setBreak(bool b)
Sets the break flag.
Definition: HalfEdge.h:122
void setPoint(int p)
Sets the number of point at which this HalfEdge points.
Definition: HalfEdge.h:117
int getDual() const
Returns the number of the dual HalfEdge.
Definition: HalfEdge.h:82
int mNext
Number of the next HalfEdge.
Definition: HalfEdge.h:34
void setDual(int d)
Sets the number of the dual HalfEdge.
Definition: HalfEdge.h:107
void setForced(bool f)
Sets the forced flag.
Definition: HalfEdge.h:127
void setNext(int n)
Sets the number of the next HalfEdge.
Definition: HalfEdge.h:112