Blender V2.61 - r43446
|
#include "MEM_guardedalloc.h"
#include "BLI_memarena.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_heap.h"
#include "BLI_boxpack2d.h"
#include "BLI_utildefines.h"
#include "ONL_opennl.h"
#include "uvedit_intern.h"
#include "uvedit_parametrizer.h"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "BLO_sys_types.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 |
Defines | |
#define | param_assert(condition) |
#define | param_warning(message) { /*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/ } |
#define | param_test_equals_ptr(str, a, b) |
#define | param_test_equals_int(str, a, b) |
#define | PEDGE_VERTEX_FLAGS (PEDGE_PIN) |
#define | PHASH_hash(ph, item) (((uintptr_t) (item))%((unsigned int) (ph)->cursize)) |
#define | PHASH_edge(v1, v2) ((v1)^(v2)) |
#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_NOPACK = 1 } |
enum | PHandleState { PHANDLE_STATE_ALLOCATED, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, PHANDLE_STATE_STRETCH } |
Functions | |
static PHash * | phash_new (PHashLink **list, int sizehint) |
static void | phash_delete (PHash *ph) |
static int | phash_size (PHash *ph) |
static void | phash_insert (PHash *ph, PHashLink *link) |
static PHashLink * | phash_lookup (PHash *ph, PHashKey key) |
static PHashLink * | phash_next (PHash *ph, PHashKey key, PHashLink *link) |
static float | p_vec_angle_cos (float *v1, float *v2, float *v3) |
static float | p_vec_angle (float *v1, float *v2, float *v3) |
static float | p_vec2_angle (float *v1, float *v2, float *v3) |
static void | p_triangle_angles (float *v1, float *v2, float *v3, float *a1, float *a2, float *a3) |
static void | p_face_angles (PFace *f, float *a1, float *a2, float *a3) |
static float | p_face_area (PFace *f) |
static float | p_area_signed (float *v1, float *v2, float *v3) |
static float | p_face_uv_area_signed (PFace *f) |
static float | p_edge_length (PEdge *e) |
static float | p_edge_uv_length (PEdge *e) |
static void | p_chart_uv_bbox (PChart *chart, float *minv, float *maxv) |
static void | p_chart_uv_scale (PChart *chart, float scale) |
static void | p_chart_uv_scale_xy (PChart *chart, float x, float y) |
static void | p_chart_uv_translate (PChart *chart, float trans[2]) |
static PBool | p_intersect_line_2d_dir (float *v1, float *dir1, float *v2, float *dir2, float *isect) |
static PEdge * | p_wheel_edge_next (PEdge *e) |
static PEdge * | p_wheel_edge_prev (PEdge *e) |
static PEdge * | p_boundary_edge_next (PEdge *e) |
static PEdge * | p_boundary_edge_prev (PEdge *e) |
static PBool | p_vert_interior (PVert *v) |
static void | p_face_flip (PFace *f) |
static void | p_vert_load_pin_select_uvs (PHandle *handle, PVert *v) |
static void | p_flush_uvs (PHandle *handle, PChart *chart) |
static void | p_flush_uvs_blend (PHandle *handle, PChart *chart, float blend) |
static void | p_face_backup_uvs (PFace *f) |
static void | p_face_restore_uvs (PFace *f) |
static PVert * | p_vert_add (PHandle *handle, PHashKey key, float *co, PEdge *e) |
static PVert * | p_vert_lookup (PHandle *handle, PHashKey key, float *co, PEdge *e) |
static PVert * | p_vert_copy (PChart *chart, PVert *v) |
static PEdge * | p_edge_lookup (PHandle *handle, PHashKey *vkeys) |
static PBool | p_face_exists (PHandle *handle, PHashKey *vkeys, int i1, int i2, int i3) |
static PChart * | p_chart_new (PHandle *handle) |
static void | p_chart_delete (PChart *chart) |
static PBool | p_edge_implicit_seam (PEdge *e, PEdge *ep) |
static PBool | p_edge_has_pair (PHandle *handle, PEdge *e, PEdge **pair, PBool impl) |
static PBool | p_edge_connect_pair (PHandle *handle, PEdge *e, PEdge ***stack, PBool impl) |
static int | p_connect_pairs (PHandle *handle, PBool impl) |
static void | p_split_vert (PChart *chart, PEdge *e) |
static PChart ** | p_split_charts (PHandle *handle, PChart *chart, int ncharts) |
static PFace * | p_face_add (PHandle *handle) |
static PFace * | p_face_add_construct (PHandle *handle, ParamKey key, ParamKey *vkeys, float *co[3], float *uv[3], int i1, int i2, int i3, ParamBool *pin, ParamBool *select) |
static PFace * | p_face_add_fill (PChart *chart, PVert *v1, PVert *v2, PVert *v3) |
static PBool | p_quad_split_direction (PHandle *handle, float **co, PHashKey *vkeys) |
static void | p_chart_boundaries (PChart *chart, int *nboundaries, PEdge **outer) |
static float | p_edge_boundary_angle (PEdge *e) |
static void | p_chart_fill_boundary (PChart *chart, PEdge *be, int nedges) |
static void | p_chart_fill_boundaries (PChart *chart, PEdge *outer) |
static void | p_abf_setup_system (PAbfSystem *sys) |
static void | p_abf_free_system (PAbfSystem *sys) |
static void | p_abf_compute_sines (PAbfSystem *sys) |
static float | p_abf_compute_sin_product (PAbfSystem *sys, PVert *v, int aid) |
static float | p_abf_compute_grad_alpha (PAbfSystem *sys, PFace *f, PEdge *e) |
static float | p_abf_compute_gradient (PAbfSystem *sys, PChart *chart) |
static PBool | p_abf_matrix_invert (PAbfSystem *sys, PChart *chart) |
static PBool | p_chart_abf_solve (PChart *chart) |
static void | p_chart_pin_positions (PChart *chart, PVert **pin1, PVert **pin2) |
static PBool | p_chart_symmetry_pins (PChart *chart, PEdge *outer, PVert **pin1, PVert **pin2) |
static void | p_chart_extrema_verts (PChart *chart, PVert **pin1, PVert **pin2) |
static void | p_chart_lscm_load_solution (PChart *chart) |
static void | p_chart_lscm_begin (PChart *chart, PBool live, PBool abf) |
static PBool | p_chart_lscm_solve (PHandle *handle, PChart *chart) |
static void | p_chart_lscm_end (PChart *chart) |
static void | p_stretch_pin_boundary (PChart *chart) |
static float | p_face_stretch (PFace *f) |
static float | p_stretch_compute_vertex (PVert *v) |
static void | p_chart_stretch_minimize (PChart *chart, RNG *rng) |
static int | p_compare_geometric_uv (const void *a, const void *b) |
static PBool | p_chart_convex_hull (PChart *chart, PVert ***verts, int *nverts, int *right) |
static float | p_rectangle_area (float *p1, float *dir, float *p2, float *p3, float *p4) |
static float | p_chart_minimum_area_angle (PChart *chart) |
static void | p_chart_rotate_minimum_area (PChart *chart) |
static void | p_barycentric_2d (float *v1, float *v2, float *v3, float *p, float *b) |
static PBool | p_triangle_inside (SmoothTriangle *t, float *co) |
static SmoothNode * | p_node_new (MemArena *arena, SmoothTriangle **tri, int ntri, float *bmin, float *bmax, int depth) |
static void | p_node_delete (SmoothNode *node) |
static PBool | p_node_intersect (SmoothNode *node, float *co) |
static int | p_compare_float (const void *a, const void *b) |
static float | p_smooth_median_edge_length (PChart *chart) |
static float | p_smooth_distortion (PEdge *e, float avg2d, float avg3d) |
static void | p_smooth (PChart *chart) |
ParamHandle * | param_construct_begin (void) |
void | param_aspect_ratio (ParamHandle *handle, float aspx, float aspy) |
void | param_delete (ParamHandle *handle) |
void | param_face_add (ParamHandle *handle, ParamKey key, int nverts, ParamKey *vkeys, float **co, float **uv, ParamBool *pin, ParamBool *select) |
void | param_edge_set_seam (ParamHandle *handle, ParamKey *vkeys) |
void | param_construct_end (ParamHandle *handle, ParamBool fill, ParamBool impl) |
void | param_lscm_begin (ParamHandle *handle, ParamBool live, ParamBool abf) |
void | param_lscm_solve (ParamHandle *handle) |
void | param_lscm_end (ParamHandle *handle) |
void | param_stretch_begin (ParamHandle *handle) |
void | param_stretch_blend (ParamHandle *handle, float blend) |
void | param_stretch_iter (ParamHandle *handle) |
void | param_stretch_end (ParamHandle *handle) |
void | param_smooth_area (ParamHandle *handle) |
void | param_pack (ParamHandle *handle, float margin) |
void | param_average (ParamHandle *handle) |
void | param_scale (ParamHandle *handle, float x, float y) |
void | param_flush (ParamHandle *handle) |
void | param_flush_restore (ParamHandle *handle) |
Variables | |
static int | PHashSizes [] |
Definition in file uvedit_parametrizer.c.
#define ABF_MAX_ITER 20 |
Definition at line 2230 of file uvedit_parametrizer.c.
Referenced by p_chart_abf_solve().
#define P_STRETCH_ITER 20 |
Definition at line 3167 of file uvedit_parametrizer.c.
Referenced by p_chart_stretch_minimize().
#define param_assert | ( | condition | ) |
if (!(condition)) \ { /*printf("Assertion %s:%d\n", __FILE__, __LINE__); abort();*/ }
Definition at line 40 of file uvedit_parametrizer.c.
Referenced by param_construct_end(), param_delete(), param_edge_set_seam(), param_face_add(), param_lscm_begin(), param_lscm_end(), param_lscm_solve(), param_smooth_area(), param_stretch_begin(), param_stretch_blend(), param_stretch_end(), and param_stretch_iter().
#define param_test_equals_int | ( | str, | |
a, | |||
b | |||
) |
if (a != b) \ { /*printf("Equals %s => %d != %d\n", str, a, b);*/ };
Definition at line 48 of file uvedit_parametrizer.c.
#define param_test_equals_ptr | ( | str, | |
a, | |||
b | |||
) |
if (a != b) \ { /*printf("Equals %s => %p != %p\n", str, a, b);*/ };
Definition at line 45 of file uvedit_parametrizer.c.
#define param_warning | ( | message | ) | { /*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/ } |
Definition at line 43 of file uvedit_parametrizer.c.
Referenced by p_chart_abf_solve(), p_chart_lscm_begin(), and p_smooth().
#define PEDGE_VERTEX_FLAGS (PEDGE_PIN) |
Definition at line 155 of file uvedit_parametrizer.c.
Referenced by p_face_flip().
#define PHASH_edge | ( | v1, | |
v2 | |||
) | ((v1)^(v2)) |
Definition at line 234 of file uvedit_parametrizer.c.
Referenced by p_edge_has_pair(), p_edge_lookup(), p_face_add_construct(), and p_face_exists().
#define PHASH_hash | ( | ph, | |
item | |||
) | (((uintptr_t) (item))%((unsigned int) (ph)->cursize)) |
Definition at line 233 of file uvedit_parametrizer.c.
Referenced by phash_insert(), phash_lookup(), and phash_next().
typedef struct PAbfSystem PAbfSystem |
typedef intptr_t PHashKey |
Definition at line 60 of file uvedit_parametrizer.c.
typedef struct SmoothNode SmoothNode |
typedef struct SmoothTriangle SmoothTriangle |
enum PBool |
Definition at line 53 of file uvedit_parametrizer.c.
enum PChartFlag |
Definition at line 191 of file uvedit_parametrizer.c.
enum PEdgeFlag |
PEDGE_SEAM | |
PEDGE_VERTEX_SPLIT | |
PEDGE_PIN | |
PEDGE_SELECT | |
PEDGE_DONE | |
PEDGE_FILLED | |
PEDGE_COLLAPSE | |
PEDGE_COLLAPSE_EDGE | |
PEDGE_COLLAPSE_PAIR |
Definition at line 142 of file uvedit_parametrizer.c.
enum PFaceFlag |
Definition at line 157 of file uvedit_parametrizer.c.
enum PHandleState |
PHANDLE_STATE_ALLOCATED | |
PHANDLE_STATE_CONSTRUCTED | |
PHANDLE_STATE_LSCM | |
PHANDLE_STATE_STRETCH |
Definition at line 195 of file uvedit_parametrizer.c.
enum PVertFlag |
Definition at line 134 of file uvedit_parametrizer.c.
static float p_abf_compute_grad_alpha | ( | PAbfSystem * | sys, |
PFace * | f, | ||
PEdge * | e | ||
) | [static] |
Definition at line 2334 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::beta, PVert::flag, PFace::PFaceUnion::id, PVert::PVertUnion::id, PEdge::PEdgeUnion::id, if(), PAbfSystem::lambdaLength, PAbfSystem::lambdaPlanar, PAbfSystem::lambdaTriangle, PEdge::next, p_abf_compute_sin_product(), PVERT_INTERIOR, PEdge::u, PFace::u, PVert::u, PEdge::vert, and PAbfSystem::weight.
Referenced by p_abf_compute_gradient().
static float p_abf_compute_gradient | ( | PAbfSystem * | sys, |
PChart * | chart | ||
) | [static] |
Definition at line 2359 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::bAlpha, PAbfSystem::bInterior, PAbfSystem::bTriangle, credits_svn_gen::e, PVert::edge, PFace::edge, PChart::faces, PVert::flag, PVert::PVertUnion::id, PFace::PFaceUnion::id, PEdge::PEdgeUnion::id, M_PI, PEdge::next, PVert::nextlink, PFace::nextlink, PAbfSystem::ninterior, norm(), p_abf_compute_grad_alpha(), p_abf_compute_sin_product(), PEdge::pair, PVERT_INTERIOR, PVert::u, PFace::u, PEdge::u, and PChart::verts.
Referenced by p_chart_abf_solve().
static float p_abf_compute_sin_product | ( | PAbfSystem * | sys, |
PVert * | v, | ||
int | aid | ||
) | [static] |
Definition at line 2299 of file uvedit_parametrizer.c.
References PAbfSystem::cosine, credits_svn_gen::e, PVert::edge, PEdge::PEdgeUnion::id, PEdge::next, PEdge::pair, PAbfSystem::sine, and PEdge::u.
Referenced by p_abf_compute_grad_alpha(), p_abf_compute_gradient(), and p_abf_matrix_invert().
static void p_abf_compute_sines | ( | PAbfSystem * | sys | ) | [static] |
Definition at line 2288 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, cos(), PAbfSystem::cosine, i, PAbfSystem::nangles, sin(), and PAbfSystem::sine.
Referenced by p_chart_abf_solve().
static void p_abf_free_system | ( | PAbfSystem * | sys | ) | [static] |
Definition at line 2270 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 PBool p_abf_matrix_invert | ( | PAbfSystem * | sys, |
PChart * | chart | ||
) | [static] |
Definition at line 2407 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::bAlpha, PAbfSystem::bInterior, PAbfSystem::bstar, PAbfSystem::bTriangle, PAbfSystem::dstar, credits_svn_gen::e, PFace::edge, PChart::faces, PVert::flag, i, PVert::PVertUnion::id, PFace::PFaceUnion::id, PEdge::PEdgeUnion::id, PAbfSystem::J2dt, PAbfSystem::lambdaLength, PAbfSystem::lambdaPlanar, PAbfSystem::lambdaTriangle, M_PI, PEdge::next, PFace::nextlink, PAbfSystem::ninterior, NL_MATRIX, NL_NB_VARIABLES, NL_SYSTEM, nlBegin(), nlDeleteContext(), nlEnd(), nlGetCurrent(), nlGetVariable(), nlMatrixAdd(), nlNewContext(), nlRightHandSideAdd(), nlSolve(), nlSolverParameteri(), p_abf_compute_sin_product(), PVERT_INTERIOR, si, PVert::u, PFace::u, PEdge::u, PEdge::vert, and PAbfSystem::weight.
Referenced by p_chart_abf_solve().
static void p_abf_setup_system | ( | PAbfSystem * | sys | ) | [static] |
Definition at line 2241 of file uvedit_parametrizer.c.
References PAbfSystem::alpha, PAbfSystem::bAlpha, PAbfSystem::beta, PAbfSystem::bInterior, PAbfSystem::bstar, PAbfSystem::bTriangle, PAbfSystem::cosine, PAbfSystem::dstar, i, 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 float p_area_signed | ( | float * | v1, |
float * | v2, | ||
float * | v3 | ||
) | [static] |
Definition at line 392 of file uvedit_parametrizer.c.
Referenced by p_chart_convex_hull().
static void p_barycentric_2d | ( | float * | v1, |
float * | v2, | ||
float * | v3, | ||
float * | p, | ||
float * | b | ||
) | [static] |
Definition at line 3569 of file uvedit_parametrizer.c.
References div.
Referenced by p_smooth(), and p_triangle_inside().
Definition at line 522 of file uvedit_parametrizer.c.
References PVert::edge, PEdge::next, and PEdge::vert.
Referenced by p_chart_convex_hull(), p_chart_fill_boundary(), and p_chart_symmetry_pins().
Definition at line 527 of file uvedit_parametrizer.c.
References credits_svn_gen::e, and p_wheel_edge_next().
Referenced by p_chart_fill_boundary(), and p_chart_symmetry_pins().
Definition at line 2624 of file uvedit_parametrizer.c.
References ABF_MAX_ITER, PAbfSystem::alpha, PAbfSystem::beta, credits_svn_gen::e, PVert::edge, PFace::edge, PChart::faces, PVert::flag, i, PEdge::PEdgeUnion::id, PFace::PFaceUnion::id, PVert::PVertUnion::id, PChart::PChartUnion::lscm, M_PI, PAbfSystem::maxangle, MEM_dupallocN(), PAbfSystem::minangle, PAbfSystem::nangles, PEdge::next, PFace::nextlink, PVert::nextlink, PAbfSystem::nfaces, PChart::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(), PEdge::pair, param_warning, PVERT_INTERIOR, PChart::u, PEdge::u, PFace::u, PVert::u, PChart::verts, and PAbfSystem::weight.
Referenced by p_chart_lscm_begin().
Definition at line 1131 of file uvedit_parametrizer.c.
References credits_svn_gen::e, PVert::edge, PChart::edges, PEdge::flag, len(), PEdge::next, PEdge::nextlink, NULL, p_edge_length(), PEdge::pair, PEDGE_DONE, and PEdge::vert.
Referenced by p_chart_convex_hull(), p_chart_lscm_begin(), and param_construct_end().
static PBool p_chart_convex_hull | ( | PChart * | chart, |
PVert *** | verts, | ||
int * | nverts, | ||
int * | right | ||
) | [static] |
Definition at line 3332 of file uvedit_parametrizer.c.
References credits_svn_gen::e, i, L, MEM_freeN(), MEM_mallocN(), NULL, p, p_area_signed(), p_boundary_edge_next(), p_chart_boundaries(), p_compare_geometric_uv(), P_FALSE, P_TRUE, U, PVert::uv, and PEdge::vert.
Referenced by p_chart_minimum_area_angle().
static void p_chart_delete | ( | PChart * | chart | ) | [static] |
Definition at line 767 of file uvedit_parametrizer.c.
References MEM_freeN().
Referenced by param_construct_end(), and param_delete().
Definition at line 2899 of file uvedit_parametrizer.c.
References PVert::co, i, PVert::nextlink, NULL, p_chart_pin_positions(), and PChart::verts.
Referenced by p_chart_lscm_begin().
Definition at line 1273 of file uvedit_parametrizer.c.
References credits_svn_gen::e, PVert::edge, PChart::edges, PEdge::flag, PEdge::next, PEdge::nextlink, p_chart_fill_boundary(), PEdge::pair, PEDGE_FILLED, and PEdge::vert.
Referenced by param_construct_end().
Definition at line 1192 of file uvedit_parametrizer.c.
References angle(), BLI_heap_free(), BLI_heap_insert(), BLI_heap_new(), BLI_heap_popmin(), BLI_heap_remove(), credits_svn_gen::e, PFace::edge, PVert::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 2952 of file uvedit_parametrizer.c.
References PVert::flag, PChart::flag, PVert::PVertUnion::id, PChart::PChartUnion::lscm, PVert::nextlink, PChart::nfaces, NL_LEAST_SQUARES, NL_NB_ROWS, NL_NB_VARIABLES, NL_TRUE, nlGetCurrent(), nlNewContext(), nlSolverParameteri(), NULL, PChart::nverts, p_chart_abf_solve(), p_chart_boundaries(), p_chart_extrema_verts(), p_chart_symmetry_pins(), P_FALSE, P_TRUE, param_warning, PCHART_NOPACK, PVERT_PIN, PVERT_SELECT, PVert::u, PChart::u, and PChart::verts.
Referenced by param_lscm_begin().
static void p_chart_lscm_end | ( | PChart * | chart | ) | [static] |
Definition at line 3150 of file uvedit_parametrizer.c.
References PChart::PChartUnion::lscm, MEM_freeN(), nlDeleteContext(), NULL, and PChart::u.
Referenced by param_lscm_end(), and param_lscm_solve().
static void p_chart_lscm_load_solution | ( | PChart * | chart | ) | [static] |
Definition at line 2942 of file uvedit_parametrizer.c.
References PVert::PVertUnion::id, PVert::nextlink, nlGetVariable(), PVert::u, PVert::uv, and PChart::verts.
Referenced by p_chart_lscm_solve().
Definition at line 3012 of file uvedit_parametrizer.c.
References cosf, PFace::edge, PChart::faces, PVert::flag, PVert::PVertUnion::id, PChart::PChartUnion::lscm, MAX3(), PEdge::next, PFace::nextlink, PVert::nextlink, NL_MATRIX, NL_SYSTEM, NL_TRUE, nlBegin(), nlEnd(), nlLockVariable(), nlMakeCurrent(), nlMatrixAdd(), nlSetVariable(), nlSolveAdvanced(), NULL, p_chart_lscm_load_solution(), p_face_angles(), P_FALSE, P_TRUE, p_vert_load_pin_select_uvs(), PVERT_PIN, SHIFT3, sin(), PVert::u, PChart::u, PVert::uv, PEdge::vert, and PChart::verts.
Referenced by param_lscm_solve().
static float p_chart_minimum_area_angle | ( | PChart * | chart | ) | [static] |
Definition at line 3418 of file uvedit_parametrizer.c.
References i, len(), len_v2v2(), M_PI, MEM_freeN(), MEM_mallocN(), p_chart_convex_hull(), p_rectangle_area(), p_vec2_angle(), and PVert::uv.
Referenced by p_chart_rotate_minimum_area().
Definition at line 759 of file uvedit_parametrizer.c.
References PChart::handle, and MEM_callocN().
Referenced by p_split_charts(), and param_construct_begin().
Definition at line 2744 of file uvedit_parametrizer.c.
References PFace::edge, fabs(), PChart::faces, PEdge::next, sub_v3_v3v3(), PVert::uv, and PEdge::vert.
Referenced by p_chart_extrema_verts(), and p_chart_symmetry_pins().
static void p_chart_rotate_minimum_area | ( | PChart * | chart | ) | [static] |
Definition at line 3539 of file uvedit_parametrizer.c.
References cos(), PVert::nextlink, p_chart_minimum_area_angle(), sin(), PVert::uv, and PChart::verts.
Referenced by param_lscm_solve().
Definition at line 3246 of file uvedit_parametrizer.c.
References add_v2_v2v2(), copy_v2_v2(), cosf, credits_svn_gen::e, PVert::edge, PVert::flag, M_PI, PVert::nextlink, p_edge_uv_length(), p_stretch_compute_vertex(), P_STRETCH_ITER, p_wheel_edge_next(), PVERT_PIN, PVERT_SELECT, rng_getFloat(), sinf, PVert::uv, and PChart::verts.
Referenced by param_stretch_iter().
static PBool p_chart_symmetry_pins | ( | PChart * | chart, |
PEdge * | outer, | ||
PVert ** | pin1, | ||
PVert ** | pin2 | ||
) | [static] |
Definition at line 2795 of file uvedit_parametrizer.c.
References PVert::flag, len(), NULL, p_boundary_edge_next(), p_boundary_edge_prev(), p_chart_pin_positions(), p_edge_length(), P_FALSE, P_TRUE, PVERT_SPLIT, and PEdge::vert.
Referenced by p_chart_lscm_begin().
static void p_chart_uv_bbox | ( | PChart * | chart, |
float * | minv, | ||
float * | maxv | ||
) | [static] |
Definition at line 430 of file uvedit_parametrizer.c.
References DO_MINMAX2, INIT_MINMAX2, PVert::nextlink, PVert::uv, and PChart::verts.
Referenced by p_smooth(), param_average(), and param_pack().
static void p_chart_uv_scale | ( | PChart * | chart, |
float | scale | ||
) | [static] |
Definition at line 441 of file uvedit_parametrizer.c.
References PVert::nextlink, PVert::uv, and PChart::verts.
Referenced by param_average(), and param_pack().
static void p_chart_uv_scale_xy | ( | PChart * | chart, |
float | x, | ||
float | y | ||
) | [static] |
Definition at line 451 of file uvedit_parametrizer.c.
References PVert::nextlink, PVert::uv, and PChart::verts.
Referenced by param_scale().
static void p_chart_uv_translate | ( | PChart * | chart, |
float | trans[2] | ||
) | [static] |
Definition at line 461 of file uvedit_parametrizer.c.
References PVert::nextlink, PVert::uv, and PChart::verts.
Referenced by param_average(), and param_pack().
static int p_compare_float | ( | const void * | a, |
const void * | b | ||
) | [static] |
Definition at line 3701 of file uvedit_parametrizer.c.
Referenced by p_smooth_median_edge_length().
static int p_compare_geometric_uv | ( | const void * | a, |
const void * | b | ||
) | [static] |
Definition at line 3313 of file uvedit_parametrizer.c.
References PVert::uv.
Referenced by p_chart_convex_hull().
Definition at line 875 of file uvedit_parametrizer.c.
References PFace::PFaceUnion::chart, PHandle::construction_chart, credits_svn_gen::e, PVert::edge, PFace::edge, PEdge::face, PChart::faces, PFace::flag, PHandle::hash_faces, MEM_freeN(), MEM_mallocN(), PEdge::next, PFace::nextlink, p_edge_connect_pair(), PFACE_CONNECTED, phash_size(), stack, PFace::u, and PEdge::vert.
Referenced by param_construct_end().
static float p_edge_boundary_angle | ( | PEdge * | e | ) | [static] |
Definition at line 1167 of file uvedit_parametrizer.c.
References angle(), PVert::co, PVert::edge, M_PI, PEdge::next, p_vec_angle(), PEdge::pair, and PEdge::vert.
Referenced by p_chart_fill_boundary().
static PBool p_edge_connect_pair | ( | PHandle * | handle, |
PEdge * | e, | ||
PEdge *** | stack, | ||
PBool | impl | ||
) | [static] |
Definition at line 855 of file uvedit_parametrizer.c.
References credits_svn_gen::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().
Definition at line 807 of file uvedit_parametrizer.c.
References PEdge::flag, PHandle::hash_edges, PVert::PVertUnion::key, PEdge::next, NULL, p_edge_implicit_seam(), P_FALSE, PEDGE_SEAM, PHASH_edge, phash_lookup(), phash_next(), PVert::u, and PEdge::vert.
Referenced by p_edge_connect_pair().
Definition at line 773 of file uvedit_parametrizer.c.
References 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().
static float p_edge_length | ( | PEdge * | e | ) | [static] |
Definition at line 407 of file uvedit_parametrizer.c.
References PVert::co, simple_enum_gen::d, PEdge::next, sqrt(), and PEdge::vert.
Referenced by p_chart_boundaries(), p_chart_symmetry_pins(), p_smooth(), p_smooth_distortion(), and p_smooth_median_edge_length().
Definition at line 721 of file uvedit_parametrizer.c.
References credits_svn_gen::e, PHandle::hash_edges, PVert::PVertUnion::key, PEdge::next, NULL, PHASH_edge, phash_lookup(), phash_next(), PVert::u, and PEdge::vert.
Referenced by param_edge_set_seam().
static float p_edge_uv_length | ( | PEdge * | e | ) | [static] |
Definition at line 419 of file uvedit_parametrizer.c.
References simple_enum_gen::d, PEdge::next, sqrt(), PVert::uv, and PEdge::vert.
Referenced by p_chart_stretch_minimize(), p_smooth(), and p_smooth_distortion().
Definition at line 1008 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_memarena_alloc(), PFace::edge, PEdge::face, PFace::flag, PEdge::flag, PEdge::next, NULL, and PEdge::pair.
Referenced by p_face_add_construct(), and p_face_add_fill().
static PFace* p_face_add_construct | ( | PHandle * | handle, |
ParamKey | key, | ||
ParamKey * | vkeys, | ||
float * | co[3], | ||
float * | uv[3], | ||
int | i1, | ||
int | i2, | ||
int | i3, | ||
ParamBool * | pin, | ||
ParamBool * | select | ||
) | [static] |
Definition at line 1040 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::flag, PHandle::hash_edges, PHandle::hash_faces, 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(), PFace::u, PEdge::u, and PEdge::vert.
Referenced by param_face_add().
Definition at line 1082 of file uvedit_parametrizer.c.
References PFace::edge, PChart::edges, PChart::faces, PChart::handle, PChart::nedges, PEdge::next, PFace::nextlink, PEdge::nextlink, PChart::nfaces, NULL, PEdge::orig_uv, p_face_add(), and PEdge::vert.
Referenced by p_chart_fill_boundary().
static void p_face_angles | ( | PFace * | f, |
float * | a1, | ||
float * | a2, | ||
float * | a3 | ||
) | [static] |
Definition at line 376 of file uvedit_parametrizer.c.
References PVert::co, PFace::edge, PEdge::next, p_triangle_angles(), and PEdge::vert.
Referenced by p_chart_abf_solve(), and p_chart_lscm_solve().
static float p_face_area | ( | PFace * | f | ) | [static] |
Definition at line 384 of file uvedit_parametrizer.c.
References area_tri_v3(), PVert::co, PFace::edge, PEdge::next, and PEdge::vert.
Referenced by param_average(), and param_stretch_begin().
static void p_face_backup_uvs | ( | PFace * | f | ) | [static] |
Definition at line 654 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().
Definition at line 738 of file uvedit_parametrizer.c.
References credits_svn_gen::e, PHandle::hash_edges, PVert::PVertUnion::key, PEdge::next, P_FALSE, P_TRUE, PHASH_edge, phash_lookup(), phash_next(), PVert::u, and PEdge::vert.
Referenced by p_quad_split_direction().
static void p_face_flip | ( | PFace * | f | ) | [static] |
Definition at line 544 of file uvedit_parametrizer.c.
References PFace::edge, PVert::flag, PEdge::flag, PEdge::next, PEdge::orig_uv, PEDGE_VERTEX_FLAGS, and PEdge::vert.
Referenced by p_edge_connect_pair().
static void p_face_restore_uvs | ( | PFace * | f | ) | [static] |
Definition at line 668 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::next, PEdge::old_uv, and PEdge::orig_uv.
Referenced by param_flush_restore().
static float p_face_stretch | ( | PFace * | f | ) | [static] |
Definition at line 3180 of file uvedit_parametrizer.c.
References add_v3_v3(), PVert::co, copy_v3_v3(), dot_v3v3(), PFace::edge, PFace::flag, mul_v3_fl(), PEdge::next, p_face_uv_area_signed(), PFACE_FILLED, sqrt(), T, PVert::uv, PEdge::vert, and simple_enum_gen::w.
Referenced by p_stretch_compute_vertex().
static float p_face_uv_area_signed | ( | PFace * | f | ) | [static] |
Definition at line 398 of file uvedit_parametrizer.c.
References PFace::edge, PEdge::next, PVert::uv, and PEdge::vert.
Referenced by p_face_stretch(), and param_average().
Definition at line 629 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, credits_svn_gen::e, PChart::edges, PEdge::nextlink, PEdge::orig_uv, PVert::uv, and PEdge::vert.
Referenced by param_flush().
Definition at line 641 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, blend(), credits_svn_gen::e, PChart::edges, PEdge::nextlink, PEdge::old_uv, PEdge::orig_uv, PVert::uv, and PEdge::vert.
Referenced by param_flush().
static PBool p_intersect_line_2d_dir | ( | float * | v1, |
float * | dir1, | ||
float * | v2, | ||
float * | dir2, | ||
float * | isect | ||
) | [static] |
Definition at line 471 of file uvedit_parametrizer.c.
References div, P_FALSE, and P_TRUE.
Referenced by p_rectangle_area().
static void p_node_delete | ( | SmoothNode * | node | ) | [static] |
Definition at line 3669 of file uvedit_parametrizer.c.
References SmoothNode::c1, SmoothNode::c2, MEM_freeN(), and SmoothNode::tri.
Referenced by p_smooth().
static PBool p_node_intersect | ( | SmoothNode * | node, |
float * | co | ||
) | [static] |
Definition at line 3679 of file uvedit_parametrizer.c.
References SmoothNode::axis, SmoothNode::c1, SmoothNode::c2, i, SmoothNode::ntri, P_FALSE, p_triangle_inside(), P_TRUE, SmoothNode::split, and SmoothNode::tri.
Referenced by p_smooth().
static SmoothNode* p_node_new | ( | MemArena * | arena, |
SmoothTriangle ** | tri, | ||
int | ntri, | ||
float * | bmin, | ||
float * | bmax, | ||
int | depth | ||
) | [static] |
Definition at line 3612 of file uvedit_parametrizer.c.
References SmoothNode::axis, BLI_memarena_alloc(), SmoothNode::c1, SmoothNode::c2, SmoothTriangle::co1, SmoothTriangle::co2, SmoothTriangle::co3, i, MEM_freeN(), MEM_mallocN(), SmoothNode::ntri, NULL, SmoothNode::split, split(), and SmoothNode::tri.
Referenced by p_smooth().
Definition at line 1108 of file uvedit_parametrizer.c.
References len_v3v3(), and p_face_exists().
Referenced by param_face_add().
static float p_rectangle_area | ( | float * | p1, |
float * | dir, | ||
float * | p2, | ||
float * | p3, | ||
float * | p4 | ||
) | [static] |
Definition at line 3396 of file uvedit_parametrizer.c.
References corner1, corner2, len_v2v2(), and p_intersect_line_2d_dir().
Referenced by p_chart_minimum_area_angle().
static void p_smooth | ( | PChart * | chart | ) | [static] |
Definition at line 3738 of file uvedit_parametrizer.c.
References BLI_memarena_free(), BLI_memarena_new(), SmoothTriangle::co1, SmoothTriangle::co2, SmoothTriangle::co3, simple_enum_gen::d, KDL::diff(), PVert::PVertUnion::distortion, DO_MINMAX2, credits_svn_gen::e, PFace::edge, PVert::edge, PChart::edges, PChart::faces, i, INIT_MINMAX2, length(), MAX2, MEM_freeN(), MEM_mallocN(), PChart::nedges, PEdge::next, PFace::nextlink, PVert::nextlink, PEdge::nextlink, nodes, SmoothTriangle::oco1, SmoothTriangle::oco2, SmoothTriangle::oco3, 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(), PEdge::pair, param_warning, MakeCursor::root, sqrt(), SmoothNode::tri, PVert::u, PVert::uv, PEdge::vert, and PChart::verts.
Referenced by param_smooth_area().
static float p_smooth_distortion | ( | PEdge * | e, |
float | avg2d, | ||
float | avg3d | ||
) | [static] |
Definition at line 3730 of file uvedit_parametrizer.c.
References p_edge_length(), and p_edge_uv_length().
Referenced by p_smooth().
static float p_smooth_median_edge_length | ( | PChart * | chart | ) | [static] |
Definition at line 3711 of file uvedit_parametrizer.c.
References credits_svn_gen::e, PChart::edges, i, MEM_freeN(), MEM_mallocN(), PChart::nedges, PEdge::nextlink, p_compare_float(), and p_edge_length().
Referenced by p_smooth().
Definition at line 970 of file uvedit_parametrizer.c.
References PFace::PFaceUnion::chart, PFace::edge, PChart::faces, i, 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 920 of file uvedit_parametrizer.c.
References copy(), credits_svn_gen::e, PVert::edge, PVert::flag, PEdge::flag, PVert::nextlink, NULL, PChart::nverts, P_FALSE, P_TRUE, p_vert_copy(), p_wheel_edge_next(), p_wheel_edge_prev(), PEDGE_VERTEX_SPLIT, PVERT_SPLIT, PEdge::vert, and PChart::verts.
Referenced by p_split_charts().
static float p_stretch_compute_vertex | ( | PVert * | v | ) | [static] |
Definition at line 3233 of file uvedit_parametrizer.c.
References PVert::edge, PEdge::face, p_face_stretch(), p_wheel_edge_next(), and sum().
Referenced by p_chart_stretch_minimize().
static void p_stretch_pin_boundary | ( | PChart * | chart | ) | [static] |
Definition at line 3169 of file uvedit_parametrizer.c.
References PVert::edge, PVert::flag, PVert::nextlink, NULL, PEdge::pair, PVERT_PIN, and PChart::verts.
Referenced by param_stretch_begin().
static void p_triangle_angles | ( | float * | v1, |
float * | v2, | ||
float * | v3, | ||
float * | a1, | ||
float * | a2, | ||
float * | a3 | ||
) | [static] |
Definition at line 369 of file uvedit_parametrizer.c.
References M_PI, and p_vec_angle().
Referenced by p_face_angles().
static PBool p_triangle_inside | ( | SmoothTriangle * | t, |
float * | co | ||
) | [static] |
Definition at line 3597 of file uvedit_parametrizer.c.
References SmoothTriangle::co1, SmoothTriangle::co2, SmoothTriangle::co3, SmoothTriangle::oco1, SmoothTriangle::oco2, SmoothTriangle::oco3, p_barycentric_2d(), P_FALSE, and P_TRUE.
Referenced by p_node_intersect().
static float p_vec2_angle | ( | float * | v1, |
float * | v2, | ||
float * | v3 | ||
) | [static] |
Definition at line 358 of file uvedit_parametrizer.c.
References p_vec_angle().
Referenced by p_chart_minimum_area_angle().
static float p_vec_angle | ( | float * | v1, |
float * | v2, | ||
float * | v3 | ||
) | [static] |
Definition at line 346 of file uvedit_parametrizer.c.
References acos(), dot(), M_PI, and p_vec_angle_cos().
Referenced by p_edge_boundary_angle(), p_triangle_angles(), and p_vec2_angle().
static float p_vec_angle_cos | ( | float * | v1, |
float * | v2, | ||
float * | v3 | ||
) | [static] |
Definition at line 328 of file uvedit_parametrizer.c.
References normalize_v3().
Referenced by p_vec_angle().
Definition at line 684 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_memarena_alloc(), co, PVert::co, credits_svn_gen::e, PVert::edge, PVert::flag, PHandle::hash_verts, PVert::PVertUnion::key, phash_insert(), and PVert::u.
Referenced by p_vert_lookup().
Definition at line 707 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_memarena_alloc(), PVert::co, PVert::edge, PVert::flag, PChart::handle, PVert::PVertUnion::key, PVert::u, and PVert::uv.
Referenced by p_split_vert().
Definition at line 539 of file uvedit_parametrizer.c.
References PVert::edge, NULL, and PEdge::pair.
Referenced by p_chart_abf_solve().
Definition at line 588 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, credits_svn_gen::e, PVert::edge, PVert::flag, PEdge::flag, PEdge::orig_uv, p_wheel_edge_next(), PEDGE_PIN, PEDGE_SELECT, PVERT_PIN, PVERT_SELECT, and PVert::uv.
Referenced by p_chart_lscm_solve(), and param_construct_end().
Definition at line 697 of file uvedit_parametrizer.c.
References PHandle::hash_verts, p_vert_add(), and phash_lookup().
Referenced by p_face_add_construct().
Definition at line 512 of file uvedit_parametrizer.c.
References PEdge::next, and PEdge::pair.
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 517 of file uvedit_parametrizer.c.
References PEdge::next, NULL, and PEdge::pair.
Referenced by p_split_vert().
void param_aspect_ratio | ( | ParamHandle * | handle, |
float | aspx, | ||
float | aspy | ||
) |
Definition at line 4068 of file uvedit_parametrizer.c.
References PHandle::aspx, and PHandle::aspy.
Referenced by construct_param_handle().
void param_average | ( | ParamHandle * | handle | ) |
Definition at line 4414 of file uvedit_parametrizer.c.
References PHandle::charts, fabsf, PChart::faces, i, 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, sqrt(), and PChart::u.
Referenced by average_islands_scale_exec().
ParamHandle* param_construct_begin | ( | void | ) |
Definition at line 4052 of file uvedit_parametrizer.c.
References PHandle::arena, PHandle::aspx, PHandle::aspy, BLI_memarena_new(), PHandle::construction_chart, PChart::edges, PChart::faces, PHandle::hash_edges, PHandle::hash_faces, PHandle::hash_verts, MEM_callocN(), p_chart_new(), PHANDLE_STATE_ALLOCATED, phash_new(), PHandle::state, and PChart::verts.
Referenced by construct_param_handle().
void param_construct_end | ( | ParamHandle * | handle, |
ParamBool | fill, | ||
ParamBool | impl | ||
) |
Definition at line 4138 of file uvedit_parametrizer.c.
References PHandle::charts, PHandle::construction_chart, PHandle::hash_edges, PHandle::hash_faces, PHandle::hash_verts, i, PHandle::ncharts, PVert::nextlink, 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, and PChart::verts.
Referenced by construct_param_handle().
void param_delete | ( | ParamHandle * | handle | ) |
Definition at line 4076 of file uvedit_parametrizer.c.
References PHandle::arena, BLI_memarena_free(), PHandle::charts, PHandle::construction_chart, PHandle::hash_edges, PHandle::hash_faces, PHandle::hash_verts, i, MEM_freeN(), PHandle::ncharts, p_chart_delete(), param_assert, PHANDLE_STATE_ALLOCATED, PHANDLE_STATE_CONSTRUCTED, phash_delete(), and PHandle::state.
Referenced by average_islands_scale_exec(), ED_unwrap_lscm(), ED_uvedit_live_unwrap_end(), minimize_stretch_exit(), and pack_islands_exec().
void param_edge_set_seam | ( | ParamHandle * | handle, |
ParamKey * | vkeys | ||
) |
Definition at line 4126 of file uvedit_parametrizer.c.
References credits_svn_gen::e, PEdge::flag, p_edge_lookup(), param_assert, PEDGE_SEAM, PHANDLE_STATE_ALLOCATED, and PHandle::state.
Referenced by construct_param_handle().
void param_face_add | ( | ParamHandle * | handle, |
ParamKey | key, | ||
int | nverts, | ||
ParamKey * | vkeys, | ||
float ** | co, | ||
float ** | uv, | ||
ParamBool * | pin, | ||
ParamBool * | select | ||
) |
Definition at line 4102 of file uvedit_parametrizer.c.
References PHandle::hash_faces, NULL, p_face_add_construct(), p_quad_split_direction(), param_assert, PHANDLE_STATE_ALLOCATED, phash_lookup(), and PHandle::state.
Referenced by construct_param_handle().
void param_flush | ( | ParamHandle * | handle | ) |
Definition at line 4483 of file uvedit_parametrizer.c.
References PHandle::blend, PHandle::charts, i, 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_unwrap_lscm(), ED_uvedit_live_unwrap_re_solve(), minimize_stretch_exit(), minimize_stretch_iteration(), and pack_islands_exec().
void param_flush_restore | ( | ParamHandle * | handle | ) |
Definition at line 4502 of file uvedit_parametrizer.c.
References PHandle::charts, PChart::faces, i, 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 4184 of file uvedit_parametrizer.c.
References PHandle::charts, PChart::faces, i, 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_unwrap_lscm(), and ED_uvedit_live_unwrap_begin().
void param_lscm_end | ( | ParamHandle * | handle | ) |
Definition at line 4224 of file uvedit_parametrizer.c.
References PHandle::charts, i, PHandle::ncharts, p_chart_lscm_end(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, and PHandle::state.
Referenced by ED_unwrap_lscm(), and ED_uvedit_live_unwrap_end().
void param_lscm_solve | ( | ParamHandle * | handle | ) |
Definition at line 4200 of file uvedit_parametrizer.c.
References PHandle::charts, PChart::flag, i, PChart::PChartUnion::lscm, PHandle::ncharts, p_chart_lscm_end(), p_chart_lscm_solve(), p_chart_rotate_minimum_area(), param_assert, PCHART_NOPACK, PHANDLE_STATE_LSCM, PHandle::state, and PChart::u.
Referenced by ED_unwrap_lscm(), and ED_uvedit_live_unwrap_re_solve().
void param_pack | ( | ParamHandle * | handle, |
float | margin | ||
) |
Definition at line 4321 of file uvedit_parametrizer.c.
References PHandle::aspx, PHandle::aspy, boxPack2D(), PHandle::charts, PChart::flag, boxPack::h, i, boxPack::index, MEM_freeN(), MEM_mallocN(), PHandle::ncharts, p_chart_uv_bbox(), p_chart_uv_scale(), p_chart_uv_translate(), PChart::PChartUnion::pack, param_scale(), PCHART_NOPACK, sqrt(), PChart::u, boxPack::w, boxPack::x, and boxPack::y.
Referenced by ED_unwrap_lscm(), and pack_islands_exec().
void param_scale | ( | ParamHandle * | handle, |
float | x, | ||
float | y | ||
) |
Definition at line 4471 of file uvedit_parametrizer.c.
References PHandle::charts, i, PHandle::ncharts, and p_chart_uv_scale_xy().
Referenced by param_pack().
void param_smooth_area | ( | ParamHandle * | handle | ) |
Definition at line 4303 of file uvedit_parametrizer.c.
References PHandle::charts, PVert::flag, i, PHandle::ncharts, PVert::nextlink, p_smooth(), param_assert, PHANDLE_STATE_CONSTRUCTED, PVERT_PIN, PHandle::state, and PChart::verts.
void param_stretch_begin | ( | ParamHandle * | handle | ) |
Definition at line 4241 of file uvedit_parametrizer.c.
References PFace::PFaceUnion::area3d, PHandle::blend, PHandle::charts, PChart::faces, PVert::flag, i, PHandle::ncharts, PFace::nextlink, PVert::nextlink, p_face_area(), p_face_backup_uvs(), p_stretch_pin_boundary(), param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, PVERT_PIN, PHandle::rng, rng_new(), PHandle::state, PFace::u, and PChart::verts.
Referenced by minimize_stretch_init().
void param_stretch_blend | ( | ParamHandle * | handle, |
float | blend | ||
) |
Definition at line 4270 of file uvedit_parametrizer.c.
References blend(), PHandle::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 4292 of file uvedit_parametrizer.c.
References NULL, param_assert, PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, PHandle::rng, rng_free(), and PHandle::state.
Referenced by minimize_stretch_exit().
void param_stretch_iter | ( | ParamHandle * | handle | ) |
Definition at line 4278 of file uvedit_parametrizer.c.
References PHandle::charts, i, PHandle::ncharts, p_chart_stretch_minimize(), param_assert, PHANDLE_STATE_STRETCH, PHandle::rng, and PHandle::state.
Referenced by minimize_stretch_iteration().
static void phash_delete | ( | PHash * | ph | ) | [static] |
Definition at line 252 of file uvedit_parametrizer.c.
References PHash::buckets, and MEM_freeN().
Referenced by param_construct_end(), and param_delete().
Definition at line 263 of file uvedit_parametrizer.c.
References PHash::buckets, PHash::cursize, PHash::cursize_id, hash, PHashLink::key, link(), PHash::list, MEM_callocN(), MEM_freeN(), next, PHashLink::next, NULL, PHASH_hash, PHashSizes, PHash::size, and size().
Referenced by p_face_add_construct(), and p_vert_add().
Definition at line 299 of file uvedit_parametrizer.c.
References PHash::buckets, hash, PHashLink::key, link(), 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 236 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 313 of file uvedit_parametrizer.c.
References hash, PHashLink::key, link(), PHashLink::next, NULL, and PHASH_hash.
Referenced by p_edge_has_pair(), p_edge_lookup(), and p_face_exists().
static int phash_size | ( | PHash * | ph | ) | [static] |
Definition at line 258 of file uvedit_parametrizer.c.
References PHash::size.
Referenced by p_connect_pairs().
int PHashSizes[] [static] |
{ 1, 3, 5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459 }
Definition at line 227 of file uvedit_parametrizer.c.
Referenced by phash_insert(), and phash_new().