Blender V4.3
BLI_polyfill_2d_beautify.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15struct Heap;
16struct MemArena;
17
24void BLI_polyfill_beautify(const float (*coords)[2],
25 unsigned int coords_num,
26 unsigned int (*tris)[3],
27
28 /* structs for reuse */
29 struct MemArena *arena,
30 struct Heap *eheap);
31
47float BLI_polyfill_beautify_quad_rotate_calc_ex(const float v1[2],
48 const float v2[2],
49 const float v3[2],
50 const float v4[2],
51 bool lock_degenerate,
52 float *r_area);
53#define BLI_polyfill_beautify_quad_rotate_calc(v1, v2, v3, v4) \
54 BLI_polyfill_beautify_quad_rotate_calc_ex(v1, v2, v3, v4, false, NULL)
55
56/* avoid realloc's when creating new structures for polyfill ngons */
57#define BLI_POLYFILL_ALLOC_NGON_RESERVE 64
58
59#ifdef __cplusplus
60}
61#endif
void BLI_polyfill_beautify(const float(*coords)[2], unsigned int coords_num, unsigned int(*tris)[3], struct MemArena *arena, struct Heap *eheap)
float BLI_polyfill_beautify_quad_rotate_calc_ex(const float v1[2], const float v2[2], const float v3[2], const float v4[2], bool lock_degenerate, float *r_area)
ATTR_WARN_UNUSED_RESULT const BMVert * v2