~ubuntu-branches/ubuntu/trusty/qgis/trusty

« back to all changes in this revision

Viewing changes to src/analysis/interpolation/HalfEdge.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          HalfEdge.h  -  description
 
3
                             -------------------
 
4
    copyright            : (C) 2004 by Marco Hugentobler
 
5
    email                : mhugent@geo.unizh.ch
 
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
class ANALYSIS_EXPORT HalfEdge
 
21
{
 
22
  protected:
 
23
    /**Number of the dual HalfEdge*/
 
24
    int mDual;
 
25
    /**Number of the next HalfEdge*/
 
26
    int mNext;
 
27
    /**Number of the point at which this HalfEdge points*/
 
28
    int mPoint;
 
29
    /**True, if the HalfEdge belongs to a break line, false otherwise*/
 
30
    bool mBreak;
 
31
    /**True, if the HalfEdge belongs to a constrained edge, false otherwise*/
 
32
    bool mForced;
 
33
 
 
34
  public:
 
35
    /**Default constructor. Values for mDual, mNext, mPoint are set to -10 which means that they are undefined*/
 
36
    HalfEdge();
 
37
    HalfEdge( int dual, int next, int point, bool mbreak, bool forced );
 
38
    ~HalfEdge();
 
39
    /**Returns the number of the dual HalfEdge*/
 
40
    int getDual() const;
 
41
    /**Returns the number of the next HalfEdge*/
 
42
    int getNext() const;
 
43
    /**Returns the number of the point at which this HalfEdge points*/
 
44
    int getPoint() const;
 
45
    /**Returns, whether the HalfEdge belongs to a break line or not*/
 
46
    bool getBreak() const;
 
47
    /**Returns, whether the HalfEdge belongs to a constrained edge or not*/
 
48
    bool getForced() const;
 
49
    /**Sets the number of the dual HalfEdge*/
 
50
    void setDual( int d );
 
51
    /**Sets the number of the next HalfEdge*/
 
52
    void setNext( int n );
 
53
    /**Sets the number of point at which this HalfEdge points*/
 
54
    void setPoint( int p );
 
55
    /**Sets the break flag*/
 
56
    void setBreak( bool b );
 
57
    /**Sets the forced flag*/
 
58
    void setForced( bool f );
 
59
};
 
60
 
 
61
inline HalfEdge::HalfEdge(): mDual( -10 ), mNext( -10 ), mPoint( -10 ), mBreak( false ), mForced( false )
 
62
{
 
63
 
 
64
}
 
65
 
 
66
inline HalfEdge::HalfEdge( int dual, int next, int point, bool mbreak, bool forced ): mDual( dual ), mNext( next ), mPoint( point ), mBreak( mbreak ), mForced( forced )
 
67
{
 
68
 
 
69
}
 
70
 
 
71
inline HalfEdge::~HalfEdge()
 
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