Blender
V3.3
|
#include <limits.h>
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_linklist.h"
#include "BLI_mempool.h"
#include "BLI_utildefines.h"
#include "bmesh.h"
#include "bmesh_edgenet.h"
#include "BLI_strict_flags.h"
Go to the source code of this file.
Classes | |
struct | VertNetInfo |
Typedefs | |
typedef struct VertNetInfo | VertNetInfo |
Enumerations | |
enum | { VNINFO_FLAG_IS_MIXFACE = (1 << 0) } |
Functions | |
static bool | bm_edge_step_ok (BMEdge *e) |
static int | bm_edge_face (BMEdge *e) |
static BMEdge * | bm_edgenet_edge_get_next (BMesh *bm, LinkNode **edge_queue, BLI_mempool *edge_queue_pool) |
static uint | bm_edgenet_path_from_pass (BMVert *v, LinkNode **v_ls, VertNetInfo *vnet_info, BLI_mempool *path_pool) |
static bool | bm_edgenet_path_check_overlap (BMVert *v1, BMVert *v2, VertNetInfo *vnet_info) |
static BMFace * | bm_edgenet_face_from_path (BMesh *bm, LinkNode *path, const uint path_len) |
static BMEdge * | bm_edgenet_path_step (BMVert *v_curr, LinkNode **v_ls, VertNetInfo *vnet_info, BLI_mempool *path_pool) |
static LinkNode * | bm_edgenet_path_calc (BMEdge *e, const int pass_nr, const uint path_cost_max, uint *r_path_len, uint *r_path_cost, VertNetInfo *vnet_info, BLI_mempool *path_pool) |
static LinkNode * | bm_edgenet_path_calc_best (BMEdge *e, int *pass_nr, uint path_cost_max, uint *r_path_len, uint *r_path_cost, VertNetInfo *vnet_info, BLI_mempool *path_pool) |
void | BM_mesh_edgenet (BMesh *bm, const bool use_edge_tag, const bool use_new_face_tag) |
Edge-net Fill.
Definition in file bmesh_edgenet.c.
typedef struct VertNetInfo VertNetInfo |
anonymous enum |
Enumerator | |
---|---|
VNINFO_FLAG_IS_MIXFACE |
Definition at line 31 of file bmesh_edgenet.c.
|
static |
Definition at line 43 of file bmesh_edgenet.c.
References BM_elem_index_get, and e.
Referenced by bm_edgenet_path_calc(), and bm_edgenet_path_step().
Check if this edge can be used in a path.
Definition at line 38 of file bmesh_edgenet.c.
References BM_elem_flag_test, BM_ELEM_TAG, e, ELEM, and NULL.
Referenced by bm_edgenet_edge_get_next(), bm_edgenet_path_calc(), bm_edgenet_path_step(), and BM_mesh_edgenet().
|
static |
Get the next available edge we can use to attempt to calculate a path from.
Definition at line 51 of file bmesh_edgenet.c.
References BLI_linklist_pop_pool(), bm, bm_edge_step_ok(), BM_EDGES_OF_MESH, BM_ITER_MESH, e, and NULL.
Referenced by BM_mesh_edgenet().
|
static |
Create a face from the path.
Definition at line 138 of file bmesh_edgenet.c.
References BLI_array_alloca, BLI_assert, bm, BM_CREATE_NOP, BM_edges_from_verts(), BM_face_create(), BM_face_exists_multi(), LinkNode::link, LinkNode::next, NULL, and UNUSED_VARS_NDEBUG.
Referenced by BM_mesh_edgenet().
|
static |
Given an edge, find the first path that can form a face.
Definition at line 249 of file bmesh_edgenet.c.
References BLI_assert, BLI_linklist_free_pool(), BLI_linklist_pop_pool(), BLI_linklist_prepend_pool(), BLI_linklist_reverse(), bm_edge_face(), bm_edge_step_ok(), bm_edgenet_path_from_pass(), bm_edgenet_path_step(), BM_elem_flag_disable, BM_elem_index_get, BM_ELEM_TAG, e, VertNetInfo::face, VertNetInfo::flag, NULL, VertNetInfo::pass, VertNetInfo::prev, v, BMEdge::v1, BMEdge::v2, and VNINFO_FLAG_IS_MIXFACE.
Referenced by bm_edgenet_path_calc_best().
|
static |
Wrapper for bm_edgenet_path_calc which ensures all included edges don't have a better option.
Definition at line 347 of file bmesh_edgenet.c.
References BLI_array_alloca, BLI_assert, BLI_linklist_free_pool(), BM_edge_exists(), bm_edgenet_path_calc(), e, LinkNode::link, LinkNode::next, and NULL.
Referenced by BM_mesh_edgenet().
|
static |
Specialized wrapper for BM_face_exists_overlap_subset that gets the verts from a path before we allocate it in the correct order.
Definition at line 103 of file bmesh_edgenet.c.
References BLI_array_alloca, BLI_linklist_prepend_alloca, BM_elem_index_get, BM_face_exists_overlap_subset(), LinkNode::link, LinkNode::next, NULL, v, v1, v2, and vn.
Referenced by bm_edgenet_path_step().
|
static |
Edge loops are built up using links to the 'prev' member. with each side of the loop having its own pass (negated from the other).
This function returns half a loop, the caller needs to run twice to get both sides.
Definition at line 80 of file bmesh_edgenet.c.
References BLI_linklist_prepend_pool(), BM_elem_index_get, v, and vn.
Referenced by bm_edgenet_path_calc().
|
static |
Step along the path from v_curr to any vert not already in the path.
Definition at line 173 of file bmesh_edgenet.c.
References BLI_linklist_pop_pool(), BLI_linklist_prepend_pool(), bm_edge_face(), BM_edge_other_vert(), bm_edge_step_ok(), bm_edgenet_path_check_overlap(), BM_EDGES_OF_VERT, BM_elem_index_get, BM_ITER_ELEM, e, VertNetInfo::face, VertNetInfo::flag, NULL, VertNetInfo::pass, VertNetInfo::prev, and VNINFO_FLAG_IS_MIXFACE.
Referenced by bm_edgenet_path_calc().
Fill in faces from an edgenet made up of boundary and wire edges.
bm | The mesh to operate on. |
use_edge_tag | Only fill tagged edges. |
Definition at line 411 of file bmesh_edgenet.c.
References BLI_assert, BLI_linklist_free_pool(), BLI_linklist_prepend_pool(), BLI_mempool_create(), BLI_mempool_destroy(), BLI_mempool_len(), BLI_MEMPOOL_NOP, bm, bm_edge_step_ok(), bm_edgenet_edge_get_next(), bm_edgenet_face_from_path(), bm_edgenet_path_calc_best(), BM_EDGES_OF_MESH, BM_elem_flag_enable, BM_elem_flag_set, BM_elem_index_set, BM_ELEM_TAG, BM_FACE, BM_FACE_FIRST_LOOP, BM_ITER_MESH, BM_LOOP, BM_mesh_elem_index_ensure(), BM_VERT, BMLoop::e, e, BMesh::elem_index_dirty, MEM_callocN, MEM_freeN, BMLoop::next, NULL, BMesh::totface, BMesh::totvert, and UINT_MAX.
Referenced by BKE_mesh_remesh_voxel_fix_poles(), bmo_edgenet_fill_exec(), bmo_holes_fill_exec(), and slice_paint_mask().