2 #ifndef __PARAMETRIZER_H__
3 #define __PARAMETRIZER_H__
9 typedef void ParamHandle; /* handle to a set of charts */
10 typedef long ParamKey; /* (hash) key for identifying verts and faces */
11 typedef enum ParamBool {
16 /* Chart construction:
18 - faces and seams may only be added between construct_{begin|end}
19 - the pointers to co and uv are stored, rather than being copied
20 - vertices are implicitly created
21 - in construct_end the mesh will be split up according to the seams
22 - the resulting charts must be:
23 - manifold, connected, open (at least one boundary loop)
24 - output will be written to the uv pointers
27 ParamHandle *param_construct_begin();
29 void param_face_add(ParamHandle *handle,
38 void param_edge_set_seam(ParamHandle *handle,
41 void param_construct_end(ParamHandle *handle, ParamBool fill, ParamBool impl);
42 void param_delete(ParamHandle *chart);
44 /* Least Squares Conformal Maps:
45 -----------------------------
46 - charts with less than two pinned vertices are assigned 2 pins
47 - lscm is divided in three steps:
48 - begin: compute matrix and it's factorization (expensive)
49 - solve using pinned coordinates (cheap)
51 - uv coordinates are allowed to change within begin/end, for
55 void param_lscm_begin(ParamHandle *handle, ParamBool live);
56 void param_lscm_solve(ParamHandle *handle);
57 void param_lscm_end(ParamHandle *handle);
61 void param_stretch_begin(ParamHandle *handle);
62 void param_stretch_blend(ParamHandle *handle, float blend);
63 void param_stretch_iter(ParamHandle *handle);
64 void param_stretch_end(ParamHandle *handle);
68 void param_pack(ParamHandle *handle);
72 void param_flush(ParamHandle *handle);
73 void param_flush_restore(ParamHandle *handle);
79 #endif /*__PARAMETRIZER_H__*/