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