Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_heap.h"
#include "BLI_math.h"
#include "bmesh.h"
#include "intern/bmesh_operators_private.h"
Go to the source code of this file.
Macros | |
#define | EDGE_OUT 1 |
#define | FACE_MARK 1 |
Functions | |
static void | bm_rotate_edges_simple (BMesh *bm, BMOperator *op, const short check_flag, const bool use_ccw) |
static float | bm_edge_calc_rotate_cost (const BMEdge *e) |
static float | bm_edge_rotate_is_boundary (const BMEdge *e) |
static void | bm_rotate_edges_shared (BMesh *bm, BMOperator *op, short check_flag, const bool use_ccw, const int edges_len) |
void | bmo_rotate_edges_exec (BMesh *bm, BMOperator *op) |
Rotate edges topology that share two faces.
Definition in file bmo_rotate_edges.c.
#define EDGE_OUT 1 |
Definition at line 18 of file bmo_rotate_edges.c.
#define FACE_MARK 1 |
Definition at line 19 of file bmo_rotate_edges.c.
Edge length is just a way of ordering that's independent of order in the edges argument, we could use some other method since ideally all edges will be rotated, this just happens to be simple to calculate.
Definition at line 50 of file bmo_rotate_edges.c.
References BM_edge_calc_length_squared(), and e.
Referenced by bm_rotate_edges_shared().
Check if this edge is a boundary: Are more than one of the connected faces edges rotating too?
Definition at line 58 of file bmo_rotate_edges.c.
References BM_elem_index_get, count, BMLoop::e, e, BMLoop::next, and BMLoop::radial_next.
Referenced by bm_rotate_edges_shared().
|
static |
Rotate edges where edges share faces, edges which could not rotate need to be re-considered after neighbors are rotated.
Definition at line 85 of file bmo_rotate_edges.c.
References BLI_assert, BLI_heap_free(), BLI_heap_insert(), BLI_heap_is_empty(), BLI_heap_new_ex(), BLI_heap_pop_min(), bm, BM_EDGE, bm_edge_calc_rotate_cost(), BM_edge_is_manifold(), BM_edge_rotate(), BM_edge_rotate_check(), bm_edge_rotate_is_boundary(), BM_EDGES_OF_MESH, BM_elem_index_get, BM_elem_index_set, BM_ITER_MESH, BMO_edge_flag_enable, BMO_ITER_INDEX, BMLoop::e, e, EDGE_OUT, BMesh::elem_index_dirty, BMEdge::l, MEM_freeN, MEM_mallocN, BMLoop::next, NULL, BMLoop::radial_next, and BMOperator::slots_in.
Referenced by bmo_rotate_edges_exec().
|
static |
Rotate edges where every edge has its own faces (we can rotate in any order).
this ends up being called twice, could add option to not to call check in BM_edge_rotate to get some extra speed
Definition at line 24 of file bmo_rotate_edges.c.
References bm, BM_EDGE, BM_edge_rotate(), BM_edge_rotate_check(), BMO_edge_flag_enable, BMO_ITER, e, EDGE_OUT, NULL, and BMOperator::slots_in.
Referenced by bmo_rotate_edges_exec().
void bmo_rotate_edges_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 219 of file bmo_rotate_edges.c.
References ARRAY_SIZE, bm, BM_EDGE, BM_edge_face_pair(), BM_EDGEROT_CHECK_DEGENERATE, BM_EDGEROT_CHECK_EXISTS, bm_rotate_edges_shared(), bm_rotate_edges_simple(), BMO_face_flag_enable, BMO_face_flag_test, BMO_ITER, BMO_slot_bool_get(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_buffer_len(), e, EDGE_OUT, FACE_MARK, BMOperator::slots_in, and BMOperator::slots_out.