diff options
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_operators.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index a701fe3eb85..83f2c402c35 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -170,17 +170,50 @@ void BM_mesh_esubdivide(BMesh *bm, const short use_only_quads, const int seed); +/** + * Fills first available UV-map with grid-like UV's for all faces with `oflag` set. + * + * \param bm: The BMesh to operate on + * \param x_segments: The x-resolution of the grid + * \param y_segments: The y-resolution of the grid + * \param oflag: The flag to check faces with. + */ void BM_mesh_calc_uvs_grid(BMesh *bm, const uint x_segments, const uint y_segments, const short oflag, const int cd_loop_uv_offset); +/** + * Fills first available UV-map with spherical projected UVs for all faces with `oflag` set. + * + * \param bm: The BMesh to operate on + * \param oflag: The flag to check faces with. + */ void BM_mesh_calc_uvs_sphere(BMesh *bm, const short oflag, const int cd_loop_uv_offset); +/** + * Fills first available UV-map with 2D projected UVs for all faces with `oflag` set. + * + * \param bm: The BMesh to operate on. + * \param mat: The transform matrix applied to the created circle. + * \param radius: The size of the circle. + * \param oflag: The flag to check faces with. + */ void BM_mesh_calc_uvs_circle(BMesh *bm, float mat[4][4], const float radius, const short oflag, const int cd_loop_uv_offset); +/** + * Fills first available UV-map with cylinder/cone-like UVs for all faces with `oflag` set. + * + * \param bm: The BMesh to operate on. + * \param mat: The transform matrix applied to the created cone/cylinder. + * \param radius_top: The size of the top end of the cone/cylinder. + * \param radius_bottom: The size of the bottom end of the cone/cylinder. + * \param segments: The number of subdivisions in the sides of the cone/cylinder. + * \param cap_ends: Whether the ends of the cone/cylinder are filled or not. + * \param oflag: The flag to check faces with. + */ void BM_mesh_calc_uvs_cone(BMesh *bm, float mat[4][4], const float radius_top, @@ -189,6 +222,15 @@ void BM_mesh_calc_uvs_cone(BMesh *bm, const bool cap_ends, const short oflag, const int cd_loop_uv_offset); +/** + * Fills first available UV-map with cube-like UVs for all faces with `oflag` set. + * + * \note Expects tagged faces to be six quads. + * \note Caller must order faces for correct alignment. + * + * \param bm: The BMesh to operate on. + * \param oflag: The flag to check faces with. + */ void BM_mesh_calc_uvs_cube(BMesh *bm, const short oflag); #include "intern/bmesh_operator_api_inline.h" |