|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_math_base_safe.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BKE_customdata.hh"#include "bmesh.hh"#include "intern/bmesh_operators_private.hh"Go to the source code of this file.
Macros | |
| #define | VERT_MARK 1 |
| #define | EDGE_ORIG 1 |
| #define | EDGE_MARK 2 |
| #define | FACE_MARK 1 |
| #define | FACE_NEW 2 |
| #define | XY(_x, _y) ((_x) + ((_y) * (xtot + 1))) |
Functions | |
| void | bmo_create_grid_exec (BMesh *bm, BMOperator *op) |
| 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) |
| void | bmo_create_uvsphere_exec (BMesh *bm, BMOperator *op) |
| void | bmo_create_icosphere_exec (BMesh *bm, BMOperator *op) |
| static void | bm_mesh_calc_uvs_sphere_face (BMFace *f, const int cd_loop_uv_offset) |
| void | BM_mesh_calc_uvs_sphere (BMesh *bm, const short oflag, const int cd_loop_uv_offset) |
| void | bmo_create_monkey_exec (BMesh *bm, BMOperator *op) |
| void | bmo_create_circle_exec (BMesh *bm, BMOperator *op) |
| void | BM_mesh_calc_uvs_circle (BMesh *bm, float mat[4][4], const float radius, const short oflag, const int cd_loop_uv_offset) |
| void | bmo_create_cone_exec (BMesh *bm, BMOperator *op) |
| void | BM_mesh_calc_uvs_cone (BMesh *bm, float mat[4][4], const float radius_top, const float radius_bottom, const int segments, const bool cap_ends, const short oflag, const int cd_loop_uv_offset) |
| void | bmo_create_cube_exec (BMesh *bm, BMOperator *op) |
| void | BM_mesh_calc_uvs_cube (BMesh *bm, const short oflag) |
Variables | |
| static const float | icovert [12][3] |
| static const short | icoface [20][3] |
| static const float | icouvs [60][2] |
| static const int | monkeyo = 4 |
| static const int | monkeynv = 271 |
| static const int | monkeynf = 250 |
| static const signed char | monkeyv [271][3] |
| static signed char | monkeyf [250][4] |
| static const float | monkeyuvs [] |
Primitive shapes.
Definition in file bmo_primitive.cc.
| #define EDGE_MARK 2 |
Definition at line 710 of file bmo_primitive.cc.
Referenced by bmo_create_icosphere_exec().
| #define EDGE_ORIG 1 |
Definition at line 709 of file bmo_primitive.cc.
Referenced by bmo_create_uvsphere_exec().
| #define FACE_MARK 1 |
Definition at line 712 of file bmo_primitive.cc.
Referenced by bmo_create_cone_exec(), bmo_create_cube_exec(), bmo_create_grid_exec(), and bmo_create_uvsphere_exec().
| #define FACE_NEW 2 |
Definition at line 713 of file bmo_primitive.cc.
Referenced by bmo_create_circle_exec(), and bmo_create_cone_exec().
| #define VERT_MARK 1 |
Definition at line 707 of file bmo_primitive.cc.
Referenced by bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_cube_exec(), bmo_create_grid_exec(), bmo_create_icosphere_exec(), bmo_create_monkey_exec(), and bmo_create_uvsphere_exec().
| #define XY | ( | _x, | |
| _y ) ((_x) + ((_y) * (xtot + 1))) |
Referenced by bmo_create_grid_exec().
| void BM_mesh_calc_uvs_circle | ( | BMesh * | bm, |
| float | mat[4][4], | ||
| float | radius, | ||
| short | oflag, | ||
| int | cd_loop_uv_offset ) |
Fills first available UV-map with 2D projected UVs for all faces with oflag set.
| bm | The BMesh to operate on. |
| mat | The transform matrix applied to the created circle. |
| radius | The size of the circle. |
| oflag | The flag to check faces with. |
Definition at line 1319 of file bmo_primitive.cc.
References BLI_assert, bm, BM_ELEM_CD_GET_FLOAT_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, BMVert::co, copy_v3_v3(), invert_m4_m4(), l, mul_m4_v3(), oflag, and BMLoop::v.
Referenced by bmo_create_circle_exec().
| void BM_mesh_calc_uvs_cone | ( | BMesh * | bm, |
| float | mat[4][4], | ||
| float | radius_top, | ||
| float | radius_bottom, | ||
| int | segments, | ||
| bool | cap_ends, | ||
| short | oflag, | ||
| int | cd_loop_uv_offset ) |
Fills first available UV-map with cylinder/cone-like UVs for all faces with oflag set.
| bm | The BMesh to operate on. |
| mat | The transform matrix applied to the created cone/cylinder. |
| radius_top | The size of the top end of the cone/cylinder. |
| radius_bottom | The size of the bottom end of the cone/cylinder. |
| segments | The number of subdivisions in the sides of the cone/cylinder. |
| cap_ends | Whether the ends of the cone/cylinder are filled or not. |
| oflag | The flag to check faces with. |
Definition at line 1505 of file bmo_primitive.cc.
References BLI_assert, bm, BM_ELEM_CD_GET_FLOAT_P, BM_face_normal_update(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, BMVert::co, dot_v3v3(), float, invert_m4_m4(), l, BMFace::len, mul_mat3_m4_v3(), mul_v3_m4v3(), BMFace::no, normalize_v3(), oflag, BMLoop::v, x, and y.
Referenced by bmo_create_cone_exec().
| void BM_mesh_calc_uvs_cube | ( | BMesh * | bm, |
| short | oflag ) |
Fills first available UV-map with cube-like UVs for all faces with oflag set.
| bm | The BMesh to operate on. |
| oflag | The flag to check faces with. |
Definition at line 1670 of file bmo_primitive.cc.
References BLI_assert, bm, BM_ELEM_CD_GET_FLOAT_P, BM_FACES_OF_MESH, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, CD_PROP_FLOAT2, CustomData_get_offset(), l, BMesh::ldata, oflag, x, and y.
Referenced by bmo_create_cube_exec().
| void BM_mesh_calc_uvs_grid | ( | BMesh * | bm, |
| uint | x_segments, | ||
| uint | y_segments, | ||
| short | oflag, | ||
| int | cd_loop_uv_offset ) |
Fills first available UV-map with grid-like UVs for all faces with oflag set.
| bm | The BMesh to operate on |
| x_segments | The x-resolution of the grid |
| y_segments | The y-resolution of the grid |
| oflag | The flag to check faces with. |
Definition at line 779 of file bmo_primitive.cc.
References BLI_assert, bm, BM_ELEM_CD_GET_FLOAT_P, BM_FACES_OF_MESH, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, float, l, oflag, x, and y.
Referenced by bmo_create_grid_exec().
Fills first available UV-map with spherical projected UVs for all faces with oflag set.
| bm | The BMesh to operate on |
| oflag | The flag to check faces with. |
Definition at line 1114 of file bmo_primitive.cc.
References BLI_assert, bm, BM_ELEM_CD_GET_FLOAT_P, BM_FACES_OF_MESH, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, bm_mesh_calc_uvs_sphere_face(), BMO_face_flag_test, l, and oflag.
Referenced by bmo_create_uvsphere_exec().
Definition at line 1046 of file bmo_primitive.cc.
References atan2f, BLI_assert, BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, BMVert::co, fabsf, float, l, BMFace::len, len, len_v3(), M_PI, safe_acosf(), BMLoop::v, and z().
Referenced by BM_mesh_calc_uvs_sphere().
| void bmo_create_circle_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 1238 of file bmo_primitive.cc.
References bm, BM_CREATE_NOP, BM_edge_create(), BM_face_create_quad_tri(), BM_mesh_calc_uvs_circle(), BM_VERT, BM_vert_create(), BMO_face_flag_enable, BMO_op_callf(), BMO_slot_bool_get(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_float_get(), BMO_slot_int_get(), BMO_slot_mat4_get(), BMO_vert_flag_enable, CD_PROP_FLOAT2, CustomData_get_offset(), FACE_NEW, BMOperator::flag, BMesh::ldata, mul_m4_v3(), sin_cos_from_fraction(), BMOperator::slots_in, BMOperator::slots_out, VERT_MARK, and zero_v3().
| void bmo_create_cone_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 1355 of file bmo_primitive.cc.
References bm, BM_CREATE_NOP, BM_edge_collapse(), BM_face_create_quad_tri(), BM_FACE_FIRST_LOOP, BM_mesh_calc_uvs_cone(), BM_VERT, BM_vert_create(), BM_vert_kill(), BMO_face_flag_enable, BMO_op_callf(), BMO_slot_bool_get(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_float_get(), BMO_slot_int_get(), BMO_slot_mat4_get(), BMO_vert_flag_enable, CD_PROP_FLOAT2, CustomData_get_offset(), BMLoop::e, FACE_MARK, FACE_NEW, BMOperator::flag, l, BMesh::ldata, MEM_freeN(), MEM_mallocN, mul_m4_v3(), BMLoop::next, BMLoop::prev, sin_cos_from_fraction(), sin_phi(), BMOperator::slots_in, BMOperator::slots_out, BMLoop::v, v2, and VERT_MARK.
| void bmo_create_cube_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 1610 of file bmo_primitive.cc.
References ARRAY_SIZE, bm, BM_CREATE_NOP, BM_face_create_verts(), BM_mesh_calc_uvs_cube(), BM_VERT, BM_vert_create(), BMO_face_flag_enable, BMO_slot_bool_get(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_float_get(), BMO_slot_mat4_get(), BMO_vert_flag_enable, CD_PROP_FLOAT2, CustomData_get_offset(), FACE_MARK, float, BMesh::ldata, mul_m4_v3(), quad, BMOperator::slots_in, BMOperator::slots_out, VERT_MARK, verts, and z().
| void bmo_create_grid_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 715 of file bmo_primitive.cc.
References bm, BM_CREATE_NOP, BM_face_create_verts(), BM_mesh_calc_uvs_grid(), BM_vert_create(), BMO_face_flag_enable, BMO_slot_bool_get(), BMO_slot_buffer_alloc(), BMO_slot_float_get(), BMO_slot_get(), BMO_slot_int_get(), BMO_slot_mat4_get(), BMO_vert_flag_enable, BMOpSlot::buf, CD_PROP_FLOAT2, CustomData_get_offset(), BMOpSlot::data, FACE_MARK, BMesh::ldata, max_ii(), mul_v3_m4v3(), BMOperator::slots_in, BMOperator::slots_out, VERT_MARK, x, XY, and y.
| void bmo_create_icosphere_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 955 of file bmo_primitive.cc.
References bm, BM_CREATE_NOP, BM_EDGE, BM_ELEM_CD_GET_FLOAT_P, BM_face_create_quad_tri(), BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_VERT, BM_vert_create(), BM_VERTS_OF_MESH, BMO_edge_flag_enable, BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), BMO_slot_bool_get(), BMO_slot_buffer_flag_enable(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_float_get(), BMO_slot_int_get(), BMO_slot_mat4_get(), BMO_vert_flag_enable, BMO_vert_flag_test, CD_PROP_FLOAT2, BMVert::co, CustomData_get_offset(), BMLoop::e, EDGE_MARK, BMOperator::flag, icoface, icouvs, icovert, l, BMesh::ldata, mul_m4_v3(), BMOperator::slots_in, BMOperator::slots_out, v, v2, and VERT_MARK.
| void bmo_create_monkey_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 1157 of file bmo_primitive.cc.
References bm, BM_CREATE_NOP, BM_ELEM_CD_GET_FLOAT_P, BM_face_create_quad_tri(), BM_ITER_ELEM, BM_LOOPS_OF_FACE, BM_VERT, BM_vert_create(), BMO_slot_bool_get(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_mat4_get(), BMO_vert_flag_enable, CD_PROP_FLOAT2, BMVert::co, CustomData_get_offset(), fabsf, l, BMesh::ldata, MEM_freeN(), MEM_mallocN, monkeyf, monkeynf, monkeynv, monkeyo, monkeyuvs, monkeyv, mul_m4_v3(), BMOperator::slots_in, BMOperator::slots_out, v, and VERT_MARK.
| void bmo_create_uvsphere_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 836 of file bmo_primitive.cc.
References axis_angle_to_mat3(), bm, BM_CREATE_NOP, BM_edge_create(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_calc_uvs_sphere(), BM_VERT, BM_vert_create(), BM_VERTS_OF_MESH, BMO_edge_flag_enable, BMO_face_flag_enable, BMO_op_callf(), BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), BMO_slot_bool_get(), BMO_slot_buffer_flag_enable(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_float_get(), BMO_slot_int_get(), BMO_slot_mat4_get(), BMO_vert_flag_enable, BMO_vert_flag_test, CD_PROP_FLOAT2, BMVert::co, cosf, CustomData_get_offset(), e, EDGE_ORIG, FACE_MARK, BMOperator::flag, float, l, BMesh::ldata, len, len_v3v3(), M_PI, min_ff(), mul_m4_v3(), mul_v3_m3v3(), sin_cos_from_fraction(), sin_phi(), sinf, BMOperator::slots_in, BMOperator::slots_out, BMLoop::v, and VERT_MARK.
|
static |
Definition at line 40 of file bmo_primitive.cc.
Referenced by bmo_create_icosphere_exec().
|
static |
Definition at line 46 of file bmo_primitive.cc.
Referenced by bmo_create_icosphere_exec().
|
static |
Definition at line 25 of file bmo_primitive.cc.
Referenced by bmo_create_icosphere_exec().
|
static |
Definition at line 125 of file bmo_primitive.cc.
Referenced by bmo_create_monkey_exec().
|
static |
Definition at line 66 of file bmo_primitive.cc.
Referenced by bmo_create_monkey_exec().
|
static |
Definition at line 65 of file bmo_primitive.cc.
Referenced by bmo_create_monkey_exec().
|
static |
Definition at line 64 of file bmo_primitive.cc.
Referenced by bmo_create_monkey_exec().
|
static |
Definition at line 212 of file bmo_primitive.cc.
Referenced by bmo_create_monkey_exec().
|
static |
Definition at line 67 of file bmo_primitive.cc.
Referenced by bmo_create_monkey_exec().