Flutter Engine
The Flutter Engine
third_party
skia
modules
bentleyottmann
include
BentleyOttmann1.h
Go to the documentation of this file.
1
// Copyright 2023 Google LLC
2
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3
4
#ifndef BentleyOttman1_DEFINED
5
#define BentleyOttman1_DEFINED
6
7
#include "
include/core/SkSpan.h
"
8
9
#include <optional>
10
#include <vector>
11
12
namespace
bentleyottmann
{
13
struct
Crossing
;
14
struct
Segment
;
15
16
// Takes in a list of segments, and returns intersection points found in the list of segments.
17
// A return value of nullopt means that the data are out of range. An empty vector means there
18
// are no self intersections.
19
//
20
// If nullopt is returned, you could divide all your points by 2, and try again.
21
std::optional<std::vector<Crossing>>
bentley_ottmann_1
(
SkSpan<const Segment>
segments);
22
}
// namespace bentleyottmann
23
24
#endif
// BentleyOttman1_DEFINED
SkSpan.h
SkSpan
Definition:
SkSpan_impl.h:65
bentleyottmann
Definition:
BentleyOttmann1.h:12
bentleyottmann::bentley_ottmann_1
std::optional< std::vector< Crossing > > bentley_ottmann_1(SkSpan< const Segment > segments)
Definition:
BentleyOttmann1.cpp:16
bentleyottmann::Crossing
Definition:
Segment.h:32
bentleyottmann::Segment
Definition:
Segment.h:15
Generated on Sun Jun 23 2024 21:56:04 for Flutter Engine by
1.9.4