Blender  V3.3
Functions
bmesh_query_uv.h File Reference

Go to the source code of this file.

Functions

float BM_loop_uv_calc_edge_length_squared (const BMLoop *l, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
float BM_loop_uv_calc_edge_length (const BMLoop *l, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
void BM_face_uv_calc_center_median_weighted (const BMFace *f, const float aspect[2], int cd_loop_uv_offset, float r_cent[2]) ATTR_NONNULL()
 
void BM_face_uv_calc_center_median (const BMFace *f, int cd_loop_uv_offset, float r_cent[2]) ATTR_NONNULL()
 
float BM_face_uv_calc_cross (const BMFace *f, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
void BM_face_uv_minmax (const BMFace *f, float min[2], float max[2], int cd_loop_uv_offset)
 
void BM_face_uv_transform (BMFace *f, const float matrix[2][2], int cd_loop_uv_offset)
 
bool BM_loop_uv_share_edge_check_with_limit (BMLoop *l_a, BMLoop *l_b, const float limit[2], int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BM_loop_uv_share_edge_check (BMLoop *l_a, BMLoop *l_b, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BM_edge_uv_share_vert_check (BMEdge *e, BMLoop *l_a, BMLoop *l_b, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BM_loop_uv_share_vert_check (BMLoop *l_a, BMLoop *l_b, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BM_face_uv_point_inside_test (const BMFace *f, const float co[2], int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 

Function Documentation

◆ BM_edge_uv_share_vert_check()

bool BM_edge_uv_share_vert_check ( BMEdge e,
BMLoop l_a,
BMLoop l_b,
int  cd_loop_uv_offset 
)

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().

◆ BM_face_uv_calc_center_median()

void BM_face_uv_calc_center_median ( const BMFace f,
int  cd_loop_uv_offset,
float  r_cent[2] 
)

◆ BM_face_uv_calc_center_median_weighted()

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.

Parameters
aspectCalculate 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().

◆ BM_face_uv_calc_cross()

float BM_face_uv_calc_cross ( const BMFace f,
int  cd_loop_uv_offset 
)

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().

◆ BM_face_uv_minmax()

void BM_face_uv_minmax ( const BMFace f,
float  min[2],
float  max[2],
int  cd_loop_uv_offset 
)

◆ BM_face_uv_point_inside_test()

bool BM_face_uv_point_inside_test ( const BMFace f,
const float  co[2],
int  cd_loop_uv_offset 
)

◆ BM_face_uv_transform()

void BM_face_uv_transform ( BMFace f,
const float  matrix[2][2],
int  cd_loop_uv_offset 
)

◆ BM_loop_uv_calc_edge_length()

float BM_loop_uv_calc_edge_length ( const BMLoop l,
int  cd_loop_uv_offset 
)

◆ BM_loop_uv_calc_edge_length_squared()

float BM_loop_uv_calc_edge_length_squared ( const BMLoop l,
int  cd_loop_uv_offset 
)

◆ BM_loop_uv_share_edge_check()

bool BM_loop_uv_share_edge_check ( BMLoop l_a,
BMLoop l_b,
int  cd_loop_uv_offset 
)

◆ BM_loop_uv_share_edge_check_with_limit()

bool BM_loop_uv_share_edge_check_with_limit ( BMLoop l_a,
BMLoop l_b,
const float  limit[2],
int  cd_loop_uv_offset 
)

◆ BM_loop_uv_share_vert_check()

bool BM_loop_uv_share_vert_check ( BMLoop l_a,
BMLoop l_b,
int  cd_loop_uv_offset 
)