Blender  V3.3
Macros
bmesh_path_uv.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_heap_simple.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "DNA_meshdata_types.h"
#include "bmesh.h"
#include "bmesh_path_uv.h"
#include "intern/bmesh_query.h"
#include "intern/bmesh_query_uv.h"

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 struct BMCalcPathUVParams *params)
 
struct LinkNodeBM_mesh_calc_path_uv_vert (BMesh *bm, BMLoop *l_src, BMLoop *l_dst, const struct 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 struct BMCalcPathUVParams *params)
 
struct LinkNodeBM_mesh_calc_path_uv_edge (BMesh *bm, BMLoop *l_src, BMLoop *l_dst, const struct 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 struct BMCalcPathUVParams *params)
 
struct LinkNodeBM_mesh_calc_path_uv_face (BMesh *bm, BMFace *f_src, BMFace *f_dst, const struct 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.c.

Macro Definition Documentation

◆ COST_INIT_MAX

#define COST_INIT_MAX   FLT_MAX

Definition at line 22 of file bmesh_path_uv.c.

Function Documentation

◆ BM_mesh_calc_path_uv_edge()

struct LinkNode* BM_mesh_calc_path_uv_edge ( BMesh bm,
BMLoop l_src,
BMLoop l_dst,
const struct BMCalcPathUVParams params,
bool(*)(BMLoop *, void *)  filter_fn,
void user_data 
)

◆ BM_mesh_calc_path_uv_face()

struct LinkNode* BM_mesh_calc_path_uv_face ( BMesh bm,
BMFace f_src,
BMFace f_dst,
const struct BMCalcPathUVParams params,
bool(*)(BMFace *, void *)  filter_fn,
void user_data 
)

◆ BM_mesh_calc_path_uv_vert()

struct LinkNode* BM_mesh_calc_path_uv_vert ( BMesh bm,
BMLoop l_src,
BMLoop l_dst,
const struct BMCalcPathUVParams params,
bool(*)(BMLoop *, void *)  filter_fn,
void user_data 
)

◆ edgetag_add_adjacent_uv()

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

◆ 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

◆ facetag_add_adjacent_uv()

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 struct BMCalcPathUVParams params 
)
static

◆ 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 50 of file bmesh_path_uv.c.

References step_cost_3_v2_ex(), v1, 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.c which follows the same logic.

Definition at line 33 of file bmesh_path_uv.c.

References dot_v2v2(), fabsf, normalize_v2(), sqrtf, sub_v2_v2v2(), v1, 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 struct BMCalcPathUVParams params 
)
static