Blender  V3.3
Macros | Typedefs
GEO_uv_parametrizer.h File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Macros

#define PARAM_KEY_MAX   INTPTR_MAX
 

Typedefs

typedef struct ParamHandle ParamHandle
 
typedef intptr_t ParamKey
 

Functions

Chart Construction:

Faces and seams may only be added between GEO_uv_parametrizer_construct_begin and GEO_uv_parametrizer_construct_end.

The pointers to co and uv are stored, rather than being copied. Vertices are implicitly created.

In GEO_uv_parametrizer_construct_end the mesh will be split up according to the seams. The resulting charts must be manifold, connected and open (at least one boundary loop). The output will be written to the uv pointers.

ParamHandleGEO_uv_parametrizer_construct_begin (void)
 
void GEO_uv_parametrizer_aspect_ratio (ParamHandle *handle, float aspx, float aspy)
 
void GEO_uv_prepare_pin_index (ParamHandle *handle, const int bmvertindex, const float uv[2])
 
ParamKey GEO_uv_find_pin_index (ParamHandle *handle, const int bmvertindex, const float uv[2])
 
void GEO_uv_parametrizer_face_add (ParamHandle *handle, const ParamKey key, const int nverts, const ParamKey *vkeys, const float **co, float **uv, const bool *pin, const bool *select)
 
void GEO_uv_parametrizer_edge_set_seam (ParamHandle *handle, ParamKey *vkeys)
 
void GEO_uv_parametrizer_construct_end (ParamHandle *handle, bool fill, bool topology_from_uvs, int *count_fail)
 
void GEO_uv_parametrizer_delete (ParamHandle *handle)
 
Least Squares Conformal Maps:

Charts with less than two pinned vertices are assigned two pins. LSCM is divided to three steps:

  1. Begin: compute matrix and its factorization (expensive).
  2. Solve using pinned coordinates (cheap).
  3. End: clean up.

UV coordinates are allowed to change within begin/end, for quick re-solving.

void GEO_uv_parametrizer_lscm_begin (ParamHandle *handle, bool live, bool abf)
 
void GEO_uv_parametrizer_lscm_solve (ParamHandle *handle, int *count_changed, int *count_failed)
 
void GEO_uv_parametrizer_lscm_end (ParamHandle *handle)
 
Stretch
void GEO_uv_parametrizer_stretch_begin (ParamHandle *handle)
 
void GEO_uv_parametrizer_stretch_blend (ParamHandle *handle, float blend)
 
void GEO_uv_parametrizer_stretch_iter (ParamHandle *handle)
 
void GEO_uv_parametrizer_stretch_end (ParamHandle *handle)
 
Packing
void GEO_uv_parametrizer_pack (ParamHandle *handle, float margin, bool do_rotate, bool ignore_pinned)
 
Average area for all charts
void GEO_uv_parametrizer_average (ParamHandle *handle, bool ignore_pinned, bool scale_uv, bool shear)
 
Simple x,y scale
void GEO_uv_parametrizer_scale (ParamHandle *handle, float x, float y)
 
Flushing
void GEO_uv_parametrizer_flush (ParamHandle *handle)
 
void GEO_uv_parametrizer_flush_restore (ParamHandle *handle)
 

Macro Definition Documentation

◆ PARAM_KEY_MAX

#define PARAM_KEY_MAX   INTPTR_MAX

Definition at line 17 of file GEO_uv_parametrizer.h.

Typedef Documentation

◆ ParamHandle

typedef struct ParamHandle ParamHandle

Definition at line 1 of file GEO_uv_parametrizer.h.

◆ ParamKey

typedef intptr_t ParamKey

Definition at line 16 of file GEO_uv_parametrizer.h.

Function Documentation

◆ GEO_uv_find_pin_index()

ParamKey GEO_uv_find_pin_index ( ParamHandle handle,
const int  bmvertindex,
const float  uv[2] 
)

◆ GEO_uv_parametrizer_aspect_ratio()

void GEO_uv_parametrizer_aspect_ratio ( ParamHandle handle,
float  aspx,
float  aspy 
)

◆ GEO_uv_parametrizer_average()

void GEO_uv_parametrizer_average ( ParamHandle handle,
bool  ignore_pinned,
bool  scale_uv,
bool  shear 
)

◆ GEO_uv_parametrizer_construct_begin()

ParamHandle* GEO_uv_parametrizer_construct_begin ( void  )

◆ GEO_uv_parametrizer_construct_end()

void GEO_uv_parametrizer_construct_end ( ParamHandle handle,
bool  fill,
bool  topology_from_uvs,
int *  count_fail 
)

◆ GEO_uv_parametrizer_delete()

void GEO_uv_parametrizer_delete ( ParamHandle handle)

◆ GEO_uv_parametrizer_edge_set_seam()

void GEO_uv_parametrizer_edge_set_seam ( ParamHandle handle,
ParamKey vkeys 
)

◆ GEO_uv_parametrizer_face_add()

void GEO_uv_parametrizer_face_add ( ParamHandle handle,
const ParamKey  key,
const int  nverts,
const ParamKey vkeys,
const float **  co,
float **  uv,
const bool pin,
const bool select 
)

◆ GEO_uv_parametrizer_flush()

void GEO_uv_parametrizer_flush ( ParamHandle handle)

◆ GEO_uv_parametrizer_flush_restore()

void GEO_uv_parametrizer_flush_restore ( ParamHandle handle)

◆ GEO_uv_parametrizer_lscm_begin()

void GEO_uv_parametrizer_lscm_begin ( ParamHandle handle,
bool  live,
bool  abf 
)

◆ GEO_uv_parametrizer_lscm_end()

void GEO_uv_parametrizer_lscm_end ( ParamHandle handle)

◆ GEO_uv_parametrizer_lscm_solve()

void GEO_uv_parametrizer_lscm_solve ( ParamHandle handle,
int *  count_changed,
int *  count_failed 
)

◆ GEO_uv_parametrizer_pack()

void GEO_uv_parametrizer_pack ( ParamHandle handle,
float  margin,
bool  do_rotate,
bool  ignore_pinned 
)

◆ GEO_uv_parametrizer_scale()

void GEO_uv_parametrizer_scale ( ParamHandle handle,
float  x,
float  y 
)

◆ GEO_uv_parametrizer_stretch_begin()

void GEO_uv_parametrizer_stretch_begin ( ParamHandle handle)

◆ GEO_uv_parametrizer_stretch_blend()

void GEO_uv_parametrizer_stretch_blend ( ParamHandle handle,
float  blend 
)

◆ GEO_uv_parametrizer_stretch_end()

void GEO_uv_parametrizer_stretch_end ( ParamHandle handle)

◆ GEO_uv_parametrizer_stretch_iter()

void GEO_uv_parametrizer_stretch_iter ( ParamHandle handle)

◆ GEO_uv_prepare_pin_index()

void GEO_uv_prepare_pin_index ( ParamHandle handle,
const int  bmvertindex,
const float  uv[2] 
)