Blender V5.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
14
15#include "bmesh_class.hh"
16
17namespace blender {
18
19/* returns positive nonzero on error */
20
21#ifdef NDEBUG
22/* No error checking for release,
23 * it can take most of the CPU time when running some tools. */
24# define BM_CHECK_ELEMENT(el) (void)(el)
25#else
32int bmesh_elem_check(void *element, char htype);
33# define BM_CHECK_ELEMENT(el) \
34 { \
35 if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
36 printf( \
37 "check_element failure, with code %i on line %i in file\n" \
38 " \"%s\"\n\n", \
39 bmesh_elem_check(el, ((BMHeader *)el)->htype), \
40 __LINE__, \
41 __FILE__); \
42 } \
43 } \
44 ((void)0)
45#endif
46
47int bmesh_radial_length(const BMLoop *l);
48int bmesh_disk_count_at_most(const BMVert *v, int count_max);
49int bmesh_disk_count(const BMVert *v);
50
56enum {
57 _FLAG_JF = (1 << 0), /* Join faces. */
58 _FLAG_MF = (1 << 1), /* Make face. */
59 _FLAG_MV = (1 << 1), /* Make face, vertex. */
60 _FLAG_OVERLAP = (1 << 2), /* General overlap flag. */
61 _FLAG_WALK = (1 << 3), /* General walk flag (keep clean). */
62 _FLAG_WALK_ALT = (1 << 4), /* Same as #_FLAG_WALK, for when a second tag is needed. */
63
64 _FLAG_ELEM_CHECK = (1 << 7), /* Reserved for bmesh_elem_check. */
65};
66
67#define BM_ELEM_API_FLAG_ENABLE(element, f) \
68 { \
69 ((element)->head.api_flag |= (f)); \
70 } \
71 (void)0
72#define BM_ELEM_API_FLAG_DISABLE(element, f) \
73 { \
74 ((element)->head.api_flag &= (uchar) ~(f)); \
75 } \
76 (void)0
77#define BM_ELEM_API_FLAG_TEST(element, f) ((element)->head.api_flag & (f))
78#define BM_ELEM_API_FLAG_CLEAR(element) \
79 { \
80 ((element)->head.api_flag = 0); \
81 } \
82 (void)0
83
90void poly_rotate_plane(const float normal[3], float (*verts)[3], uint nverts);
91
92} // namespace blender
93
94/* include the rest of our private declarations */
95#include "bmesh_structure.hh" /* IWYU pragma: export */
BMesh Iterators.
unsigned int uint
Definition BKE_text.h:55
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
int bmesh_elem_check(void *element, const char htype)
int bmesh_radial_length(const BMLoop *l)
int bmesh_disk_count_at_most(const BMVert *v, int count_max)
int bmesh_disk_count(const BMVert *v)
ATTR_WARN_UNUSED_RESULT const void * element
void poly_rotate_plane(const float normal[3], float(*verts)[3], const uint nverts)
POLY ROTATE PLANE.