|
Blender
V2.93
|
#include <limits.h>#include "MEM_guardedalloc.h"#include "BLI_alloca.h"#include "BLI_linklist.h"#include "BLI_linklist_stack.h"#include "BLI_math.h"#include "BLI_utildefines.h"#include "BLI_utildefines_stack.h"#include "bmesh.h"#include "bmesh_bisect_plane.h"#include "BLI_strict_flags.h"Go to the source code of this file.
Macros | |
| #define | BM_VERT_DIR(v) ((short *)(&(v)->head.index))[0] /* Direction -1/0/1 */ |
| #define | BM_VERT_SKIP(v) ((short *)(&(v)->head.index))[1] /* Skip Vert 0/1 */ |
| #define | BM_VERT_DIST(v) ((v)->no[0]) /* Distance from the plane. */ |
| #define | BM_VERT_SORTVAL(v) ((v)->no[1]) /* Temp value for sorting. */ |
| #define | BM_VERT_LOOPINDEX(v) |
Cut the geometry in half using a plane.
Definition in file bmesh_bisect_plane.c.
Definition at line 71 of file bmesh_bisect_plane.c.
Definition at line 73 of file bmesh_bisect_plane.c.
| #define BM_VERT_LOOPINDEX | ( | v | ) |
Definition at line 75 of file bmesh_bisect_plane.c.
Definition at line 72 of file bmesh_bisect_plane.c.
Definition at line 74 of file bmesh_bisect_plane.c.
|
static |
Definition at line 148 of file bmesh_bisect_plane.c.
References axis_dominant_v3_to_m3(), BLI_array_alloca, BLI_assert, bm, BM_FACE_FIRST_LOOP, BM_face_is_normal_valid(), BM_face_split(), BM_face_vert_share_loop(), BM_loop_is_adjacent(), BM_VERT_DIR, BM_VERT_LOOPINDEX, BM_VERT_SKIP, BM_VERT_SORTVAL, bm_vert_sortval_cb(), BMO_edge_flag_enable, BMO_face_flag_enable, BMVert::co, cross_v3_v3v3(), dot_v3v3(), BMLoop::e, equals_v3v3(), BMLoop::f, float(), is_inside(), l_b, BMFace::len, LIKELY, mul_v2_m3v3(), BMLoop::next, BMFace::no, normalize_v3(), NULL, BMLoop::prev, STACK_DECLARE, STACK_INIT, STACK_PUSH, STACK_SIZE, sub_v3_v3v3(), UNLIKELY, BMLoop::v, v, vert_is_center_test(), and vert_pair_adjacent_in_orig_face().
Referenced by BM_mesh_bisect_plane().
| 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 | ||
| ) |
| use_snap_center | Snap verts onto the plane. |
| use_tag | Only bisect tagged edges and faces. |
| oflag_center | Operator flag, enabled for geometry on the axis (existing and created) |
Definition at line 408 of file bmesh_bisect_plane.c.
References BLI_LINKSTACK_DECLARE, BLI_LINKSTACK_FREE, BLI_LINKSTACK_INIT, BLI_LINKSTACK_POP, BLI_LINKSTACK_PUSH, bm, BM_edge_split(), BM_EDGES_OF_MESH, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_TAG, bm_face_bisect_verts(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_LOOPS_OF_VERT, BM_mesh_elem_hflag_disable_all(), BM_VERT, BM_VERT_DIR, BM_VERT_DIST, BM_VERTS_OF_EDGE, BM_VERTS_OF_MESH, BMO_edge_flag_enable, BMO_vert_flag_enable, closest_to_plane_v3(), BMVert::co, e, edge_is_cut_enable(), edge_is_cut_test(), BMesh::elem_index_dirty, eps, BMLoop::f, face_in_stack_disable(), face_in_stack_enable(), face_in_stack_test(), MEM_freeN, MEM_mallocN, plane_point_test_v3(), BMLoop::radial_next, BMesh::totedge, v, vert_is_center_disable(), vert_is_center_enable(), and vert_is_center_test().
Referenced by BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(), and bmo_bisect_plane_exec().
|
static |
Definition at line 134 of file bmesh_bisect_plane.c.
References BM_VERT_SORTVAL.
Referenced by bm_face_bisect_verts().
| BLI_INLINE void edge_is_cut_disable | ( | BMEdge * | e | ) |
Definition at line 108 of file bmesh_bisect_plane.c.
References BM_elem_flag_disable, BM_ELEM_TAG, and e.
| BLI_INLINE void edge_is_cut_enable | ( | BMEdge * | e | ) |
Definition at line 104 of file bmesh_bisect_plane.c.
References BM_elem_flag_enable, BM_ELEM_TAG, and e.
Referenced by BM_mesh_bisect_plane().
| BLI_INLINE bool edge_is_cut_test | ( | BMEdge * | e | ) |
Definition at line 112 of file bmesh_bisect_plane.c.
References BM_elem_flag_test, BM_ELEM_TAG, and e.
Referenced by BM_mesh_bisect_plane().
| BLI_INLINE void face_in_stack_disable | ( | BMFace * | f | ) |
Definition at line 122 of file bmesh_bisect_plane.c.
References BM_elem_flag_enable, and BM_ELEM_TAG.
Referenced by BM_mesh_bisect_plane().
| BLI_INLINE void face_in_stack_enable | ( | BMFace * | f | ) |
Definition at line 118 of file bmesh_bisect_plane.c.
References BM_elem_flag_disable, and BM_ELEM_TAG.
Referenced by BM_mesh_bisect_plane().
| BLI_INLINE bool face_in_stack_test | ( | BMFace * | f | ) |
Definition at line 126 of file bmesh_bisect_plane.c.
References BM_elem_flag_test, and BM_ELEM_TAG.
Referenced by BM_mesh_bisect_plane().
|
static |
Definition at line 49 of file bmesh_bisect_plane.c.
References eps, and plane_point_side_v3().
Referenced by BM_mesh_bisect_plane().
| BLI_INLINE void vert_is_center_disable | ( | BMVert * | v | ) |
Definition at line 88 of file bmesh_bisect_plane.c.
References BM_elem_flag_disable, BM_ELEM_TAG, and v.
Referenced by BM_mesh_bisect_plane().
| BLI_INLINE void vert_is_center_enable | ( | BMVert * | v | ) |
Hide flag access (for more readable code since same flag is used differently for vert/edgeface)...
Definition at line 84 of file bmesh_bisect_plane.c.
References BM_elem_flag_enable, BM_ELEM_TAG, and v.
Referenced by BM_mesh_bisect_plane().
| BLI_INLINE bool vert_is_center_test | ( | BMVert * | v | ) |
Definition at line 92 of file bmesh_bisect_plane.c.
References BM_elem_flag_test, BM_ELEM_TAG, and v.
Referenced by bm_face_bisect_verts(), and BM_mesh_bisect_plane().
| BLI_INLINE bool vert_pair_adjacent_in_orig_face | ( | BMVert * | v_a, |
| BMVert * | v_b, | ||
| const uint | f_len_orig | ||
| ) |
Definition at line 97 of file bmesh_bisect_plane.c.
References abs(), BM_VERT_LOOPINDEX, and ELEM.
Referenced by bm_face_bisect_verts().