summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/heatmap_layer_properties.hpp
blob: 358ebda9fc7fbb953d50c80b8b900c26574b5260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// clang-format off

// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.

#pragma once

#include <mbgl/style/types.hpp>
#include <mbgl/style/layer_properties.hpp>
#include <mbgl/style/layers/heatmap_layer.hpp>
#include <mbgl/style/layout_property.hpp>
#include <mbgl/style/paint_property.hpp>
#include <mbgl/style/properties.hpp>
#include <mbgl/programs/attributes.hpp>
#include <mbgl/programs/uniforms.hpp>

namespace mbgl {
namespace style {

struct HeatmapColor : ColorRampProperty {
};

struct HeatmapIntensity : PaintProperty<float> {
    static float defaultValue() { return 1; }
};

struct HeatmapOpacity : PaintProperty<float> {
    static float defaultValue() { return 1; }
};

struct HeatmapRadius : DataDrivenPaintProperty<float, attributes::radius, uniforms::radius> {
    static float defaultValue() { return 30; }
};

struct HeatmapWeight : DataDrivenPaintProperty<float, attributes::weight, uniforms::weight> {
    static float defaultValue() { return 1; }
};

class HeatmapPaintProperties : public Properties<
    HeatmapColor,
    HeatmapIntensity,
    HeatmapOpacity,
    HeatmapRadius,
    HeatmapWeight
> {};

class MBGL_EXPORT HeatmapLayerProperties final : public LayerProperties {
public:
    explicit HeatmapLayerProperties(Immutable<HeatmapLayer::Impl>);
    HeatmapLayerProperties(
        Immutable<HeatmapLayer::Impl>,
        HeatmapPaintProperties::PossiblyEvaluated);
    ~HeatmapLayerProperties() override;

    unsigned long constantsMask() const override;

    const HeatmapLayer::Impl& layerImpl() const;
    // Data members.
    HeatmapPaintProperties::PossiblyEvaluated evaluated;
};

} // namespace style
} // namespace mbgl

// clang-format on