Welcome to mirror list, hosted at ThFree Co, Russian Federation.

clipping.hpp « geometry - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27a2e25d6437a6df209bc5da5ba91048f1e22a2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include "geometry/point2d.hpp"
#include "geometry/rect2d.hpp"
#include "geometry/spline.hpp"
#include "geometry/triangle2d.hpp"

#include <functional>
#include <vector>

namespace m2
{
using ClipTriangleByRectResultIt =
    std::function<void(m2::PointD const &, m2::PointD const &, m2::PointD const &)>;

void ClipTriangleByRect(m2::RectD const & rect, m2::PointD const & p1, m2::PointD const & p2,
                        m2::PointD const & p3, ClipTriangleByRectResultIt const & resultIterator);

std::vector<m2::SharedSpline> ClipSplineByRect(m2::RectD const & rect,
                                               m2::SharedSpline const & spline);
}  // namespace m2