xref: /aosp_15_r20/external/skia/modules/bentleyottmann/include/BruteForceCrossings.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard Worker // Copyright 2023 Google LLC
2*c8dee2aaSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3*c8dee2aaSAndroid Build Coastguard Worker 
4*c8dee2aaSAndroid Build Coastguard Worker #ifndef QuadraticCrossings_DEFINED
5*c8dee2aaSAndroid Build Coastguard Worker #define QuadraticCrossings_DEFINED
6*c8dee2aaSAndroid Build Coastguard Worker 
7*c8dee2aaSAndroid Build Coastguard Worker #include "include/core/SkSpan.h"
8*c8dee2aaSAndroid Build Coastguard Worker 
9*c8dee2aaSAndroid Build Coastguard Worker #include <optional>
10*c8dee2aaSAndroid Build Coastguard Worker #include <vector>
11*c8dee2aaSAndroid Build Coastguard Worker 
12*c8dee2aaSAndroid Build Coastguard Worker namespace bentleyottmann {
13*c8dee2aaSAndroid Build Coastguard Worker struct Crossing;
14*c8dee2aaSAndroid Build Coastguard Worker struct Segment;
15*c8dee2aaSAndroid Build Coastguard Worker 
16*c8dee2aaSAndroid Build Coastguard Worker // Takes in a list of segments, and returns intersection points found in the list of segments.
17*c8dee2aaSAndroid Build Coastguard Worker // An empty vector means there are no self intersections.
18*c8dee2aaSAndroid Build Coastguard Worker //
19*c8dee2aaSAndroid Build Coastguard Worker std::optional<std::vector<Crossing>> brute_force_crossings(SkSpan<const Segment> segments);
20*c8dee2aaSAndroid Build Coastguard Worker }  // namespace bentleyottmann
21*c8dee2aaSAndroid Build Coastguard Worker 
22*c8dee2aaSAndroid Build Coastguard Worker #endif  // QuadraticCrossings_DEFINED
23