Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_mesh_mapping.h
| Show All 11 Lines | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| struct MEdge; | struct MEdge; | ||||
| struct MLoop; | struct MLoop; | ||||
| struct MLoopTri; | struct MLoopTri; | ||||
| struct MLoopUV; | |||||
| struct MPoly; | struct MPoly; | ||||
| /* UvVertMap */ | /* UvVertMap */ | ||||
| #define STD_UV_CONNECT_LIMIT 0.0001f | #define STD_UV_CONNECT_LIMIT 0.0001f | ||||
| /* Map from uv vertex to face. Used by select linked, uv subdivision-surface and obj exporter. */ | /* Map from uv vertex to face. Used by select linked, uv subdivision-surface and obj exporter. */ | ||||
| typedef struct UvVertMap { | typedef struct UvVertMap { | ||||
| struct UvMapVert **vert; | struct UvMapVert **vert; | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | typedef struct MeshElemMap { | ||||
| int count; | int count; | ||||
| } MeshElemMap; | } MeshElemMap; | ||||
| /* mapping */ | /* mapping */ | ||||
| UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly, | UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly, | ||||
| const bool *hide_poly, | const bool *hide_poly, | ||||
| const bool *select_poly, | const bool *select_poly, | ||||
| const struct MLoop *mloop, | const struct MLoop *mloop, | ||||
| const struct MLoopUV *mloopuv, | const float (*mloopuv)[2], | ||||
| unsigned int totpoly, | unsigned int totpoly, | ||||
| unsigned int totvert, | unsigned int totvert, | ||||
| const float limit[2], | const float limit[2], | ||||
| bool selected, | bool selected, | ||||
| bool use_winding); | bool use_winding); | ||||
| UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v); | UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v); | ||||
| void BKE_mesh_uv_vert_map_free(UvVertMap *vmap); | void BKE_mesh_uv_vert_map_free(UvVertMap *vmap); | ||||
| ▲ Show 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | bool BKE_mesh_calc_islands_loop_poly_edgeseam(const float (*vert_positions)[3], | ||||
| int totpoly, | int totpoly, | ||||
| const struct MLoop *loops, | const struct MLoop *loops, | ||||
| int totloop, | int totloop, | ||||
| MeshIslandStore *r_island_store); | MeshIslandStore *r_island_store); | ||||
| /** | /** | ||||
| * Calculate UV islands. | * Calculate UV islands. | ||||
| * | * | ||||
| * \note If no MLoopUV layer is passed, we only consider edges tagged as seams as UV boundaries. | * \note If no UV layer is passed, we only consider edges tagged as seams as UV boundaries. | ||||
| * This has the advantages of simplicity, and being valid/common to all UV maps. | * This has the advantages of simplicity, and being valid/common to all UV maps. | ||||
| * However, it means actual UV islands without matching UV seams will not be handled correctly. | * However, it means actual UV islands without matching UV seams will not be handled correctly. | ||||
| * If a valid UV layer is passed as \a luvs parameter, | * If a valid UV layer is passed as \a luvs parameter, | ||||
| * UV coordinates are also used to detect islands boundaries. | * UV coordinates are also used to detect islands boundaries. | ||||
| * | * | ||||
| * \note All this could be optimized. | * \note All this could be optimized. | ||||
| * Not sure it would be worth the more complex code, though, | * Not sure it would be worth the more complex code, though, | ||||
| * those loops are supposed to be really quick to do. | * those loops are supposed to be really quick to do. | ||||
| */ | */ | ||||
| bool BKE_mesh_calc_islands_loop_poly_uvmap(float (*vert_positions)[3], | bool BKE_mesh_calc_islands_loop_poly_uvmap(float (*vert_positions)[3], | ||||
| int totvert, | int totvert, | ||||
| struct MEdge *edges, | struct MEdge *edges, | ||||
| int totedge, | int totedge, | ||||
| struct MPoly *polys, | struct MPoly *polys, | ||||
| int totpoly, | int totpoly, | ||||
| struct MLoop *loops, | struct MLoop *loops, | ||||
| int totloop, | int totloop, | ||||
| const struct MLoopUV *luvs, | const float (*luvs)[2], | ||||
| MeshIslandStore *r_island_store); | MeshIslandStore *r_island_store); | ||||
| /** | /** | ||||
| * Calculate smooth groups from sharp edges. | * Calculate smooth groups from sharp edges. | ||||
| * | * | ||||
| * \param r_totgroup: The total number of groups, 1 or more. | * \param r_totgroup: The total number of groups, 1 or more. | ||||
| * \return Polygon aligned array of group index values (bitflags if use_bitflags is true), | * \return Polygon aligned array of group index values (bitflags if use_bitflags is true), | ||||
| * starting at 1 (0 being used as 'invalid' flag). | * starting at 1 (0 being used as 'invalid' flag). | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||