63 #define BM_VERT_DIR(v) ((short *)(&(v)->head.index))[0]
64 #define BM_VERT_SKIP(v) ((short *)(&(v)->head.index))[1]
65 #define BM_VERT_DIST(v) ((v)->no[0])
66 #define BM_VERT_SORTVAL(v) ((v)->no[1])
67 #define BM_VERT_LOOPINDEX(v) \
68 (*((uint *)(&(v)->no[2])))
96 return ELEM(delta, 1, (
uint)(f_len_orig - 1));
148 BMesh *
bm,
BMFace *f,
const float plane[4],
const short oflag_center,
const short oflag_new)
155 bool use_dirs[3] = {
false,
false,
false};
159 bool face_has_center_edge =
false;
178 if (face_has_center_edge ==
false) {
180 face_has_center_edge =
true;
185 }
while ((l_iter = l_iter->
next) != l_first);
187 if ((
STACK_SIZE(vert_split_arr) > 1) && (use_dirs[0] && use_dirs[2])) {
198 if (oflag_center | oflag_new) {
213 if (face_has_center_edge) {
219 }
while ((l_iter = l_iter->
next) != l_first);
223 BMLoop *l_first_non_center = l_first;
225 l_first_non_center = l_first_non_center->
next;
228 l_iter = l_first_non_center;
245 l_next = l_next->
next;
252 l_iter = l_prev->
next;
253 while (l_iter != l_next) {
256 l_iter = l_iter->
next;
260 l_iter = l_next->
prev;
261 }
while ((l_iter = l_iter->
next) != l_first_non_center);
265 float axis_mat[3][3];
280 for (i = 0; i <
STACK_SIZE(vert_split_arr); i++) {
281 if (!
equals_v3v3(vert_split_arr[0]->co, vert_split_arr[i]->co)) {
282 sub_v3_v3v3(sort_dir, vert_split_arr[0]->co, vert_split_arr[i]->co);
305 }
while ((l_iter = l_iter->
next) != l_first);
309 for (i = 0; i <
STACK_SIZE(vert_split_arr); i++) {
328 for (i = 0; i <
STACK_SIZE(vert_split_arr) - 1; i++) {
329 BMVert *v_a = vert_split_arr[i];
330 BMVert *v_b = vert_split_arr[i + 1];
332 if (face_has_center_edge) {
347 for (j = 0; j <
STACK_SIZE(face_split_arr); j++) {
367 if (oflag_center | oflag_new) {
376 if (f_tmp != face_split_arr[j]) {
391 (
void)vert_split_arr;
401 const float plane[4],
402 const bool use_snap_center,
404 const short oflag_center,
405 const short oflag_new,
430 edges_arr[einput_len++] =
e;
472 if (use_snap_center) {
481 for (i = 0; i < einput_len; i++) {
487 if (side[0] && side[1] && (side[0] != side[1])) {
488 const float e_fac = dist[0] / (dist[0] - dist[1]);
493 l_iter = l_first =
e->l;
499 }
while ((l_iter = l_iter->
radial_next) != l_first);
511 if (oflag_new | oflag_center) {
518 else if (side[0] == 0 || side[1] == 0) {
542 if (side[0] == 0 && side[1] == 0) {
typedef float(TangentPoint)[2]
#define BLI_array_alloca(arr, realsize)
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
#define BLI_LINKSTACK_PUSH(var, ptr)
#define BLI_LINKSTACK_DECLARE(var, type)
#define BLI_LINKSTACK_FREE(var)
#define BLI_LINKSTACK_INIT(var)
#define BLI_LINKSTACK_POP(var)
MINLINE float plane_point_side_v3(const float plane[4], const float co[3])
void axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3])
Normal to x,y matrix.
void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[3])
void mul_v2_m3v3(float r[2], const float M[3][3], const float a[3])
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
#define STACK_PUSH(stack, val)
#define STACK_DECLARE(stack)
#define STACK_SIZE(stack)
#define STACK_INIT(stack, stack_num)
Read Guarded memory(de)allocation.
BLI_INLINE void vert_is_center_enable(BMVert *v)
static int bm_vert_sortval_cb(const void *v_a_v, const void *v_b_v)
void BM_mesh_bisect_plane(BMesh *bm, const float plane[4], const bool use_snap_center, const bool use_tag, const short oflag_center, const short oflag_new, const float eps)
BLI_INLINE void face_in_stack_enable(BMFace *f)
static void bm_face_bisect_verts(BMesh *bm, BMFace *f, const float plane[4], const short oflag_center, const short oflag_new)
BLI_INLINE void vert_is_center_disable(BMVert *v)
BLI_INLINE bool edge_is_cut_test(BMEdge *e)
BLI_INLINE bool vert_is_center_test(BMVert *v)
BLI_INLINE void edge_is_cut_disable(BMEdge *e)
#define BM_VERT_LOOPINDEX(v)
static short plane_point_test_v3(const float plane[4], const float co[3], const float eps, float *r_depth)
BLI_INLINE bool face_in_stack_test(BMFace *f)
#define BM_VERT_SORTVAL(v)
BLI_INLINE void edge_is_cut_enable(BMEdge *e)
BLI_INLINE bool vert_pair_adjacent_in_orig_face(BMVert *v_a, BMVert *v_b, const uint f_len_orig)
BLI_INLINE void face_in_stack_disable(BMFace *f)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
#define BM_ITER_ELEM_INDEX(ele, iter, data, itype, indexvar)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
BMVert * BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac)
Edge Split.
BMFace * BM_face_split(BMesh *bm, BMFace *f, BMLoop *l_a, BMLoop *l_b, BMLoop **r_l, BMEdge *example, const bool no_double)
Face Split.
#define BMO_edge_flag_enable(bm, e, oflag)
#define BMO_vert_flag_enable(bm, e, oflag)
#define BMO_face_flag_enable(bm, e, oflag)
bool BM_face_is_normal_valid(const BMFace *f)
BMLoop * BM_face_vert_share_loop(BMFace *f, BMVert *v)
Return the Loop Shared by Face and Vertex.
BLI_INLINE bool BM_loop_is_adjacent(const BMLoop *l_a, const BMLoop *l_b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMLoop * l_b
ATTR_WARN_UNUSED_RESULT const BMVert * v
SyclQueue void void size_t num_bytes void
static bool is_inside(int x, int y, int cols, int rows)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
struct BMLoop * radial_next