|
Blender
V2.93
|
#include "MEM_guardedalloc.h"#include "BLI_boxpack_2d.h"#include "BLI_convexhull_2d.h"#include "BLI_heap.h"#include "BLI_math.h"#include "BLI_memarena.h"#include "BLI_polyfill_2d.h"#include "BLI_polyfill_2d_beautify.h"#include "BLI_rand.h"#include "BLI_utildefines.h"#include "uvedit_parametrizer.h"#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "BLI_sys_types.h"#include "eigen_capi.h"Go to the source code of this file.
Classes | |
| struct | PHashLink |
| struct | PHash |
| struct | PVert |
| union | PVert::PVertUnion |
| struct | PEdge |
| union | PEdge::PEdgeUnion |
| struct | PFace |
| union | PFace::PFaceUnion |
| struct | PChart |
| union | PChart::PChartUnion |
| struct | PChart::PChartUnion::PChartLscm |
| struct | PChart::PChartUnion::PChartPack |
| struct | PHandle |
| struct | PAbfSystem |
| struct | SmoothTriangle |
| struct | SmoothNode |
Macros | |
| #define | param_assert(condition) |
| #define | param_warning(message) {/*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/}(void)0 |
| #define | PEDGE_VERTEX_FLAGS (PEDGE_PIN) |
| #define | PHASH_hash(ph, item) (((uintptr_t)(item)) % ((uint)(ph)->cursize)) |
| #define | PHASH_edge(v1, v2) (((v1) < (v2)) ? ((v1)*39) ^ ((v2)*31) : ((v1)*31) ^ ((v2)*39)) |
| #define | ABF_MAX_ITER 20 |
| #define | P_STRETCH_ITER 20 |
Typedefs | |
| typedef enum PBool | PBool |
| typedef intptr_t | PHashKey |
| typedef struct PHashLink | PHashLink |
| typedef struct PHash | PHash |
| typedef struct PVert | PVert |
| typedef struct PEdge | PEdge |
| typedef struct PFace | PFace |
| typedef struct PChart | PChart |
| typedef struct PHandle | PHandle |
| typedef struct PAbfSystem | PAbfSystem |
| typedef struct SmoothTriangle | SmoothTriangle |
| typedef struct SmoothNode | SmoothNode |
Enumerations | |
| enum | PBool { P_TRUE = 1 , P_FALSE = 0 } |
| enum | PVertFlag { PVERT_PIN = 1 , PVERT_SELECT = 2 , PVERT_INTERIOR = 4 , PVERT_COLLAPSE = 8 , PVERT_SPLIT = 16 } |
| enum | PEdgeFlag { PEDGE_SEAM = 1 , PEDGE_VERTEX_SPLIT = 2 , PEDGE_PIN = 4 , PEDGE_SELECT = 8 , PEDGE_DONE = 16 , PEDGE_FILLED = 32 , PEDGE_COLLAPSE = 64 , PEDGE_COLLAPSE_EDGE = 128 , PEDGE_COLLAPSE_PAIR = 256 } |
| enum | PFaceFlag { PFACE_CONNECTED = 1 , PFACE_FILLED = 2 , PFACE_COLLAPSE = 4 } |
| enum | PChartFlag { PCHART_HAS_PINS = 1 } |
| enum | PHandleState { PHANDLE_STATE_ALLOCATED , PHANDLE_STATE_CONSTRUCTED , PHANDLE_STATE_LSCM , PHANDLE_STATE_STRETCH } |
Variables | |
| static int | PHashSizes [] |
| #define ABF_MAX_ITER 20 |
Definition at line 2408 of file uvedit_parametrizer.c.
| #define P_STRETCH_ITER 20 |
Definition at line 3416 of file uvedit_parametrizer.c.
| #define param_assert | ( | condition | ) |
Definition at line 46 of file uvedit_parametrizer.c.
| #define param_warning | ( | message | ) | {/*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/}(void)0 |
Definition at line 50 of file uvedit_parametrizer.c.
| #define PEDGE_VERTEX_FLAGS (PEDGE_PIN) |
Definition at line 152 of file uvedit_parametrizer.c.
Definition at line 236 of file uvedit_parametrizer.c.
Definition at line 235 of file uvedit_parametrizer.c.
| typedef struct PAbfSystem PAbfSystem |
Definition at line 60 of file uvedit_parametrizer.c.
| typedef struct SmoothNode SmoothNode |
| typedef struct SmoothTriangle SmoothTriangle |
| enum PBool |
| Enumerator | |
|---|---|
| P_TRUE | |
| P_FALSE | |
Definition at line 53 of file uvedit_parametrizer.c.
| enum PChartFlag |
| Enumerator | |
|---|---|
| PCHART_HAS_PINS | |
Definition at line 191 of file uvedit_parametrizer.c.
| enum PEdgeFlag |
| Enumerator | |
|---|---|
| PEDGE_SEAM | |
| PEDGE_VERTEX_SPLIT | |
| PEDGE_PIN | |
| PEDGE_SELECT | |
| PEDGE_DONE | |
| PEDGE_FILLED | |
| PEDGE_COLLAPSE | |
| PEDGE_COLLAPSE_EDGE | |
| PEDGE_COLLAPSE_PAIR | |
Definition at line 139 of file uvedit_parametrizer.c.
| enum PFaceFlag |
| Enumerator | |
|---|---|
| PFACE_CONNECTED | |
| PFACE_FILLED | |
| PFACE_COLLAPSE | |
Definition at line 154 of file uvedit_parametrizer.c.
| enum PHandleState |
| Enumerator | |
|---|---|
| PHANDLE_STATE_ALLOCATED | |
| PHANDLE_STATE_CONSTRUCTED | |
| PHANDLE_STATE_LSCM | |
| PHANDLE_STATE_STRETCH | |
Definition at line 195 of file uvedit_parametrizer.c.
| enum PVertFlag |
| Enumerator | |
|---|---|
| PVERT_PIN | |
| PVERT_SELECT | |
| PVERT_INTERIOR | |
| PVERT_COLLAPSE | |
| PVERT_SPLIT | |
Definition at line 131 of file uvedit_parametrizer.c.
|
static |
Definition at line 2515 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::beta, e, PFace::PFaceUnion::id, if(), PAbfSystem::lambdaLength, PAbfSystem::lambdaPlanar, PAbfSystem::lambdaTriangle, p_abf_compute_sin_product(), PVERT_INTERIOR, PFace::u, v, v1, v2, and PAbfSystem::weight.
Referenced by p_abf_compute_gradient().
|
static |
Definition at line 2540 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::bAlpha, PAbfSystem::bInterior, PAbfSystem::bTriangle, e, PFace::edge, PChart::faces, float(), PEdge::PEdgeUnion::id, PFace::PFaceUnion::id, M_PI, PEdge::next, PFace::nextlink, PAbfSystem::ninterior, norm(), p_abf_compute_grad_alpha(), p_abf_compute_sin_product(), PVERT_INTERIOR, PEdge::u, PFace::u, v, and PChart::verts.
Referenced by p_chart_abf_solve().
|
static |
Definition at line 2478 of file uvedit_parametrizer.c.
References PAbfSystem::cosine, e, PEdge::PEdgeUnion::id, PAbfSystem::sine, PEdge::u, and v.
Referenced by p_abf_compute_grad_alpha(), p_abf_compute_gradient(), and p_abf_matrix_invert().
|
static |
Definition at line 2467 of file uvedit_parametrizer.c.
References alpha, PAbfSystem::alpha, cosf, PAbfSystem::cosine, PAbfSystem::nangles, PAbfSystem::sine, and sinf.
Referenced by p_chart_abf_solve().
|
static |
Definition at line 2449 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::bAlpha, PAbfSystem::beta, PAbfSystem::bInterior, PAbfSystem::bstar, PAbfSystem::bTriangle, PAbfSystem::cosine, PAbfSystem::dstar, PAbfSystem::J2dt, PAbfSystem::lambdaLength, PAbfSystem::lambdaPlanar, PAbfSystem::lambdaTriangle, MEM_freeN, PAbfSystem::sine, and PAbfSystem::weight.
Referenced by p_chart_abf_solve().
|
static |
Definition at line 2588 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::bAlpha, beta(), PAbfSystem::bInterior, PAbfSystem::bstar, PAbfSystem::bTriangle, Freestyle::c, context, PAbfSystem::dstar, e, PFace::edge, EIG_linear_solver_delete(), EIG_linear_solver_matrix_add(), EIG_linear_solver_new(), EIG_linear_solver_right_hand_side_add(), EIG_linear_solver_solve(), EIG_linear_solver_variable_get(), PChart::faces, float(), PEdge::PEdgeUnion::id, PFace::PFaceUnion::id, PAbfSystem::J2dt, PAbfSystem::lambdaLength, PAbfSystem::lambdaPlanar, PAbfSystem::lambdaTriangle, M_PI, PEdge::next, PFace::nextlink, PAbfSystem::ninterior, p_abf_compute_sin_product(), PVERT_INTERIOR, r, PEdge::u, PFace::u, v1, v2, PEdge::vert, PAbfSystem::weight, x, and x2.
Referenced by p_chart_abf_solve().
|
static |
Definition at line 2419 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::bAlpha, PAbfSystem::beta, PAbfSystem::bInterior, PAbfSystem::bstar, PAbfSystem::bTriangle, PAbfSystem::cosine, PAbfSystem::dstar, float(), PAbfSystem::J2dt, PAbfSystem::lambdaLength, PAbfSystem::lambdaPlanar, PAbfSystem::lambdaTriangle, M_PI, PAbfSystem::maxangle, MEM_callocN, MEM_mallocN, PAbfSystem::minangle, PAbfSystem::nangles, PAbfSystem::nfaces, PAbfSystem::ninterior, PAbfSystem::sine, and PAbfSystem::weight.
Referenced by p_chart_abf_solve().
|
static |
Definition at line 4438 of file uvedit_parametrizer.c.
References add_newell_cross_v3_v3v3(), axis_dominant_v3_to_m3_negate(), BLI_memarena_alloc(), BLI_memarena_clear(), BLI_polyfill_beautify(), BLI_polyfill_calc_arena(), float(), mul_v2_m3v3(), normal, normalize_v3(), param_face_add(), PHandle::polyfill_arena, PHandle::polyfill_heap, select(), SmoothNode::tri, UNLIKELY, v1, v2, and zero_v3().
Referenced by param_face_add().
Definition at line 409 of file uvedit_parametrizer.c.
Referenced by p_chart_convex_hull().
|
static |
Definition at line 3854 of file uvedit_parametrizer.c.
References Freestyle::a, Freestyle::c, v1, and v2.
Referenced by p_smooth(), and p_triangle_inside().
Definition at line 587 of file uvedit_parametrizer.c.
References e.
Referenced by p_chart_convex_hull(), p_chart_fill_boundary(), and p_chart_symmetry_pins().
Definition at line 592 of file uvedit_parametrizer.c.
References e, and p_wheel_edge_next().
Referenced by p_chart_fill_boundary(), and p_chart_symmetry_pins().
Definition at line 2816 of file uvedit_parametrizer.c.
References PChart::PChartUnion::PChartLscm::abf_alpha, ABF_MAX_ITER, PAbfSystem::alpha, PAbfSystem::beta, e, PFace::edge, PChart::faces, PEdge::PEdgeUnion::id, PFace::PFaceUnion::id, PChart::PChartUnion::lscm, M_PI, PAbfSystem::maxangle, MEM_dupallocN, PAbfSystem::minangle, PAbfSystem::nangles, PEdge::next, PFace::nextlink, PChart::nfaces, PAbfSystem::nfaces, PAbfSystem::ninterior, norm(), p_abf_compute_gradient(), p_abf_compute_sines(), p_abf_free_system(), p_abf_matrix_invert(), p_abf_setup_system(), p_face_angles(), P_FALSE, P_TRUE, p_vert_interior(), param_warning, PVERT_INTERIOR, PEdge::u, PFace::u, PChart::u, v, PChart::verts, and PAbfSystem::weight.
Referenced by p_chart_lscm_begin().
Definition at line 1264 of file uvedit_parametrizer.c.
References e, PVert::edge, PChart::edges, PEdge::flag, len, PEdge::next, NULL, p_edge_length(), PEDGE_DONE, and PEdge::vert.
Referenced by p_chart_convex_hull(), p_chart_lscm_begin(), and param_construct_end().
|
static |
Definition at line 3589 of file uvedit_parametrizer.c.
References e, L, MEM_freeN, MEM_mallocN, NULL, p_area_signed(), p_boundary_edge_next(), p_chart_boundaries(), p_compare_geometric_uv(), P_FALSE, P_TRUE, and U.
Referenced by p_chart_minimum_area_angle().
|
static |
Definition at line 858 of file uvedit_parametrizer.c.
References MEM_freeN.
Referenced by param_construct_end(), and param_delete().
Definition at line 3106 of file uvedit_parametrizer.c.
References BMVert::co, NULL, p_chart_pin_positions(), v, and PChart::verts.
Referenced by p_chart_lscm_begin().
Definition at line 1407 of file uvedit_parametrizer.c.
References e, PVert::edge, PChart::edges, PEdge::flag, PEdge::next, p_chart_fill_boundary(), PEDGE_FILLED, and PEdge::vert.
Referenced by param_construct_end().
Definition at line 1330 of file uvedit_parametrizer.c.
References angle(), BLI_heap_free(), BLI_heap_insert(), BLI_heap_new(), BLI_heap_pop_min(), BLI_heap_remove(), e, PVert::edge, PFace::edge, PEdge::flag, PFace::flag, PEdge::PEdgeUnion::heaplink, PEdge::next, NULL, p_boundary_edge_next(), p_boundary_edge_prev(), p_edge_boundary_angle(), p_face_add_fill(), PEdge::pair, PEDGE_FILLED, PFACE_FILLED, PEdge::u, and PEdge::vert.
Referenced by p_chart_fill_boundaries().
Definition at line 3160 of file uvedit_parametrizer.c.
References PChart::PChartUnion::PChartLscm::context, EIG_linear_least_squares_solver_new(), PChart::PChartUnion::lscm, PChart::nfaces, NULL, PChart::nverts, p_chart_abf_solve(), p_chart_boundaries(), p_chart_extrema_verts(), p_chart_symmetry_pins(), p_chart_uv_area(), P_FALSE, P_TRUE, param_warning, PChart::PChartUnion::PChartLscm::pin1, PChart::PChartUnion::PChartLscm::pin2, PVERT_PIN, PVERT_SELECT, select(), PChart::PChartUnion::PChartLscm::single_pin, PChart::PChartUnion::PChartLscm::single_pin_area, PChart::u, v, and PChart::verts.
Referenced by param_lscm_begin().
|
static |
Definition at line 3396 of file uvedit_parametrizer.c.
References PChart::PChartUnion::PChartLscm::abf_alpha, PChart::PChartUnion::PChartLscm::context, EIG_linear_solver_delete(), PChart::PChartUnion::lscm, MEM_freeN, NULL, PChart::PChartUnion::PChartLscm::pin1, PChart::PChartUnion::PChartLscm::pin2, PChart::PChartUnion::PChartLscm::single_pin, PChart::PChartUnion::PChartLscm::single_pin_area, and PChart::u.
Referenced by param_lscm_end(), and param_lscm_solve().
|
static |
Definition at line 3149 of file uvedit_parametrizer.c.
References context, PChart::PChartUnion::PChartLscm::context, EIG_linear_solver_variable_get(), PChart::PChartUnion::lscm, PChart::u, v, and PChart::verts.
Referenced by p_chart_lscm_solve().
Definition at line 3229 of file uvedit_parametrizer.c.
References PChart::PChartUnion::PChartLscm::abf_alpha, alpha, blender::compositor::area(), context, PChart::PChartUnion::PChartLscm::context, copy_v2_v2(), cosf, PFace::edge, EIG_linear_solver_matrix_add(), EIG_linear_solver_solve(), EIG_linear_solver_variable_lock(), EIG_linear_solver_variable_set(), PChart::faces, PVert::PVertUnion::id, PChart::PChartUnion::lscm, max_fff(), PEdge::next, PFace::nextlink, p_chart_lscm_load_solution(), p_face_angles(), p_face_uv_area_signed(), P_FALSE, P_TRUE, p_vert_load_pin_select_uvs(), PChart::PChartUnion::PChartLscm::pin1, PChart::PChartUnion::PChartLscm::pin2, PVERT_PIN, SHIFT3, sinf, PChart::PChartUnion::PChartLscm::single_pin, PChart::PChartUnion::PChartLscm::single_pin_uv, SWAP, PVert::u, PChart::u, PVert::uv, v, v1, v2, PEdge::vert, and PChart::verts.
Referenced by param_lscm_solve().
|
static |
Definition at line 3377 of file uvedit_parametrizer.c.
References PChart::PChartUnion::lscm, p_chart_uv_area(), p_chart_uv_scale(), p_chart_uv_translate(), PChart::PChartUnion::PChartLscm::single_pin, PChart::PChartUnion::PChartLscm::single_pin_area, PChart::PChartUnion::PChartLscm::single_pin_uv, sqrtf, sub_v2_v2v2(), PChart::u, and PVert::uv.
Referenced by param_lscm_solve().
Definition at line 3683 of file uvedit_parametrizer.c.
References Freestyle::a, blender::compositor::area(), float(), len, len_v2v2(), M_PI, MEM_freeN, MEM_mallocN, p_chart_convex_hull(), p_rectangle_area(), p_vec2_angle(), right, PVert::uv, and v.
Referenced by p_chart_rotate_minimum_area().
Definition at line 850 of file uvedit_parametrizer.c.
References PChart::handle, and MEM_callocN.
Referenced by p_split_charts(), and param_construct_begin().
Definition at line 2948 of file uvedit_parametrizer.c.
References PFace::edge, fabsf, PChart::faces, PEdge::next, sub_v3_v3v3(), PVert::uv, and PEdge::vert.
Referenced by p_chart_extrema_verts(), and p_chart_symmetry_pins().
|
static |
Definition at line 3821 of file uvedit_parametrizer.c.
References angle(), angle_to_mat2(), BLI_convexhull_aabb_fit_points_2d(), float(), MEM_freeN, MEM_mallocN, PChart::nverts, p_chart_uv_to_array(), and p_chart_uv_transform().
Referenced by param_lscm_solve(), and param_pack_rotate().
|
static |
Definition at line 3807 of file uvedit_parametrizer.c.
References angle(), cosf, p_chart_minimum_area_angle(), sinf, v, and PChart::verts.
Referenced by param_lscm_solve().
Definition at line 3500 of file uvedit_parametrizer.c.
References add_v2_v2v2(), BLI_rng_get_float(), copy_v2_v2(), cosf, e, float(), high(), low(), M_PI, p_edge_uv_length(), p_stretch_compute_vertex(), P_STRETCH_ITER, p_wheel_edge_next(), PVERT_PIN, PVERT_SELECT, sinf, v, and PChart::verts.
Referenced by param_stretch_iter().
|
static |
Definition at line 2999 of file uvedit_parametrizer.c.
References equals_v3v3(), PVert::flag, len, NULL, p_boundary_edge_next(), p_boundary_edge_prev(), p_chart_pin_positions(), p_edge_length(), P_FALSE, PVERT_SPLIT, and PEdge::vert.
Referenced by p_chart_lscm_begin().
Definition at line 457 of file uvedit_parametrizer.c.
References blender::compositor::area(), fabsf, PChart::faces, PFace::nextlink, and p_face_uv_area_signed().
Referenced by p_chart_lscm_begin(), and p_chart_lscm_transform_single_pin().
Definition at line 446 of file uvedit_parametrizer.c.
References INIT_MINMAX2, minmax_v2v2_v2(), v, and PChart::verts.
Referenced by p_smooth(), param_average(), and param_pack().
|
static |
Definition at line 517 of file uvedit_parametrizer.c.
References copy_v2_v2(), v, and PChart::verts.
Definition at line 468 of file uvedit_parametrizer.c.
References v, and PChart::verts.
Referenced by p_chart_lscm_transform_single_pin(), param_average(), and param_pack().
Definition at line 478 of file uvedit_parametrizer.c.
References v, PChart::verts, x, and y.
Referenced by param_scale().
Definition at line 507 of file uvedit_parametrizer.c.
References copy_v2_v2(), v, and PChart::verts.
Referenced by p_chart_rotate_fit_aabb().
Definition at line 498 of file uvedit_parametrizer.c.
References mul_m2_v2(), v, and PChart::verts.
Referenced by p_chart_rotate_fit_aabb().
Definition at line 488 of file uvedit_parametrizer.c.
References v, and PChart::verts.
Referenced by p_chart_lscm_transform_single_pin(), param_average(), and param_pack().
|
static |
Definition at line 3992 of file uvedit_parametrizer.c.
References Freestyle::a.
Referenced by p_smooth_median_edge_length().
|
static |
Definition at line 3569 of file uvedit_parametrizer.c.
References Freestyle::a, v1, and v2.
Referenced by p_chart_convex_hull().
Definition at line 971 of file uvedit_parametrizer.c.
References PFace::PFaceUnion::chart, PHandle::construction_chart, e, PVert::edge, PFace::edge, PChart::faces, PFace::flag, PHandle::hash_faces, MEM_freeN, MEM_mallocN, PEdge::next, PFace::nextlink, p_edge_connect_pair(), PFACE_CONNECTED, phash_size(), PFace::u, and PEdge::vert.
Referenced by param_construct_end().
Definition at line 1305 of file uvedit_parametrizer.c.
References angle(), BMVert::co, e, M_PI, PEdge::next, p_vec_angle(), PEdge::pair, v, v1, v2, and PEdge::vert.
Referenced by p_chart_fill_boundary().
|
static |
Definition at line 947 of file uvedit_parametrizer.c.
References e, PEdge::face, PFace::flag, NULL, p_edge_has_pair(), p_face_flip(), PEdge::pair, PFACE_CONNECTED, and PEdge::vert.
Referenced by p_connect_pairs().
|
static |
Definition at line 898 of file uvedit_parametrizer.c.
References e, PEdge::flag, PHandle::hash_edges, PEdge::next, NULL, p_edge_implicit_seam(), P_FALSE, PEDGE_SEAM, PHASH_edge, phash_lookup(), phash_next(), v1, v2, and PEdge::vert.
Referenced by p_edge_connect_pair().
Definition at line 864 of file uvedit_parametrizer.c.
References e, fabsf, PEdge::flag, PVert::PVertUnion::key, PEdge::next, PEdge::orig_uv, P_FALSE, P_TRUE, PEDGE_SEAM, PVert::u, and PEdge::vert.
Referenced by p_edge_has_pair().
Definition at line 423 of file uvedit_parametrizer.c.
References BMVert::co, e, sqrtf, v1, and v2.
Referenced by p_chart_boundaries(), p_chart_symmetry_pins(), p_smooth(), p_smooth_distortion(), and p_smooth_median_edge_length().
Definition at line 806 of file uvedit_parametrizer.c.
References e, PHandle::hash_edges, NULL, PHASH_edge, phash_lookup(), and phash_next().
Referenced by param_edge_set_seam().
Definition at line 435 of file uvedit_parametrizer.c.
References e, sqrtf, v1, and v2.
Referenced by p_chart_stretch_minimize(), p_smooth(), and p_smooth_distortion().
Definition at line 1117 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_memarena_alloc(), PFace::edge, PEdge::face, PEdge::flag, PFace::flag, PEdge::next, NULL, and PEdge::pair.
Referenced by p_face_add_construct(), and p_face_add_fill().
|
static |
Definition at line 1149 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::flag, PHandle::hash_edges, PHandle::hash_faces, i1, PEdge::PEdgeUnion::key, PFace::PFaceUnion::key, PEdge::next, PEdge::orig_uv, p_face_add(), p_vert_lookup(), PEDGE_PIN, PEDGE_SELECT, PHASH_edge, phash_insert(), select(), PEdge::u, PFace::u, and PEdge::vert.
Referenced by param_face_add().
Definition at line 1210 of file uvedit_parametrizer.c.
References PFace::edge, PChart::edges, PChart::faces, PChart::handle, PChart::nedges, PEdge::next, PEdge::nextlink, PFace::nextlink, PChart::nfaces, NULL, PEdge::orig_uv, p_face_add(), v1, v2, and PEdge::vert.
Referenced by p_chart_fill_boundary().
Definition at line 393 of file uvedit_parametrizer.c.
References BMVert::co, PFace::edge, PEdge::next, p_triangle_angles(), v1, v2, and PEdge::vert.
Referenced by p_chart_abf_solve(), and p_chart_lscm_solve().
Definition at line 401 of file uvedit_parametrizer.c.
References area_tri_v3(), BMVert::co, PFace::edge, PEdge::next, v1, v2, and PEdge::vert.
Referenced by param_average(), and param_stretch_begin().
|
static |
Definition at line 721 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::next, PEdge::old_uv, and PEdge::orig_uv.
Referenced by param_lscm_begin(), and param_stretch_begin().
|
static |
Definition at line 825 of file uvedit_parametrizer.c.
References e, PHandle::hash_edges, i1, P_FALSE, P_TRUE, PHASH_edge, phash_lookup(), and phash_next().
Referenced by p_quad_split_direction(), and param_face_add().
|
static |
Definition at line 609 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::flag, PEdge::next, PEdge::orig_uv, PEDGE_VERTEX_FLAGS, v1, v2, and PEdge::vert.
Referenced by p_edge_connect_pair().
|
static |
Definition at line 739 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::next, PEdge::old_uv, and PEdge::orig_uv.
Referenced by param_flush_restore().
Definition at line 3432 of file uvedit_parametrizer.c.
References Freestyle::a, add_v3_v3(), blender::compositor::area(), Freestyle::c, BMVert::co, copy_v3_v3(), dot_v3v3(), PFace::edge, PFace::flag, mul_v3_fl(), PEdge::next, p_face_uv_area_signed(), PFACE_FILLED, sqrtf, T, v1, v2, PEdge::vert, and w().
Referenced by p_stretch_compute_vertex().
Definition at line 414 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::next, v1, v2, and PEdge::vert.
Referenced by p_chart_lscm_solve(), p_chart_uv_area(), p_face_stretch(), and param_average().
Definition at line 696 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, e, and PChart::edges.
Referenced by param_flush().
Definition at line 708 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, blend(), e, and PChart::edges.
Referenced by param_flush().
|
static |
Definition at line 527 of file uvedit_parametrizer.c.
References P_FALSE, P_TRUE, v1, and v2.
Referenced by p_rectangle_area().
|
static |
Definition at line 3957 of file uvedit_parametrizer.c.
References MEM_freeN, and node.
Referenced by p_smooth().
|
static |
Definition at line 3970 of file uvedit_parametrizer.c.
References node, P_FALSE, p_triangle_inside(), and P_TRUE.
Referenced by p_smooth().
|
static |
Definition at line 3898 of file uvedit_parametrizer.c.
References SmoothNode::axis, BLI_memarena_alloc(), MEM_freeN, MEM_mallocN, node, SmoothNode::ntri, NULL, blender::io::alembic::split(), t, and SmoothNode::tri.
Referenced by p_smooth().
Definition at line 1236 of file uvedit_parametrizer.c.
References len_v3v3(), and p_face_exists().
Referenced by param_face_add().
|
static |
Definition at line 3658 of file uvedit_parametrizer.c.
References corner1, corner2, len_v2v2(), and p_intersect_line_2d_dir().
Referenced by p_chart_minimum_area_angle().
|
static |
Definition at line 4034 of file uvedit_parametrizer.c.
References BLI_memarena_free(), BLI_memarena_new(), center, KDL::diff(), PVert::PVertUnion::distortion, e, PFace::edge, PChart::edges, PChart::faces, INIT_MINMAX2, len_v2(), length(), max_ff(), MEM_freeN, MEM_mallocN, MEM_SIZE_OPTIMAL, minmax_v2v2_v2(), PChart::nedges, PEdge::next, PFace::nextlink, p_barycentric_2d(), p_chart_uv_bbox(), p_edge_length(), p_edge_uv_length(), p_node_delete(), p_node_intersect(), p_node_new(), p_smooth_distortion(), p_smooth_median_edge_length(), padding(), param_warning, t, SmoothNode::tri, PVert::u, PVert::uv, v, PEdge::vert, PChart::verts, x, and y.
Referenced by param_smooth_area().
Definition at line 4026 of file uvedit_parametrizer.c.
References e, p_edge_length(), and p_edge_uv_length().
Referenced by p_smooth().
Definition at line 4006 of file uvedit_parametrizer.c.
References e, PChart::edges, MEM_freeN, MEM_mallocN, PChart::nedges, p_compare_float(), and p_edge_length().
Referenced by p_smooth().
Definition at line 1078 of file uvedit_parametrizer.c.
References PFace::PFaceUnion::chart, PFace::edge, PChart::faces, MEM_mallocN, PEdge::next, PEdge::nextlink, PFace::nextlink, p_chart_new(), p_split_vert(), and PFace::u.
Referenced by param_construct_end().
Definition at line 1021 of file uvedit_parametrizer.c.
References copy(), e, PEdge::flag, PChart::flag, NULL, PChart::nverts, P_FALSE, P_TRUE, p_vert_copy(), p_wheel_edge_next(), p_wheel_edge_prev(), PCHART_HAS_PINS, PEDGE_PIN, PEDGE_VERTEX_SPLIT, PVERT_SPLIT, v, PEdge::vert, and PChart::verts.
Referenced by p_split_charts().
Definition at line 3487 of file uvedit_parametrizer.c.
References e, p_face_stretch(), p_wheel_edge_next(), sum(), and v.
Referenced by p_chart_stretch_minimize().
|
static |
Definition at line 3418 of file uvedit_parametrizer.c.
References NULL, PVERT_PIN, v, and PChart::verts.
Referenced by param_stretch_begin().
|
static |
Definition at line 385 of file uvedit_parametrizer.c.
References float(), M_PI, p_vec_angle(), v1, and v2.
Referenced by p_face_angles().
|
static |
Definition at line 3883 of file uvedit_parametrizer.c.
References p_barycentric_2d(), P_FALSE, P_TRUE, and t.
Referenced by p_node_intersect().
Definition at line 368 of file uvedit_parametrizer.c.
References p_vec_angle(), u1, u2, v1, and v2.
Referenced by p_chart_minimum_area_angle().
Definition at line 355 of file uvedit_parametrizer.c.
References acosf, M_PI, p_vec_angle_cos(), v1, and v2.
Referenced by p_edge_boundary_angle(), p_triangle_angles(), and p_vec2_angle().
Definition at line 337 of file uvedit_parametrizer.c.
References normalize_v3(), v1, and v2.
Referenced by p_vec_angle().
Definition at line 759 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_memarena_alloc(), BMVert::co, copy_v3_v3(), e, PHandle::hash_verts, CCL_NAMESPACE_BEGIN::isfinite(), phash_insert(), UNLIKELY, and v.
Referenced by p_vert_lookup().
Definition at line 792 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_memarena_alloc(), BMVert::co, PVert::co, copy_v3_v3(), PVert::edge, PVert::flag, PChart::handle, PVert::PVertUnion::key, PVert::u, PVert::uv, and v.
Referenced by p_split_vert().
Definition at line 604 of file uvedit_parametrizer.c.
Referenced by p_chart_abf_solve().
Definition at line 654 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, e, p_wheel_edge_next(), PEDGE_PIN, PEDGE_SELECT, PVERT_PIN, PVERT_SELECT, and v.
Referenced by p_chart_lscm_solve(), and param_construct_end().
Definition at line 782 of file uvedit_parametrizer.c.
References e, PHandle::hash_verts, p_vert_add(), phash_lookup(), and v.
Referenced by p_face_add_construct().
Definition at line 577 of file uvedit_parametrizer.c.
References e.
Referenced by p_boundary_edge_prev(), p_chart_stretch_minimize(), p_split_vert(), p_stretch_compute_vertex(), and p_vert_load_pin_select_uvs().
Definition at line 582 of file uvedit_parametrizer.c.
Referenced by p_split_vert().
| void param_aspect_ratio | ( | ParamHandle * | handle, |
| float | aspx, | ||
| float | aspy | ||
| ) |
Definition at line 4400 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, and PHandle::do_aspect.
Referenced by construct_param_handle(), construct_param_handle_multi(), and construct_param_handle_subsurfed().
| void param_average | ( | ParamHandle * | handle, |
| bool | ignore_pinned | ||
| ) |
Definition at line 4882 of file uvedit_parametrizer.c.
References PChart::PChartUnion::PChartPack::area, PHandle::charts, fabsf, PChart::faces, PChart::flag, PHandle::ncharts, PFace::nextlink, p_chart_uv_bbox(), p_chart_uv_scale(), p_chart_uv_translate(), p_face_area(), p_face_uv_area_signed(), PChart::PChartUnion::pack, PCHART_HAS_PINS, PChart::PChartUnion::PChartPack::rescale, sqrtf, and PChart::u.
Referenced by average_islands_scale_exec(), and uvedit_unwrap().
| ParamHandle* param_construct_begin | ( | void | ) |
Definition at line 4381 of file uvedit_parametrizer.c.
References PHandle::arena, PHandle::aspx, PHandle::aspy, BLI_heap_new_ex(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_POLYFILL_ALLOC_NGON_RESERVE, PHandle::construction_chart, PHandle::do_aspect, PChart::edges, PChart::faces, PHandle::hash_edges, PHandle::hash_faces, PHandle::hash_verts, MEM_callocN, MEM_SIZE_OPTIMAL, p_chart_new(), PHANDLE_STATE_ALLOCATED, phash_new(), PHandle::polyfill_arena, PHandle::polyfill_heap, PHandle::state, and PChart::verts.
Referenced by construct_param_handle(), construct_param_handle_multi(), and construct_param_handle_subsurfed().
| void param_construct_end | ( | ParamHandle * | handle, |
| ParamBool | fill, | ||
| ParamBool | topology_from_uvs, | ||
| int * | count_fail | ||
| ) |
Definition at line 4549 of file uvedit_parametrizer.c.
References PHandle::charts, PHandle::construction_chart, PHandle::hash_edges, PHandle::hash_faces, PHandle::hash_verts, PHandle::ncharts, NULL, p_chart_boundaries(), p_chart_delete(), p_chart_fill_boundaries(), p_connect_pairs(), p_split_charts(), p_vert_load_pin_select_uvs(), param_assert, PHANDLE_STATE_ALLOCATED, PHANDLE_STATE_CONSTRUCTED, phash_delete(), PHandle::state, v, and PChart::verts.
Referenced by construct_param_handle(), construct_param_handle_multi(), and construct_param_handle_subsurfed().
| void param_delete | ( | ParamHandle * | handle | ) |
Definition at line 4409 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_heap_free(), BLI_memarena_free(), PHandle::charts, PHandle::construction_chart, ELEM, PHandle::hash_edges, PHandle::hash_faces, PHandle::hash_verts, MEM_freeN, PHandle::ncharts, NULL, p_chart_delete(), param_assert, PHANDLE_STATE_ALLOCATED, PHANDLE_STATE_CONSTRUCTED, phash_delete(), PHandle::polyfill_arena, PHandle::polyfill_heap, and PHandle::state.
Referenced by average_islands_scale_exec(), ED_uvedit_live_unwrap_end(), minimize_stretch_exit(), uvedit_pack_islands(), uvedit_pack_islands_multi(), and uvedit_unwrap().
| void param_edge_set_seam | ( | ParamHandle * | handle, |
| ParamKey * | vkeys | ||
| ) |
Definition at line 4536 of file uvedit_parametrizer.c.
References e, p_edge_lookup(), param_assert, PEDGE_SEAM, PHANDLE_STATE_ALLOCATED, and PHandle::state.
Referenced by construct_param_handle(), construct_param_handle_multi(), and construct_param_handle_subsurfed().
| void param_face_add | ( | ParamHandle * | handle, |
| ParamKey | key, | ||
| int | nverts, | ||
| ParamKey * | vkeys, | ||
| float * | co[4], | ||
| float * | uv[4], | ||
| ParamBool * | pin, | ||
| ParamBool * | select | ||
| ) |
Definition at line 4500 of file uvedit_parametrizer.c.
References ELEM, PHandle::hash_faces, NULL, p_add_ngon(), p_face_add_construct(), p_face_exists(), p_quad_split_direction(), param_assert, PHANDLE_STATE_ALLOCATED, phash_lookup(), select(), and PHandle::state.
Referenced by construct_param_handle_face_add(), construct_param_handle_subsurfed(), and p_add_ngon().
| void param_flush | ( | ParamHandle * | handle | ) |
Definition at line 4961 of file uvedit_parametrizer.c.
References PHandle::blend, PHandle::charts, PChart::PChartUnion::PChartLscm::context, PChart::PChartUnion::lscm, PHandle::ncharts, p_flush_uvs(), p_flush_uvs_blend(), PHANDLE_STATE_LSCM, PHandle::state, and PChart::u.
Referenced by average_islands_scale_exec(), ED_uvedit_live_unwrap_re_solve(), minimize_stretch_exit(), minimize_stretch_iteration(), uvedit_pack_islands(), uvedit_pack_islands_multi(), and uvedit_unwrap().
| void param_flush_restore | ( | ParamHandle * | handle | ) |
Definition at line 4983 of file uvedit_parametrizer.c.
References PHandle::charts, PChart::faces, PHandle::ncharts, PFace::nextlink, and p_face_restore_uvs().
Referenced by ED_uvedit_live_unwrap_end(), and minimize_stretch_exit().
| void param_lscm_begin | ( | ParamHandle * | handle, |
| ParamBool | live, | ||
| ParamBool | abf | ||
| ) |
Definition at line 4603 of file uvedit_parametrizer.c.
References PHandle::charts, PChart::faces, PHandle::ncharts, PFace::nextlink, p_chart_lscm_begin(), p_face_backup_uvs(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, and PHandle::state.
Referenced by ED_uvedit_live_unwrap_begin(), and uvedit_unwrap().
| void param_lscm_end | ( | ParamHandle * | handle | ) |
Definition at line 4660 of file uvedit_parametrizer.c.
References PHandle::charts, PHandle::ncharts, p_chart_lscm_end(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, and PHandle::state.
Referenced by ED_uvedit_live_unwrap_end(), and uvedit_unwrap().
| void param_lscm_solve | ( | ParamHandle * | handle, |
| int * | count_changed, | ||
| int * | count_failed | ||
| ) |
Definition at line 4620 of file uvedit_parametrizer.c.
References PHandle::charts, PChart::PChartUnion::PChartLscm::context, PChart::flag, PChart::PChartUnion::lscm, PHandle::ncharts, NULL, p_chart_lscm_end(), p_chart_lscm_solve(), p_chart_lscm_transform_single_pin(), p_chart_rotate_fit_aabb(), p_chart_rotate_minimum_area(), param_assert, PCHART_HAS_PINS, PHANDLE_STATE_LSCM, result, PChart::PChartUnion::PChartLscm::single_pin, PHandle::state, and PChart::u.
Referenced by ED_uvedit_live_unwrap_re_solve(), and uvedit_unwrap().
| void param_pack | ( | ParamHandle * | handle, |
| float | margin, | ||
| bool | do_rotate, | ||
| bool | ignore_pinned | ||
| ) |
Definition at line 4778 of file uvedit_parametrizer.c.
References blender::compositor::area(), PHandle::aspx, PHandle::aspy, BLI_box_pack_2d(), PHandle::charts, double(), PChart::flag, float(), BoxPack::h, BoxPack::index, MEM_freeN, MEM_mallocN, PHandle::ncharts, p_chart_uv_bbox(), p_chart_uv_scale(), p_chart_uv_translate(), PChart::PChartUnion::pack, param_pack_rotate(), param_scale(), PCHART_HAS_PINS, PChart::PChartUnion::PChartPack::size, sqrtf, PChart::u, BoxPack::w, BoxPack::x, and BoxPack::y.
Referenced by uvedit_pack_islands(), and uvedit_pack_islands_multi().
|
static |
Definition at line 4760 of file uvedit_parametrizer.c.
References PHandle::charts, PChart::flag, PHandle::ncharts, p_chart_rotate_fit_aabb(), and PCHART_HAS_PINS.
Referenced by param_pack().
| void param_scale | ( | ParamHandle * | handle, |
| float | x, | ||
| float | y | ||
| ) |
Definition at line 4949 of file uvedit_parametrizer.c.
References PHandle::charts, PHandle::ncharts, p_chart_uv_scale_xy(), x, and y.
Referenced by param_pack().
| void param_smooth_area | ( | ParamHandle * | handle | ) |
Definition at line 4740 of file uvedit_parametrizer.c.
References PHandle::charts, PHandle::ncharts, p_smooth(), param_assert, PHANDLE_STATE_CONSTRUCTED, PVERT_PIN, PHandle::state, v, and PChart::verts.
| void param_stretch_begin | ( | ParamHandle * | handle | ) |
Definition at line 4677 of file uvedit_parametrizer.c.
References PFace::PFaceUnion::area3d, PHandle::blend, BLI_rng_new(), PHandle::charts, PChart::faces, PHandle::ncharts, PFace::nextlink, p_face_area(), p_face_backup_uvs(), p_stretch_pin_boundary(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, PVERT_PIN, PHandle::rng, PHandle::state, PFace::u, v, and PChart::verts.
Referenced by minimize_stretch_init().
| void param_stretch_blend | ( | ParamHandle * | handle, |
| float | blend | ||
| ) |
Definition at line 4707 of file uvedit_parametrizer.c.
References PHandle::blend, blend(), param_assert, PHANDLE_STATE_STRETCH, and PHandle::state.
Referenced by minimize_stretch_init(), and minimize_stretch_iteration().
| void param_stretch_end | ( | ParamHandle * | handle | ) |
Definition at line 4729 of file uvedit_parametrizer.c.
References BLI_rng_free(), NULL, param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, PHandle::rng, and PHandle::state.
Referenced by minimize_stretch_exit().
| void param_stretch_iter | ( | ParamHandle * | handle | ) |
Definition at line 4715 of file uvedit_parametrizer.c.
References PHandle::charts, PHandle::ncharts, p_chart_stretch_minimize(), param_assert, PHANDLE_STATE_STRETCH, PHandle::rng, and PHandle::state.
Referenced by minimize_stretch_iteration().
|
static |
Definition at line 255 of file uvedit_parametrizer.c.
References PHash::buckets, and MEM_freeN.
Referenced by param_construct_end(), and param_delete().
Definition at line 266 of file uvedit_parametrizer.c.
References PHash::buckets, PHash::cursize, PHash::cursize_id, hash, PHashLink::key, PHash::list, MEM_callocN, MEM_freeN, PHashLink::next, next, NULL, PHASH_hash, PHashSizes, size(), and PHash::size.
Referenced by p_face_add_construct(), and p_vert_add().
Definition at line 302 of file uvedit_parametrizer.c.
References PHash::buckets, hash, PHashLink::key, PHashLink::next, NULL, and PHASH_hash.
Referenced by p_edge_has_pair(), p_edge_lookup(), p_face_exists(), p_vert_lookup(), and param_face_add().
Definition at line 238 of file uvedit_parametrizer.c.
References PHash::buckets, PHash::cursize, PHash::cursize_id, PHash::list, MEM_callocN, PHashSizes, and PHash::size.
Referenced by param_construct_begin().
Definition at line 319 of file uvedit_parametrizer.c.
References hash, PHashLink::key, PHashLink::next, NULL, and PHASH_hash.
Referenced by p_edge_has_pair(), p_edge_lookup(), and p_face_exists().
|
static |
Definition at line 261 of file uvedit_parametrizer.c.
References PHash::size.
Referenced by p_connect_pairs().
|
static |
Definition at line 229 of file uvedit_parametrizer.c.
Referenced by phash_insert(), and phash_new().