Mercator
Main Page
Classes
Files
File List
Mercator
ThresholdShader.h
1
// This file may be redistributed and modified only under the terms of
2
// the GNU General Public License (See COPYING for details).
3
// Copyright (C) 2003 Alistair Riddoch
4
5
#ifndef MERCATOR_FILL_THRESHOLD_SHADER_H
6
#define MERCATOR_FILL_THRESHOLD_SHADER_H
7
8
#include <Mercator/Shader.h>
9
10
namespace
Mercator {
11
13
class
HighShader
:
public
Shader
{
14
private
:
16
float
m_threshold
;
17
public
:
19
static
const
std::string
key_threshold
;
20
22
static
const
float
default_threshold
;
23
27
explicit
HighShader
(
float
threshold
=
default_threshold
);
31
explicit
HighShader
(
const
Parameters
& params);
32
virtual
~
HighShader
();
33
35
const
float
threshold
()
const
{
return
m_threshold
; }
36
37
virtual
bool
checkIntersect
(
const
Segment
&)
const
;
38
virtual
void
shade
(
Surface
&)
const
;
39
};
40
42
class
LowShader
:
public
Shader
{
43
private
:
45
float
m_threshold
;
46
public
:
48
static
const
std::string
key_threshold
;
49
51
static
const
float
default_threshold
;
52
56
explicit
LowShader
(
float
threshold
=
default_threshold
);
60
explicit
LowShader
(
const
Parameters
& params);
61
virtual
~
LowShader
();
62
64
const
float
threshold
()
const
{
return
m_threshold
; }
65
66
virtual
bool
checkIntersect
(
const
Segment
&)
const
;
67
virtual
void
shade
(
Surface
&)
const
;
68
};
69
71
class
BandShader
:
public
Shader
{
72
private
:
74
float
m_lowThreshold
;
76
float
m_highThreshold
;
77
public
:
79
static
const
std::string
key_lowThreshold
;
81
static
const
std::string
key_highThreshold
;
82
84
static
const
float
default_lowThreshold
;
86
static
const
float
default_highThreshold
;
87
92
explicit
BandShader
(
float
low_threshold =
default_lowThreshold
,
93
float
high_threshold =
default_highThreshold
);
97
explicit
BandShader
(
const
Parameters
& params);
98
virtual
~
BandShader
();
99
101
const
float
lowThreshold
()
const
{
return
m_lowThreshold
; }
103
const
float
highThreshold
()
const
{
return
m_highThreshold
; }
104
105
virtual
bool
checkIntersect
(
const
Segment
&)
const
;
106
virtual
void
shade
(
Surface
&)
const
;
107
};
108
109
}
// namespace Mercator
110
111
#endif // MERCATOR_FILL_THRESHOLD_SHADER_H
Generated for Mercator by
1.8.3.1