xref: /aosp_15_r20/external/skia/modules/bentleyottmann/include/BruteForceCrossings.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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 QuadraticCrossings_DEFINED
5 #define QuadraticCrossings_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 // An empty vector means there are no self intersections.
18 //
19 std::optional<std::vector<Crossing>> brute_force_crossings(SkSpan<const Segment> segments);
20 }  // namespace bentleyottmann
21 
22 #endif  // QuadraticCrossings_DEFINED
23