ALMaSS Rabbit ODdox  1.1
The rabbit model description following ODdox protocol
CIPELandscapeMaker.h
Go to the documentation of this file.
1 //
2 // CIPELandscapeMaker.h
3 //
4 /*
5 
6 Copyright (c) 2006, National Environmental Research Institute, Denmark (NERI)
7 
8 All rights reserved.
9 
10 
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions are met:
13 
14 *) Redistributions of source code must retain the above copyright notice, this
15 list of conditions and the following disclaimer. *) Redistributions in binary form must reproduce the above copyright notice,
16 this list of conditions and the following disclaimer in the documentation
17 and/or other materials provided with the distribution. *) Neither the name of the NERI nor the names of its contributors
18 may be used to endorse or promote products derived from this software without specific prior written permission.
19 
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 */
32 
33 
34 #ifndef CIPEMAKER_H
35 #define CIPEMAKER_H
36 
37 struct EGP_Data {
38  int m_polynum;
40  int m_cx;
41  int m_cy;
42  //....continue as needed
43 };
44 
45 struct Edges {
46  int m_x;
47  int m_y;
48  bool m_cangrow;
49 };
50 
52  int m_polynum;
56  vector<Edges> m_OurEdges;
57 
58 public:
60  bool GetCanGrow(int x, int y);
61  void SetCanGrow(int x, int y, bool cg);
62  unsigned int ShrinkList();
63 };
64 
66  vector<EdgeGrowingPoints*> m_polylist;
67  int m_polyrefs[25000]; // if we run into memory problems then we can always do this better
68 public:
71  // Interface functions
72  inline bool HaveSeen(int a_poly);
73  void AddPolygon(EGP_Data egpdata);
74  // You access stuff in the polylist list like this:
75  bool CanGrow(int polyref, int x, int y) { return m_polylist[m_polyrefs[polyref]]->GetCanGrow(x,y); }
76 protected:
77  // Nothing here yet
78 };
79 
80 #endif // CIPEMAKER
PolygonDataVector::m_polyrefs
int m_polyrefs[25000]
Definition: CIPELandscapeMaker.h:67
EdgeGrowingPoints::m_originalsize
int m_originalsize
Definition: CIPELandscapeMaker.h:53
EdgeGrowingPoints
Definition: CIPELandscapeMaker.h:51
PolygonDataVector::~PolygonDataVector
~PolygonDataVector()
EdgeGrowingPoints::m_centre_x
int m_centre_x
Definition: CIPELandscapeMaker.h:54
EGP_Data::m_cx
int m_cx
Definition: CIPELandscapeMaker.h:40
PolygonDataVector::PolygonDataVector
PolygonDataVector()
EdgeGrowingPoints::m_OurEdges
vector< Edges > m_OurEdges
Definition: CIPELandscapeMaker.h:56
EdgeGrowingPoints::ShrinkList
unsigned int ShrinkList()
Edges::m_y
int m_y
Definition: CIPELandscapeMaker.h:47
EGP_Data::m_orig_size
int m_orig_size
Definition: CIPELandscapeMaker.h:39
EGP_Data::m_polynum
int m_polynum
Definition: CIPELandscapeMaker.h:38
EGP_Data::m_cy
int m_cy
Definition: CIPELandscapeMaker.h:41
Edges::m_x
int m_x
Definition: CIPELandscapeMaker.h:46
PolygonDataVector
Definition: CIPELandscapeMaker.h:65
EGP_Data
Definition: CIPELandscapeMaker.h:37
Edges
Definition: CIPELandscapeMaker.h:45
Edges::m_cangrow
bool m_cangrow
Definition: CIPELandscapeMaker.h:48
EdgeGrowingPoints::GetCanGrow
bool GetCanGrow(int x, int y)
PolygonDataVector::AddPolygon
void AddPolygon(EGP_Data egpdata)
PolygonDataVector::CanGrow
bool CanGrow(int polyref, int x, int y)
Definition: CIPELandscapeMaker.h:75
EdgeGrowingPoints::SetCanGrow
void SetCanGrow(int x, int y, bool cg)
PolygonDataVector::m_polylist
vector< EdgeGrowingPoints * > m_polylist
Definition: CIPELandscapeMaker.h:66
EdgeGrowingPoints::EdgeGrowingPoints
EdgeGrowingPoints(EGP_Data egpd)
EdgeGrowingPoints::m_centre_y
int m_centre_y
Definition: CIPELandscapeMaker.h:55
PolygonDataVector::HaveSeen
bool HaveSeen(int a_poly)
EdgeGrowingPoints::m_polynum
int m_polynum
Definition: CIPELandscapeMaker.h:52