ALMaSS Rabbit ODdox
1.00
The rabbit model description following ODdox protocol
Main Page
Related Pages
Classes
Files
File List
File Members
ALMaSS_all
Landscape
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
;
39
int
m_orig_size
;
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
51
class
EdgeGrowingPoints
{
52
int
m_polynum
;
53
int
m_originalsize
;
54
int
m_centre_x
;
55
int
m_centre_y
;
56
vector<Edges>
m_OurEdges
;
57
58
public
:
59
EdgeGrowingPoints
(
EGP_Data
egpd);
60
bool
GetCanGrow(
int
x,
int
y);
61
void
SetCanGrow(
int
x,
int
y,
bool
cg);
62
unsigned
int
ShrinkList();
63
};
64
65
class
PolygonDataVector
{
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
:
69
PolygonDataVector
();
70
~
PolygonDataVector
();
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
EdgeGrowingPoints::m_polynum
int m_polynum
Definition:
CIPELandscapeMaker.h:52
EGP_Data::m_polynum
int m_polynum
Definition:
CIPELandscapeMaker.h:38
EdgeGrowingPoints::m_OurEdges
vector< Edges > m_OurEdges
Definition:
CIPELandscapeMaker.h:56
EdgeGrowingPoints::m_centre_y
int m_centre_y
Definition:
CIPELandscapeMaker.h:55
PolygonDataVector
Definition:
CIPELandscapeMaker.h:65
EGP_Data::m_cx
int m_cx
Definition:
CIPELandscapeMaker.h:40
PolygonDataVector::m_polylist
vector< EdgeGrowingPoints * > m_polylist
Definition:
CIPELandscapeMaker.h:66
Edges::m_x
int m_x
Definition:
CIPELandscapeMaker.h:46
Edges::m_y
int m_y
Definition:
CIPELandscapeMaker.h:47
Edges
Definition:
CIPELandscapeMaker.h:45
EdgeGrowingPoints
Definition:
CIPELandscapeMaker.h:51
PolygonDataVector::CanGrow
bool CanGrow(int polyref, int x, int y)
Definition:
CIPELandscapeMaker.h:75
EdgeGrowingPoints::m_originalsize
int m_originalsize
Definition:
CIPELandscapeMaker.h:53
EdgeGrowingPoints::m_centre_x
int m_centre_x
Definition:
CIPELandscapeMaker.h:54
Edges::m_cangrow
bool m_cangrow
Definition:
CIPELandscapeMaker.h:48
EGP_Data::m_cy
int m_cy
Definition:
CIPELandscapeMaker.h:41
EGP_Data
Definition:
CIPELandscapeMaker.h:37
EGP_Data::m_orig_size
int m_orig_size
Definition:
CIPELandscapeMaker.h:39
Generated on Mon Dec 5 2016 09:53:44 for ALMaSS Rabbit ODdox by
1.8.11