143 if (iter_type & (MR_ITER_LEDGE | MR_ITER_LVERT)) {
151 for (
int med_index = 0; med_index < mr->
edge_len; med_index++, med++) {
181 if (iter_type & (MR_ITER_LEDGE | MR_ITER_LVERT)) {
191 if (eve->
e ==
NULL) {
201 if (ede->
l ==
NULL) {
320 const bool is_editmode,
321 const bool is_paint_mode,
322 const bool is_mode_active,
323 const float obmat[4][4],
325 const bool do_uvedit,
358 bool use_mapped = is_mode_active &&
373 #ifdef WITH_FREESTYLE
479 if (vert_coords !=
NULL) {
490 if (vert_normals !=
NULL) {
501 if (poly_normals !=
NULL) {
523 #define EXTRACT_TRIS_LOOPTRI_FOREACH_BM_BEGIN(elem_tri, index_tri, params) \
524 CHECK_TYPE(params, const ExtractTriBMesh_Params *); \
526 const int _tri_index_end = (params)->tri_range[1]; \
527 BMLoop **elem_tri = (params)->looptris[(params)->tri_range[0]]; \
528 for (int index_tri = (params)->tri_range[0]; index_tri < _tri_index_end; \
529 index_tri += 1, elem_tri += 3)
530 #define EXTRACT_TRIS_LOOPTRI_FOREACH_BM_END }
540 #define EXTRACT_TRIS_LOOPTRI_FOREACH_MESH_BEGIN(elem_tri, index_tri, params) \
541 CHECK_TYPE(params, const ExtractTriMesh_Params *); \
543 const int _tri_index_end = (params)->tri_range[1]; \
544 const MLoopTri *elem_tri = &(params)->mlooptri[(params)->tri_range[0]]; \
545 for (int index_tri = (params)->tri_range[0]; index_tri < _tri_index_end; \
546 index_tri += 1, elem_tri += 1)
547 #define EXTRACT_TRIS_LOOPTRI_FOREACH_MESH_END }
563 #define EXTRACT_POLY_FOREACH_BM_BEGIN(elem_poly, index_poly, params, mr) \
564 CHECK_TYPE(params, const ExtractPolyBMesh_Params *); \
566 BLI_assert((mr->bm->elem_table_dirty & BM_FACE) == 0); \
567 BMFace **_ftable = mr->bm->ftable; \
568 const int _poly_index_end = (params)->poly_range[1]; \
569 for (int index_poly = (params)->poly_range[0]; index_poly < _poly_index_end; \
571 BMFace *elem_poly = _ftable[index_poly]; \
574 #define EXTRACT_POLY_FOREACH_BM_END \
579 #define EXTRACT_POLY_AND_LOOP_FOREACH_BM_BEGIN(elem_loop, index_loop, params, mr) \
580 CHECK_TYPE(params, const ExtractPolyBMesh_Params *); \
582 BLI_assert((mr->bm->elem_table_dirty & BM_FACE) == 0); \
583 BMFace **_ftable = mr->bm->ftable; \
584 const int _poly_index_end = (params)->poly_range[1]; \
585 for (int index_poly = (params)->poly_range[0]; index_poly < _poly_index_end; \
587 BMFace *elem_face = _ftable[index_poly]; \
588 BMLoop *elem_loop, *l_first; \
589 elem_loop = l_first = BM_FACE_FIRST_LOOP(elem_face); \
591 const int index_loop = BM_elem_index_get(elem_loop); \
594 #define EXTRACT_POLY_AND_LOOP_FOREACH_BM_END(elem_loop) \
596 while ((elem_loop = elem_loop->next) != l_first) \
608 #define EXTRACT_POLY_FOREACH_MESH_BEGIN(elem_poly, index_poly, params, mr) \
609 CHECK_TYPE(params, const ExtractPolyMesh_Params *); \
611 const MPoly *_mpoly = mr->mpoly; \
612 const int _poly_index_end = (params)->poly_range[1]; \
613 for (int index_poly = (params)->poly_range[0]; index_poly < _poly_index_end; \
615 const MPoly *elem_poly = &_mpoly[index_poly]; \
618 #define EXTRACT_POLY_FOREACH_MESH_END \
623 #define EXTRACT_POLY_AND_LOOP_FOREACH_MESH_BEGIN( \
624 elem_poly, index_poly, elem_loop, index_loop, params, mr) \
625 CHECK_TYPE(params, const ExtractPolyMesh_Params *); \
627 const MPoly *_mpoly = mr->mpoly; \
628 const MLoop *_mloop = mr->mloop; \
629 const int _poly_index_end = (params)->poly_range[1]; \
630 for (int index_poly = (params)->poly_range[0]; index_poly < _poly_index_end; \
632 const MPoly *elem_poly = &_mpoly[index_poly]; \
633 const int _index_end = elem_poly->loopstart + elem_poly->totloop; \
634 for (int index_loop = elem_poly->loopstart; index_loop < _index_end; index_loop += 1) { \
635 const MLoop *elem_loop = &_mloop[index_loop]; \
638 #define EXTRACT_POLY_AND_LOOP_FOREACH_MESH_END \
657 #define EXTRACT_LEDGE_FOREACH_BM_BEGIN(elem_edge, index_ledge, params) \
658 CHECK_TYPE(params, const ExtractLEdgeBMesh_Params *); \
660 BLI_assert((mr->bm->elem_table_dirty & BM_EDGE) == 0); \
661 BMEdge **_etable = mr->bm->etable; \
662 const int *_ledge = (params)->ledge; \
663 const int _ledge_index_end = (params)->ledge_range[1]; \
664 for (int index_ledge = (params)->ledge_range[0]; index_ledge < _ledge_index_end; \
665 index_ledge += 1) { \
666 BMEdge *elem_edge = _etable[_ledge[index_ledge]]; \
669 #define EXTRACT_LEDGE_FOREACH_BM_END \
682 #define EXTRACT_LEDGE_FOREACH_MESH_BEGIN(elem_edge, index_ledge, params, mr) \
683 CHECK_TYPE(params, const ExtractLEdgeMesh_Params *); \
685 const MEdge *_medge = mr->medge; \
686 const int *_ledge = (params)->ledge; \
687 const int _ledge_index_end = (params)->ledge_range[1]; \
688 for (int index_ledge = (params)->ledge_range[0]; index_ledge < _ledge_index_end; \
689 index_ledge += 1) { \
690 const MEdge *elem_edge = &_medge[_ledge[index_ledge]]; \
693 #define EXTRACT_LEDGE_FOREACH_MESH_END \
712 #define EXTRACT_LVERT_FOREACH_BM_BEGIN(elem_vert, index_lvert, params) \
713 CHECK_TYPE(params, const ExtractLVertBMesh_Params *); \
715 BLI_assert((mr->bm->elem_table_dirty & BM_FACE) == 0); \
716 BMVert **vtable = mr->bm->vtable; \
717 const int *lverts = (params)->lvert; \
718 const int _lvert_index_end = (params)->lvert_range[1]; \
719 for (int index_lvert = (params)->lvert_range[0]; index_lvert < _lvert_index_end; \
720 index_lvert += 1) { \
721 BMVert *elem_vert = vtable[lverts[index_lvert]]; \
724 #define EXTRACT_LVERT_FOREACH_BM_END \
737 #define EXTRACT_LVERT_FOREACH_MESH_BEGIN(elem, index_lvert, params, mr) \
738 CHECK_TYPE(params, const ExtractLVertMesh_Params *); \
740 const MVert *mvert = mr->mvert; \
741 const int *lverts = (params)->lvert; \
742 const int _lvert_index_end = (params)->lvert_range[1]; \
743 for (int index_lvert = (params)->lvert_range[0]; index_lvert < _lvert_index_end; \
744 index_lvert += 1) { \
745 const MVert *elem = &mvert[lverts[index_lvert]]; \
748 #define EXTRACT_LVERT_FOREACH_MESH_END \
815 size_t mat_tri_idx_size =
sizeof(int) * mr->
mat_len;
819 int *mat_tri_len =
data->tri_mat_start;
827 mat_tri_len[mat] += efa->
len - 2;
833 for (
int mp_index = 0; mp_index < mr->
poly_len; mp_index++, mp++) {
836 mat_tri_len[mat] += mp->
totloop - 2;
841 int ofs = mat_tri_len[0];
843 for (
int i = 1; i < mr->
mat_len; i++) {
844 int tmp = mat_tri_len[i];
845 mat_tri_len[i] = ofs;
849 memcpy(
data->tri_mat_end, mat_tri_len, mat_tri_idx_size);
851 int visible_tri_tot = ofs;
862 const int mat_last = mr->
mat_len - 1;
866 int *mat_tri_ofs =
data->tri_mat_end;
867 const int mat =
min_ii(elt[0]->f->mat_nr, mat_last);
883 const int mat_last = mr->
mat_len - 1;
888 int *mat_tri_ofs =
data->tri_mat_end;
891 &
data->elb, mat_tri_ofs[mat]++, mlt->tri[0], mlt->tri[1], mlt->tri[2]);
909 for (
int i = 0; i < mr->
mat_len; i++) {
916 const int mat_start =
data->tri_mat_start[i];
917 const int mat_end =
data->tri_mat_end[i];
918 const int start = mat_start * 3;
919 const int len = (mat_end - mat_start) * 3;
934 .use_threading =
false,
974 }
while ((l_iter = l_iter->
next) != l_first);
989 const int ml_index_last = mp->loopstart + (mp->totloop - 1);
990 int ml_index = ml_index_last, ml_index_next = mp->loopstart;
992 const MLoop *ml = &mloop[ml_index];
993 const MEdge *med = &medge[ml->
e];
1002 }
while ((ml_index = ml_index_next++) != ml_index_last);
1009 const int ml_index_last = mp->loopstart + (mp->totloop - 1);
1010 int ml_index = ml_index_last, ml_index_next = mp->loopstart;
1012 const MLoop *ml = &mloop[ml_index];
1014 }
while ((ml_index = ml_index_next++) != ml_index_last);
1026 const int l_index_offset = mr->
edge_len + ledge_index;
1028 const int l_index = mr->
loop_len + ledge_index * 2;
1046 const int l_index_offset = mr->
edge_len + ledge_index;
1047 const int e_index = mr->
ledges[ledge_index];
1051 const int l_index = mr->
loop_len + ledge_index * 2;
1080 .use_threading =
false,
1092 const int start = mr->
edge_len * 2;
1117 .use_threading =
false,
1251 .use_threading =
false,
1332 .use_threading =
false,
1364 const int e_index = ml->e;
1370 const int ml_index_last = mp->totloop + mp->loopstart - 1;
1371 const int ml_index_other = (ml_index == ml_index_last) ? mp->loopstart : (ml_index + 1);
1411 .use_threading =
false,
1420 #define NO_EDGE INT_MAX
1439 size_t vert_to_loop_size =
sizeof(
uint) * mr->
vert_len;
1444 data->is_manifold =
true;
1453 for (
int e = 0;
e < 3;
e++) {
1457 bool inv_indices = (
v2 > v3);
1461 if (!value_is_init || v_data ==
NO_EDGE) {
1464 int value = (int)l1 + 1;
1467 data->vert_to_loop[
v2] = l2;
1468 data->vert_to_loop[v3] = l3;
1473 bool inv_opposite = (v_data < 0);
1476 if (inv_opposite == inv_indices) {
1480 data->is_manifold =
false;
1517 mr->
mloop[mlt->tri[1]].
v,
1518 mr->
mloop[mlt->tri[2]].
v,
1545 l2 =
data->vert_to_loop[
v2];
1546 l3 =
data->vert_to_loop[v3];
1548 data->is_manifold =
false;
1568 .use_threading =
false,
1595 if (!hidden && (
data->sync_selection || selected)) {
1649 .use_threading =
false,
1672 if (!hidden && (
data->sync_selection || selected)) {
1698 const int ml_index_last = mp->totloop + mp->loopstart - 1;
1699 const int ml_index_next = (ml_index == ml_index_last) ? mp->loopstart : (ml_index + 1);
1702 (mp->flag &
ME_HIDE) != 0 || !real_edge,
1726 .use_threading =
false,
1751 if (!hidden && (
data->sync_selection || selected)) {
1800 .use_threading =
false,
1825 if (!hidden && (
data->sync_selection || selected)) {
1858 ((mp->flag &
ME_HIDE) != 0) || !real_fdot || !subd_fdot,
1870 ((mp->flag &
ME_HIDE) != 0) || !real_fdot,
1894 .use_threading =
false,
1918 if (
format.attr_len == 0) {
1977 vert->
nor =
data->normals[ml->v].low;
2001 int l_index = mr->
loop_len + ledge_index * 2;
2018 const int ml_index = mr->
loop_len + ledge_index * 2;
2022 vert[0].
nor =
data->normals[med->v1].low;
2023 vert[1].
nor =
data->normals[med->v2].low;
2036 const int l_index = offset + lvert_index;
2052 const int ml_index = offset + lvert_index;
2053 const int v_index = mr->
lverts[lvert_index];
2056 vert->
nor =
data->normals[v_index].low;
2079 .use_threading =
true,
2102 if (
format.attr_len == 0) {
2187 int l_index = mr->
loop_len + ledge_index * 2;
2206 const int ml_index = mr->
loop_len + ledge_index * 2;
2226 const int l_index = offset + lvert_index;
2243 const int ml_index = offset + lvert_index;
2244 const int v_index = mr->
lverts[lvert_index];
2271 .use_threading =
true,
2288 if (
format.attr_len == 0) {
2363 .use_threading =
true,
2376 if (
format.attr_len == 0) {
2455 .use_threading =
true,
2475 uv_layers |= (1 << layer);
2480 if (uv_layers & (1 << i)) {
2486 BLI_snprintf(attr_name,
sizeof(attr_name),
"u%s", attr_safe_name);
2489 BLI_snprintf(attr_name,
sizeof(attr_name),
"a%s", attr_safe_name);
2509 if (
format.attr_len == 0) {
2521 if (uv_layers & (1 << i)) {
2527 BMLoop *l_iter, *l_first;
2531 memcpy(uv_data, luv->
uv,
sizeof(*uv_data));
2533 }
while ((l_iter = l_iter->
next) != l_first);
2538 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++, uv_data++, layer_data++) {
2539 memcpy(uv_data, layer_data->
uv,
sizeof(*uv_data));
2551 .use_threading =
false,
2575 bool orco_allocated =
false;
2582 if (tan_layers & (1 << i)) {
2587 BLI_snprintf(attr_name,
sizeof(attr_name),
"t%s", attr_safe_name);
2601 if (use_orco_tan && orco ==
NULL) {
2603 orco_allocated =
true;
2627 if (tan_len != 0 || use_orco_tan) {
2628 short tangent_mask = 0;
2629 bool calc_active_tangent =
false;
2632 calc_active_tangent,
2650 calc_active_tangent,
2666 BLI_snprintf(attr_name,
sizeof(*attr_name),
"t%s", attr_safe_name);
2672 if (orco_allocated) {
2677 if (
format.attr_len == 0) {
2688 for (
int i = 0; i < tan_len; i++) {
2689 const char *name = tangent_names[i];
2692 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++) {
2694 (*tan_data)[3] = (layer_data[ml_index][3] > 0.0f) ? SHRT_MAX : SHRT_MIN;
2700 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++) {
2702 (*tan_data)[3] = (layer_data[ml_index][3] > 0.0f) ? SHRT_MAX : SHRT_MIN;
2709 for (
int i = 0; i < tan_len; i++) {
2710 const char *name = tangent_names[i];
2713 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++) {
2715 tan_data->
w = (layer_data[ml_index][3] > 0.0f) ? 1 : -2;
2721 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++) {
2723 tan_data->
w = (layer_data[ml_index][3] > 0.0f) ? 1 : -2;
2741 .use_threading =
false,
2759 .use_threading =
false,
2781 if (
format.attr_len == 0) {
2790 typedef struct gpuSculptData {
2804 BMLoop *l_iter, *l_first;
2807 float v_mask = 0.0f;
2811 vbo_data->mask = v_mask;
2812 uchar face_set_color[4] = {UCHAR_MAX, UCHAR_MAX, UCHAR_MAX, UCHAR_MAX};
2822 }
while ((l_iter = l_iter->
next) != l_first);
2827 for (
int mp_index = 0; mp_index < mr->
poly_len; mp_index++) {
2830 float v_mask = 0.0f;
2832 v_mask = cd_mask[loops[mp_loop].
v];
2834 vbo_data->mask = v_mask;
2836 uchar face_set_color[4] = {UCHAR_MAX, UCHAR_MAX, UCHAR_MAX, UCHAR_MAX};
2838 const int face_set_id = cd_face_set[mp_index];
2859 .use_threading =
false,
2878 for (
int i = 0; i <
MAX_MCOL; i++) {
2879 if (vcol_layers & (1 << i)) {
2884 BLI_snprintf(attr_name,
sizeof(attr_name),
"c%s", attr_safe_name);
2898 BLI_snprintf(attr_name,
sizeof(attr_name),
"a%s", attr_safe_name);
2905 if (
U.experimental.use_sculpt_vertex_colors) {
2906 for (
int i = 0; i < 8; i++) {
2907 if (svcol_layers & (1 << i)) {
2912 BLI_snprintf(attr_name,
sizeof(attr_name),
"c%s", attr_safe_name);
2924 BLI_snprintf(attr_name,
sizeof(attr_name),
"a%s", attr_safe_name);
2935 typedef struct gpuMeshVcol {
2942 for (
int i = 0; i <
MAX_MCOL; i++) {
2943 if (vcol_layers & (1 << i)) {
2949 BMLoop *l_iter, *l_first;
2958 }
while ((l_iter = l_iter->
next) != l_first);
2963 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++, mloopcol++, vcol_data++) {
2972 if (svcol_layers & (1 << i) &&
U.experimental.use_sculpt_vertex_colors) {
2978 BMLoop *l_iter, *l_first;
2987 }
while ((l_iter = l_iter->
next) != l_first);
2992 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++, vcol_data++) {
3007 .use_threading =
false,
3026 if (
format.attr_len == 0) {
3055 float *loop_orco = orco_data->
vbo_data[l_index];
3069 float *loop_orco = orco_data->
vbo_data[ml_index];
3090 .use_threading =
true,
3108 const float v_co[3],
3109 const float v_no[3],
3110 const float v_next_co[3])
3112 float enor[3], evec[3];
3118 d *= (1.0f / 0.065f);
3119 CLAMP(d, 0.0f, 1.0f);
3128 if (
format.attr_len == 0) {
3144 for (
int e_index = 0; e_index < mr->
edge_len; e_index++, med++) {
3146 data->use_edge_render =
true;
3154 data->use_edge_render =
true;
3173 data->vbo_data[l_index] = ratio * 253 + 1;
3176 data->vbo_data[l_index] = 255;
3188 if (
data->use_edge_render) {
3200 if (
data->edge_loop_count[ml->e] < 3) {
3201 data->edge_loop_count[ml->e]++;
3203 if (
data->edge_loop_count[ml->e] == 2) {
3205 const int ml_index_last = mp->totloop + mp->loopstart - 1;
3206 const int ml_index_other = (ml_index == ml_index_last) ? mp->loopstart : (ml_index + 1);
3207 const MLoop *ml_next = &mr->
mloop[ml_index_other];
3213 data->vbo_data[ml_index] = ratio * 253 + 1;
3217 data->vbo_data[ml_index] = 255;
3231 data->vbo_data[mr->
loop_len + (ledge_index * 2) + 0] = 255;
3232 data->vbo_data[mr->
loop_len + (ledge_index * 2) + 1] = 255;
3244 data->vbo_data[mr->
loop_len + ledge_index * 2 + 0] = 255;
3245 data->vbo_data[mr->
loop_len + ledge_index * 2 + 1] = 255;
3263 if (
format.attr_len == 0) {
3275 for (
int ml_index = 0; ml_index < buf_len; ml_index++, fdata++) {
3276 *fdata =
data->vbo_data[ml_index] / 255.0f;
3292 .use_threading =
false,
3313 if (dvert ==
NULL) {
3328 if (input == 0.0f) {
3336 if (input == 0.0f) {
3356 CLAMP(input, 0.0f, 1.0f);
3365 if (
format.attr_len == 0) {
3376 if (
data->wstate->defgroup_active == -1) {
3397 if (
data->cd_ofs != -1) {
3451 .use_threading =
true,
3486 #ifdef WITH_FREESTYLE
3525 if (is_face_only_select_mode) {
3547 #ifdef WITH_FREESTYLE
3603 if (
format.attr_len == 0) {
3661 memset(
data, 0x0,
sizeof(*
data) * 2);
3677 memset(
data, 0x0,
sizeof(*
data) * 2);
3678 const int e_index = mr->
ledges[ledge_index];
3719 const int v_index = mr->
lverts[lvert_index];
3737 .use_threading =
true,
3756 if (
format.attr_len == 0) {
3782 memset(eldata, 0x0,
sizeof(*eldata));
3798 memset(eldata, 0x0,
sizeof(*eldata));
3813 const int ml_index_last = mp->loopstart + mp->totloop - 1;
3814 const int l_prev = (ml_index == mp->loopstart) ? ml_index_last : (ml_index - 1);
3843 .use_threading =
true,
3857 if (
format.attr_len == 0) {
3870 if (
area >= FLT_EPSILON && uvarea >= FLT_EPSILON) {
3872 return (
area > uvarea) ? (uvarea /
area) : -(
area / uvarea);
3879 ratio *= (ratio > 0.0f) ? tot_ratio : -inv_tot_ratio;
3880 return (ratio > 1.0f) ? (1.0f / ratio) : ratio;
3888 float tot_area = 0.0f, tot_uv_area = 0.0f;
3902 tot_uv_area += uvarea;
3910 for (
int mp_index = 0; mp_index < mr->
poly_len; mp_index++, mp++) {
3914 tot_uv_area += uvarea;
3924 for (
int mp_index = 0; mp_index < mr->
poly_len; mp_index++) {
3925 poly_stretch[mp_index] = area_ratio[mp_index] * SHRT_MAX;
3937 for (
int i = 0; i < efa->
len; i++, l_index++) {
3938 loop_stretch[l_index] = poly_stretch[f];
3945 for (
int mp_index = 0, l_index = 0; mp_index < mr->
poly_len; mp_index++, mp++) {
3946 for (
int i = 0; i < mp->
totloop; i++, l_index++) {
3947 loop_stretch[l_index] = poly_stretch[mp_index];
3959 .use_threading =
false,
3984 const float uv_prev[2],
3986 const float co_prev[3])
4005 const float av[2][3],
4018 return 1.0f -
pow2f(1.0f - stretch);
4027 if (
format.attr_len == 0) {
4060 const MLoopUV *luv, *luv_next;
4108 int l_next = ml_index + 1, ml_index_end = mp->loopstart + mp->totloop;
4110 if (ml_index == mp->loopstart) {
4112 const int ml_index_last = ml_index_end - 1;
4113 const int l_next_tmp = mp->loopstart;
4117 auv, av,
data->luv[ml_index_last].uv,
data->luv[l_next_tmp].uv,
v->
co, v_next->
co);
4122 if (l_next == ml_index_end) {
4123 l_next = mp->loopstart;
4135 auv, av,
data->luv[ml_index].uv,
data->luv[l_next].uv,
v->
co, v_next->
co);
4156 .use_threading =
false,
4170 if (
format.attr_len == 0) {
4188 v[axis - 3] = -1.0f;
4197 else if (fac >
max) {
4201 fac = (fac -
min) * minmax_irange;
4203 CLAMP(fac, 0.0f, 1.0f);
4219 const float minmax_irange = 1.0f / (
max -
min);
4234 for (
int i = 0; i < f->
len; i++, l_index++) {
4235 r_overhang[l_index] = fac;
4241 for (
int mp_index = 0, l_index = 0; mp_index < mr->
poly_len; mp_index++, mp++) {
4244 for (
int i = 0; i < mp->
totloop; i++, l_index++) {
4245 r_overhang[l_index] = fac;
4258 if (uv[0] + uv[1] > 1.0f) {
4259 uv[0] = 1.0f - uv[0];
4260 uv[1] = 1.0f - uv[1];
4270 fac = (fac -
min) * minmax_irange;
4272 CLAMP(fac, 0.0f, 1.0f);
4282 const float eps_offset = 0.00002f;
4290 const float minmax_irange = 1.0f / (
max -
min);
4292 float jit_ofs[32][2];
4299 for (
int j = 0; j < samples; j++) {
4308 struct BMLoop *(*looptris)[3] = em->looptris;
4309 for (
int i = 0; i < mr->
tri_len; i++) {
4310 BMLoop **ltri = looptris[i];
4312 const float *
cos[3] = {
4322 for (
int j = 0; j < samples; j++) {
4323 float dist = face_dists[index];
4328 if (f_hit && dist < face_dists[index]) {
4329 float angle_fac =
fabsf(
4331 angle_fac = 1.0f - angle_fac;
4332 angle_fac = angle_fac * angle_fac * angle_fac;
4333 angle_fac = 1.0f - angle_fac;
4335 if (dist < face_dists[index]) {
4336 face_dists[index] = dist;
4349 for (
int i = 0; i <
f->
len; i++, l_index++) {
4350 r_thickness[l_index] = fac;
4359 for (
int i = 0; i < mr->
tri_len; i++, mlooptri++) {
4360 const int index = mlooptri->
poly;
4369 for (
int j = 0; j < samples; j++) {
4375 hit.
dist = face_dists[index];
4378 hit.
dist < face_dists[index]) {
4380 angle_fac = 1.0f - angle_fac;
4381 angle_fac = angle_fac * angle_fac * angle_fac;
4382 angle_fac = 1.0f - angle_fac;
4383 hit.
dist /= angle_fac;
4384 if (hit.
dist < face_dists[index]) {
4385 face_dists[index] = hit.
dist;
4392 for (
int mp_index = 0, l_index = 0; mp_index < mr->
poly_len; mp_index++, mp++) {
4393 float fac = face_dists[mp_index];
4395 for (
int i = 0; i < mp->
totloop; i++, l_index++) {
4396 r_thickness[l_index] = fac;
4426 float ix_pair[2][3];
4427 int verts_shared = 0;
4433 if (verts_shared >= 2) {
4446 for (
int l_index = 0; l_index < mr->
loop_len; l_index++) {
4447 r_intersect[l_index] = -1.0f;
4460 for (
int i = 0; i < overlap_len; i++) {
4461 BMFace *f_hit_pair[2] = {
4465 for (
int j = 0; j < 2; j++) {
4466 BMFace *f_hit = f_hit_pair[j];
4469 for (
int k = 0; k < f_hit->
len; k++, l_index++) {
4470 r_intersect[l_index] = 1.0f;
4490 for (
int i = 0; i < overlap_len; i++) {
4491 const MPoly *f_hit_pair[2] = {
4495 for (
int j = 0; j < 2; j++) {
4496 const MPoly *f_hit = f_hit_pair[j];
4498 for (
int k = 0; k < f_hit->
totloop; k++, l_index++) {
4499 r_intersect[l_index] = 1.0f;
4511 fac = (fac -
min) * minmax_irange;
4512 CLAMP(fac, 0.0f, 1.0f);
4527 const float minmax_irange = 1.0f / (
max -
min);
4548 BMLoop *l_iter, *l_first;
4553 const float *no_face;
4565 if (
dot_v3v3(no_face, no_corner) < 0.0f) {
4570 }
while ((l_iter = l_iter->
next) != l_first);
4575 for (
int i = 0; i < f->
len; i++, l_index++) {
4576 r_distort[l_index] = fac;
4582 for (
int mp_index = 0, l_index = 0; mp_index < mr->
poly_len; mp_index++, mp++) {
4589 for (
int i = 1; i <= mp->
totloop; i++) {
4599 if (
dot_v3v3(f_no, no_corner) < 0.0f) {
4608 for (
int i = 0; i < mp->
totloop; i++, l_index++) {
4609 r_distort[l_index] = fac;
4619 fac = (fac -
min) * minmax_irange;
4620 CLAMP(fac, 0.0f, 1.0f);
4635 const float minmax_irange = 1.0f / (
max -
min);
4656 BMLoop *l_iter, *l_first;
4662 }
while ((l_iter = l_iter->
next) != l_first);
4671 for (
int mp_index = 0; mp_index < mr->
poly_len; mp_index++, mp++) {
4672 for (
int i = 0; i < mp->
totloop; i++) {
4680 if (!value_is_init) {
4685 if (*pval !=
NULL) {
4687 const float *f2_no = *pval;
4697 float *col1 = &vert_angles[l_curr->
v];
4698 float *col2 = &vert_angles[l_next->v];
4710 float *col1 = &vert_angles[
v1];
4711 float *col2 = &vert_angles[
v2];
4720 for (
int l_index = 0; l_index < mr->
loop_len; l_index++, ml++) {
4763 .use_threading =
false,
4777 if (
format.attr_len == 0) {
4794 float *co =
center[f_index];
4797 BMLoop *l_iter, *l_first;
4801 }
while ((l_iter = l_iter->
next) != l_first);
4828 float *co =
center[mp_index];
4831 const MLoop *ml = &mloop[mp->loopstart];
4832 for (
int i = 0; i < mp->totloop; i++, ml++) {
4836 mul_v3_fl(co, 1.0f / (
float)mp->totloop);
4847 .use_threading =
true,
4855 #define NOR_AND_FLAG_DEFAULT 0
4856 #define NOR_AND_FLAG_SELECT 1
4857 #define NOR_AND_FLAG_ACTIVE -1
4858 #define NOR_AND_FLAG_HIDDEN -2
4865 if (
format.attr_len == 0) {
4880 static float invalid_normal[3] = {0.0f, 0.0f, 0.0f};
4887 for (
int f = 0; f < mr->
poly_len; f++) {
4905 for (
int f = 0; f < mr->
poly_len; f++) {
4928 .use_threading =
false,
4941 if (
format.attr_len == 0) {
4956 static float invalid_normal[3] = {0.0f, 0.0f, 0.0f};
4963 for (
int f = 0; f < mr->
poly_len; f++) {
4981 for (
int f = 0; f < mr->
poly_len; f++) {
5004 .use_threading =
false,
5024 if (
format.attr_len == 0) {
5082 float w = 1.0f / (
float)mp->totloop;
5103 .use_threading =
true,
5121 if (
format.attr_len == 0) {
5142 memset(eldata, 0x0,
sizeof(*eldata));
5156 memset(eldata, 0x0,
sizeof(*eldata));
5179 .use_threading =
true,
5200 if (
format.attr_len == 0) {
5234 .use_threading =
false,
5248 if (
format.attr_len == 0) {
5371 const int e_index = mr->
ledges[ledge_index];
5400 const int v_index = mr->
lverts[lvert_index];
5412 .use_threading =
true,
5422 .use_threading =
true,
5434 .use_threading =
true,
5442 if (
format.attr_len == 0) {
5488 .use_threading =
true,
5530 taskdata->
cache = cache;
5532 taskdata->
buf = buf;
5543 taskdata->
start = 0;
5544 taskdata->
end = INT_MAX;
5554 taskdata->
cache = cache;
5574 if (iter_type & MR_ITER_LOOPTRI) {
5582 if (iter_type & MR_ITER_POLY) {
5589 if (iter_type & MR_ITER_LEDGE) {
5597 if (iter_type & MR_ITER_LVERT) {
5608 if (iter_type & MR_ITER_LOOPTRI) {
5609 extract->iter_looptri_mesh(mr,
5616 if (iter_type & MR_ITER_POLY) {
5623 if (iter_type & MR_ITER_LEDGE) {
5631 if (iter_type & MR_ITER_LVERT) {
5659 data->user_data->user_data);
5663 if (remainin_tasks == 0 &&
data->extract->finish !=
NULL) {
5812 struct TaskNode *task_node_user_data_init,
5821 taskdata->
start = start;
5829 struct TaskNode *task_node_mesh_render_data,
5830 struct TaskNode *task_node_user_data_init,
5831 ListBase *single_threaded_task_datas,
5832 ListBase *user_data_init_task_datas,
5843 if (do_hq_normals) {
5860 mr, cache,
extract, buf, task_counter);
5863 const int chunk_size = 8192;
5865 if (use_thread &&
extract->use_threading) {
5868 if (taskdata->
iter_type & MR_ITER_LOOPTRI) {
5869 for (
int i = 0; i < mr->
tri_len; i += chunk_size) {
5871 task_graph, task_node_user_data_init, taskdata, MR_ITER_LOOPTRI, i, chunk_size);
5874 if (taskdata->
iter_type & MR_ITER_POLY) {
5875 for (
int i = 0; i < mr->
poly_len; i += chunk_size) {
5877 task_graph, task_node_user_data_init, taskdata, MR_ITER_POLY, i, chunk_size);
5880 if (taskdata->
iter_type & MR_ITER_LEDGE) {
5883 task_graph, task_node_user_data_init, taskdata, MR_ITER_LEDGE, i, chunk_size);
5886 if (taskdata->
iter_type & MR_ITER_LVERT) {
5889 task_graph, task_node_user_data_init, taskdata, MR_ITER_LVERT, i, chunk_size);
5894 else if (use_thread) {
5904 BLI_addtail(single_threaded_task_datas, taskdata);
5913 const bool is_editmode,
5914 const bool is_paint_mode,
5915 const bool is_mode_active,
5916 const float obmat[4][4],
5917 const bool do_final,
5918 const bool do_uvedit,
5919 const bool use_subsurf_fdots,
5923 const bool use_hide)
5960 #define TEST_ASSIGN(type, type_lowercase, name) \
5962 if (DRW_TEST_ASSIGN_##type(mbc.type_lowercase.name)) { \
5963 iter_flag |= mesh_extract_iter_type(&extract_##name); \
5964 data_flag |= extract_##name.data_flag; \
6003 if (do_lines_loose_subbuffer) {
6004 iter_flag |= MR_ITER_LEDGE;
6032 size_t counters_size = (
sizeof(mbc) /
sizeof(
void *)) *
sizeof(
int32_t);
6034 int counter_used = 0;
6037 task_graph, mr, iter_flag, data_flag);
6044 task_graph, user_data_init_task_data);
6046 #define EXTRACT(buf, name) \
6047 if (mbc.buf.name) { \
6048 extract_task_create(task_graph, \
6049 task_node_mesh_render_data, \
6050 task_node_user_data_init, \
6051 &single_threaded_task_data->task_datas, \
6052 &user_data_init_task_data->task_datas, \
6058 &task_counters[counter_used++]); \
6073 EXTRACT(vbo, edituv_stretch_area);
6074 EXTRACT(vbo, edituv_stretch_angle);
6079 EXTRACT(vbo, fdots_edituv_data);
6090 const MeshExtract *lines_extractor = do_lines_loose_subbuffer ?
6094 task_node_mesh_render_data,
6095 task_node_user_data_init,
6103 &task_counters[counter_used++]);
6106 if (do_lines_loose_subbuffer) {
6113 EXTRACT(ibo, lines_paint_mask);
6114 EXTRACT(ibo, lines_adjacency);
6129 task_graph, single_threaded_task_data);
6145 static double avg = 0;
6146 static double avg_fps = 0;
6147 static double avg_rdata = 0;
6148 static double end_prev = 0;
6150 if (end_prev == 0) {
6154 avg = avg * 0.95 + (end - rdata_end) * 0.05;
6155 avg_fps = avg_fps * 0.95 + (end - end_prev) * 0.05;
6156 avg_rdata = avg_rdata * 0.95 + (rdata_end - rdata_start) * 0.05;
6159 "rdata %.0fms iter %.0fms (frame %.0fms)\n", avg_rdata * 1000, avg * 1000, avg_fps * 1000);
typedef float(TangentPoint)[2]
BVHTree * BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, struct Mesh *mesh, const BVHCacheType bvh_cache_type, const int tree_type)
CustomData interface, see also DNA_customdata_types.h.
void CustomData_free(struct CustomData *data, int totelem)
const char * CustomData_get_layer_name(const struct CustomData *data, int type, int n)
int CustomData_get_named_layer_index(const struct CustomData *data, int type, const char *name)
int CustomData_get_active_layer(const struct CustomData *data, int type)
void * CustomData_get_layer_named(const struct CustomData *data, int type, const char *name)
int CustomData_get_stencil_layer(const struct CustomData *data, int type)
void * CustomData_get_layer_n(const struct CustomData *data, int type, int n)
void * CustomData_get_layer(const struct CustomData *data, int type)
int CustomData_get_n_offset(const struct CustomData *data, int type, int n)
int CustomData_get_offset(const struct CustomData *data, int type)
void CustomData_reset(struct CustomData *data)
int CustomData_get_render_layer(const struct CustomData *data, int type)
struct BMFace * BKE_bmbvh_ray_cast(BMBVHTree *tree, const float co[3], const float dir[3], const float radius, float *r_dist, float r_hitout[3], float r_cagehit[3])
void BKE_bmbvh_free(BMBVHTree *tree)
BMBVHTree * BKE_bmbvh_new_from_editmesh(struct BMEditMesh *em, int flag, const float(*cos_cage)[3], const bool cos_cage_free)
struct BVHTreeOverlap * BKE_bmbvh_overlap_self(const BMBVHTree *bmtree, unsigned int *r_overlap_tot)
void BKE_editmesh_cache_ensure_vert_normals(struct BMEditMesh *em, struct EditMeshData *emd)
void BKE_editmesh_cache_ensure_poly_normals(struct BMEditMesh *em, struct EditMeshData *emd)
void BKE_editmesh_loop_tangent_calc(BMEditMesh *em, bool calc_active_tangent, const char(*tangent_names)[MAX_NAME], int tangent_names_len, const float(*poly_normals)[3], const float(*loop_normals)[3], const float(*vert_orco)[3], CustomData *dm_loopdata_out, const uint dm_loopdata_out_len, short *tangent_mask_curr_p)
void BKE_mesh_recalc_looptri(const struct MLoop *mloop, const struct MPoly *mpoly, const struct MVert *mvert, int totloop, int totpoly, struct MLoopTri *mlooptri)
void BKE_mesh_orco_verts_transform(struct Mesh *me, float(*orco)[3], int totvert, int invert)
void BKE_mesh_normals_loop_split(const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, float(*r_loopnors)[3], const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, const bool use_split_normals, const float split_angle, MLoopNorSpaceArray *r_lnors_spacearr, short(*clnors_data)[2], int *r_loop_to_poly)
float BKE_mesh_calc_poly_uv_area(const struct MPoly *mpoly, const struct MLoopUV *uv_array)
float BKE_mesh_calc_poly_area(const struct MPoly *mpoly, const struct MLoop *loopstart, const struct MVert *mvarray)
void BKE_mesh_calc_normals_poly(struct MVert *mverts, float(*r_vertnors)[3], int numVerts, const struct MLoop *mloop, const struct MPoly *mpolys, int numLoops, int numPolys, float(*r_polyNors)[3], const bool only_face_normals)
void BKE_mesh_calc_loop_tangent_ex(const struct MVert *mvert, const struct MPoly *mpoly, const uint mpoly_len, const struct MLoop *mloop, const struct MLoopTri *looptri, const uint looptri_len, struct CustomData *loopdata, bool calc_active_tangent, const char(*tangent_names)[64], int tangent_names_len, const float(*poly_normals)[3], const float(*loop_normals)[3], const float(*vert_orco)[3], struct CustomData *loopdata_out, const uint loopdata_out_len, short *tangent_mask_curr_p)
void BKE_paint_face_set_overlay_color_get(const int face_set, const int seed, uchar r_color[4])
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
#define BLI_BITMAP_SIZE(_tot)
#define BLI_BITMAP_NEW(_tot, _alloc_string)
#define BLI_BITMAP_TEST_AND_SET_ATOMIC(_bitmap, _index)
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP free_value)
BLI_INLINE void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *r_v0, unsigned int *r_v1)
BLI_INLINE bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi)
EdgeHash * BLI_edgehash_new_ex(const char *info, const unsigned int nentries_reserve)
EdgeHashIterator * BLI_edgehashIterator_new(EdgeHash *eh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_edgehash_ensure_p(EdgeHash *eh, unsigned int v0, unsigned int v1, void ***r_val) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void BLI_edgehashIterator_step(EdgeHashIterator *ehi)
void BLI_edgehashIterator_free(EdgeHashIterator *ehi)
BLI_INLINE void * BLI_edgehashIterator_getValue(EdgeHashIterator *ehi)
void BLI_jitter_init(float(*jitarr)[2], int num)
BVHTreeOverlap * BLI_bvhtree_overlap(const BVHTree *tree1, const BVHTree *tree2, unsigned int *r_overlap_tot, BVHTree_OverlapCallback callback, void *userdata)
float BLI_bvhtree_get_epsilon(const BVHTree *tree)
int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float pow2f(float x)
MINLINE int poly_to_tri_count(const int poly_count, const int corner_count)
bool is_edge_convex_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
bool isect_tri_tri_v3(const float t_a0[3], const float t_a1[3], const float t_a2[3], const float t_b0[3], const float t_b1[3], const float t_b2[3], float r_i1[3], float r_i2[3])
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_transposed_mat3_m4_v3(const float M[4][4], float r[3])
float mat4_to_scale(const float M[4][4])
void copy_vn_fl(float *array_tar, const int size, const float val)
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
float angle_normalized_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f)
MINLINE void normal_float_to_short_v3(short r[3], const float n[3])
MINLINE float normalize_v3(float r[3])
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void normal_short_to_float_v3(float r[3], const short n[3])
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void clamp_v2(float vec[2], const float min, const float max)
MINLINE void copy_v3_v3_short(short r[3], const short a[3])
MINLINE void negate_v3(float r[3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v3(float r[3])
MINLINE float normalize_v2(float r[2])
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3(float r[3], const float a[3])
void interp_v3_v3v3v3_uv(float p[3], const float v1[3], const float v2[3], const float v3[3], const float uv[2])
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
void(* TaskGraphNodeFreeFunction)(void *task_data)
void BLI_task_graph_edge_create(struct TaskNode *from_node, struct TaskNode *to_node)
bool BLI_task_graph_node_push_work(struct TaskNode *task_node)
struct TaskNode * BLI_task_graph_node_create(struct TaskGraph *task_graph, TaskGraphNodeRunFunction run, void *user_data, TaskGraphNodeFreeFunction free_func)
void BLI_task_graph_work_and_wait(struct TaskGraph *task_graph)
#define POINTER_FROM_INT(i)
#define SHIFT3(type, a, b, c)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define POINTER_AS_INT(i)
#define MAX_CUSTOMDATA_LAYER_NAME
Object is a sort of wrapper for general info.
#define SCE_STATVIS_INTERSECT
#define SCE_STATVIS_THICKNESS
#define SCE_STATVIS_SHARP
#define SCE_STATVIS_DISTORT
@ OB_DRAW_GROUPUSER_ACTIVE
#define SCE_STATVIS_OVERHANG
#define UV_SYNC_SELECTION
#define SCE_SELECT_VERTEX
struct BMFace * EDBM_uv_active_face_get(struct BMEditMesh *em, const bool sloppy, const bool selected)
bool uvedit_edge_select_test_ex(const struct ToolSettings *ts, struct BMLoop *l, const int cd_loop_uv_offset)
bool uvedit_uv_select_test_ex(const struct ToolSettings *ts, struct BMLoop *l, const int cd_loop_uv_offset)
bool uvedit_face_select_test_ex(const struct ToolSettings *ts, struct BMFace *efa, const int cd_loop_uv_offset)
NSNotificationCenter * center
bool GPU_use_hq_normals_workaround(void)
bool GPU_crappy_amd_driver(void)
void GPU_indexbuf_set_point_vert(GPUIndexBufBuilder *builder, uint elem, uint v1)
void GPU_indexbuf_set_point_restart(GPUIndexBufBuilder *builder, uint elem)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
void GPU_indexbuf_add_point_vert(GPUIndexBufBuilder *, uint v)
void GPU_indexbuf_add_line_verts(GPUIndexBufBuilder *, uint v1, uint v2)
void GPU_indexbuf_set_line_verts(GPUIndexBufBuilder *builder, uint elem, uint v1, uint v2)
void GPU_indexbuf_set_tri_verts(GPUIndexBufBuilder *builder, uint elem, uint v1, uint v2, uint v3)
void GPU_indexbuf_set_line_restart(GPUIndexBufBuilder *builder, uint elem)
void GPU_indexbuf_add_line_adj_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3, uint v4)
GPUIndexBuf * GPU_indexbuf_calloc(void)
void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem, GPUIndexBuf *elem_src, uint start, uint length)
void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, GPUIndexBuf *)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
const GPUVertFormat * GPU_vertbuf_get_format(const GPUVertBuf *verts)
void * GPU_vertbuf_steal_data(GPUVertBuf *verts)
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_clear(GPUVertBuf *verts)
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
#define GPU_vertbuf_init_with_format(verts, format)
void * GPU_vertbuf_get_data(const GPUVertBuf *verts)
void GPU_vertbuf_data_len_set(GPUVertBuf *, uint v_len)
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
Group RGB to Bright Vector Camera CLAMP
Utility defines for timing/benchmarks.
Provides wrapper around system-specific atomic primitives, and some extensions (faked-atomic operatio...
ATOMIC_INLINE int32_t atomic_add_and_fetch_int32(int32_t *p, int32_t x)
ATOMIC_INLINE int32_t atomic_sub_and_fetch_int32(int32_t *p, int32_t x)
#define BM_ELEM_CD_GET_FLOAT(ele, offset)
#define BM_ELEM_CD_GET_INT(ele, offset)
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
ATTR_WARN_UNUSED_RESULT BMesh * bm
BMEdge * BM_mesh_active_edge_get(BMesh *bm)
BMVert * BM_mesh_active_vert_get(BMesh *bm)
BMFace * BM_mesh_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected)
void BM_loops_calc_normal_vcos(BMesh *bm, const float(*vcos)[3], const float(*vnos)[3], const float(*fnos)[3], const bool use_split_normals, const float split_angle, float(*r_lnos)[3], MLoopNorSpaceArray *r_lnors_spacearr, short(*clnors_data)[2], const int cd_loop_clnors_offset, const bool do_rebuild)
BMesh Compute Loop Normals from/to external data.
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BLI_INLINE BMFace * BM_face_at_index(BMesh *bm, const int index)
BLI_INLINE BMEdge * BM_edge_at_index(BMesh *bm, const int index)
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
float BM_face_calc_area_uv(const BMFace *f, int cd_loop_uv_offset)
float BM_face_calc_area(const BMFace *f)
float BM_loop_calc_face_normal_safe(const BMLoop *l, float r_normal[3])
bool BM_edge_in_face(const BMEdge *e, const BMFace *f)
float BM_loop_calc_face_normal_safe_vcos(const BMLoop *l, const float normal_fallback[3], float const (*vertexCos)[3], float r_normal[3])
float BM_edge_calc_face_angle_signed(const BMEdge *e)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
__forceinline float extract(const int4 &b)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
MINLINE unsigned short unit_float_to_ushort_clamp(float val)
float BLI_color_from_srgb_table[256]
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > tan(const Rall1d< T, V, S > &arg)
static void area(int d1, int d2, int e1, int e2, float weights[2])
struct Mesh * mesh_eval_final
struct Mesh * mesh_eval_cage
struct BMLoop *(* looptris)[3]
BVHTree_RayCastCallback raycast_callback
const MLoopTri * mlooptri
float const (* polyNos)[3]
const float(* polyCos)[3]
float const (* vertexNos)[3]
const float(* vertexCos)[3]
struct DRW_MeshWeightState weight_state
struct MeshBufferCache::@261 ibo
GPUIndexBuf ** tris_per_mat
GPUIndexBuf * lines_loose
eMRExtractType extract_type
const float(* bm_vert_normals)[3]
const float(* bm_poly_centers)[3]
const float(* bm_poly_normals)[3]
const float(* bm_vert_coords)[3]
const ToolSettings * toolsettings
struct EditMeshData * edit_data
struct BMEditMesh * edit_mesh
struct CustomData pdata ldata
int face_sets_color_default
double PIL_check_seconds_timer(void)
__forceinline ssef high(const avxf &a)
__forceinline const avxi abs(const avxi &a)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)