QGIS API Documentation
2.8.2-Wien
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
core
pal
costcalculator.h
Go to the documentation of this file.
1
/***************************************************************************
2
costcalculator.h
3
---------------------
4
begin : November 2009
5
copyright : (C) 2009 by Martin Dobias
6
email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
#ifndef COSTCALCULATOR_H
16
#define COSTCALCULATOR_H
17
18
#include "rtree.hpp"
19
20
namespace
pal
21
{
22
class
Feats;
23
24
class
CostCalculator
25
{
26
public
:
28
static
void
addObstacleCostPenalty
(
LabelPosition
* lp,
PointSet
* feat );
29
30
static
void
setPolygonCandidatesCost
(
int
nblp,
LabelPosition
**lPos,
int
max_p, RTree<PointSet*, double, 2, double> *obstacles,
double
bbx[4],
double
bby[4] );
31
33
static
void
setCandidateCostFromPolygon
(
LabelPosition
* lp, RTree <PointSet*, double, 2, double> *obstacles,
double
bbx[4],
double
bby[4] );
34
36
static
int
finalizeCandidatesCosts
(
Feats
* feat,
int
max_p, RTree <PointSet*, double, 2, double> *obstacles,
double
bbx[4],
double
bby[4] );
37
};
38
46
class
PolygonCostCalculator
47
{
48
LabelPosition
*lp;
49
double
px, py;
50
double
dist;
51
bool
ok;
52
53
public
:
54
PolygonCostCalculator
(
LabelPosition
*lp );
55
56
void
update
(
PointSet
*pset );
57
58
double
getCost
();
59
60
LabelPosition
*
getLabel
();
61
};
62
}
63
64
#endif // COSTCALCULATOR_H
Generated on Sun May 10 2015 16:33:23 for QGIS API Documentation by
1.8.1.2