Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations | Functions | Variables

uvedit_parametrizer.c File Reference

#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 PHashphash_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 PHashLinkphash_lookup (PHash *ph, PHashKey key)
static PHashLinkphash_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 PEdgep_wheel_edge_next (PEdge *e)
static PEdgep_wheel_edge_prev (PEdge *e)
static PEdgep_boundary_edge_next (PEdge *e)
static PEdgep_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 PVertp_vert_add (PHandle *handle, PHashKey key, float *co, PEdge *e)
static PVertp_vert_lookup (PHandle *handle, PHashKey key, float *co, PEdge *e)
static PVertp_vert_copy (PChart *chart, PVert *v)
static PEdgep_edge_lookup (PHandle *handle, PHashKey *vkeys)
static PBool p_face_exists (PHandle *handle, PHashKey *vkeys, int i1, int i2, int i3)
static PChartp_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 PFacep_face_add (PHandle *handle)
static PFacep_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 PFacep_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 SmoothNodep_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)
ParamHandleparam_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 []

Detailed Description

Definition in file uvedit_parametrizer.c.


Define Documentation

#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)
Value:
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,
 
)
Value:
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,
 
)
Value:
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))
#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 Documentation

typedef struct PAbfSystem PAbfSystem
typedef enum PBool PBool
typedef struct PChart PChart
typedef struct PEdge PEdge
typedef struct PFace PFace
typedef struct PHandle PHandle
typedef struct PHash PHash
typedef intptr_t PHashKey

Definition at line 60 of file uvedit_parametrizer.c.

typedef struct PHashLink PHashLink
typedef struct PVert PVert
typedef struct SmoothNode SmoothNode

Enumeration Type Documentation

enum PBool
Enumerator:
P_TRUE 
P_FALSE 

Definition at line 53 of file uvedit_parametrizer.c.

enum PChartFlag
Enumerator:
PCHART_NOPACK 

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 142 of file uvedit_parametrizer.c.

enum PFaceFlag
Enumerator:
PFACE_CONNECTED 
PFACE_FILLED 
PFACE_COLLAPSE 

Definition at line 157 of file uvedit_parametrizer.c.

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 134 of file uvedit_parametrizer.c.


Function Documentation

static float p_abf_compute_grad_alpha ( PAbfSystem sys,
PFace f,
PEdge e 
) [static]
static float p_abf_compute_gradient ( PAbfSystem sys,
PChart chart 
) [static]
static float p_abf_compute_sin_product ( PAbfSystem sys,
PVert v,
int  aid 
) [static]
static void p_abf_compute_sines ( PAbfSystem sys) [static]
static void p_abf_free_system ( PAbfSystem sys) [static]
static PBool p_abf_matrix_invert ( PAbfSystem sys,
PChart chart 
) [static]
static void p_abf_setup_system ( PAbfSystem sys) [static]
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().

static PEdge* p_boundary_edge_next ( PEdge e) [static]
static PEdge* p_boundary_edge_prev ( PEdge e) [static]

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().

static PBool p_chart_abf_solve ( PChart chart) [static]
static void p_chart_boundaries ( PChart chart,
int *  nboundaries,
PEdge **  outer 
) [static]
static PBool p_chart_convex_hull ( PChart chart,
PVert ***  verts,
int *  nverts,
int *  right 
) [static]
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().

static void p_chart_extrema_verts ( PChart chart,
PVert **  pin1,
PVert **  pin2 
) [static]

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().

static void p_chart_fill_boundaries ( PChart chart,
PEdge outer 
) [static]
static void p_chart_fill_boundary ( PChart chart,
PEdge be,
int  nedges 
) [static]
static void p_chart_lscm_begin ( PChart chart,
PBool  live,
PBool  abf 
) [static]
static void p_chart_lscm_end ( PChart chart) [static]
static void p_chart_lscm_load_solution ( PChart chart) [static]
static PBool p_chart_lscm_solve ( PHandle handle,
PChart chart 
) [static]
static float p_chart_minimum_area_angle ( PChart chart) [static]
static PChart* p_chart_new ( PHandle handle) [static]

Definition at line 759 of file uvedit_parametrizer.c.

References PChart::handle, and MEM_callocN().

Referenced by p_split_charts(), and param_construct_begin().

static void p_chart_pin_positions ( PChart chart,
PVert **  pin1,
PVert **  pin2 
) [static]
static void p_chart_rotate_minimum_area ( PChart chart) [static]
static void p_chart_stretch_minimize ( PChart chart,
RNG rng 
) [static]
static PBool p_chart_symmetry_pins ( PChart chart,
PEdge outer,
PVert **  pin1,
PVert **  pin2 
) [static]
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().

static int p_connect_pairs ( PHandle handle,
PBool  impl 
) [static]
static float p_edge_boundary_angle ( PEdge e) [static]
static PBool p_edge_connect_pair ( PHandle handle,
PEdge e,
PEdge ***  stack,
PBool  impl 
) [static]
static PBool p_edge_has_pair ( PHandle handle,
PEdge e,
PEdge **  pair,
PBool  impl 
) [static]
static PBool p_edge_implicit_seam ( PEdge e,
PEdge ep 
) [static]
static float p_edge_length ( PEdge e) [static]
static PEdge* p_edge_lookup ( PHandle handle,
PHashKey vkeys 
) [static]
static float p_edge_uv_length ( PEdge e) [static]
static PFace* p_face_add ( PHandle handle) [static]
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]
static PFace* p_face_add_fill ( PChart chart,
PVert v1,
PVert v2,
PVert v3 
) [static]
static void p_face_angles ( PFace f,
float *  a1,
float *  a2,
float *  a3 
) [static]
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().

static PBool p_face_exists ( PHandle handle,
PHashKey vkeys,
int  i1,
int  i2,
int  i3 
) [static]
static void p_face_flip ( PFace f) [static]
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]
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().

static void p_flush_uvs ( PHandle handle,
PChart chart 
) [static]
static void p_flush_uvs_blend ( PHandle handle,
PChart chart,
float  blend 
) [static]
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]
static SmoothNode* p_node_new ( MemArena arena,
SmoothTriangle **  tri,
int  ntri,
float *  bmin,
float *  bmax,
int  depth 
) [static]
static PBool p_quad_split_direction ( PHandle handle,
float **  co,
PHashKey vkeys 
) [static]

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]
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]
static PChart** p_split_charts ( PHandle handle,
PChart chart,
int  ncharts 
) [static]
static void p_split_vert ( PChart chart,
PEdge e 
) [static]
static float p_stretch_compute_vertex ( PVert v) [static]
static void p_stretch_pin_boundary ( PChart chart) [static]
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]
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().

static PVert* p_vert_add ( PHandle handle,
PHashKey  key,
float *  co,
PEdge e 
) [static]
static PVert* p_vert_copy ( PChart chart,
PVert v 
) [static]
static PBool p_vert_interior ( PVert v) [static]

Definition at line 539 of file uvedit_parametrizer.c.

References PVert::edge, NULL, and PEdge::pair.

Referenced by p_chart_abf_solve().

static void p_vert_load_pin_select_uvs ( PHandle handle,
PVert v 
) [static]
static PVert* p_vert_lookup ( PHandle handle,
PHashKey  key,
float *  co,
PEdge e 
) [static]

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().

static PEdge* p_wheel_edge_next ( PEdge e) [static]
static PEdge* p_wheel_edge_prev ( PEdge e) [static]

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)
ParamHandle* param_construct_begin ( void  )
void param_construct_end ( ParamHandle handle,
ParamBool  fill,
ParamBool  impl 
)
void param_delete ( ParamHandle handle)
void param_edge_set_seam ( ParamHandle handle,
ParamKey vkeys 
)
void param_face_add ( ParamHandle handle,
ParamKey  key,
int  nverts,
ParamKey vkeys,
float **  co,
float **  uv,
ParamBool pin,
ParamBool select 
)
void param_flush ( ParamHandle handle)
void param_flush_restore ( ParamHandle handle)
void param_lscm_begin ( ParamHandle handle,
ParamBool  live,
ParamBool  abf 
)
void param_lscm_end ( ParamHandle handle)
void param_lscm_solve ( ParamHandle handle)
void param_pack ( ParamHandle handle,
float  margin 
)
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)
void param_stretch_begin ( ParamHandle handle)
void param_stretch_blend ( ParamHandle handle,
float  blend 
)
void param_stretch_end ( ParamHandle handle)
void param_stretch_iter ( ParamHandle handle)
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().

static void phash_insert ( PHash ph,
PHashLink link 
) [static]
static PHashLink* phash_lookup ( PHash ph,
PHashKey  key 
) [static]
static PHash* phash_new ( PHashLink **  list,
int  sizehint 
) [static]
static PHashLink* phash_next ( PHash ph,
PHashKey  key,
PHashLink link 
) [static]
static int phash_size ( PHash ph) [static]

Definition at line 258 of file uvedit_parametrizer.c.

References PHash::size.

Referenced by p_connect_pairs().


Variable Documentation

int PHashSizes[] [static]
Initial value:
 {
    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().