Blender V4.3
bmesh_private.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
15/* returns positive nonzero on error */
16
17#ifdef NDEBUG
18/* No error checking for release,
19 * it can take most of the CPU time when running some tools. */
20# define BM_CHECK_ELEMENT(el) (void)(el)
21#else
28int bmesh_elem_check(void *element, char htype);
29# define BM_CHECK_ELEMENT(el) \
30 { \
31 if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
32 printf( \
33 "check_element failure, with code %i on line %i in file\n" \
34 " \"%s\"\n\n", \
35 bmesh_elem_check(el, ((BMHeader *)el)->htype), \
36 __LINE__, \
37 __FILE__); \
38 } \
39 } \
40 ((void)0)
41#endif
42
43int bmesh_radial_length(const BMLoop *l);
44int bmesh_disk_count_at_most(const BMVert *v, int count_max);
45int bmesh_disk_count(const BMVert *v);
46
52enum {
53 _FLAG_JF = (1 << 0), /* Join faces. */
54 _FLAG_MF = (1 << 1), /* Make face. */
55 _FLAG_MV = (1 << 1), /* Make face, vertex. */
56 _FLAG_OVERLAP = (1 << 2), /* General overlap flag. */
57 _FLAG_WALK = (1 << 3), /* General walk flag (keep clean). */
58 _FLAG_WALK_ALT = (1 << 4), /* Same as #_FLAG_WALK, for when a second tag is needed. */
59
60 _FLAG_ELEM_CHECK = (1 << 7), /* Reserved for bmesh_elem_check. */
61};
62
63#define BM_ELEM_API_FLAG_ENABLE(element, f) \
64 { \
65 ((element)->head.api_flag |= (f)); \
66 } \
67 (void)0
68#define BM_ELEM_API_FLAG_DISABLE(element, f) \
69 { \
70 ((element)->head.api_flag &= (uchar) ~(f)); \
71 } \
72 (void)0
73#define BM_ELEM_API_FLAG_TEST(element, f) ((element)->head.api_flag & (f))
74#define BM_ELEM_API_FLAG_CLEAR(element) \
75 { \
76 ((element)->head.api_flag = 0); \
77 } \
78 (void)0
79
86void poly_rotate_plane(const float normal[3], float (*verts)[3], uint nverts);
87
88/* include the rest of our private declarations */
89#include "bmesh_structure.hh"
unsigned int uint
int bmesh_radial_length(const BMLoop *l)
@ _FLAG_WALK
@ _FLAG_JF
@ _FLAG_WALK_ALT
@ _FLAG_ELEM_CHECK
@ _FLAG_MV
@ _FLAG_MF
@ _FLAG_OVERLAP
void poly_rotate_plane(const float normal[3], float(*verts)[3], uint nverts)
POLY ROTATE PLANE.
int bmesh_disk_count_at_most(const BMVert *v, int count_max)
int bmesh_elem_check(void *element, char htype)
int bmesh_disk_count(const BMVert *v)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
static float verts[][3]