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