Blender
V3.3
|
#include "GEO_uv_parametrizer.h"
#include "MEM_guardedalloc.h"
#include "BLI_boxpack_2d.h"
#include "BLI_convexhull_2d.h"
#include "BLI_ghash.h"
#include "BLI_heap.h"
#include "BLI_memarena.h"
#include "BLI_polyfill_2d.h"
#include "BLI_polyfill_2d_beautify.h"
#include "BLI_rand.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 | ParamHandle |
struct | PAbfSystem |
struct | GeoUVPinIndex |
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 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 ParamHandle | ParamHandle |
typedef struct PAbfSystem | PAbfSystem |
typedef struct GeoUVPinIndex | GeoUVPinIndex |
Enumerations | |
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 2283 of file uv_parametrizer.c.
#define P_STRETCH_ITER 20 |
Definition at line 3284 of file uv_parametrizer.c.
#define param_assert | ( | condition | ) |
Definition at line 24 of file uv_parametrizer.c.
#define param_warning | ( | message | ) | {/*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/}(void)0 |
Definition at line 28 of file uv_parametrizer.c.
Definition at line 119 of file uv_parametrizer.c.
Definition at line 207 of file uv_parametrizer.c.
Definition at line 206 of file uv_parametrizer.c.
typedef struct GeoUVPinIndex GeoUVPinIndex |
typedef struct PAbfSystem PAbfSystem |
typedef struct ParamHandle ParamHandle |
Definition at line 33 of file uv_parametrizer.c.
enum PChartFlag |
Enumerator | |
---|---|
PCHART_HAS_PINS |
Definition at line 160 of file uv_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 106 of file uv_parametrizer.c.
enum PFaceFlag |
Enumerator | |
---|---|
PFACE_CONNECTED | |
PFACE_FILLED | |
PFACE_COLLAPSE |
Definition at line 121 of file uv_parametrizer.c.
enum PHandleState |
Enumerator | |
---|---|
PHANDLE_STATE_ALLOCATED | |
PHANDLE_STATE_CONSTRUCTED | |
PHANDLE_STATE_LSCM | |
PHANDLE_STATE_STRETCH |
Definition at line 164 of file uv_parametrizer.c.
enum PVertFlag |
Enumerator | |
---|---|
PVERT_PIN | |
PVERT_SELECT | |
PVERT_INTERIOR | |
PVERT_COLLAPSE | |
PVERT_SPLIT |
Definition at line 98 of file uv_parametrizer.c.
ParamKey GEO_uv_find_pin_index | ( | ParamHandle * | handle, |
const int | bmvertindex, | ||
const float | uv[2] | ||
) |
Definition at line 3779 of file uv_parametrizer.c.
References BLI_ghash_lookup(), len_squared_v2v2(), GeoUVPinIndex::next, ParamHandle::pin_hash, POINTER_FROM_INT, GeoUVPinIndex::reindex, and GeoUVPinIndex::uv.
Referenced by construct_param_edge_set_seams(), and construct_param_handle_face_add().
void GEO_uv_parametrizer_aspect_ratio | ( | ParamHandle * | phandle, |
float | aspx, | ||
float | aspy | ||
) |
Definition at line 3728 of file uv_parametrizer.c.
References ParamHandle::aspx, and ParamHandle::aspy.
Referenced by construct_param_handle(), construct_param_handle_multi(), and construct_param_handle_subsurfed().
void GEO_uv_parametrizer_average | ( | ParamHandle * | phandle, |
bool | ignore_pinned, | ||
bool | scale_uv, | ||
bool | shear | ||
) |
Definition at line 4249 of file uv_parametrizer.c.
References add_v2_v2(), PChart::PChartUnion::PChartPack::area, ParamHandle::charts, clamp_f(), PVert::co, dot_v3v3(), PFace::edge, err, fabsf, PChart::faces, PChart::flag, invert_m2_m2(), len_v3(), mid_v2_v2v2(), ParamHandle::ncharts, negate_v2(), PEdge::next, PFace::nextlink, normalize_v3(), PChart::PChartUnion::PChartPack::origin, p_chart_uv_bbox(), p_chart_uv_scale(), p_chart_uv_transform(), p_chart_uv_translate(), p_face_area(), p_face_uv_area_signed(), PChart::PChartUnion::pack, PCHART_HAS_PINS, PChart::PChartUnion::PChartPack::rescale, sqrtf, t, PChart::u, PVert::uv, and PEdge::vert.
Referenced by average_islands_scale_exec(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), and uvedit_unwrap().
ParamHandle* GEO_uv_parametrizer_construct_begin | ( | void | ) |
Definition at line 3710 of file uv_parametrizer.c.
References ParamHandle::arena, ParamHandle::aspx, ParamHandle::aspy, BLI_heap_new_ex(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_POLYFILL_ALLOC_NGON_RESERVE, ParamHandle::construction_chart, PChart::edges, PChart::faces, ParamHandle::hash_edges, ParamHandle::hash_faces, ParamHandle::hash_verts, MEM_callocN, MEM_SIZE_OPTIMAL, p_chart_new(), PHANDLE_STATE_ALLOCATED, phash_new(), ParamHandle::polyfill_arena, ParamHandle::polyfill_heap, ParamHandle::state, and PChart::verts.
Referenced by construct_param_handle(), construct_param_handle_multi(), construct_param_handle_subsurfed(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), and blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray().
void GEO_uv_parametrizer_construct_end | ( | ParamHandle * | phandle, |
bool | fill, | ||
bool | topology_from_uvs, | ||
int * | count_fail | ||
) |
Definition at line 3946 of file uv_parametrizer.c.
References ParamHandle::charts, ParamHandle::construction_chart, ParamHandle::hash_edges, ParamHandle::hash_faces, ParamHandle::hash_verts, PChart::nboundaries, ParamHandle::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(), ParamHandle::state, v, and PChart::verts.
Referenced by construct_param_handle(), construct_param_handle_multi(), construct_param_handle_subsurfed(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), and blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray().
void GEO_uv_parametrizer_delete | ( | ParamHandle * | phandle | ) |
Definition at line 3734 of file uv_parametrizer.c.
References ParamHandle::arena, BLI_ghash_free(), BLI_heap_free(), BLI_memarena_free(), ParamHandle::charts, ParamHandle::construction_chart, ELEM, ParamHandle::hash_edges, ParamHandle::hash_faces, ParamHandle::hash_verts, MEM_freeN, MEM_SAFE_FREE, ParamHandle::ncharts, NULL, p_chart_delete(), param_assert, PHANDLE_STATE_ALLOCATED, PHANDLE_STATE_CONSTRUCTED, phash_delete(), ParamHandle::pin_hash, ParamHandle::polyfill_arena, ParamHandle::polyfill_heap, and ParamHandle::state.
Referenced by average_islands_scale_exec(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), ED_uvedit_live_unwrap_end(), minimize_stretch_exit(), uvedit_pack_islands(), uvedit_pack_islands_multi(), and uvedit_unwrap().
void GEO_uv_parametrizer_edge_set_seam | ( | ParamHandle * | phandle, |
ParamKey * | vkeys | ||
) |
Definition at line 3934 of file uv_parametrizer.c.
References e, p_edge_lookup(), param_assert, PEDGE_SEAM, PHANDLE_STATE_ALLOCATED, and ParamHandle::state.
Referenced by construct_param_edge_set_seams(), construct_param_handle_subsurfed(), and blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray().
void GEO_uv_parametrizer_face_add | ( | ParamHandle * | phandle, |
const ParamKey | key, | ||
const int | nverts, | ||
const ParamKey * | vkeys, | ||
const float ** | co, | ||
float ** | uv, | ||
const bool * | pin, | ||
const bool * | select | ||
) |
Definition at line 3900 of file uv_parametrizer.c.
References ELEM, ParamHandle::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(), ParamHandle::state, and GeoUVPinIndex::uv.
Referenced by construct_param_handle_face_add(), construct_param_handle_subsurfed(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), and p_add_ngon().
void GEO_uv_parametrizer_flush | ( | ParamHandle * | phandle | ) |
Definition at line 4403 of file uv_parametrizer.c.
References ParamHandle::blend, ParamHandle::charts, PChart::PChartUnion::PChartLscm::context, PChart::PChartUnion::lscm, ParamHandle::ncharts, p_flush_uvs(), p_flush_uvs_blend(), PHANDLE_STATE_LSCM, ParamHandle::state, and PChart::u.
Referenced by average_islands_scale_exec(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), ED_uvedit_live_unwrap_re_solve(), minimize_stretch_exit(), minimize_stretch_iteration(), uvedit_pack_islands(), uvedit_pack_islands_multi(), and uvedit_unwrap().
void GEO_uv_parametrizer_flush_restore | ( | ParamHandle * | phandle | ) |
Definition at line 4424 of file uv_parametrizer.c.
References ParamHandle::charts, PChart::faces, ParamHandle::ncharts, PFace::nextlink, and p_face_restore_uvs().
Referenced by ED_uvedit_live_unwrap_end(), and minimize_stretch_exit().
void GEO_uv_parametrizer_lscm_begin | ( | ParamHandle * | phandle, |
bool | live, | ||
bool | abf | ||
) |
Definition at line 3999 of file uv_parametrizer.c.
References ParamHandle::charts, PChart::faces, ParamHandle::ncharts, PFace::nextlink, p_chart_lscm_begin(), p_face_backup_uvs(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, and ParamHandle::state.
Referenced by blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), ED_uvedit_live_unwrap_begin(), and uvedit_unwrap().
void GEO_uv_parametrizer_lscm_end | ( | ParamHandle * | phandle | ) |
Definition at line 4054 of file uv_parametrizer.c.
References ParamHandle::charts, ParamHandle::ncharts, p_chart_lscm_end(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, and ParamHandle::state.
Referenced by blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), ED_uvedit_live_unwrap_end(), and uvedit_unwrap().
void GEO_uv_parametrizer_lscm_solve | ( | ParamHandle * | phandle, |
int * | count_changed, | ||
int * | count_failed | ||
) |
Definition at line 4015 of file uv_parametrizer.c.
References ParamHandle::charts, PChart::PChartUnion::PChartLscm::context, PChart::flag, PChart::PChartUnion::lscm, ParamHandle::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, ParamHandle::state, and PChart::u.
Referenced by blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), ED_uvedit_live_unwrap_re_solve(), and uvedit_unwrap().
void GEO_uv_parametrizer_pack | ( | ParamHandle * | handle, |
float | margin, | ||
bool | do_rotate, | ||
bool | ignore_pinned | ||
) |
Definition at line 4144 of file uv_parametrizer.c.
References blender::compositor::area(), ParamHandle::aspx, ParamHandle::aspy, BLI_box_pack_2d(), ParamHandle::charts, double(), PChart::flag, float(), GEO_uv_parametrizer_pack_rotate(), GEO_uv_parametrizer_scale(), BoxPack::h, BoxPack::index, MEM_freeN, MEM_mallocN, ParamHandle::ncharts, p_chart_uv_bbox(), p_chart_uv_scale(), p_chart_uv_translate(), PChart::PChartUnion::pack, PCHART_HAS_PINS, PChart::PChartUnion::PChartPack::size, sqrtf, PChart::u, BoxPack::w, BoxPack::x, and BoxPack::y.
Referenced by blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), uvedit_pack_islands(), and uvedit_pack_islands_multi().
|
static |
Definition at line 4128 of file uv_parametrizer.c.
References ParamHandle::charts, PChart::flag, ParamHandle::ncharts, p_chart_rotate_fit_aabb(), and PCHART_HAS_PINS.
Referenced by GEO_uv_parametrizer_pack().
void GEO_uv_parametrizer_scale | ( | ParamHandle * | phandle, |
float | x, | ||
float | y | ||
) |
Definition at line 4392 of file uv_parametrizer.c.
References ParamHandle::charts, ParamHandle::ncharts, p_chart_uv_scale_xy(), x, and y.
Referenced by GEO_uv_parametrizer_pack().
void GEO_uv_parametrizer_stretch_begin | ( | ParamHandle * | phandle | ) |
Definition at line 4070 of file uv_parametrizer.c.
References PFace::PFaceUnion::area3d, ParamHandle::blend, BLI_rng_new(), ParamHandle::charts, PChart::faces, ParamHandle::ncharts, PFace::nextlink, p_face_area(), p_face_backup_uvs(), p_stretch_pin_boundary(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, PVERT_PIN, ParamHandle::rng, ParamHandle::state, PFace::u, v, and PChart::verts.
Referenced by minimize_stretch_init().
void GEO_uv_parametrizer_stretch_blend | ( | ParamHandle * | phandle, |
float | blend | ||
) |
Definition at line 4099 of file uv_parametrizer.c.
References ParamHandle::blend, blend(), param_assert, PHANDLE_STATE_STRETCH, and ParamHandle::state.
Referenced by minimize_stretch_init(), and minimize_stretch_iteration().
void GEO_uv_parametrizer_stretch_end | ( | ParamHandle * | phandle | ) |
Definition at line 4118 of file uv_parametrizer.c.
References BLI_rng_free(), NULL, param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, ParamHandle::rng, and ParamHandle::state.
Referenced by minimize_stretch_exit().
void GEO_uv_parametrizer_stretch_iter | ( | ParamHandle * | phandle | ) |
Definition at line 4105 of file uv_parametrizer.c.
References ParamHandle::charts, ParamHandle::ncharts, p_chart_stretch_minimize(), param_assert, PHANDLE_STATE_STRETCH, ParamHandle::rng, and ParamHandle::state.
Referenced by minimize_stretch_iteration().
void GEO_uv_prepare_pin_index | ( | ParamHandle * | handle, |
const int | bmvertindex, | ||
const float | uv[2] | ||
) |
Definition at line 3814 of file uv_parametrizer.c.
References BLI_ghash_insert(), BLI_ghash_int_new(), BLI_ghash_lookup(), equals_v2v2(), new_geo_uv_pinindex(), GeoUVPinIndex::next, ParamHandle::pin_hash, POINTER_FROM_INT, and GeoUVPinIndex::uv.
Referenced by uvedit_prepare_pinned_indices().
|
static |
Definition at line 3805 of file uv_parametrizer.c.
References ParamHandle::arena, BLI_memarena_alloc(), copy_v2_v2(), GeoUVPinIndex::next, NULL, PARAM_KEY_MAX, GeoUVPinIndex::reindex, ParamHandle::unique_pin_count, and GeoUVPinIndex::uv.
Referenced by GEO_uv_prepare_pin_index().
|
static |
Definition at line 2390 of file uv_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 2415 of file uv_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 2353 of file uv_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 2342 of file uv_parametrizer.c.
References PAbfSystem::alpha, cosf, PAbfSystem::cosine, PAbfSystem::nangles, PAbfSystem::sine, and sinf.
Referenced by p_chart_abf_solve().
|
static |
Definition at line 2324 of file uv_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 2463 of file uv_parametrizer.c.
References PAbfSystem::alpha, usdtokens::b(), PAbfSystem::bAlpha, beta(), PAbfSystem::bInterior, PAbfSystem::bstar, PAbfSystem::bTriangle, Freestyle::c, blender::compositor::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 2294 of file uv_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 3839 of file uv_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(), GEO_uv_parametrizer_face_add(), mul_v2_m3v3(), normal, normalize_v3(), ParamHandle::polyfill_arena, ParamHandle::polyfill_heap, select(), UNLIKELY, GeoUVPinIndex::uv, v1, v2, and zero_v3().
Referenced by GEO_uv_parametrizer_face_add().
Definition at line 340 of file uv_parametrizer.c.
Referenced by p_chart_convex_hull().
Definition at line 468 of file uv_parametrizer.c.
References e.
Referenced by p_chart_convex_hull(), p_chart_fill_boundary(), and p_chart_symmetry_pins().
Definition at line 473 of file uv_parametrizer.c.
References e, and p_wheel_edge_next().
Referenced by p_chart_fill_boundary(), and p_chart_symmetry_pins().
Definition at line 2687 of file uv_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_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 1143 of file uv_parametrizer.c.
References e, PVert::edge, PChart::edges, PEdge::flag, len, PChart::nboundaries, PEdge::next, NULL, p_edge_length(), PEDGE_DONE, and PEdge::vert.
Referenced by GEO_uv_parametrizer_construct_end(), p_chart_convex_hull(), and p_chart_lscm_begin().
|
static |
Definition at line 3459 of file uv_parametrizer.c.
References e, L, MEM_freeN, MEM_mallocN, p_area_signed(), p_boundary_edge_next(), p_chart_boundaries(), p_compare_geometric_uv(), and U.
Referenced by p_chart_minimum_area_angle().
Definition at line 738 of file uv_parametrizer.c.
References MEM_freeN.
Referenced by GEO_uv_parametrizer_construct_end(), and GEO_uv_parametrizer_delete().
Definition at line 2977 of file uv_parametrizer.c.
References BMVert::co, NULL, p_chart_pin_positions(), v, and PChart::verts.
Referenced by p_chart_lscm_begin().
Definition at line 1282 of file uv_parametrizer.c.
References e, PVert::edge, PChart::edges, PEdge::flag, PEdge::next, p_chart_fill_boundary(), PEDGE_FILLED, and PEdge::vert.
Referenced by GEO_uv_parametrizer_construct_end().
Definition at line 1205 of file uv_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 3031 of file uv_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(), 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 GEO_uv_parametrizer_lscm_begin().
Definition at line 3267 of file uv_parametrizer.c.
References PChart::PChartUnion::PChartLscm::abf_alpha, PChart::PChartUnion::PChartLscm::context, EIG_linear_solver_delete(), PChart::PChartUnion::lscm, MEM_SAFE_FREE, 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 GEO_uv_parametrizer_lscm_end(), and GEO_uv_parametrizer_lscm_solve().
Definition at line 3020 of file uv_parametrizer.c.
References blender::compositor::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().
|
static |
Definition at line 3100 of file uv_parametrizer.c.
References PChart::PChartUnion::PChartLscm::abf_alpha, blender::compositor::area(), blender::compositor::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_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 GEO_uv_parametrizer_lscm_solve().
Definition at line 3248 of file uv_parametrizer.c.
References PChart::PChartUnion::lscm, offset, 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 GEO_uv_parametrizer_lscm_solve().
Definition at line 3553 of file uv_parametrizer.c.
References Freestyle::a, blender::compositor::area(), float(), len, len_v2v2(), M_PI, M_PI_2, M_PI_4, 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().
|
static |
Definition at line 730 of file uv_parametrizer.c.
References PChart::handle, and MEM_callocN.
Referenced by GEO_uv_parametrizer_construct_begin(), and p_split_charts().
Definition at line 2819 of file uv_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().
Definition at line 3691 of file uv_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 GEO_uv_parametrizer_lscm_solve(), and GEO_uv_parametrizer_pack_rotate().
Definition at line 3677 of file uv_parametrizer.c.
References angle(), cosf, p_chart_minimum_area_angle(), sinf, v, and PChart::verts.
Referenced by GEO_uv_parametrizer_lscm_solve().
Definition at line 3370 of file uv_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 GEO_uv_parametrizer_stretch_iter().
|
static |
Definition at line 2870 of file uv_parametrizer.c.
References equals_v3v3(), PVert::flag, len, NULL, p_boundary_edge_next(), p_boundary_edge_prev(), p_chart_pin_positions(), p_edge_length(), PVERT_SPLIT, and PEdge::vert.
Referenced by p_chart_lscm_begin().
Definition at line 375 of file uv_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 364 of file uv_parametrizer.c.
References INIT_MINMAX2, minmax_v2v2_v2(), v, and PChart::verts.
Referenced by GEO_uv_parametrizer_average(), and GEO_uv_parametrizer_pack().
Definition at line 386 of file uv_parametrizer.c.
References v, and PChart::verts.
Referenced by GEO_uv_parametrizer_average(), GEO_uv_parametrizer_pack(), and p_chart_lscm_transform_single_pin().
Definition at line 396 of file uv_parametrizer.c.
References v, PChart::verts, x, and y.
Referenced by GEO_uv_parametrizer_scale().
Definition at line 425 of file uv_parametrizer.c.
References copy_v2_v2(), v, and PChart::verts.
Referenced by p_chart_rotate_fit_aabb().
Definition at line 416 of file uv_parametrizer.c.
References mul_m2_v2(), v, and PChart::verts.
Referenced by GEO_uv_parametrizer_average(), and p_chart_rotate_fit_aabb().
Definition at line 406 of file uv_parametrizer.c.
References v, and PChart::verts.
Referenced by GEO_uv_parametrizer_average(), GEO_uv_parametrizer_pack(), and p_chart_lscm_transform_single_pin().
Definition at line 3439 of file uv_parametrizer.c.
References Freestyle::a, usdtokens::b(), v1, and v2.
Referenced by p_chart_convex_hull().
|
static |
Definition at line 851 of file uv_parametrizer.c.
References PFace::PFaceUnion::chart, ParamHandle::construction_chart, e, PVert::edge, PFace::edge, PChart::faces, PFace::flag, ParamHandle::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 GEO_uv_parametrizer_construct_end().
Definition at line 1180 of file uv_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 827 of file uv_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 778 of file uv_parametrizer.c.
References e, PEdge::flag, ParamHandle::hash_edges, PEdge::next, NULL, p_edge_implicit_seam(), PEDGE_SEAM, PHASH_edge, phash_lookup(), phash_next(), v1, v2, and PEdge::vert.
Referenced by p_edge_connect_pair().
Definition at line 744 of file uv_parametrizer.c.
References e, fabsf, PEdge::flag, PVert::PVertUnion::key, PEdge::next, PEdge::orig_uv, PEDGE_SEAM, PVert::u, and PEdge::vert.
Referenced by p_edge_has_pair().
Definition at line 354 of file uv_parametrizer.c.
References BMVert::co, e, and len_v3v3().
Referenced by p_chart_boundaries(), and p_chart_symmetry_pins().
|
static |
Definition at line 687 of file uv_parametrizer.c.
References e, ParamHandle::hash_edges, NULL, PHASH_edge, phash_lookup(), and phash_next().
Referenced by GEO_uv_parametrizer_edge_set_seam().
Definition at line 359 of file uv_parametrizer.c.
References e, and len_v2v2().
Referenced by p_chart_stretch_minimize(), and p_face_stretch().
|
static |
Definition at line 997 of file uv_parametrizer.c.
References ParamHandle::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 1029 of file uv_parametrizer.c.
References PFace::edge, PEdge::flag, ParamHandle::hash_edges, ParamHandle::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 GEO_uv_parametrizer_face_add().
Definition at line 1089 of file uv_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 324 of file uv_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 332 of file uv_parametrizer.c.
References area_tri_v3(), BMVert::co, PFace::edge, PEdge::next, v1, v2, and PEdge::vert.
Referenced by GEO_uv_parametrizer_average(), and GEO_uv_parametrizer_stretch_begin().
Definition at line 602 of file uv_parametrizer.c.
References PFace::edge, PEdge::next, PEdge::old_uv, and PEdge::orig_uv.
Referenced by GEO_uv_parametrizer_lscm_begin(), and GEO_uv_parametrizer_stretch_begin().
|
static |
Definition at line 706 of file uv_parametrizer.c.
References e, ParamHandle::hash_edges, i1, PHASH_edge, phash_lookup(), and phash_next().
Referenced by GEO_uv_parametrizer_face_add(), and p_quad_split_direction().
Definition at line 490 of file uv_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().
Definition at line 620 of file uv_parametrizer.c.
References PFace::edge, PEdge::next, PEdge::old_uv, and PEdge::orig_uv.
Referenced by GEO_uv_parametrizer_flush_restore().
Definition at line 3300 of file uv_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_edge_uv_length(), p_face_uv_area_signed(), PFACE_FILLED, sqrtf, T, v1, v2, PEdge::vert, and w().
Referenced by p_stretch_compute_vertex().
Definition at line 345 of file uv_parametrizer.c.
References PFace::edge, PEdge::next, v1, v2, and PEdge::vert.
Referenced by GEO_uv_parametrizer_average(), p_chart_lscm_solve(), p_chart_uv_area(), and p_face_stretch().
|
static |
Definition at line 577 of file uv_parametrizer.c.
References ParamHandle::aspx, ParamHandle::aspy, e, and PChart::edges.
Referenced by GEO_uv_parametrizer_flush().
|
static |
Definition at line 589 of file uv_parametrizer.c.
References ParamHandle::aspx, ParamHandle::aspy, blend(), e, and PChart::edges.
Referenced by GEO_uv_parametrizer_flush().
|
static |
Definition at line 435 of file uv_parametrizer.c.
Referenced by p_rectangle_area().
|
static |
Definition at line 1115 of file uv_parametrizer.c.
References len_v3v3(), and p_face_exists().
Referenced by GEO_uv_parametrizer_face_add().
|
static |
Definition at line 3528 of file uv_parametrizer.c.
References corner1, corner2, len_v2v2(), and p_intersect_line_2d_dir().
Referenced by p_chart_minimum_area_angle().
|
static |
Definition at line 958 of file uv_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 GEO_uv_parametrizer_construct_end().
Definition at line 901 of file uv_parametrizer.c.
References copy(), e, PEdge::flag, PChart::flag, NULL, PChart::nverts, 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 3357 of file uv_parametrizer.c.
References e, p_face_stretch(), p_wheel_edge_next(), sum(), and v.
Referenced by p_chart_stretch_minimize().
Definition at line 3286 of file uv_parametrizer.c.
References NULL, PVERT_PIN, v, and PChart::verts.
Referenced by GEO_uv_parametrizer_stretch_begin().
|
static |
Definition at line 316 of file uv_parametrizer.c.
References float(), M_PI, p_vec_angle(), v1, and v2.
Referenced by p_face_angles().
Definition at line 312 of file uv_parametrizer.c.
References angle_v2v2v2(), v1, and v2.
Referenced by p_chart_minimum_area_angle().
Definition at line 308 of file uv_parametrizer.c.
References angle_v3v3v3(), v1, and v2.
Referenced by p_edge_boundary_angle(), and p_triangle_angles().
|
static |
Definition at line 640 of file uv_parametrizer.c.
References ParamHandle::arena, BLI_memarena_alloc(), BMVert::co, copy_v3_v3(), e, ParamHandle::hash_verts, CCL_NAMESPACE_BEGIN::isfinite(), phash_insert(), UNLIKELY, and v.
Referenced by p_vert_lookup().
Definition at line 673 of file uv_parametrizer.c.
References ParamHandle::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().
|
static |
Definition at line 535 of file uv_parametrizer.c.
References ParamHandle::aspx, ParamHandle::aspy, e, p_wheel_edge_next(), PEDGE_PIN, PEDGE_SELECT, PVERT_PIN, PVERT_SELECT, and v.
Referenced by GEO_uv_parametrizer_construct_end(), and p_chart_lscm_solve().
|
static |
Definition at line 663 of file uv_parametrizer.c.
References e, ParamHandle::hash_verts, p_vert_add(), phash_lookup(), and v.
Referenced by p_face_add_construct().
Definition at line 458 of file uv_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 463 of file uv_parametrizer.c.
Referenced by p_split_vert().
Definition at line 226 of file uv_parametrizer.c.
References PHash::buckets, and MEM_freeN.
Referenced by GEO_uv_parametrizer_construct_end(), and GEO_uv_parametrizer_delete().
Definition at line 237 of file uv_parametrizer.c.
References PHash::buckets, PHash::cursize, PHash::cursize_id, hash, PHashLink::key, PHash::list, blender::bke::attribute_accessor_functions::lookup(), 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 273 of file uv_parametrizer.c.
References PHash::buckets, hash, PHashLink::key, PHashLink::next, NULL, and PHASH_hash.
Referenced by GEO_uv_parametrizer_face_add(), p_edge_has_pair(), p_edge_lookup(), p_face_exists(), and p_vert_lookup().
Definition at line 209 of file uv_parametrizer.c.
References PHash::buckets, PHash::cursize, PHash::cursize_id, PHash::list, MEM_callocN, PHashSizes, and PHash::size.
Referenced by GEO_uv_parametrizer_construct_begin().
Definition at line 290 of file uv_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 232 of file uv_parametrizer.c.
References PHash::size.
Referenced by p_connect_pairs().
|
static |
Definition at line 200 of file uv_parametrizer.c.
Referenced by phash_insert(), and phash_new().