Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_utildefines_stack.h"
#include "BKE_customdata.h"
#include "DNA_meshdata_types.h"
#include "bmesh.h"
#include "intern/bmesh_private.h"
Go to the source code of this file.
Macros | |
#define | UV_ASPECT(l, r_uv) uv_aspect(l, aspect, cd_loop_uv_offset, r_uv) |
Functions | |
static void | uv_aspect (const BMLoop *l, const float aspect[2], const int cd_loop_uv_offset, float r_uv[2]) |
void | BM_face_uv_calc_center_median_weighted (const BMFace *f, const float aspect[2], const int cd_loop_uv_offset, float r_cent[2]) |
void | BM_face_uv_calc_center_median (const BMFace *f, const int cd_loop_uv_offset, float r_cent[2]) |
float | BM_face_uv_calc_cross (const BMFace *f, const int cd_loop_uv_offset) |
void | BM_face_uv_minmax (const BMFace *f, float min[2], float max[2], const int cd_loop_uv_offset) |
void | BM_face_uv_transform (BMFace *f, const float matrix[2][2], const int cd_loop_uv_offset) |
bool | BM_loop_uv_share_edge_check (BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset) |
bool | BM_loop_uv_share_vert_check (BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset) |
bool | BM_edge_uv_share_vert_check (BMEdge *e, BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset) |
bool | BM_face_uv_point_inside_test (const BMFace *f, const float co[2], const int cd_loop_uv_offset) |
Typically we avoid hiding arguments, make this an exception since it reads poorly with so many repeated arguments.
Definition at line 35 of file bmesh_query_uv.c.
Check if two loops that share a vertex also have the same UV coordinates.
Definition at line 151 of file bmesh_query_uv.c.
References BLI_assert, BM_ELEM_CD_GET_VOID_P, BM_loop_other_vert_loop_by_edge(), BM_loop_uv_share_vert_check(), e, equals_v2v2(), l_b, MLoopUV::uv, and BMLoop::v.
Referenced by uv_rip_pairs_from_loop().
void BM_face_uv_calc_center_median | ( | const BMFace * | f, |
const int | cd_loop_uv_offset, | ||
float | r_cent[2] | ||
) |
Definition at line 76 of file bmesh_query_uv.c.
References add_v2_v2(), BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, BMFace::len, mul_v2_fl(), BMLoop::next, MLoopUV::uv, and zero_v2().
Referenced by do_lasso_select_mesh_uv(), make_child_duplis_faces_from_editmesh(), uv_box_select_exec(), uv_circle_select_exec(), and uv_find_nearest_face_ex().
void BM_face_uv_calc_center_median_weighted | ( | const BMFace * | f, |
const float | aspect[2], | ||
int | cd_loop_uv_offset, | ||
float | r_cent[2] | ||
) |
Computes the UV center of a face, using the mean average weighted by edge length.
See BM_face_calc_center_median_weighted for matching spatial functionality.
aspect | Calculate the center scaling by these values, and finally dividing. Since correct weighting depends on having the correct aspect. |
Definition at line 37 of file bmesh_query_uv.c.
References BM_FACE_FIRST_LOOP, copy_v2_v2(), len_v2v2(), madd_v2_v2fl(), mul_v2_fl(), BMLoop::next, BMLoop::prev, UV_ASPECT, w(), and zero_v2().
Referenced by edgetag_cut_cost_face_uv(), facetag_cut_cost_edge_uv(), and facetag_cut_cost_vert_uv().
Calculate the UV cross product (use the sign to check the winding).
Definition at line 90 of file bmesh_query_uv.c.
References BLI_array_alloca, BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, copy_v2_v2(), cross_poly_v2(), float(), BMFace::len, BMLoop::next, and MLoopUV::uv.
Referenced by bm_loop_calc_uv_angle_from_dir().
void BM_face_uv_minmax | ( | const BMFace * | f, |
float | min[2], | ||
float | max[2], | ||
const int | cd_loop_uv_offset | ||
) |
Definition at line 104 of file bmesh_query_uv.c.
References BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, max, min, minmax_v2v2_v2(), BMLoop::next, and MLoopUV::uv.
Referenced by bm_face_array_calc_bounds(), and ED_uvedit_pack_islands_multi().
Check if the point is inside the UV face.
Definition at line 173 of file bmesh_query_uv.c.
References BLI_array_alloca, BLI_assert, BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, BM_face_is_normal_valid(), copy_v2_v2(), float(), isect_point_poly_v2(), BMFace::len, and BMLoop::next.
Referenced by uv_find_nearest_face_ex().
Definition at line 115 of file bmesh_query_uv.c.
References BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, mul_m2_v2(), BMLoop::next, and MLoopUV::uv.
Referenced by bm_face_array_uv_rotate_fit_aabb().
Check if two loops that share an edge also have the same UV coordinates.
Definition at line 126 of file bmesh_query_uv.c.
References BLI_assert, BM_ELEM_CD_GET_VOID_P, BMLoop::e, equals_v2v2(), l_b, BMLoop::next, SWAP, MLoopUV::uv, and BMLoop::v.
Referenced by bm_loop_find_other_fan_loop_with_visible_face(), bm_loop_find_other_radial_loop_with_visible_face(), bm_loop_uv_shared_edge_check(), BM_mesh_calc_path_uv_edge(), ED_uvedit_selected_edges(), edgetag_add_adjacent_uv(), edgetag_test_cb(), facetag_add_adjacent_uv(), uv_rip_single_from_loop(), uv_seams_from_islands_exec(), uvedit_edge_select_set_noflush(), and uvedit_loop_find_other_radial_loop_with_visible_face().
Check if two loops that share a vertex also have the same UV coordinates.
Definition at line 140 of file bmesh_query_uv.c.
References BLI_assert, BM_ELEM_CD_GET_VOID_P, equals_v2v2(), l_b, MLoopUV::uv, and BMLoop::v.
Referenced by BM_edge_uv_share_vert_check(), BM_mesh_calc_path_uv_vert(), ED_uvedit_selected_verts(), edgetag_add_adjacent_uv(), facetag_add_adjacent_uv(), mesh_calc_path_region_elem(), uv_select_linked_multi(), uvedit_uv_select_shared_vert(), uvedit_vert_is_all_other_faces_selected(), uvedit_vert_is_edge_select_any_other(), and uvedit_vert_is_face_select_any_other().
|
static |
Definition at line 21 of file bmesh_query_uv.c.
References BM_ELEM_CD_GET_VOID_P, and l.