Blender  V3.3
lineart_cpp_bridge.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "BLI_sort.hh"
8 #include "BLI_vector.hh"
9 #include "MOD_lineart.h"
10 #include "lineart_intern.h"
11 
13 {
14  int a = p1.v1 - p2.v1;
15  int b = p1.v2 - p2.v2;
16  /* parallel_sort() requires cmp() to return true when the first element needs to appear before
17  * the second element in the sorted array, false otherwise (strict weak ordering), see
18  * https://en.cppreference.com/w/cpp/named_req/Compare. */
19  return a < 0 ? true : (a == 0 ? b < 0 : false);
20 }
21 
23 {
25 }
void lineart_sort_adjacent_items(LineartAdjacentEdge *ai, int length)
static bool cmp_adjacent_items(const LineartAdjacentEdge &p1, const LineartAdjacentEdge &p2)
static unsigned a[3]
Definition: RandGen.cpp:78
T length(const vec_base< T, Size > &a)
void parallel_sort(RandomAccessIterator begin, RandomAccessIterator end)
Definition: BLI_sort.hh:21
static const pxr::TfToken b("b", pxr::TfToken::Immortal)