Blender V4.3
bmesh_path_uv.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_heap_simple.h"
#include "BLI_linklist.h"
#include "BLI_math_geom.h"
#include "BLI_math_vector.h"
#include "bmesh.hh"
#include "bmesh_path_uv.hh"
#include "intern/bmesh_query.hh"
#include "intern/bmesh_query_uv.hh"

Go to the source code of this file.

Macros

#define COST_INIT_MAX   FLT_MAX
 

Functions

Generic Helpers
static float step_cost_3_v2_ex (const float v1[2], const float v2[2], const float v3[2], bool skip_12, bool skip_23)
 
static float step_cost_3_v2 (const float v1[2], const float v2[2], const float v3[2])
 
BM_mesh_calc_path_uv_vert
static void verttag_add_adjacent_uv (HeapSimple *heap, BMLoop *l_a, BMLoop **loops_prev, float *cost, const BMCalcPathUVParams *params)
 
LinkNodeBM_mesh_calc_path_uv_vert (BMesh *bm, BMLoop *l_src, BMLoop *l_dst, const BMCalcPathUVParams *params, bool(*filter_fn)(BMLoop *, void *), void *user_data)
 
BM_mesh_calc_path_uv_edge
static float edgetag_cut_cost_vert_uv (BMLoop *l_e_a, BMLoop *l_e_b, BMLoop *l_v, const float aspect_y, const int cd_loop_uv_offset)
 
static float edgetag_cut_cost_face_uv (BMLoop *l_e_a, BMLoop *l_e_b, BMFace *f, const float aspect_v2[2], const int cd_loop_uv_offset)
 
static void edgetag_add_adjacent_uv (HeapSimple *heap, BMLoop *l_a, BMLoop **loops_prev, float *cost, const BMCalcPathUVParams *params)
 
LinkNodeBM_mesh_calc_path_uv_edge (BMesh *bm, BMLoop *l_src, BMLoop *l_dst, const BMCalcPathUVParams *params, bool(*filter_fn)(BMLoop *, void *), void *user_data)
 
BM_mesh_calc_path_uv_face
static float facetag_cut_cost_edge_uv (BMFace *f_a, BMFace *f_b, BMLoop *l_edge, const void *const f_endpoints[2], const float aspect_v2[2], const int cd_loop_uv_offset)
 
static float facetag_cut_cost_vert_uv (BMFace *f_a, BMFace *f_b, BMLoop *l_vert, const void *const f_endpoints[2], const float aspect_v2[2], const int cd_loop_uv_offset)
 
static void facetag_add_adjacent_uv (HeapSimple *heap, BMFace *f_a, BMFace **faces_prev, float *cost, const void *const f_endpoints[2], const float aspect_v2[2], const BMCalcPathUVParams *params)
 
LinkNodeBM_mesh_calc_path_uv_face (BMesh *bm, BMFace *f_src, BMFace *f_dst, const BMCalcPathUVParams *params, bool(*filter_fn)(BMFace *, void *), void *user_data)
 

Detailed Description

Find a path between 2 elements in UV space.

Definition in file bmesh_path_uv.cc.

Macro Definition Documentation

◆ COST_INIT_MAX

#define COST_INIT_MAX   FLT_MAX

Function Documentation

◆ BM_mesh_calc_path_uv_edge()

◆ BM_mesh_calc_path_uv_face()

◆ BM_mesh_calc_path_uv_vert()

◆ edgetag_add_adjacent_uv()

◆ edgetag_cut_cost_face_uv()

static float edgetag_cut_cost_face_uv ( BMLoop * l_e_a,
BMLoop * l_e_b,
BMFace * f,
const float aspect_v2[2],
const int cd_loop_uv_offset )
static

◆ edgetag_cut_cost_vert_uv()

static float edgetag_cut_cost_vert_uv ( BMLoop * l_e_a,
BMLoop * l_e_b,
BMLoop * l_v,
const float aspect_y,
const int cd_loop_uv_offset )
static

Definition at line 187 of file bmesh_path_uv.cc.

References BM_ELEM_CD_GET_FLOAT_P, BMLoop::next, step_cost_3_v2(), and BMLoop::v.

Referenced by edgetag_add_adjacent_uv().

◆ facetag_add_adjacent_uv()

◆ facetag_cut_cost_edge_uv()

static float facetag_cut_cost_edge_uv ( BMFace * f_a,
BMFace * f_b,
BMLoop * l_edge,
const void *const f_endpoints[2],
const float aspect_v2[2],
const int cd_loop_uv_offset )
static

◆ facetag_cut_cost_vert_uv()

static float facetag_cut_cost_vert_uv ( BMFace * f_a,
BMFace * f_b,
BMLoop * l_vert,
const void *const f_endpoints[2],
const float aspect_v2[2],
const int cd_loop_uv_offset )
static

◆ step_cost_3_v2()

static float step_cost_3_v2 ( const float v1[2],
const float v2[2],
const float v3[2] )
static

Definition at line 51 of file bmesh_path_uv.cc.

References step_cost_3_v2_ex(), and v2.

Referenced by edgetag_cut_cost_face_uv(), and edgetag_cut_cost_vert_uv().

◆ step_cost_3_v2_ex()

static float step_cost_3_v2_ex ( const float v1[2],
const float v2[2],
const float v3[2],
bool skip_12,
bool skip_23 )
static

Use skip options when we want to start measuring from a boundary.

See step_cost_3_v3_ex in bmesh_path.cc which follows the same logic.

Definition at line 34 of file bmesh_path_uv.cc.

References dot_v2v2(), fabsf, normalize_v2(), sqrtf, sub_v2_v2v2(), and v2.

Referenced by facetag_cut_cost_edge_uv(), facetag_cut_cost_vert_uv(), and step_cost_3_v2().

◆ verttag_add_adjacent_uv()

static void verttag_add_adjacent_uv ( HeapSimple * heap,
BMLoop * l_a,
BMLoop ** loops_prev,
float * cost,
const BMCalcPathUVParams * params )
static