summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry/anchor.hpp
blob: 1a2cbd3daca1e2d22df26639bbe8fb3feb7e1a57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <mbgl/util/geometry.hpp>
#include <mbgl/util/optional.hpp>

#include <vector>

namespace mbgl {

class Anchor {
public:
    Point<float> point;
    float angle = 0.0f;
    float scale = 0.0f;
    optional<std::size_t> segment;

    Anchor(float x_, float y_, float angle_, float scale_, optional<std::size_t> segment_ = nullopt)
        : point(x_, y_), angle(angle_), scale(scale_), segment(segment_) {}
};

using Anchors = std::vector<Anchor>;

} // namespace mbgl